/* =====================================================
   帝寶產後護理之家 — 全站樣式
   設計原則:溫暖柔和、行動優先、無外部框架
   ===================================================== */
:root {
    --c-primary: #e56a9a;      /* 主色:溫柔粉 */
    --c-primary-dark: #c94f80;
    --c-accent: #f7b7cd;
    --c-cream: #fdf6f0;
    --c-text: #4a3f42;
    --c-text-light: #8a7d81;
    --c-white: #ffffff;
    --c-border: #f0dde3;
    --shadow: 0 4px 20px rgba(201, 79, 128, .10);
    --radius: 14px;
    --maxw: 1200px;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", -apple-system, sans-serif;
    color: var(--c-text);
    background: var(--c-white);
    line-height: 1.8;
    font-size: 16px;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--c-primary-dark); text-decoration: none; }
a:hover { color: var(--c-primary); }
ul, ol { list-style-position: inside; }

.skip-link {
    position: absolute; left: -9999px; top: 0;
    background: var(--c-primary); color: #fff; padding: 8px 16px; z-index: 999;
}
.skip-link:focus { left: 0; color: #fff; }

/* ---------- Header ---------- */
.site-header {
    position: sticky; top: 0; z-index: 100;
    background: rgba(255, 255, 255, .97);
    border-bottom: 1px solid var(--c-border);
    backdrop-filter: blur(8px);
}
.header-inner {
    max-width: var(--maxw); margin: 0 auto; padding: 10px 16px;
    display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
}
.site-logo img { width: 180px; height: auto; }
.header-cta { display: flex; gap: 10px; margin-left: auto; }
.btn-tel, .btn-line {
    display: inline-block; padding: 8px 18px; border-radius: 24px;
    font-weight: 700; font-size: 15px; white-space: nowrap;
}
.btn-tel { background: var(--c-primary); color: #fff; }
.btn-tel:hover { background: var(--c-primary-dark); color: #fff; }
.btn-line { background: #06c755; color: #fff; }
.btn-line:hover { background: #05a648; color: #fff; }

.menu-toggle {
    display: none; background: none; border: 2px solid var(--c-primary);
    color: var(--c-primary); font-size: 20px; border-radius: 8px;
    padding: 4px 12px; cursor: pointer;
}

.main-nav { width: 100%; }
.main-nav > ul { display: flex; justify-content: center; gap: 4px; list-style: none; flex-wrap: wrap; }
.main-nav li { position: relative; }
.main-nav a {
    display: block; padding: 10px 18px; color: var(--c-text);
    font-weight: 500; border-radius: 8px;
}
.main-nav li.active > a, .main-nav a:hover { color: var(--c-primary-dark); background: var(--c-cream); }
.sub-menu {
    display: none; position: absolute; left: 0; top: 100%;
    background: #fff; min-width: 190px; box-shadow: var(--shadow);
    border-radius: 10px; padding: 6px; list-style: none; z-index: 50;
}
.main-nav li:hover > .sub-menu, .main-nav li:focus-within > .sub-menu { display: block; }
.sub-menu a { padding: 9px 14px; font-size: 15px; }

/* ---------- Hero / 版頭 ---------- */
.page-hero {
    position: relative; background: linear-gradient(135deg, var(--c-cream), #fce8ef);
    text-align: center; padding: 46px 16px 30px;
}
.page-hero h1 { font-size: 32px; color: var(--c-primary-dark); letter-spacing: 2px; }
.page-hero .hero-sub { color: var(--c-text-light); margin-top: 6px; font-size: 16px; }
.page-hero img.hero-img {
    max-width: var(--maxw); margin: 22px auto 0; border-radius: var(--radius);
    box-shadow: var(--shadow); width: 100%; object-fit: cover; max-height: 420px;
}

/* 首頁輪播 */
.home-slider { position: relative; overflow: hidden; }
.home-slider .slide { display: none; position: relative; }
.home-slider .slide.on { display: block; }
.home-slider .slide img { width: 100%; max-height: 560px; object-fit: cover; }
.slide-caption {
    position: absolute; bottom: 8%; left: 6%; right: 6%;
    color: #fff; text-shadow: 0 2px 10px rgba(0,0,0,.55);
    font-size: 20px; max-width: 640px;
}
.slide-caption h3 { font-size: 28px; }
.slider-dots { position: absolute; bottom: 14px; left: 0; right: 0; text-align: center; }
.slider-dots button {
    width: 12px; height: 12px; border-radius: 50%; border: none; margin: 0 5px;
    background: rgba(255,255,255,.55); cursor: pointer;
}
.slider-dots button.on { background: var(--c-primary); }

/* ---------- 版面 ---------- */
main { display: block; }
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 16px; }
.section { padding: 52px 0; }
.section-alt { background: var(--c-cream); }
.section-title { text-align: center; font-size: 28px; color: var(--c-primary-dark); margin-bottom: 8px; }
.section-sub { text-align: center; color: var(--c-text-light); margin-bottom: 34px; }

.breadcrumb { max-width: var(--maxw); margin: 0 auto; padding: 12px 16px; font-size: 14px; }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 4px; }
.breadcrumb li + li::before { content: "›"; margin: 0 6px; color: var(--c-text-light); }
.breadcrumb li[aria-current] { color: var(--c-text-light); }

/* 卡片網格 */
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
    background: #fff; border-radius: var(--radius); overflow: hidden;
    box-shadow: var(--shadow); transition: transform .25s;
    display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-5px); }
.card img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.card .card-body { padding: 18px 20px 22px; flex: 1; }
.card h2, .card h3 { font-size: 19px; color: var(--c-primary-dark); margin-bottom: 8px; }
.card p { font-size: 15px; color: var(--c-text-light); }
.card .btn-more { display: inline-block; margin-top: 12px; font-weight: 700; font-size: 15px; }

/* 內文區 */
.content-body { max-width: 860px; margin: 0 auto; font-size: 17px; }
.content-body h2 { color: var(--c-primary-dark); font-size: 24px; margin: 34px 0 14px; }
.content-body h3 { color: var(--c-primary-dark); font-size: 20px; margin: 26px 0 10px; }
.content-body p { margin-bottom: 14px; }
.content-body ul, .content-body ol { margin: 0 0 16px 8px; }
.content-body li { margin-bottom: 6px; }
.content-body img { border-radius: var(--radius); margin: 18px auto; }
.content-body iframe { width: 100%; min-height: 380px; border: 0; border-radius: var(--radius); margin: 18px 0; }
.content-body table { width: 100%; border-collapse: collapse; margin: 18px 0; }
.content-body th, .content-body td { border: 1px solid var(--c-border); padding: 10px 12px; text-align: left; }
.content-body th { background: var(--c-cream); }

/* 相簿 */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.gallery img { border-radius: 10px; aspect-ratio: 4/3; object-fit: cover; width: 100%; cursor: zoom-in; }

/* ---------- FAQ(AEO 核心區塊) ---------- */
.faq-section { max-width: 860px; margin: 0 auto; padding: 40px 16px; }
.faq-section > h2 { text-align: center; font-size: 26px; color: var(--c-primary-dark); margin-bottom: 26px; }
.faq-item {
    background: #fff; border: 1px solid var(--c-border);
    border-radius: 12px; margin-bottom: 12px; overflow: hidden;
}
.faq-item summary {
    padding: 16px 20px; cursor: pointer; font-weight: 700;
    list-style: none; position: relative; padding-right: 44px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
    content: "+"; position: absolute; right: 18px; top: 50%;
    transform: translateY(-50%); font-size: 22px; color: var(--c-primary);
}
.faq-item[open] summary::after { content: "−"; }
.faq-item summary h3 { display: inline; font-size: 17px; color: var(--c-text); }
.faq-answer { padding: 0 20px 18px; color: var(--c-text-light); }

/* CTA 帶 */
.cta-band {
    background: linear-gradient(120deg, var(--c-primary), var(--c-primary-dark));
    color: #fff; text-align: center; padding: 44px 16px;
}
.cta-band h2 { font-size: 26px; margin-bottom: 8px; }
.cta-band p { opacity: .92; margin-bottom: 18px; }
.cta-band .btn-tel, .cta-band .btn-line { font-size: 17px; padding: 12px 30px; margin: 0 6px; }
.cta-band .btn-tel { background: #fff; color: var(--c-primary-dark); }

/* 消息列表 */
.news-list { max-width: 860px; margin: 0 auto; }
.news-item {
    display: flex; gap: 20px; padding: 20px; background: #fff;
    border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 18px;
}
.news-item img { width: 200px; aspect-ratio: 4/3; object-fit: cover; border-radius: 10px; flex-shrink: 0; }
.news-item h2 { font-size: 19px; margin-bottom: 6px; }
.news-item h2 a { color: var(--c-text); }
.news-item h2 a:hover { color: var(--c-primary-dark); }
.news-item time { font-size: 14px; color: var(--c-text-light); }
.news-item p { font-size: 15px; color: var(--c-text-light); margin-top: 6px; }
.cat-tabs { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin-bottom: 30px; }
.cat-tabs a { padding: 8px 20px; border-radius: 22px; background: #fff; border: 1px solid var(--c-border); font-size: 15px; }
.cat-tabs a.on { background: var(--c-primary); color: #fff; border-color: var(--c-primary); }

/* 文章目錄 TOC */
.toc {
    background: var(--c-cream); border: 1px solid var(--c-border);
    border-radius: var(--radius); padding: 16px 24px; margin: 24px 0;
}
.toc summary.toc-title {
    font-weight: 700; color: var(--c-primary-dark); font-size: 17px;
    cursor: pointer; list-style: none; position: relative; padding-right: 30px;
}
.toc summary.toc-title::-webkit-details-marker { display: none; }
.toc summary.toc-title::after {
    content: "−"; position: absolute; right: 4px; top: 0;
    color: var(--c-primary); font-size: 20px;
}
.toc details:not([open]) summary.toc-title::after { content: "+"; }
.toc ol { list-style: none; counter-reset: toc; margin-top: 12px; }
.toc li { margin-bottom: 6px; font-size: 15px; }
.toc li:not(.toc-sub) { counter-increment: toc; }
.toc li:not(.toc-sub)::before { content: counter(toc) ". "; color: var(--c-primary); font-weight: 700; }
.toc li.toc-sub { padding-left: 26px; }
.toc li.toc-sub::before { content: "· "; color: var(--c-accent); font-weight: 700; }
.toc a { color: var(--c-text); }
.toc a:hover { color: var(--c-primary-dark); }
html { scroll-padding-top: 130px; }  /* 錨點跳轉時避開黏性導覽列 */

/* 內文自動內部連結 */
.content-body a.auto-link {
    color: var(--c-primary-dark); font-weight: 600;
    border-bottom: 1px dashed var(--c-accent); text-decoration: none;
}
.content-body a.auto-link:hover { border-bottom-style: solid; }

/* 文章頁 */
.article-page { max-width: 820px; margin: 0 auto; padding: 0 16px; }
.article-page h1 { font-size: 30px; color: var(--c-primary-dark); line-height: 1.5; margin: 24px 0 10px; }
.article-meta { color: var(--c-text-light); font-size: 14px; margin-bottom: 24px; }

/* 分頁導覽 */
.pagination { margin: 36px 0 8px; }
.pagination ul { list-style: none; display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.pagination a, .pagination .current {
    display: inline-block; min-width: 40px; padding: 8px 14px; text-align: center;
    border-radius: 22px; border: 1px solid var(--c-border); background: #fff;
    color: var(--c-text); font-size: 15px;
}
.pagination a:hover { border-color: var(--c-primary); color: var(--c-primary-dark); }
.pagination .current { background: var(--c-primary); border-color: var(--c-primary); color: #fff; font-weight: 700; }
.pagination .ellipsis { padding: 8px 2px; color: var(--c-text-light); }

/* ---------- Footer ---------- */
.site-footer { background: #3f3236; color: #e9dee2; margin-top: 60px; }
.footer-inner {
    max-width: var(--maxw); margin: 0 auto; padding: 48px 16px 30px;
    display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 36px;
}
.footer-heading { font-size: 18px; color: #fff; margin-bottom: 14px; }
.footer-nap p { margin-bottom: 6px; font-style: normal; font-size: 15px; }
.footer-nap a { color: var(--c-accent); }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 8px; }
.footer-links a { color: #e9dee2; font-size: 15px; }
.footer-links a:hover { color: var(--c-accent); }
.footer-social { margin-top: 14px; display: flex; gap: 14px; }
.footer-social a { color: var(--c-accent); font-weight: 700; }
.footer-copy { border-top: 1px solid #574a4e; text-align: center; padding: 16px; font-size: 14px; color: #b5a7ac; }

/* ---------- RWD ---------- */
@media (max-width: 900px) {
    .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .footer-inner { grid-template-columns: 1fr 1fr; }
    .gallery { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
    .menu-toggle { display: block; margin-left: 8px; }
    .main-nav { display: none; }
    .main-nav.open { display: block; }
    .main-nav > ul { flex-direction: column; }
    .sub-menu { position: static; display: block; box-shadow: none; padding-left: 22px; }
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .footer-inner { grid-template-columns: 1fr; }
    .news-item { flex-direction: column; }
    .news-item img { width: 100%; }
    .page-hero h1 { font-size: 25px; }
    .header-cta { margin-left: 0; }
    .site-logo img { width: 150px; }
    .slide-caption { font-size: 13px; line-height: 1.5; bottom: 12%; }
    .slide-caption h3 { font-size: 17px; }
    .home-slider .slide img { min-height: 300px; }
}

/* ============ 專業照護團隊(care_team) ============ */
.team-list { display: flex; flex-direction: column; gap: 26px; max-width: 980px; margin: 12px auto 0; }
.team-card {
    display: grid; grid-template-columns: 300px 1fr; gap: 28px;
    background: var(--c-white); border: 1px solid var(--c-border);
    border-radius: var(--radius); box-shadow: var(--shadow);
    padding: 26px; align-items: start;
}
.team-card:nth-child(even) { grid-template-columns: 1fr 300px; }
.team-card:nth-child(even) .team-photo { order: 2; }
.team-photo img {
    width: 100%; aspect-ratio: 1/1; object-fit: cover;
    border-radius: var(--radius); display: block;
}
.team-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
    padding-bottom: 12px; margin-bottom: 6px; border-bottom: 2px solid var(--c-accent); }
.team-role {
    background: var(--c-primary); color: #fff; font-size: 14px; font-weight: 700;
    padding: 4px 14px; border-radius: 999px; white-space: nowrap;
}
.team-name { font-size: 26px; color: var(--c-primary-dark); margin: 0; letter-spacing: 2px; }
.team-block { margin-top: 14px; }
.team-block h4 {
    font-size: 15px; color: var(--c-primary-dark); margin: 0 0 6px;
    position: relative; padding-left: 12px;
}
.team-block h4::before {
    content: ""; position: absolute; left: 0; top: 4px; bottom: 4px; width: 4px;
    background: var(--c-primary); border-radius: 2px;
}
.team-block ul { margin: 0 0 0 4px; padding: 0; list-style: none; }
.team-block li {
    font-size: 15px; color: var(--c-text); line-height: 1.7; padding-left: 16px; position: relative;
}
.team-block li::before { content: "・"; position: absolute; left: 0; color: var(--c-accent); }
.team-current li { color: var(--c-primary-dark); font-weight: 600; }

@media (max-width: 720px) {
    .team-card, .team-card:nth-child(even) { grid-template-columns: 1fr; gap: 18px; padding: 20px; }
    .team-card:nth-child(even) .team-photo { order: 0; }
    .team-photo img { max-width: 260px; margin: 0 auto; aspect-ratio: 1/1; }
    .team-name { font-size: 23px; }
}
