:root {
    --bg-color: #f8fafc;    
    --card-bg: #ffffff;    
    --text-main: #0f172a;  
    --text-body: #475569;  
    --accent: #2563eb;     
    --border: rgba(0, 0, 0, 0.06);
    --nav-height: 80px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', 'Noto Sans TC', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-body);
    line-height: 1.8;
    overflow-x: hidden;
}

/* 導覽列 */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    height: var(--nav-height);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5%;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    z-index: 2000;
    transition: all 0.4s ease;
}

.nav-title-sticky {
    position: relative; /* 關鍵：改為 relative */
    /* 刪除原本的 left: 50% 和 transform: translateX(-50%) */
    opacity: 0;
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--accent);
    transition: opacity 0.3s ease;
    white-space: nowrap;
    visibility: hidden; /* 初始隱藏，避免佔空間但看不見 */
}

/* 當滾動後顯示 */
nav.scrolled .nav-title-sticky {
    opacity: 1;
    visibility: visible;
}

.logo {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--accent);
    text-decoration: none;
    letter-spacing: -1px;
    z-index: 2100;
}

.nav-external-links {
    display: flex;
    gap: 12px;
    z-index: 2100;
}

.nav-external-links a {
    color: var(--text-main);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 8px 16px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    transition: 0.3s;
}

.nav-external-links a:hover {
    background: var(--accent);
    color: #fff;
}

/* 手機版三橫線按鈕 */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    z-index: 2500;
    padding: 10px;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-main);
    border-radius: 2px;
    transition: 0.3s;
}

/* Hero 區塊 */
.hero-section {
    display: grid;
    grid-template-columns: 1.5fr 0.5fr;
    min-height: 80vh;
    padding: calc(var(--nav-height) + 40px) 5% 60px;
    gap: 40px;
    align-items: center;
}

.hero-image-container {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    aspect-ratio: 16 / 10;
}

.hero-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 40px;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: white;
}

hero-title {
    font-size: 3.5rem;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 10px;
    /* 新增下方兩行 */
    transition: transform 0.1s linear, opacity 0.1s linear;
    transform-origin: top left; 
}
.outline-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.outline-title {
    font-size: 3rem;
    font-weight: 900;
    color: var(--text-main);
    line-height: 1;
    margin-bottom: 20px;
}

.outline-desc {
    font-size: 1.25rem;
    color: var(--text-body);
    max-width: 400px;
}

/* 圖文段落區塊 */
.content-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 100px 24px;
}

.content-section {
    margin-bottom: 150px;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--text-main);
    position: relative;
    display: inline-block;
    padding-bottom: 15px;
}

/* .section-header h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 25%;
    width: 50%;
    height: 4px;
    background: var(--accent);
    border-radius: 2px;
} */

.content-section h3 {
    text-align: center;
    font-size: 1.5rem;
    margin-bottom: 20px;
    /* --- 新增建議 --- */
    max-width: 800px;      /* 限制寬度，讓長句子的換行更漂亮 */
    margin-left: auto;     /* 配合 max-width 達成水平置中 */
    margin-right: auto;    /* 配合 max-width 達成水平置中 */
    line-height: 1.8;      /* 確保行間距舒適 */
    color: var(--text-main);
}

.row {
    display: flex;
    align-items: center;
    gap: 60px;
}

.row.reverse {
    flex-direction: row-reverse;
}

.col-text {
    flex: 1;
}

.col-text p {
    font-size: 1.15rem;
    margin-bottom: 20px;
    color: var(--text-body);
}

.col-image {
    flex: 1;
    margin-bottom: 10px;
}

.col-image img {
    width: 100%;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    transition: transform 0.4s ease;
}

.col-image img:hover {
    transform: scale(1.02);
}

/* 動畫 */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

footer {
    padding: 60px 5%;
    background: #fff;
    border-top: 1px solid var(--border);
    text-align: center;
}

.footer-logo {
    margin-bottom: 1rem;
}

.footer-image {
    max-height: 6rem;
    margin-left: 0.5rem;
    margin-right: 0.5rem;
    box-sizing: border-box;
    vertical-align: middle;
}

/* 響應式 */
@media (max-width: 1024px) {
    .hero-section {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .outline-container { align-items: center; }
    .hero-title { font-size: 2.5rem; }
    .outline-title { font-size: 4rem; }
    .row, .row.reverse {
        flex-direction: column;
        gap: 40px;
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }

    .nav-external-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background: white;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        gap: 30px;
    }

    .nav-external-links.active {
        right: 0;
    }

    .nav-external-links a {
        font-size: 1.5rem;
        border: none;
        background: none;
        padding: 0;
    }

    /* 三橫線變叉叉動畫 */
    .menu-toggle.active span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    .menu-toggle.active span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
}

#nav-links a.active {
    background-color: #2563eb; 
    color: #ffffff;           
    border: 1px solid #2563eb;
    font-weight: 800;
}

/* 1. 基礎卡片增加滑鼠手勢 */
.member-card {
    cursor: pointer;
    transition: transform 0.3s ease;
}

.member-card:hover {
    transform: translateY(-5px); /* 懸停時稍微浮起，暗示可以點擊 */
}

/* 2. 彈出層 (Overlay) 的樣式 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85); /* 背景變暗 */
    display: none; /* 預設隱藏 */
    justify-content: center;
    align-items: center;
    z-index: 9999;
    cursor: zoom-out;
}

/* 3. 彈出的內容動畫 */
.modal-content {
    max-width: 80%;
    max-height: 80%;
    transform: scale(0.5);
    transition: transform 0.3s ease;
}

/* 當 active 時顯示 */
.modal-overlay.active {
    display: flex;
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}
/* --- 語言選擇頁面樣式 --- */
.language-overlay {
    position: fixed; /* 確保覆蓋整個畫面 */
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #0f172a; /* 你的深色主題色 */
    color: white;
    text-align: center;
    z-index: 9999; /* 確保他在最上層，甚至蓋過導覽列 */
}

.lang-box p {
    margin-bottom: 25px;
    color: #cbd5e1;
}

.btn-group {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.lang-choice {
    display: inline-block;
    padding: 12px 30px;
    border: 2px solid var(--accent);
    color: white;
    text-decoration: none;
    font-weight: bold;
    border-radius: 8px;
    transition: 0.3s;
}

.lang-choice:hover {
    background: var(--accent);
    transform: translateY(-3px);
}

.member-grid {
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); 
    gap: 20px;
}

.member-card {
    background: white; 
    padding: 24px; 
    border-radius: 16px; 
    border: 1px solid var(--border);
    transition: 0.3s ease;
    text-align: left;
}

.member-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 20px -5px rgba(0,0,0,0.05);
    border-color: var(--accent);
}

.member-avatar {
    width: 64px; 
    height: 64px; 
    background: #e2e8f0; 
    border-radius: 50%; 
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    font-size: 1.5rem;
}

.member-name {
    color: var(--text-main);
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 4px;
}

.member-role {
    font-size: 0.85rem;
    color: var(--text-body);
    font-weight: 500;
}

.member-image {
    max-width: 100%;
    border-radius: 1rem;
}

/* --- 新的彈出詳情卡片 (Modal Card) 樣式 --- */

/* 1. 彈出層背景 - 保持不變，但確保居中 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7); /* 稍微透明一點，可以看到背景 */
    display: none; /* 預設隱藏 */
    justify-content: center;
    align-items: center;
    z-index: 9999;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* 當 active 時顯示背景 */
.modal-overlay.active {
    display: flex;
    opacity: 1;
}

/* 2. 彈出的卡片容器 */
.modal-card {
    background: #ffffff;
    width: 100%;
    max-width: 800px; /* 最大寬度 */
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    position: relative;
    overflow: hidden; /* 確保圓角裁切 */
    
    /* 入場動畫：縮放 + 淡入 */
    transform: scale(0.9) translateY(20px);
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

/* 當 active 時，卡片動畫到位 */
.modal-overlay.active .modal-card {
    transform: scale(1) translateY(0);
}

/* 3. 關閉按鈕 */
.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0,0,0,0.1);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 24px;
    color: #0f172a;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: background 0.3s;
}

.modal-close:hover {
    background: rgba(0,0,0,0.2);
}

/* 4. 卡片主體排版 (使用 Grid) */
.modal-body {
    display: grid;
    grid-template-columns: 1fr 1.2fr; /* 左側圖片，右側文字 */
}

/* 5. 圖片區塊 */
.modal-image-container {
    width: 100%;
    height: 100%;
    min-height: 400px; /* 確保有一定高度 */
    overflow: hidden;
}

.modal-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* 圖片填滿但不變形 */
}

/* 6. 文字區塊 */
.modal-text-content {
    padding: 60px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.modal-name {
    font-size: 2.5rem;
    font-weight: 900;
    color: #0f172a;
    line-height: 1.1;
    margin-bottom: 8px;
}

.modal-role {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--accent); /* 使用你的主色藍色 */
    margin-bottom: 20px;
}

.modal-divider {
    width: 60px;
    height: 4px;
    background: var(--accent);
    border-radius: 2px;
    margin-bottom: 30px;
}

.modal-desc {
    font-size: 1rem;
    color: var(--text-body);
    line-height: 1.8;
}

/* 手機版響應式排版 */
@media (max-width: 768px) {
    .modal-body {
        grid-template-columns: 1fr; /* 改為單欄排版 */
    }
    
    .modal-image-container {
        min-height: 250px; /* 手機版圖片高度縮小 */
    }
    
    .modal-text-content {
        padding: 40px 30px;
    }
    
    .modal-name {
        font-size: 2rem;
    }
}
