@charset "UTF-8";
/* =========================================
   寧好診所 全站專屬樣式表 (style.css)
   ========================================= */

/* --- 1. 全站共用顏色變數 --- */
:root {
    --primary-color: #2c3e50;    /* 深灰藍：專業、穩重 */
    --accent-color: #80652f;     /* 深金色：保留品牌感並符合文字對比 */
    --accent-hover: #6c5427;
    --line-color: #087a3b;
    --line-hover: #066430;
    --secondary-color: #f8f9fa;  /* 淺灰背景：舒適、乾淨 */
    --biotech-grid: radial-gradient(circle, rgba(234, 234, 234, 0.4) 1px, transparent 1px);
}

/* --- 2. 基礎設定 --- */
html, body {
    overflow-x: hidden;
    width: 100%;
}
body {
    font-family: "Microsoft JhengHei", "PingFang TC", "Helvetica Neue", sans-serif;
    color: #333;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
}

.skip-link {
    position: fixed;
    top: 8px;
    left: 8px;
    z-index: 2000;
    padding: 10px 16px;
    color: #fff;
    background: var(--primary-color);
    border-radius: 8px;
    transform: translateY(-150%);
    transition: transform 0.2s ease;
}

.skip-link:focus {
    color: #fff;
    transform: translateY(0);
}

a:focus-visible,
button:focus-visible {
    outline: 3px solid #0b69c7;
    outline-offset: 3px;
}

/* --- 3. 頂部導覽列 (Navbar) --- */
.navbar-brand {
    font-weight: 700;
    color: var(--primary-color) !important;
}
.nav-link {
    color: var(--primary-color) !important;
    font-weight: 500;
    transition: color 0.3s ease;
}
.nav-link:hover {
    color: var(--accent-color) !important;
}
.nav-link.active {
    color: var(--accent-color) !important;
    font-weight: 700;
}

/* --- 4. 共用按鈕設計 --- */
/* 金標按鈕 (搭配 Bootstrap .btn 使用) */
.btn-gold {
    background-color: var(--accent-color);
    color: #fff !important;
    border: none;
    font-weight: 600;
    transition: all 0.3s ease;
}
.btn-gold:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(108, 84, 39, 0.28);
}

/* LINE 綠色按鈕 (獨立樣式) */
.btn-line {
    background-color: var(--line-color);
    color: #fff !important;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50px;
    transition: all 0.3s ease;
    padding: 10px 25px; /* 預設內距 */
}
.btn-line:hover {
    background-color: var(--line-hover);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(6, 100, 48, 0.3);
}

/* 自訂空心深藍按鈕 (地圖導航專用) */
.btn-outline-custom {
    color: var(--primary-color) !important;
    border: 2px solid var(--primary-color);
    background-color: transparent;
    transition: all 0.3s ease;
}

.btn-outline-custom:hover {
    background-color: var(--primary-color);
    color: #fff !important;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(26, 43, 60, 0.2);
}

/* 懸浮在右下角的 LINE 按鈕 */
.floating-line {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
    padding: 12px 25px;
    box-shadow: 0 8px 25px rgba(6, 100, 48, 0.32);
}

/* --- 5. 標題與版面區塊 --- */
.section-padding {
    padding: 80px 0;
}
.section-title {
    font-weight: 700;
    color: var(--primary-color);
}
/* 標題下方的裝飾短金線 */
.section-title::after {
    content: "";
    display: block;
    width: 50px;
    height: 3px;
    background: var(--accent-color);
    margin: 15px auto 0;
    border-radius: 2px;
}

/* 首頁：主視覺區背景 (微科技網格) */
.hero-section {
    background-color: #fff;
    padding: 80px 0;
    background-image: var(--biotech-grid);
    background-size: 30px 30px;
}

/* --- 6. 各式卡片懸浮動畫特效 --- */
/* 首頁：特色卡片 */
.feature-card {
    border: 1px solid #eaeaea;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}
.feature-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.08) !important;
    border-color: var(--accent-color) !important;
}

/* 首頁：診療項目卡片 */
.service-card {
    border: 1px solid #eaeaea; /* 讓卡片平時就擁有淡淡的高級灰邊框 */
    padding: 1.5rem;
    border-radius: 1rem;
    transition: all 0.3s ease;
}
.service-card:hover {
    background-color: var(--secondary-color);
    border-color: var(--accent-color); /* 滑鼠移入時，邊框變成低調金，呼應網站主題 */
}

/* 醫師介紹頁：社群追蹤卡片 */
.social-card {
    transition: all 0.3s ease;
    border: 1px solid #eaeaea;
}
.social-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.08) !important;
    border-color: var(--accent-color) !important;
}

/* 衛教專欄頁：精選文章大卡片 */
.featured-card {
    border: 0;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
    height: 100%;
}
.featured-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

/* --- 7. 衛教專欄 (Blog) 專屬列表樣式 --- */
.category-title {
    position: relative;
    padding-left: 15px;
    margin-bottom: 1.5rem;
}
.category-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: 5px;
    bottom: 5px;
    width: 5px;
    background-color: var(--accent-color);
    border-radius: 10px;
}
.article-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px dashed #dee2e6;
    text-decoration: none;
    color: #4a5568;
    transition: all 0.2s ease;
}
.article-list-item:hover {
    color: var(--accent-color);
    padding-left: 10px;
}

/* --- 8. 頁尾 (Footer) 動畫特效 --- */
.footer-link {
    transition: all 0.3s ease;
}
.footer-link:hover {
    color: var(--accent-color) !important;
    padding-left: 5px;
}
.footer-social {
    transition: color 0.3s ease;
}
.footer-social:hover {
    color: var(--accent-color) !important;
}

footer .text-white-50 {
    color: rgba(255, 255, 255, 0.76) !important;
}

.article-content {
    max-width: 72ch;
    margin-inline: auto;
}

.medical-notice {
    color: #495057;
    background: #f4f6f8;
    border-left: 4px solid var(--accent-color);
}

.max-w-900 {
    max-width: 900px;
}

#clinicEnvironmentCarousel .carousel-item img {
    height: 500px;
    object-fit: cover;
}

@media (max-width: 767.98px) {
    #clinicEnvironmentCarousel .carousel-item img {
        height: auto !important;
    }

    body {
        padding-bottom: 76px;
    }

    .hero-section,
    .section-padding {
        padding-top: 56px;
        padding-bottom: 56px;
    }

    .floating-line {
        right: 16px;
        bottom: max(16px, env(safe-area-inset-bottom));
        width: 56px;
        height: 56px;
        padding: 0;
        font-size: 0;
        border-radius: 50%;
    }

    .floating-line .bi {
        margin: 0 !important;
        font-size: 1.35rem;
    }

    .navbar-nav .nav-item.ms-3 {
        margin-left: 0 !important;
        margin-top: 8px;
    }

    .navbar-nav .btn {
        width: 100%;
    }
/* --- 門診時間表 (Schedule Table) 響應式優化 --- */
.table-responsive {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}
.table-responsive::-webkit-scrollbar {
    display: none;  /* Chrome, Safari and Opera */
}

@media (max-width: 767.98px) {
    .table-responsive table {
        font-size: 0.8rem !important;
        table-layout: fixed;
        width: 100% !important;
        min-width: unset !important;
    }
    
    .table-responsive th, 
    .table-responsive td {
        padding: 8px 2px !important;
        vertical-align: middle;
    }
    
    /* 設定時段列寬度佔 25%，其他 6 天各佔 12.5% */
    .table-responsive th[scope="row"],
    .table-responsive thead th:first-child {
        width: 25% !important;
    }
    .table-responsive thead th:not(:first-child),
    .table-responsive td {
        width: 12.5% !important;
    }

    /* 時段內時間文字縮小與間距調整 */
    .table-responsive th span {
        font-size: 0.65rem !important;
        display: block;
        margin-top: 2px;
        line-height: 1.2;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}

/* --- 9. 常見問題 (FAQ Accordion) 美化樣式 --- */
.faq-accordion .accordion-item {
    border: 1px solid #eaeaea;
    border-radius: 12px !important;
    margin-bottom: 16px;
    overflow: hidden;
    background-color: #ffffff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
    transition: all 0.3s ease;
}

.faq-accordion .accordion-item:hover {
    border-color: #d1d5db;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.faq-accordion .accordion-button {
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--primary-color);
    background-color: #ffffff;
    padding: 1.25rem 1.5rem;
    border-radius: 12px !important;
}

.faq-accordion .accordion-button:not(.collapsed) {
    color: var(--accent-color);
    background-color: var(--secondary-color);
    box-shadow: none;
}

.faq-accordion .accordion-button:focus {
    box-shadow: none;
    border-color: rgba(0, 0, 0, 0.1);
}

.faq-accordion .accordion-body {
    padding: 1.25rem 1.5rem;
    font-size: 1rem;
    line-height: 1.8;
    color: #4a5568;
    background-color: #ffffff;
    border-top: 1px solid #f0f0f0;
}

/* --- 10. 延伸閱讀與精選專欄 (Topic Cluster Cards) --- */
.topic-article-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #eaeaea;
    border-radius: 16px;
    overflow: hidden;
    height: 100%;
    background: #ffffff;
}

.topic-article-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08) !important;
    border-color: #d1d5db;
}

.recommend-article-link {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border: 1px solid #eaeaea;
    border-radius: 12px;
    margin-bottom: 10px;
    text-decoration: none;
    color: var(--primary-color);
    background: #ffffff;
    transition: all 0.2s ease;
    font-weight: 500;
}

.recommend-article-link:hover {
    background-color: var(--secondary-color);
    color: var(--accent-color);
    border-color: var(--accent-color);
    transform: translateX(4px);
}

