@charset "UTF-8";

/* =========================================
   1. 變數與基礎設定 (Variables & Reset)
   ========================================= */
:root {
    /* 核心色系：奶茶/大地色調 */
    --bg-color: #fdfbf7;       /* 背景：溫暖米白 */
    --text-main: #5d4037;      /* 主文字：深咖啡 */
    --text-light: #8d6e63;     /* 次文字：淺可可 */
    --link-color: #a1887f;     /* 連結/強調：焦糖色 */
    
    /* 導覽列 */
    --nav-bg: rgba(235, 225, 215, 0.95);
    --nav-text: #4e342e;
    
    /* 裝飾與背景 */
    --accent-light: #efebe9;   /* 淺奶茶 (原本的 --milk-tea-light / --accent-bg) */
    --accent-dark: #d7ccc8;    /* 深奶茶 (原本的 --milk-tea-dark) */
    --card-bg: #fff;
    
    --gap: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
    transition: opacity 0.3s, color 0.3s;
}

a:hover {
    opacity: 0.8;
    color: var(--link-color);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* =========================================
   2. 共用元件 (Header, Footer, Container)
   ========================================= */

/* --- 導覽列 (Navbar) --- */

/* 外層容器：固定在頂部 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    height: 48px;
    background-color: var(--nav-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 9999;
    box-shadow: 0 1px 3px rgba(93, 64, 55, 0.1);
    display: flex;
    justify-content: center;
}

/* 內部容器：控制最大寬度與排列 */
.navbar nav {
    width: 100%;
    max-width: 1000px;
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    position: relative; /* 為了讓手機版下拉選單定位參考用 */
}

/* 1. Logo 品牌名稱 */
.navbar nav a.nav-brand {
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--nav-text);
    z-index: 1001; /* 確保 Logo 永遠在最上層，不會被選單遮住 */
    margin-right: auto; /* 確保 Logo 靠左，其他東西推到右邊 */
}

/* 2. 連結群組 (電腦版設定) */
.nav-links {
    display: flex;
    align-items: center;
    
    /* ★ 新增這三行來修復排版 */
    flex: 1;                       /* 讓這一包連結佔據剩下所有的寬度 */
    justify-content: space-evenly; /*讓裡面的連結平均分散 (置中展開) */
    margin-left: 40px;             /* 讓連結群組跟 Logo 保持一點距離 */
}

/* 連結樣式 */
.navbar nav a {
    color: var(--nav-text);
    font-size: 14px;
    font-weight: 500;
    padding: 0 10px;
    white-space: nowrap;
}

/* 3. 漢堡選單機制 (Checkbox Hack) */

/* 核心開關：隱藏 Checkbox */
.nav-checkbox {
    display: none;
}

/* 漢堡按鈕：預設隱藏 (電腦版不顯示) */
.menu-btn {
    display: none; 
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
    z-index: 1001; /* 確保按鈕在最上層 */
}

/* 漢堡線條樣式 */
.menu-btn .bar {
    width: 25px;
    height: 3px;
    background-color: var(--nav-text);
    border-radius: 2px;
    transition: 0.3s;
}

/* --- 手機版 RWD 設定 (Max-width: 768px) --- */
@media (max-width: 768px) {
    
    /* 顯示漢堡按鈕 */
    .menu-btn {
        display: flex;
    }

    /* 隱藏/修改連結群組樣式 */
    .nav-links {
        position: absolute;
        top: 48px; /* Navbar 的高度，讓選單剛好接在下方 */
        left: 0;
        width: 100%;
        background-color: var(--nav-bg);
        
        /* 排版改為垂直 */
        flex-direction: column;
        align-items: center;
        gap: 0; /* 移除間距，改用 padding */
        
        /* 隱藏狀態 */
        max-height: 0;
        overflow: hidden;
        
        /* 動畫與裝飾 */
        transition: max-height 0.4s ease-out;
        box-shadow: 0 4px 6px rgba(0,0,0,0.1);
        border-top: 1px solid rgba(0,0,0,0.05);
    }

    /* 手機版連結樣式調整 */
    .nav-links a {
        padding: 15px 0;
        width: 100%;
        text-align: center;
        border-bottom: 1px solid rgba(0,0,0,0.05);
        font-size: 16px; /* 手機版字體稍微大一點比較好按 */
    }

    /* ★ 關鍵功能：當 Checkbox 被勾選時，展開選單 */
    .nav-checkbox:checked ~ .nav-links {
        max-height: 400px; /* 足夠放下所有連結的高度 */
    }
}

/* --- 其他共用元件 (Container, Main-content, Header) --- */
/* 這部分保持原本的設定，沒有變動 */

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

.main-content {
    padding-top: 60px; /* 48px header + gap */
    min-height: 80vh;
}

.page-header {
    margin-bottom: 40px;
    border-bottom: 1px solid var(--accent-dark);
    padding-bottom: 20px;
    text-align: center;
}
.page-header h1 {
    font-size: 2rem;
    color: var(--text-main);
}
.back-link {
    display: inline-block;
    margin-bottom: 10px;
    font-size: 0.9rem;
    color: var(--text-light);
}

/* --- Footer 區域 (Apple 結構 + CSS 變數應用) --- */

footer {
    background-color: var(--accent-light); /* 使用淺奶茶色作為背景 */
    color: var(--text-main);               /* 主要文字顏色 */
    font-size: 12px;
    line-height: 1.5;
    padding: 40px 0 20px;
    width: 100%;
}

.footer-content {
    max-width: 980px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 導覽網格系統 */
.footer-nav-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    padding-bottom: 20px;
    /* 使用深奶茶色作為分隔線 */
    border-bottom: 1px solid var(--accent-dark); 
    margin-bottom: 15px;
}

.footer-col h3 {
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 10px;
    /* 使用導覽列深色文字，加強標題層次 */
    color: var(--nav-text); 
}

.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-col li {
    margin-bottom: 8px;
}

.footer-col a {
    text-decoration: none;
    color: var(--text-main); /* 連結預設使用主文字色 */
    transition: color 0.2s;
}

.footer-col a:hover {
    color: var(--link-color); /* 滑鼠懸停時變成焦糖色 */
    text-decoration: underline;
}

/* 底部版權與連結區 */
.footer-legal {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    /* 使用次文字色 (淺可可)，讓版權宣告較為低調 */
    color: var(--text-light); 
}

.copyright .region-badge {
    margin-left: 10px;
    padding-left: 10px;
    border-left: 1px solid var(--accent-dark);
}

.legal-links a {
    color: var(--text-main); /* 底部連結使用主色，確保可讀性 */
    text-decoration: none;
    margin-left: 10px;
}

.legal-links a:hover {
    color: var(--link-color);
    text-decoration: underline;
}

.legal-links .divider {
    margin: 0 5px;
    color: var(--accent-dark);
}

/* 手機版響應式調整 */
@media (max-width: 768px) {
    .footer-nav-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-legal {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
}

/* =========================================
   3. 首頁專用樣式 (Index Page)
   ========================================= */
.hero {
    position: relative;
    height: 90vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    background-color: #4e342e;
    color: #fff;
    padding-top: 48px;
    overflow: hidden;
}
.hero-bg {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    opacity: 0.5;
    filter: sepia(0.2) contrast(0.9);
    z-index: 1;
}
.hero-content {
    position: relative;
    z-index: 2;
    padding: 20px;
}
.hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}
.cta-links {
    display: flex;
    gap: 20px;
    justify-content: center;
    font-size: 1.1rem;
    color: var(--accent-dark);
}
.cta-links a:hover {
    text-decoration: underline;
    color: #fff;
}

/* 卡片網格 */
.grid-container {
    max-width: 1400px;
    margin: 12px auto;
    padding: 0 12px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--gap);
}
.card {
    background-color: var(--card-bg);
    height: 500px;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 50px;
    text-align: center;
    overflow: hidden;
    border-radius: 4px;
    transition: transform 0.3s ease;
}
.card:hover { transform: translateY(-2px); }
.card h2 { font-size: 2.5rem; margin-bottom: 5px; color: var(--text-main); }
.card p { font-size: 1.2rem; margin-bottom:  5px; color: var(--text-light); }
.card-img {
    margin-top: auto;
    width: 100%; height: 70%;
    object-fit: cover;
    filter: sepia(0.1);
}
.card.full-width {
    grid-column: 1 / -1;
    height: 600px;
    background-color: var(--accent-light);
}
.card.dark {
    background-color: var(--accent-dark);
}
.card.dark h2 { color: #3e2723; }

/* RWD for Index */
@media (max-width: 768px) {
    .hero h1 { font-size: 2.5rem; }
    .grid-container { grid-template-columns: 1fr; }
    .card, .card.full-width { height: 400px; }
}

/* =========================================
   4. 團隊頁面專用樣式 (Team Page)
   ========================================= */
.doctor-card {
    background: var(--card-bg);
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(93, 64, 55, 0.08);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    margin-bottom: 30px;
}
.doctor-img-box {
    background-color: var(--accent-light);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}
.doctor-photo {
    width: 200px; height: 200px;
    object-fit: cover;
    object-position: top;
    border-radius: 50%;
    border: 5px solid #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.doctor-info { padding: 30px; flex: 1; }
.doctor-title {
    color: var(--link-color);
    font-size: 1rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.doctor-name {
    font-size: 2rem;
    margin: 5px 0 20px 0;
    border-bottom: 2px solid var(--accent-light);
    padding-bottom: 10px;
    display: inline-block;
}
.section-title {
    font-size: 1.1rem;
    font-weight: bold;
    margin-top: 20px;
    margin-bottom: 10px;
    background-color: var(--accent-light);
    padding: 5px 10px;
    border-radius: 4px;
    display: inline-block;
}
.doctor-info ul { list-style: none; padding-left: 0; }
.doctor-info ul li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 8px;
    color: #555;
}
.doctor-info ul li::before {
    content: "•";
    color: var(--link-color);
    position: absolute;
    left: 0; font-weight: bold;
}

@media (min-width: 768px) {
    .doctor-card { flex-direction: row; align-items: stretch; }
    .doctor-img-box { flex: 0 0 300px; }
}

/* =========================================
   5. 關於頁面專用樣式 (About Page)
   ========================================= */
.about-container {
    max-width: 800px;
    margin: 0 auto;
    background: var(--card-bg);
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(93, 64, 55, 0.05);
    text-align: center;
}
.logo-img {
    max-width: 120px;
    border-radius: 50%;
    margin-bottom: 10px;
}
.quote {
    font-style: italic;
    border-left: 4px solid var(--link-color);
    background-color: var(--accent-light);
    padding: 20px;
    margin: 30px 0;
    border-radius: 0 8px 8px 0;
    text-align: left;
}
.core-values {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    text-align: left;
    margin-top: 40px;
}
.value-card {
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 25px 20px;
    text-align: center;
    transition: transform 0.3s ease;
    background-color: #fff;
}
.value-card:hover {
    transform: translateY(-5px);
    border-color: var(--link-color);
    box-shadow: 0 5px 15px rgba(93, 64, 55, 0.1);
}
.icon {
    font-size: 2.5em;
    margin-bottom: 15px;
    display: block;
}

@media (min-width: 600px) {
    .core-values { grid-template-columns: 1fr 1fr 1fr; }
}

/* =========================================
   6. 聯絡我們區塊 (Contact Section) - 新增
   ========================================= */
.contact-section {
    background-color: var(--bg-color);
    padding: 60px 0;
    border-top: 1px solid var(--accent-dark);
    scroll-margin-top: 60px; /* 讓點擊導覽列連結時，不會被 header 擋住標題 */
}

.section-header {
    text-align: center;
    margin-bottom: 40px;
}
.section-header h2 {
    font-size: 2rem;
    color: var(--text-main);
    margin-bottom: 10px;
}
.section-header p {
    color: var(--text-light);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr; /* 左右各一半 */
    gap: 40px;
    background: #fff;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(93, 64, 55, 0.05);
}

.contact-info h3 {
    color: var(--link-color);
    margin-bottom: 15px;
    font-size: 1.2rem;
    font-weight: bold;
}

.info-item {
    margin-bottom: 30px;
    border-bottom: 1px solid #eee; /* 增加一點分隔線 */
    padding-bottom: 20px;
}
.info-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.hours-table {
    width: 100%;
    border-collapse: collapse;
    color: #555;
    font-size: 0.95rem;
}
.hours-table th, .hours-table td {
    text-align: left;
    padding: 5px 0;
    vertical-align: top;
}
.hours-table th {
    width: 100px;
    font-weight: normal;
    color: var(--text-light);
}

.map-container {
    min-height: 300px;
    background-color: var(--accent-light);
    border-radius: 8px;
    overflow: hidden;
}

/* 手機版 RWD：變成垂直排列 */
@media (max-width: 768px) {
    .contact-grid {
        grid-template-columns: 1fr;
        padding: 20px;
        gap: 20px;
    }
    .map-container {
        height: 250px;
        order: -1; /* 讓地圖在手機版跑到上面去，比較顯眼（可選） */
    }
}

/* =========================================
   7. 新聞列表與文章內頁 (News & Articles)
   ========================================= */

/* --- 新聞列表頁 (News List) --- */
.news-list {
    display: flex;
    flex-direction: column;
    gap: 30px;
    max-width: 800px;
    margin: 0 auto;
}

.news-item {
    display: flex;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(93, 64, 55, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
    color: inherit;
}

.news-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(93, 64, 55, 0.1);
}

.news-thumb {
    width: 200px;
    height: auto;
    object-fit: cover;
    background-color: var(--accent-light);
}

.news-content {
    padding: 25px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.news-date {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 8px;
}

.news-title {
    font-size: 1.4rem;
    color: var(--text-main);
    margin-bottom: 10px;
    font-weight: bold;
}

.news-excerpt {
    font-size: 1rem;
    color: #555;
    line-height: 1.6;
    margin-bottom: 15px;
}

.read-more {
    color: var(--link-color);
    font-weight: bold;
    font-size: 0.9rem;
}

/* 手機版 RWD：新聞列表垂直排列 */
@media (max-width: 600px) {
    .news-item {
        flex-direction: column;
    }
    .news-thumb {
        width: 100%;
        height: 180px;
    }
}

/* --- 文章內頁 (Article Detail) --- */
.article-container {
    max-width: 800px;
    margin: 0 auto;
    background: #fff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(93, 64, 55, 0.05);
}

.article-meta {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.article-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #333;
}

.article-content p {
    margin-bottom: 20px;
}

.article-content h2 {
    color: var(--text-main);
    margin-top: 30px;
    margin-bottom: 15px;
    font-size: 1.5rem;
}

