* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
}

/* Header 樣式 */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 2rem;
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

.logo {
    flex: 0 0 auto;
}

.logo img {
    height: 90px;
    padding: 5px;
    width: auto;
    transition: transform 0.3s ease;
}

.logo img:hover {
    transform: scale(1.1);
}

nav {
    display: flex;
    align-items: center;
    gap: 2rem;
}

/* 導航菜單樣式 */
.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin: 0;
    padding: 0;
}

.nav-links li {
    margin-left: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: #333;
    font-weight: bold;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: #007bff;
}

.language-switch {
    margin-left: auto;
}

.language-switch select {
    padding: 0.5rem;
    border-radius: 4px;
    border: 1px solid #ddd;
    background-color: #fff;
    cursor: pointer;
}

/* 漢堡菜單按鈕 */
.hamburger {
    display: none;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background: #333;
    margin: 5px 0;
    transition: 0.3s;
}

/* 主要內容區域 */
main {
    margin-top: 80px;
}

section {
    margin-bottom: 4rem;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeIn 1s ease forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 服務卡片網格 */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.service-card {
    padding: 2rem;
    background: #f8f9fa;
    border-radius: 10px;
    text-align: center;
    transition: transform 0.3s ease;
}

.service-card:hover {
    transform: translateY(-10px);
}

.service-card i {
    font-size: 2.5rem;
    color: #007bff;
    margin-bottom: 1rem;
}

/* Footer 樣式 */
footer {
    background: #333;
    color: #fff;
    text-align: center;
    padding: 1rem;
    position: relative;
    bottom: 0;
    width: 100%;
}

/* Banner Slider 樣式 */
.banner-slider {
    position: relative;
    width: 100%;
    height: 80vh;
    overflow: hidden;
    max-height: calc(100vw / 16 * 9);
}

.slide {
    position: absolute;
    width: 100%;
    height: 100%;
    display: none;
}

.slide.active {
    display: block;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slide-content {
    position: absolute;
    top: 50%;
    left: 15%;
    transform: translateY(-50%);
    text-align: left;
    color: #fff;
    z-index: 2;
    max-width: 600px;
}

.slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1;
}

.main-slogan {
    font-size: 3.5rem;
    font-weight: bold;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    line-height: 1.2;
}

.sub-slogan {
    font-size: 1.8rem;
    margin-bottom: 2rem;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
    line-height: 1.4;
}

.cta-button {
    display: inline-block;
    padding: 1rem 2rem;
    background-color: #007bff;
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    font-size: 1.2rem;
    transition: background-color 0.3s;
}

.cta-button:hover {
    background-color: #0056b3;
}

/* 響應式設計 */
@media (max-width: 768px) {
    .cta-button {
        display: inline-block;
        padding: 0.4rem 0.8rem;
        background-color: #007bff;
        color: #fff;
        text-decoration: none;
        border-radius: 5px;
        font-size: 1rem;
        transition: background-color 0.3s;
    }    
    .hamburger {
        display: block;
    }
    
    .nav-links {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background: #fff;
        flex-direction: column;
        align-items: center;
        padding: 2rem 0;
        transition: left 0.3s ease;
        box-shadow: 2px 0 5px rgba(0,0,0,0.1);
    }

    .nav-links.active {
        left: 0;
    }

    .nav-links li {
        margin: 1rem 0;
    }

    .nav-links a {
        font-size: 1.2rem;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .slide-content {
        left: 10%;
        max-width: 80%;
    }
    
    .main-slogan {
        font-size: 1.5rem;
    }
    
    .sub-slogan {
        font-size: 1.3rem;
    }
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
    box-sizing: border-box;
}

/* 響應式設計 */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
}

#about {
    display: block;  /* 默認為垂直排列 */
}

/* 在平板尺寸以上使用左右排列 */
@media (min-width: 769px) {
    #about {
        display: flex;
        align-items: flex-start;
        gap: 4rem;
    }

    #about h2 {
        flex: 0 0 40%;  /* 固定寬度，不伸縮 */
        margin: 0;
    }

    #about p {
        flex: 1;        /* 佔用剩餘空間 */
        margin-top: 1rem;  /* 頂部間距 */
        padding-right: 2rem;  /* 右側間距 */
    }
}

/* 確保在手機尺寸下保持垂直排列 */
@media (max-width: 768px) {
    #about h2 {
        margin-bottom: 2rem;
    }
}

/* 商會動態樣式 */
#news-events {
    padding: 4rem 0;
}

/* 滑動器容器 */
.events-slider {
    position: relative;
    overflow: hidden;
    margin-top: 2rem;
    padding: 0 60px; /* 為箭頭按鈕預留空間 */
}

.events-grid {
    display: flex;
    transition: transform 0.5s ease;
    gap: 2rem;
    width: 100%;
}

.event-card {
    flex: 0 0 calc(25% - 1.5rem);
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    min-width: 250px; /* 確保最小寬度 */
}

.event-card:hover {
    transform: translateY(-5px);
}

/* 滑動器導航按鈕 */
.slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 123, 255, 0.9);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    font-weight: bold;
    z-index: 10;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.slider-nav:hover {
    background: rgba(0, 123, 255, 1);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.slider-nav.prev {
    left: 10px;
}

.slider-nav.next {
    right: 10px;
}

.slider-nav:disabled {
    background: rgba(108, 117, 125, 0.5);
    cursor: not-allowed;
    transform: translateY(-50%);
}

.slider-nav:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.3);
}

/* 滑動器指示器 */
.slider-indicators {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.slider-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #dee2e6;
    cursor: pointer;
    transition: all 0.3s ease;
}

.slider-dot.active {
    background: #007bff;
    transform: scale(1.2);
}

.slider-dot:hover {
    background: #0056b3;
}

.event-image {
    position: relative;
    width: 100%;
    padding-top: 66.67%; /* 3:2 比例 */
    overflow: hidden;
}

.event-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.event-date {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0,0,0,0.8);
    color: #fff;
    padding: 0.8rem;
    border-radius: 5px;
    text-align: center;
    min-width: 80px;
}

.event-date .year {
    display: block;
    font-size: 0.9rem;
    font-weight: bold;
    margin-bottom: 0.2rem;
    border-bottom: 1px solid rgba(255,255,255,0.3);
    padding-bottom: 0.2rem;
}

.event-date .month {
    display: block;
    font-size: 0.9rem;
    text-transform: uppercase;
    margin: 0.2rem 0;
}

.event-date .day {
    display: block;
    font-size: 1.8rem;
    font-weight: bold;
    line-height: 1;
}

.event-content {
    padding: 1.5rem;
}

.event-content h3 {
    margin: 0 0 0.5rem;
    font-size: 1.2rem;
    color: #333;
}

.event-description {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.event-link {
    color: #007bff;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.9rem;
}

.event-link:hover {
    background: #0056b3;
    transform: translateX(5px);
}

/* 新增的活動狀態和類型樣式 */
.event-status {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: bold;
    text-transform: uppercase;
    z-index: 3;
}

.event-status.status-completed {
    background: rgba(40, 167, 69, 0.9);
    color: white;
}

.event-status.status-ongoing {
    background: rgba(220, 53, 69, 0.9);
    color: white;
}

.event-status.status-upcoming {
    background: rgba(255, 193, 7, 0.9);
    color: #333;
}

.event-status.status-planning {
    background: rgba(108, 117, 125, 0.9);
    color: white;
}

.event-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
    align-items: center;
}

.event-type {
    background: #e9ecef;
    color: #495057;
    padding: 2px 8px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 500;
}

.event-location {
    color: #6c757d;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 2px;
}

.event-duration {
    font-size: 0.85rem;
    color: #6c757d;
    margin: 8px 0;
    padding: 8px;
    background: #f8f9fa;
    border-radius: 4px;
    border-left: 3px solid #007bff;
}

.date-range {
    font-size: 0.8rem;
    color: #666;
    margin-left: 2px;
}

/* 狀態相關的卡片樣式 */
.event-card.status-completed {
    border-left: 4px solid #28a745;
}

.event-card.status-ongoing {
    border-left: 4px solid #dc3545;
}

.event-card.status-upcoming {
    border-left: 4px solid #ffc107;
}

.event-card.status-planning {
    border-left: 4px solid #6c757d;
}

/* 響應式調整 */
@media (max-width: 1200px) {
    .event-card {
        flex: 0 0 calc(33.333% - 1.33rem);
        min-width: 280px;
    }
    
    .events-slider {
        padding: 0 50px;
    }
}

@media (max-width: 992px) {
    .event-card {
        flex: 0 0 calc(50% - 1rem);
        min-width: 300px;
    }
    
    .events-slider {
        padding: 0 45px;
    }
    
    .slider-nav {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
}

@media (max-width: 768px) {
    .event-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .event-status {
        position: static;
        margin-bottom: 8px;
        align-self: flex-end;
    }
    
    .event-duration {
        font-size: 0.8rem;
        padding: 6px;
    }
    
    .events-slider {
        padding: 0 40px;
    }
}

@media (max-width: 576px) {
    .event-card {
        flex: 0 0 calc(100% - 0rem);
        min-width: 250px;
    }
    
    .events-grid {
        gap: 1rem;
    }
    
    .events-slider {
        padding: 0 35px;
    }
    
    .slider-nav.prev {
        left: 5px;
    }
    
    .slider-nav.next {
        right: 5px;
    }
    
    .slider-nav {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
}

/* 強制確保滑動器布局 */
.events-slider .events-grid {
    display: flex !important;
    flex-wrap: nowrap !important;
}

.events-slider .event-card {
    flex-shrink: 0 !important;
}

/* 活動新聞頁面特定樣式 */
#news-banner {
    margin-top: 80px;
}

#news-list {
    padding: 4rem 0;
}

.nav-links .active {
    color: #007bff;
}

/* 新聞卡片特定樣式 */
#news-list .event-card .event-content h3 {
    font-size: 1.3rem;
    line-height: 1.4;
    margin-bottom: 1rem;
}

#news-list .event-description {
    height: 60px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

/* 新聞列表樣式 */
.news-list-grid {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-top: 2rem;
}

.news-list-item {
    display: flex;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.news-list-item:hover {
    transform: translateX(10px);
}

.news-list-item .event-image {
    flex: 0 0 300px;
    position: relative;
    padding-top: 0;
    height: 220px;
}

.news-list-item .event-content {
    flex: 1;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.news-list-item .event-content h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.news-list-item .event-description {
    height: auto;
    margin-bottom: 1.5rem;
}

/* 響應式設計 */
@media (max-width: 768px) {
    .news-list-item {
        flex-direction: column;
    }

    .news-list-item .event-image {
        flex: 0 0 200px;
        width: 100%;
    }

    .news-list-item:hover {
        transform: translateY(-5px);
    }
} 