/* ==========================================================================
   STARTKUP 淡江新創社 - 官方網頁樣式表 (style.css)
   採用現代深色極簡風、玻璃擬態 (Glassmorphism) 與流暢的微動畫
   ========================================================================== */

/* --- 全局設計變數與主題色 --- */
:root {
    --bg-dark: #0f172a;          /* 深藍黑色背景 */
    --bg-card: rgba(30, 41, 59, 0.7); /* 半透明卡片背景 */
    --border-color: rgba(255, 255, 255, 0.08); /* 細緻邊框顏色 */
    --border-hover: rgba(59, 130, 246, 0.4);   /* 懸停邊框顏色 */
    
    /* 漸層主題色 */
    --color-primary: #3b82f6;    /* 科技藍 */
    --color-secondary: #8b5cf6;  /* 活力紫 */
    --color-accent: #10b981;     /* 極光綠 */
    
    /* 文字顏色 */
    --text-main: #f8fafc;        /* 主文字亮白 */
    --text-muted: #94a3b8;       /* 副文字灰藍 */
    
    /* 字體 */
    --font-sans: 'Outfit', 'Noto Sans TC', sans-serif;
    
    /* 動態過渡時間 */
    --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* --- 基礎樣式重設 (Reset) --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth; /* 平滑滾動 */
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-sans);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* --- 全局漸層發光背景效果 --- */
body::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.15) 0%, rgba(15, 23, 42, 0) 70%);
    top: -100px;
    right: -100px;
    z-index: -2;
    pointer-events: none;
}

body::after {
    content: '';
    position: absolute;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.1) 0%, rgba(15, 23, 42, 0) 70%);
    bottom: 20%;
    left: -200px;
    z-index: -2;
    pointer-events: none;
}

/* --- 導覽列 (Navbar) --- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 70px;
    z-index: 100;
    backdrop-filter: blur(12px); /* 磨砂玻璃模糊 */
    -webkit-backdrop-filter: blur(12px);
    background-color: rgba(15, 23, 42, 0.75);
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition-smooth);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 24px;
}

.logo-text {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.logo-text svg {
    transition: transform 0.5s ease;
}

.logo-text:hover svg {
    transform: rotate(90deg); /* 懸停時標誌微旋轉 */
}

/* STARTKUP 導覽列文字標誌 */
.logo-brand {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-style: italic;
    font-size: 1.35rem;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #ffffff 60%, #94a3b8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* 亮橘色 K，配合 Logo 品牌視覺 */
.orange-k {
    color: #f97316;
    -webkit-text-fill-color: #f97316;
}

.nav-links {
    display: flex;
    gap: 32px;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: var(--transition-smooth);
    position: relative;
    padding: 4px 0;
}

.nav-links a:hover {
    color: var(--text-main);
}

/* 導覽列連結下劃線微動畫 */
.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
    transition: var(--transition-smooth);
}

.nav-links a:hover::after {
    width: 100%;
}

/* --- 字體縮放無障礙按鈕組樣式 --- */
.font-resizer {
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    padding: 2px;
    border-radius: 20px;
    margin-left: 8px;
}

.resizer-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-family: var(--font-sans);
    font-size: 0.8rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 16px;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.resizer-btn:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.05);
}

/* 當前選定字體大小狀態 */
.resizer-btn.active {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    color: var(--text-main);
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.3);
}

/* --- 首頁英雄區 (Hero Section) --- */
.hero-section {
    min-height: 100vh;
    padding-top: 120px;
    padding-bottom: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.hero-bg-glow {
    position: absolute;
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.2) 0%, rgba(59, 130, 246, 0) 70%);
    top: 25%;
    left: 50%;
    transform: translate(-50%, -50%);
    filter: blur(40px);
    z-index: -1;
    pointer-events: none;
}

.hero-container {
    max-width: 900px;
    width: 100%;
    margin: 0 auto;
    padding: 0 24px;
    text-align: center;
}

/* 社團 Logo 容器與懸浮動畫 */
.club-logo-container {
    margin-bottom: 24px;
    display: inline-block;
    filter: drop-shadow(0 0 20px rgba(139, 92, 246, 0.3));
    animation: floatAnimation 6s ease-in-out infinite; /* 飄浮動畫 */
}

.main-logo {
    width: 130px;
    height: 130px;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    letter-spacing: 2px;
    margin-bottom: 8px;
}

/* STARTKUP 首頁主標誌文字 */
.logo-brand-main {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-style: italic;
    font-size: 4.5rem !important; /* 特大品牌字體 */
    letter-spacing: -1.5px !important;
    background: linear-gradient(135deg, #ffffff 60%, #94a3b8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-top: 12px;
}

.hero-subtitle {
    font-size: 1.1rem;
    font-weight: 300;
    color: var(--text-muted);
    letter-spacing: 4px;
    text-transform: uppercase;
    margin-bottom: 48px;
}

/* --- 社團宗旨卡片 (Purpose Card) --- */
.purpose-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 40px;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    text-align: center;
    transition: var(--transition-smooth);
}

.purpose-card:hover {
    border-color: rgba(139, 92, 246, 0.2);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
}

.purpose-card h2 {
    font-size: 1.75rem;
    margin-bottom: 16px;
    background: linear-gradient(90deg, #ffffff, var(--color-primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.purpose-text {
    font-size: 1.2rem;
    color: var(--text-main);
    font-weight: 500;
    margin-bottom: 40px;
    letter-spacing: 1px;
}

.purpose-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.purpose-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    padding: 24px;
    transition: var(--transition-smooth);
}

.purpose-item:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-5px);
}

.icon-box {
    font-size: 2rem;
    margin-bottom: 12px;
}

.purpose-item h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-main);
}

.purpose-item p {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* --- 組織架構區 (Structure Section) --- */
.structure-section {
    padding: 100px 24px;
    max-width: 1200px;
    margin: 0 auto;
}

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

.section-header h2 {
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.section-header p {
    color: var(--text-muted);
    font-size: 1rem;
}

.structure-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

/* 決策層居中 (理事長) */
.leader-level {
    margin-bottom: 30px;
    display: flex;
    justify-content: center;
    width: 100%;
}

/* 組織架構實體連接線 */
.struct-connector-line {
    width: 2px;
    height: 40px;
    background: linear-gradient(180deg, var(--color-primary), var(--color-secondary));
    margin: 15px 0;
    position: relative;
}

/* 連接線頭尾的發光小圓點 */
.struct-connector-line::before,
.struct-connector-line::after {
    content: '';
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    left: 50%;
    transform: translateX(-50%);
    box-shadow: 0 0 8px currentColor;
}

.struct-connector-line::before {
    top: 0;
    background-color: var(--color-primary);
    color: var(--color-primary);
}

.struct-connector-line::after {
    bottom: 0;
    background-color: var(--color-secondary);
    color: var(--color-secondary);
}

/* 部門網格 (RWD 佈局 - 調整為對稱的 4 欄) */
.departments-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    width: 100%;
}

/* --- 部門卡片 (Department Cards) --- */
.dept-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 24px 20px;
    text-align: center;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: var(--transition-smooth);
}

/* 卡片發光背景裝飾 */
.dept-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
    opacity: 0;
    transition: var(--transition-smooth);
}

.dept-card:hover {
    transform: translateY(-8px);
    border-color: var(--border-hover);
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.15);
}

.dept-card:hover::before {
    opacity: 1;
}

/* 被選取啟動狀態 */
.dept-card.active {
    border-color: var(--color-primary);
    background-color: rgba(59, 130, 246, 0.1);
    box-shadow: 0 0 25px rgba(59, 130, 246, 0.25);
    transform: scale(1.03);
}

.dept-card.active::before {
    opacity: 1;
    height: 5px;
}

.dept-icon {
    font-size: 2.25rem;
    margin-bottom: 12px;
    transition: transform 0.3s ease;
}

.dept-card:hover .dept-icon {
    transform: scale(1.2) rotate(5deg); /* 懸停時圖示彈性放大 */
}

.dept-card h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--text-main);
}

.dept-tag {
    display: inline-block;
    padding: 2px 10px;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    margin-bottom: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* 各部門特有標籤與光暈配色 */
.tag-leader { background: rgba(59, 130, 246, 0.15); color: #60a5fa; }
.tag-operations { background: rgba(14, 165, 233, 0.15); color: #38bdf8; }
.tag-marketing { background: rgba(34, 197, 94, 0.15); color: #4ade80; }
.tag-competition { background: rgba(234, 179, 8, 0.15); color: #facc15; }
.tag-hrai { background: rgba(239, 68, 68, 0.15); color: #f87171; }
.tag-pmteam { background: rgba(139, 92, 246, 0.15); color: #c084fc; }

/* 每個部門卡片 Active 狀態的專屬發光外框 */
#card-decision.active { border-color: #3b82f6; box-shadow: 0 0 25px rgba(59, 130, 246, 0.25); }
#card-operations.active { border-color: #38bdf8; box-shadow: 0 0 25px rgba(56, 189, 248, 0.25); }
#card-marketing.active { border-color: #4ade80; box-shadow: 0 0 25px rgba(74, 222, 128, 0.25); }
#card-competition.active { border-color: #facc15; box-shadow: 0 0 25px rgba(250, 204, 21, 0.25); }
#card-hrai.active { border-color: #f87171; box-shadow: 0 0 25px rgba(248, 113, 113, 0.25); }
#card-pmteam.active { border-color: #c084fc; box-shadow: 0 0 25px rgba(192, 132, 252, 0.25); }

/* 組員人數標籤樣式 */
.member-tag {
    display: inline-block;
    margin-top: 10px;
    padding: 3px 12px;
    font-size: 0.72rem;
    font-weight: 600;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-muted);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition-smooth);
}

.dept-card:hover .member-tag {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-main);
}

/* 根據不同部門在 hover 時，組員標籤呈現相應的輕微呼吸發光 */
#card-operations:hover .member-tag { background: rgba(56, 189, 248, 0.1); color: #38bdf8; border-color: rgba(56, 189, 248, 0.2); }
#card-marketing:hover .member-tag { background: rgba(74, 222, 128, 0.1); color: #4ade80; border-color: rgba(74, 222, 128, 0.2); }
#card-competition:hover .member-tag { background: rgba(250, 204, 21, 0.1); color: #facc15; border-color: rgba(250, 204, 21, 0.2); }
#card-hrai:hover .member-tag { background: rgba(248, 113, 113, 0.1); color: #f87171; border-color: rgba(248, 113, 113, 0.2); }

.dept-card p {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.4;
}

/* --- 工作職掌詳細看板 (Duties Section) --- */
.duties-section {
    padding: 20px 24px 100px;
    max-width: 900px;
    margin: 0 auto;
}

.duties-container {
    width: 100%;
}

.duties-card {
    background-color: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 24px;
    padding: 40px;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
    position: relative;
    transition: var(--transition-smooth);
}

.duties-card:hover {
    border-color: rgba(59, 130, 246, 0.2);
}

.duties-header {
    display: flex;
    align-items: center;
    gap: 24px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 24px;
    margin-bottom: 28px;
}

.duties-icon-large {
    font-size: 3.5rem;
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 0 15px rgba(255, 255, 255, 0.05);
}

#dept-detail-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.dept-detail-subtitle {
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--color-primary);
}

.duties-body h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
}

.duties-body h3::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 18px;
    background: linear-gradient(180deg, var(--color-primary), var(--color-accent));
    border-radius: 4px;
}

.duties-list {
    list-style: none;
}

.duties-list li {
    font-size: 0.95rem;
    margin-bottom: 14px;
    padding-left: 28px;
    position: relative;
    color: #e2e8f0;
    line-height: 1.6;
}

/* 自訂清單項目精美勾選符號 */
.duties-list li::before {
    content: '✦';
    position: absolute;
    left: 4px;
    top: 0;
    color: var(--color-accent);
    font-size: 0.9rem;
}

/* --- 未來黃金出路視覺設計樣式 --- */
.career-body {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px dashed var(--border-color); /* 精緻虛線分隔 */
}

.career-body h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
}

.career-body h3::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 18px;
    background: linear-gradient(180deg, #f97316, #fb923c); /* 亮橘色漸層，呼應 K 標誌 */
    border-radius: 4px;
}

.career-list {
    list-style: none;
}

.career-list li {
    font-size: 0.95rem;
    margin-bottom: 14px;
    padding-left: 28px;
    position: relative;
    color: #e2e8f0;
    line-height: 1.6;
}

/* 金黃色小星芒，代表黃金未來出路 */
.career-list li::before {
    content: '★';
    position: absolute;
    left: 4px;
    top: 1px;
    color: #fb923c;
    font-size: 0.9rem;
}

/* JS 淡入淡出轉場效果類別 */
.fade-out {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.fade-in {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1), transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

/* --- 頁尾 (Footer) --- */
.footer {
    border-top: 1px solid var(--border-color);
    padding: 40px 24px;
    text-align: center;
    background-color: #0b0f19;
}

.footer p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.footer-sub {
    font-size: 0.75rem !important;
    margin-top: 8px;
    letter-spacing: 1px;
}

/* --- 關鍵畫格動畫 (Keyframe Animations) --- */
@keyframes floatAnimation {
    0% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-12px) rotate(2deg); /* 緩緩飄浮且微傾 */
    }
    100% {
        transform: translateY(0px) rotate(0deg);
    }
}

/* --- 響應式佈局 (Responsive RWD Rulings) --- */

/* 平板尺寸 (992px 以下) */
@media (max-width: 992px) {
    .departments-grid {
        grid-template-columns: repeat(2, 1fr); /* 降為雙欄以完美對稱 */
        gap: 16px;
    }
    .hero-title {
        font-size: 2.75rem;
    }
}

/* 行動裝置尺寸 (768px 以下) */
@media (max-width: 768px) {
    .purpose-grid {
        grid-template-columns: 1fr; /* 宗旨項目改為單欄垂直排列 */
        gap: 16px;
    }
    .departments-grid {
        grid-template-columns: repeat(2, 1fr); /* 降為雙欄 */
    }
    .duties-header {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }
    .duties-card {
        padding: 30px 20px;
    }
}

/* 超小手機尺寸 (576px 以下) */
@media (max-width: 576px) {
    .navbar {
        height: auto;
        padding: 12px 0;
    }
    .nav-container {
        flex-direction: column;
        gap: 8px;
    }
    .nav-links {
        gap: 16px;
    }
    .hero-section {
        padding-top: 140px;
    }
    .hero-title {
        font-size: 2.25rem;
    }
    .departments-grid {
        grid-template-columns: 1fr; /* 全改為單欄 */
    }
    .leader-level {
        width: 100%;
    }
    .dept-card {
        width: 100%;
    }
}
