:root {
  --brown: #614839;
  --accent: #a97e63;
  --text: #393939;
  --muted: #7a7a7a;
  --max: 1400px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { margin: 0; font: 400 16px/1.7 "Noto Sans TC", sans-serif; color: var(--text); background: #fff; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { font-weight: 400; margin: 0 0 .6em; line-height: 1.35; }
p { margin: 0 0 1em; }
.wrap { max-width: var(--max); margin: 0 auto; padding-left: 24px; padding-right: 24px; }
.center { text-align: center; }

/* 公告列（取代舊站 Popups 外掛） */
.notice { background: var(--accent); color: #fff; text-align: center; padding: 10px 16px; font-size: 15px; }

/* 頁首 */
.header { position: sticky; top: 0; z-index: 10; background: var(--brown); display: flex; align-items: center; justify-content: space-between; padding: 0 32px; height: 74px; }
.logo img { height: 40px; width: auto; }
.nav { display: flex; gap: 32px; }
.nav a { color: rgba(255,255,255,.75); text-decoration: none; font-size: 15px; font-weight: 500; }
.nav a:hover, .nav a.on { color: #fff; }
.nav-toggle, .burger { display: none; }

/* 首頁大圖 */
.hero { position: relative; min-height: 640px; background: center/cover no-repeat; color: #fff; display: flex; align-items: flex-end; }
.hero::before { content: ""; position: absolute; inset: 0; background: rgba(40,30,24,.6); }
.hero-inner { position: relative; width: 100%; padding-bottom: 60px; }
.hero h1 { font-size: clamp(32px, 5vw, 64px); max-width: 820px; font-weight: 500; }
.hero p { max-width: 640px; font-size: 14px; }
.hero-contact { min-height: 520px; align-items: center; }
.hero-contact::before { background: rgba(0,0,0,.15); }
.hero-contact h1 { font-size: clamp(32px, 4vw, 48px); }
.eyebrow { font-size: 12px; letter-spacing: 1px; text-transform: uppercase; margin: 0 0 8px; }
.eyebrow.dark { color: var(--muted); }

/* 鏤空大字（舊站各區塊背景標題） */
/* 先描邊再填白（paint-order），蓋掉中文字形內部重疊的輪廓線，只留外框 */
.ghost { font-family: "Playfair Display", "Noto Sans TC", serif; font-weight: 700; font-size: clamp(48px, 7vw, 80px); line-height: 1; color: #fff; -webkit-text-stroke: 2px var(--accent); paint-order: stroke fill; opacity: .6; margin-bottom: -.45em; user-select: none; }
.ghost-hero { color: transparent; -webkit-text-stroke: 1px rgba(255,255,255,.7); font-weight: 400; font-size: clamp(64px, 11vw, 150px); margin-bottom: 0; opacity: .8; }
.ghost-solid { margin-bottom: 0; opacity: 1; }
.title { font-size: clamp(24px, 3vw, 36px); position: relative; }
.title.narrow { max-width: 760px; margin-left: auto; margin-right: auto; }
section { padding-top: 90px; }

.about { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.about-text p { font-size: 14px; }
.line-quote { border-left: 1px solid var(--accent); margin: 24px 0; padding: 0 0 0 28px; font-size: 14px; }
.sign strong { font-size: 18px; }
.sign { font-size: 13px; }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; text-align: center; }
.stats b { display: block; font: 700 44px/1.2 "Playfair Display", serif; color: var(--accent); }
.stats span { display: block; font-size: 18px; }
.stats small { color: var(--muted); }

.band { height: 190px; margin-top: 90px; background: center/cover no-repeat; filter: grayscale(.4) brightness(.8); }

.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px 0; padding-top: 60px; }
.card { position: relative; min-height: 480px; padding: 64px 40px 40px; background: center/cover no-repeat; font-size: 13px; isolation: isolate; }
.card::before { content: ""; position: absolute; inset: 0; z-index: -1; }
.card.warm::before { background: rgba(214,186,166,.85); }
.card.cool::before { background: rgba(180,188,195,.85); }
.card h3 { font-size: 20px; margin-bottom: 1.4em; }

.news-head { display: grid; grid-template-columns: 1.3fr 1fr; gap: 60px; align-items: center; }
.news-head > p { font-size: 13px; }
.trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 60px; text-align: center; }
.trio img { aspect-ratio: 4/3; object-fit: cover; width: 100%; }
.trio h3 { font-size: 20px; font-weight: 500; margin-top: 24px; }
.trio p { font-size: 13px; color: var(--muted); }

.divider { width: 1px; height: 60px; background: var(--accent); margin: 60px auto 0; }

/* 醫師人數決定欄數：1 位橫式（照片左、簡介右），2 位平分，3 位以上每列 3 位 */
.team { display: grid; grid-template-columns: repeat(auto-fit, minmax(calc((100% - 64px) / 3), 1fr)); gap: 32px; align-items: start; }
.doctor { font-size: 13px; }
.doctor img { width: 100%; aspect-ratio: 1; object-fit: cover; margin-bottom: 20px; }
.doctor:only-child { display: grid; grid-template-columns: minmax(0, 1fr) 2fr; gap: 32px; align-items: center; }
.doctor:only-child img { margin-bottom: 0; }
.doctor h3 { font-size: 20px; margin: 0 0 .3em; }
.muted-strong { font-weight: 500; }

.testimonial { display: grid; grid-template-columns: 1fr 140px 1fr; gap: 24px; align-items: center; }
.testimonial .t-avatar { aspect-ratio: 4/5; object-fit: cover; }
.t-text { font-size: 13px; border-left: 1px solid var(--accent); padding-left: 24px; }
.t-text p { margin-bottom: .8em; }
.quote-mark { font: 700 64px/0.6 "Playfair Display", serif; color: var(--accent); height: 30px; }
.t-author { font-family: "Playfair Display", serif; font-size: 16px; }

.faq { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: start; }
.faq .line-quote p { font-size: 14px; }
.signoff::before { content: ""; display: inline-block; width: 40px; height: 1px; background: var(--text); vertical-align: middle; margin-right: 12px; }
.signoff { font-size: 14px; }
.accordion details { border-bottom: 1px solid #eee; }
.accordion summary { cursor: pointer; list-style: none; padding: 18px 24px; font-size: 18px; font-weight: 500; display: flex; justify-content: space-between; gap: 16px; }
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after { content: "▾"; color: var(--accent); }
.accordion details[open] { background: var(--accent); color: #fff; box-shadow: 0 10px 30px rgba(0,0,0,.2); }
.accordion details[open] summary::after { content: "▴"; color: #fff; }
.accordion details p { padding: 0 24px; font-size: 13px; }
.accordion details p:last-child { padding-bottom: 18px; }

.contact { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; padding-bottom: 90px; }
.contact > div p { font-size: 13px; }
.map { width: 100%; height: 300px; border: 0; display: block; }

/* 聯繫我們頁 */
.boxes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; text-align: center; padding-bottom: 60px; }
.box { text-decoration: none; }
.box .fa { width: auto; height: 40px; fill: var(--accent); }
.box h3 { font-size: 15px; font-weight: 700; color: var(--accent); margin: 12px 0 18px; }
.box p { font-size: 13px; font-style: italic; color: var(--muted); }
.boxes + .map { height: 360px; }
.contact-about { display: grid; grid-template-columns: 1fr 1fr; align-items: center; padding-top: 0; }
.wrap-left { padding: 60px 48px; max-width: 600px; justify-self: end; }
.contact-about img { width: 100%; height: 100%; object-fit: cover; }
.brown { color: var(--accent); font-size: 28px; }
.italic { font-style: italic; color: var(--muted); }
.pill .fa { height: .9em; width: auto; fill: currentColor; vertical-align: -1px; margin-left: 10px; }
.pill { display: inline-block; border: 1.5px solid var(--brown); border-radius: 30px; padding: 8px 28px; text-decoration: none; font-size: 14px; color: var(--brown); letter-spacing: 1px; }

/* 頁尾 */
.footer { background: #000; color: #aaa; font-size: 13px; margin-top: 0; padding-top: 50px; }
.footer-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 60px; }
.footer h3 { color: #ccc; font-size: 16px; margin-bottom: 1.4em; }
.footer-logo { height: 40px; width: auto; margin-bottom: 20px; }
.svc-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 24px; }
.social { display: flex; gap: 16px; }
.social .fa { width: auto; height: 15px; fill: #ccc; }
.tel { color: #1bb0ce; font-weight: 700; text-decoration: none; }
.copy { border-top: 1px solid #222; text-align: center; padding: 20px 16px; margin: 30px 0 0; }

/* 手機版 */
@media (max-width: 900px) {
  .header { padding: 0 16px; height: 64px; }
  .burger { display: block; width: 28px; height: 20px; position: relative; cursor: pointer; }
  .burger span, .burger::before, .burger::after { content: ""; position: absolute; left: 0; right: 0; height: 2px; background: #fff; }
  .burger::before { top: 0; } .burger span { top: 9px; } .burger::after { bottom: 0; }
  .nav { display: none; position: absolute; top: 64px; left: 0; right: 0; background: var(--brown); flex-direction: column; gap: 0; padding: 8px 16px 16px; }
  .nav a { padding: 10px 0; }
  .nav-toggle:checked ~ .nav { display: flex; }
  .wrap { padding-left: 16px; padding-right: 16px; }
  section { padding-top: 60px; }
  .hero { min-height: 480px; }
  .about, .news-head, .faq, .contact, .contact-about, .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .stats, .trio, .boxes { grid-template-columns: 1fr; }
  .cards { grid-template-columns: 1fr 1fr; }
  .card { min-height: 0; padding: 40px 20px; }
  .testimonial { grid-template-columns: 1fr; }
  .testimonial .t-avatar { width: 140px; }
  .team { grid-template-columns: 1fr; }
  .doctor img { max-width: 360px; }
  .doctor:only-child { display: block; }
  .doctor:only-child img { margin-bottom: 20px; }
  .wrap-left { padding: 40px 16px; justify-self: stretch; }
}
@media (max-width: 520px) { .cards { grid-template-columns: 1fr; } }

/* 捲動進場動畫（比照原站）：只有 JS 啟用時才先隱藏，進入畫面時播放 */
.js [data-anim] { opacity: 0; }
.js [data-anim].in { animation: var(--anim) var(--dur, 1s) ease both; animation-delay: var(--d, 0ms); }
[data-anim="fadeIn"] { --anim: fadeIn; }
[data-anim="fadeInUp"] { --anim: fadeInUp; }
[data-anim="fadeInDown"] { --anim: fadeInDown; }
[data-anim="fadeInLeft"] { --anim: fadeInLeft; }
[data-anim="fadeInRight"] { --anim: fadeInRight; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeInUp { from { opacity: 0; transform: translate3d(0, 60px, 0); } to { opacity: 1; transform: none; } }
@keyframes fadeInDown { from { opacity: 0; transform: translate3d(0, -60px, 0); } to { opacity: 1; transform: none; } }
@keyframes fadeInLeft { from { opacity: 0; transform: translate3d(-60px, 0, 0); } to { opacity: 1; transform: none; } }
@keyframes fadeInRight { from { opacity: 0; transform: translate3d(60px, 0, 0); } to { opacity: 1; transform: none; } }
/* 滑鼠移上：浮起／縮小／放大（同原站 Elementor hover 效果） */
.float { transition: transform .3s; } .float:hover { transform: translateY(-8px); }
.shrink img { transition: transform .3s; } .shrink:hover img { transform: scale(.9); }
.grow { transition: transform .3s; } .grow:hover { transform: scale(1.1); }
@media (prefers-reduced-motion: reduce) {
  .js [data-anim] { opacity: 1; animation: none !important; }
  .float:hover, .shrink:hover img, .grow:hover { transform: none; }
}
