/* css/index.css - Optimized Light Mode with Subtle Neon Accents */

/* --- 科技風 亮色模式變數 (Light Style with Subtle Neon) --- */
:root {
    --bg-primary: #FFFFFF;      /* Clean White Background */
    --bg-secondary: #F5F5F5;    /* Light Grey for Cards/Sections */
    --text-primary: #1A1A2E;    /* Deep Navy/Black Text */
    --text-secondary: #666688;  /* Subtle dark grey/blue text */
    --accent-main: #00FFFF;     /* Neon Cyan (Primary Highlight) */
    --accent-secondary: #97068b;/* Neon Magenta (Contrast Highlight) */
    --border-color: #DDDDFF;    /* Very light blue/grey border */
    --button-primary: #00CCFF;  /* Bright Cyan Button */
    --button-hover: #0099CC;
    --glow-shadow: 0 0 10px rgba(0, 255, 255, 0.4);
    
    /* 新增現代設計風格變數 */
    --gradient-primary: linear-gradient(135deg, #00CCFF 0%, #2b7cff 100%);
    --gradient-hover: linear-gradient(135deg, #0099CC 0%, #1a56cc 100%);
    --img-border: 1px solid rgba(0, 0, 0, 0.08);
}

/* --- 全域設定 --- */
body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: "Microsoft JhengHei", "Heiti TC", sans-serif; /* Restored original font */
    transition: background-color 0.5s, color 0.5s;
}

/* --- 圖片精緻化全域樣式 --- */
.poster img, 
.news-card img, 
.award-box img, 
.gallery-img img,
.card-thumb img {
    border-radius: 12px !important;
    border: var(--img-border);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease;
}

/* --- 1. 全螢幕主視覺 (Hero Section) --- */
.hero-section {
    width: 100%;
    height: 95vh;
    padding: 0;
    display: flex;
    justify-content: center;
    position: relative;
    margin-bottom: 0;
}

.hero-section .hero-content {
    width: 100%;
    height: 100%;
    position: relative;
    border-radius: 0;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1); /* Softer shadow */
}

/* 圖片設定：強制填滿 */
.hero-section .hero-content img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    filter: brightness(1); /* Normal brightness */
}

/* 遮罩 (輕微的暗色調，讓前景文字更清晰) */
.hero-section .hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.15); /* Very light black overlay */
    z-index: 1;
    pointer-events: none;
}

/* 下滑箭頭動畫 (霓虹風格：使用白色/亮色，添加輕微的發光) */
.scroll-down {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10000;
    cursor: pointer;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: 0.3s;
    animation: bounce 2s infinite;
    color: var(--text-primary); /* 淺色文字 */
    border: 2px solid rgba(26, 26, 46, 0.5); /* 半透明邊框 */
    background: rgba(255, 255, 255, 0.8);
}

.scroll-down:hover {
    color: var(--accent-main);
    border-color: var(--accent-main);
    box-shadow: var(--glow-shadow); /* 輕微霓虹懸浮 */
}

.scroll-down svg {
    width: 48px;
    height: 48px;
    fill: var(--text-primary); 
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-20px);
    }
    60% {
        transform: translateX(-50%) translateY(-10px);
    }
}

@media (max-width: 768px) {
    .hero-section {
        height: 100svh;
    }
    .scroll-down {
        bottom: 80px;
        font-size: 2.5rem;
    }
}

/* --- 2. 跑馬燈 (替換成亮色風格) --- */
.marquee-container {
    width: 100%;
    background-color: #FFFACD; /* 保持原來的淡黃色，但邊框加強 */
    overflow: hidden;
    white-space: nowrap;
    padding: 15px 0;
    border-bottom: 1px solid #E0E0AA;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.marquee-text {
    display: inline-block;
    font-size: 1.6rem;
    font-weight: bold;
    color: #FF0000; /* 改為紅色 */
    padding-left: 100%;
    animation: scroll-left 20s linear infinite;
}

@keyframes scroll-left {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}

/* --- 共用容器設定 (對齊 About 頁面) --- */
.news-section, .activity-review {
    max-width: 1400px;
    width: 92%;
    margin: 120px auto;
    padding: 0 30px;
}

/* --- 3. 最新消息 (海報區) --- */
.news-section h2, .activity-review h2 {
    text-align: center;
    font-size: 2.4rem;
    color: var(--text-primary);
    font-weight: 900;
    margin-bottom: 60px;
    letter-spacing: 2px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* 輕微文字陰影 */
}

.poster-container {
    display: flex;
    justify-content: space-between;
    gap: 50px;
    margin-bottom: 50px;
    flex-wrap: wrap;
}

.poster {
    flex: 1;
    min-width: 300px;
}

.poster img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.12);
    transition: transform 0.3s;
}

.poster img:hover {
    transform: translateY(-8px);
}

/* 按鈕樣式 (漸層精緻化) */
.cta-buttons {
    display: flex;
    justify-content: space-between;
    gap: 40px;
    margin-bottom: 100px;
}

.cta-buttons button {
    flex: 1;
    background: var(--gradient-primary); /* 改為漸層 */
    color: white;
    border: none;
    padding: 15px 0;
    font-size: 1.2rem;
    cursor: pointer;
    border-radius: 12px; /* 統一圓角 */
    font-weight: bold;
    box-shadow: 0 4px 6px rgba(43, 124, 255, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.cta-buttons button:hover {
    background: var(--gradient-hover);
    transform: translateY(-3px); /* 向上浮動 */
    box-shadow: 0 6px 15px rgba(43, 124, 255, 0.4);
}

/* --- 最新消息區 (新聞卡片排版) --- */
.news-grid {
    display: flex;
    justify-content: space-between;
    gap: 40px;
    margin-bottom: 80px;
}

.news-card {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 12px; /* 統一圓角 */
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.news-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.news-card img {
    width: 100%;
    height: auto;
    border-radius: 12px 12px 0 0 !important;
    margin-bottom: 30px;
}

.news-card button {
    width: calc(100% - 40px); /* 兩邊留一點空間，更精緻 */
    margin: 0 auto 20px auto;
    background: var(--gradient-primary); /* 改為漸層 */
    color: white;
    border: none;
    padding: 14px 0;
    font-size: 1.1rem;
    cursor: pointer;
    border-radius: 10px;
    font-weight: bold;
    box-shadow: 0 4px 6px rgba(43, 124, 255, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.news-card button:hover {
    background: var(--gradient-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(43, 124, 255, 0.4);
}

/* --- 4. 榮譽榜 (簡潔科技感) --- */
.awards-container {
    display: flex;
    justify-content: center;
    margin-bottom: 120px;
    width: 90%;
    margin-left: auto;
    margin-right: auto;
    max-width: 1400px;
}

.award-box {
    background-color: var(--bg-secondary); /* 淺灰背景 */
    border: 2px solid var(--accent-main); /* 青色邊框 */
    padding: 60px;
    display: flex;
    align-items: center;
    gap: 80px;
    width: 100%;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

.award-box img {
    width: 280px;
    border-radius: 6px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
    background-color: #fff;
    padding: 8px;
}

.award-text h3 {
    color: var(--accent-main); /* 霓虹青色標題 */
    font-size: 2.2rem;
    font-weight: 900;
    margin-bottom: 25px;
}

.award-text p {
    font-size: 1.7rem;
    color: var(--text-primary);
    font-weight: bold;
    line-height: 1.6;
}

/* --- 5. 活動花絮導覽區塊 --- */

/* 1. 復原外層容器 (移除 flex 相關設定，以免影響下方內容) */
.activity-review {
    margin-top: 60px;
    margin-bottom: 120px;
    text-align: center; /* 保留原本的文字置中即可 */
}

/* 2. 只針對選單本身進行置中 */
.activity-toggle {
    display: flex;            /* 改用 flex */
    width: fit-content;       /* 關鍵：讓選單寬度剛好包住按鈕，不會撐滿整個畫面 */
    margin: 0 auto 60px auto; /* 關鍵：利用 margin: auto 讓這個區塊在畫面上水平置中 */
    justify-content: center;
    align-items: center;
    background-color: transparent; 
    padding: 2px;             /* 避免邊框被切掉的小緩衝 */
    border: none;
}

.toggle-btn {
    font-size: 1.1rem; 
    color: var(--text-primary);
    font-weight: 700;
    cursor: pointer;
    padding: 10px 25px; 
    transition: all 0.3s ease;
    margin: 0 !important;
    position: relative;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    letter-spacing: 1.5px;
    white-space: nowrap;
    
    /* 邊框設定 */
    border: 1px solid #2b7cff; 
    margin-left: -1px !important; /* 讓邊框重疊避免變粗 */
    box-sizing: border-box;    
}

/* 確保第一個按鈕沒有負邊距，才不會往左歪 */
.toggle-btn:first-child {
    margin-left: 0 !important;
}

.toggle-btn:hover {
    background-color: rgba(43, 124, 255, 0.05); 
}

.toggle-btn.active {
    color: #2b7cff;
    background-color: rgba(43, 124, 255, 0.1); 
}

/* 藍色底線：精準對齊文字長度 */
.toggle-btn.active::after {
    content: "";
    position: absolute;
    bottom: 5px;      
    left: 25px;       
    right: 25px;      
    height: 3px;      
    background-color: #2b7cff;
    border-radius: 2px;
}

.gallery-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 50px;
    margin-bottom: 80px;
    padding-bottom: 60px;
    border-bottom: 1px solid var(--border-color);
}

.gallery-text {
    flex: 1;
    text-align: left;
}

.gallery-text h3 {
    color: var(--accent-secondary); /* 使用洋紅標題 */
    font-size: 2rem;
    font-weight: 900;
    margin-bottom: 15px;
}

.gallery-img {
    flex: 1.2;
}

.gallery-img img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 6px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.gallery-item:nth-child(even) {
    flex-direction: row-reverse;
}

@media (max-width: 900px) {
    .news-grid {
        flex-direction: column;
        gap: 40px;
    }

    .news-card {
        width: 100%;
    }

    .award-box {
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }
    .award-box img {
        width: 100%;
        max-width: 250px;
    }

    .gallery-item, .gallery-item:nth-child(even) {
        flex-direction: column-reverse;
        text-align: center;
    }
}

/* --- 卡片式網格設計 (簡潔科技感卡片) --- */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.activity-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.activity-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.card-thumb {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.activity-card:hover .card-thumb img {
    transform: scale(1.05);
}

.card-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.card-tag {
    background-color: var(--accent-main); /* Cyan tag */
    color: var(--bg-primary); /* 深色字 */
    font-size: 0.85rem;
    padding: 4px 10px;
    border-radius: 2px;
    margin-bottom: 12px;
    display: inline-block;
    font-weight: normal;
    box-shadow: 0 0 5px rgba(0, 255, 255, 0.5); /* 霓虹光暈 */
}

.card-title {
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--text-primary);
    margin: 0 0 10px 0;
    line-height: 1.4;
}

.card-desc {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
    height: 4.8rem;
    overflow: hidden;
}

/* --- 卡片內迷你輪播 --- */
.mini-slider {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    border-radius: 8px 8px 0 0;
}

.mini-track {
    display: flex;
    height: 100%;
    width: 100%;
    transition: transform 0.4s ease-in-out;
}

.mini-track img {
    width: 100%;
    min-width: 100%;
    flex-shrink: 0;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* 按鈕樣式 (保持科技感) */
.mini-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.3);
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.mini-prev { left: 10px; }
.mini-next { right: 10px; }
.mini-slider:hover .mini-btn { opacity: 1; }
.mini-btn:hover { background-color: rgba(0, 0, 0, 0.8); }

/* --- 三欄快速連結區塊 --- */
.quick-links-section {
    background: linear-gradient(135deg, #E0FFFF 0%, #F0F8FF 100%); /* 輕柔藍白漸層 */
    padding: 60px 20px;
    margin: 0 0 40px 0;
    border-top: 1px solid var(--border-color);
}

.links-container {
    max-width: 1300px;
    width: 90%;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.links-column h3 {
    color: var(--accent-main); /* 霓虹青色標題 */
    font-size: 1.3rem;
    font-weight: bold;
    margin: 0 0 20px 0;
    padding-bottom: 15px;
    border-bottom: 3px solid var(--accent-main);
    display: inline-block;
}

.links-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.links-column li {
    margin: 12px 0;
}

.links-column .sub-links strong {
    display: block;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.links-column a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.3s ease, text-shadow 0.3s ease;
    display: flex;
    align-items: center;
}

.links-column a::before {
    content: ">";
    margin-right: 12px;
    color: var(--accent-secondary); /* 洋紅色導引符 */
    font-weight: bold;
    font-size: 1.2rem;
}

.links-column a:hover {
    color: var(--accent-main);
    text-shadow: 0 0 5px var(--accent-main);
}

@media (max-width: 1024px) {
    .links-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .links-container {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .quick-links-section {
        padding: 40px 20px;
    }
}

/* --- 顧問資料模態視窗 (淺色化) --- */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4); /* 略深的遮罩 */
}

.modal-content {
    background-color: var(--bg-primary); /* 白色背景 */
    margin: 10% auto;
    padding: 20px;
    border: 1px solid var(--border-color);
    width: 80%;
    max-width: 500px;
    border-radius: 8px;
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.close-btn {
    color: #aaa;
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-btn:hover,
.close-btn:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

/* --- 顧問頁面樣式 --- */
.advisor-list {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 40px;
    overflow-x: auto;
    max-width: 100%;
    margin: 40px auto;
    padding: 0 20px;
}

.advisor-card {
    background: var(--bg-secondary); /* 淺灰背景 */
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
    flex: 0 1 220px;
    box-sizing: border-box;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.advisor-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.advisor-card img {
    border-radius: 50%;
    width: 120px;
    height: 120px;
    object-fit: cover;
    margin-bottom: 15px;
    border: 3px solid var(--accent-main); /* 霓虹青色邊框 */
}

.advisor-info h2 {
    font-size: 1.1rem;
    margin: 0 0 5px;
    color: var(--accent-main);
}

.advisor-info p {
    margin: 0;
    font-size: 1rem;
    color: var(--text-secondary);
}