/* assets/css/global.css */

/* 1. 變數設定 (保留你的原始配色) */
:root {
    --primary-color: #2980B9;
    --primary-text-color: #1A5276; 
    --secondary-color: #3498DB;
    --accent-color: #8E43AD;
    --background-color: #ffffff;
    --light-gray-bg: #f4f5f7;
    --text-color: #172b4d;
    --light-text-color: #5e6c84;
    --border-color: #dfe1e6;
    --white-color: #ffffff;
    --success-color: var(--accent-color);
    --heading-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --body-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* 2. 基礎重置 */
body {
    margin: 0;
    font-family: var(--body-font);
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    width: 90%;
    max-width: 1100px;
    margin: 0 auto;
}

a {
    text-decoration: none;
    color: inherit;
}

/* 3. 通用按鈕樣式 (Header 和 Hero 都會用到) */
.btn {
    padding: 10px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 1px solid transparent;
    cursor: pointer;
    font-size: 0.95em;
    display: inline-block;
}

.btn-primary {
    color: var(--white-color);
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* 4. Header 導航列樣式 */
.main-header {
    background: var(--background-color);
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: box-shadow 0.3s ease;
}

.main-header.scrolled {
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    text-decoration: none;
}

/* 5. Footer 頁尾樣式 */
.main-footer {
    background-color: #091E42;
    color: #B3BAC5;
    padding: 60px 0 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1.5fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h4 {
    color: var(--white-color);
    font-size: 1.1em;
    margin-bottom: 15px;
    margin-top: 0;
}

.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-col li {
    margin-bottom: 10px;
}

.footer-col a {
    color: #B3BAC5;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-col a:hover {
    color: var(--white-color);
}

.footer-bottom {
    border-top: 1px solid #2C3E5D;
    padding-top: 30px;
    text-align: center;
    font-size: 0.9em;
}

/* 6. Header/Footer 的 RWD 設定 */
@media (max-width: 992px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }
}

/* --- Header & Navigation 樣式 --- */

.nav-container {
    display: flex;
    justify-content: space-between; /* 左右撐開，中間置中 */
    align-items: center;
    height: 80px; /* 固定 Header 高度 */
}

/* Logo 微調 */
.logo {
    text-decoration: none;
    flex-shrink: 0; /* 防止 Logo 被壓縮 */
}

/* 中間導航選單 (site-nav) */
.site-nav {
    flex-grow: 1; /* 佔據中間剩餘空間 */
    display: flex;
    justify-content: center; /* 內容置中 */
}

.site-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 30px; /* 選單項目之間的間距 */
}

.site-nav ul li a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    font-size: 1rem;
    transition: color 0.3s;
}

.site-nav ul li a:hover {
    color: var(--primary-color); /* 滑鼠懸停變色 */
}

/* 右側按鈕區 */
.nav-buttons {
    display: flex;
    align-items: center;
    gap: 20px; /* Login 和 Sign Up 按鈕的間距 */
    flex-shrink: 0;
}

/* Login 連結樣式 */
.nav-link-login {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-link-login:hover {
    color: var(--primary-color);
}

/* RWD 手機版調整 (簡單版：螢幕太小時隱藏中間選單) */
@media (max-width: 768px) {
    .site-nav {
        display: none; /* 手機版暫時隱藏選單，通常這裡會改成漢堡選單 */
    }
    
    .nav-buttons .nav-link-login {
        display: none; /* 手機版空間不夠時，也可以選擇隱藏 Login 文字 */
    }
}