/* 全域設定 */
* {
    margin: 0; padding: 0; box-sizing: border-box;
    font-family: 'Noto Sans TC', -apple-system, sans-serif;
    html {
    scroll-behavior: smooth;
}
}

:root {
    --primary: #330062;
    --accent: #9D50BB;
    --gold: #D4AF37;
    --bg-gray: #F4F4F9;
    --white: #ffffff;
}

body { background-color: var(--bg-gray); color: #333; line-height: 1.6; }

/* Navbar */
.navbar {
    background: var(--primary); color: var(--white);
    display: flex; justify-content: space-between; align-items: center;
    padding: 1rem 8%; position: sticky; top: 0; z-index: 1000;
}
.logo { font-size: 1.4rem; font-weight: 800; letter-spacing: 1px; }
.nav-links { display: flex; list-style: none; gap: 2rem; }
.nav-links a { color: var(--white); text-decoration: none; font-weight: 500; transition: 0.3s; }
.nav-links a:hover { color: var(--gold); }

/* 確保 Logo 連結看起來不像普通連結 */
.logo a {
    text-decoration: none;    /* 移除底線 */
    color: inherit;           /* 繼承父元素 (.logo) 的顏色，即金色或白色 */
    display: inline-block;
    transition: 0.3s ease;    /* 增加微小的過渡效果 */
}

.logo a:hover {
    opacity: 0.8;             /* 滑鼠移上去時稍微變淡，讓用戶知道可以點擊 */
    transform: scale(1.02);   /* 輕微放大效果，增加互動感 */
}

/* Hero Section */
.hero-section { padding: 80px 8%; background: #fff; }
.hero-content {
    display: grid; grid-template-columns: 1.2fr 0.8fr;
    max-width: 1200px; margin: 0 auto; gap: 60px; align-items: center;
}
.tag { color: var(--accent); font-weight: bold; letter-spacing: 2px; font-size: 1.5rem; }
h1 { font-size: 1.3rem; color: var(--primary); margin: 10px 0; line-height: 1.2; }
.subtitle { color: var(--gold); font-weight: bold; margin-bottom: 20px; }

.event-details {
    margin: 20px 0; padding-left: 15px; border-left: 4px solid var(--accent);
}
.detail-item { margin-bottom: 8px; font-weight: 500; color: #555; }
.detail-item i { width: 25px; color: var(--accent); }

.divider { height: 1px; background: #eee; margin: 40px 0; width: 80%; }

/* Buttons */
.btn-primary {
    display: inline-block; background: #25D366; color: white;
    padding: 12px 30px; text-decoration: none; border-radius: 50px;
    font-weight: bold; transition: 0.3s; box-shadow: 0 4px 15px rgba(37,211,102,0.3);
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 6px 20px rgba(37,211,102,0.4); }

/* Poster Side */
.fixed-poster {
    width: 100%; border-radius: 20px; box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

/* Section Intro 樣式 */
.section-intro {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 50px; /* 標題與卡片之間的間距 */
    padding: 0 20px;
}

.section-intro h1 {
    font-size: 1.5rem;
    color: var(--accent);
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.section-intro p {
    font-size: 1.1rem;
    color: #666;
    line-height: 1.6;
}

/* 標題下方的裝飾線 */
.title-underline {
    width: 250px;
    height: 4px;
    background: var(--accent);
    margin: 20px auto 0;
    border-radius: 2px;
}

/* Course Section 容器微調 */
.course-section {
    padding: 100px 8%; /* 增加上下留白，更有呼吸感 */
    background-color: #fff; /* 或者 var(--bg-gray) */
}

/* 卡片標籤微調 */
.course-info .tag {
    display: inline-block;
    background: #f0e6f5;
    color: var(--accent);
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    margin-bottom: 10px;
}

/* 手機版 RWD 調整 */
@media (max-width: 768px) {
    .section-intro h1 {
        font-size: 1.8rem;
    }
    .section-intro p {
        font-size: 1rem;
    }
    .course-section {
        padding: 60px 5%;
    }
}

/* Course Grid */
.course-section { padding: 60px 8%; }
.course-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px; max-width: 1200px; margin: 0 auto;
}
.course-card {
    background: white; border-radius: 15px; overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05); transition: 0.3s;
}
.course-card:hover { transform: translateY(-10px); }
.course-img-box img { width: 100%; height: 250px; object-fit: cover; }
.course-info { padding: 25px; }
.course-info h3 { color: var(--primary); margin-bottom: 10px; }
.course-link { color: red; font-weight: bold; text-decoration: none; font-size: 1.2rem; }

/* Gallery */
.gallery-container { padding: 80px 8%; text-align: center; }
.gif-wrapper {
    max-width: 800px; margin: 40px auto; aspect-ratio: 4 / 3;
    border-radius: 20px; overflow: hidden; border: 10px solid white;
    box-shadow: 0 20px 50px rgba(0,0,0,0.1);
}
.activity-gif { width: 100%; height: 100%; object-fit: cover; }

/* Footer */
.footer { background: var(--primary); color: white; padding: 40px 8% 20px; text-align: center; }
.footer-info { margin-bottom: 20px; }
.copyright { color: rgba(255,255,255,0.5); font-size: 0.8rem; margin-top: 30px; }

/* RWD 手機版關鍵修正 */
@media (max-width: 992px) {
    .hero-content { grid-template-columns: 1fr; text-align: center; }
    .poster-side { order: -1; } /* 圖片移到頂部 */
    .event-details { border-left: none; border-top: 2px solid var(--accent); padding: 15px 0; }
    .divider { width: 100%; }
}

@media (max-width: 768px) {
    .navbar { padding: 1rem 5%; }
    .menu-icon { display: block; }
    .nav-links {
        display: none; position: absolute; top: 100%; left: 0; width: 100%;
        background: var(--primary); flex-direction: column; padding: 20px;
    }
    .nav-links.active { display: flex; }
    h1 { font-size: 1.3rem; }
}
