/* site.css — 睛彩視界眼科診所官網（2026-09 改版，自行撰寫，不沿用廠商樣式）
   主色取自診所標誌的青綠色。行動裝置優先。 */
:root {
  --teal: #00a3ad;        /* 標誌主色：大面積底色、圖示 */
  --teal-ink: #00707a;    /* 文字用深青（白底對比足夠） */
  --deep: #0c3a40;
  --mist: #eef7f7;
  --line: #d7e9ea;
  --ink: #1d2a2e;
  --muted: #5a6b70;
  --line-green: #06c755;
  --radius: 14px;
  --wrap: 1140px;
  --shadow: 0 6px 24px rgba(12, 58, 64, .08);
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; color: var(--ink); background: #fff;
  font: 17px/1.75 system-ui, -apple-system, "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  -webkit-text-size-adjust: 100%;
  padding-bottom: 64px; /* 手機底部快速聯絡列的空間 */
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--teal-ink); }
h1, h2, h3 { line-height: 1.35; color: var(--deep); margin: 0 0 .5em; }
ul { margin: 0; padding: 0; list-style: none; }
.wrap { width: min(100% - 40px, var(--wrap)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--deep); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
.ic { width: 1.25em; height: 1.25em; flex: none; }
.ic-lg { width: 44px; height: 44px; color: var(--teal); }

/* ---------- 按鈕 ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5em;
  padding: .7em 1.3em; border-radius: 999px; font-weight: 600; text-decoration: none;
  border: 2px solid transparent; transition: transform .15s, box-shadow .15s;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-line { background: var(--line-green); color: #fff; }
.btn-ghost { background: rgba(255,255,255,.14); color: #fff; border-color: rgba(255,255,255,.7); }
.more { display: inline-flex; align-items: center; gap: .35em; font-weight: 600; text-decoration: none; }
.more .ic { width: 1em; height: 1em; transition: transform .15s; }
.more:hover .ic { transform: translateX(3px); }
.center { text-align: center; }

/* ---------- 頁首 ---------- */
/* 毛玻璃效果放在 ::before：backdrop-filter 若直接加在 .site-header，會讓裡面 position:fixed 的手機選單改以頁首（高 68px）為定位基準，選單只剩一小條 */
.site-header { position: sticky; top: 0; z-index: 50; border-bottom: 1px solid var(--line); }
.site-header::before { content: ""; position: absolute; inset: 0; z-index: -1; background: rgba(255,255,255,.96); -webkit-backdrop-filter: saturate(1.4) blur(8px); backdrop-filter: saturate(1.4) blur(8px); }
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 68px; }
.brand img { height: 42px; width: auto; }
.nav-toggle { display: inline-flex; background: none; border: 0; padding: 8px; color: var(--deep); cursor: pointer; }
.nav-toggle .ic { width: 28px; height: 28px; }
.nav-toggle .ic:last-child, .nav-open .nav-toggle .ic:first-child { display: none; }
.nav-open .nav-toggle .ic:last-child { display: block; }
.site-nav { display: none; }
.nav-open .site-nav {
  display: block; position: fixed; inset: 68px 0 0 0; overflow-y: auto;
  background: #fff; padding: 12px 20px 100px;
}
.nav-list > li { border-bottom: 1px solid var(--line); position: relative; }
.nav-list a { display: block; padding: 14px 4px; color: var(--ink); text-decoration: none; font-weight: 600; }
.nav-list a[aria-current] { color: var(--teal-ink); }
.sub-toggle { position: absolute; right: 0; top: 6px; background: none; border: 0; padding: 10px; color: var(--muted); cursor: pointer; }
.sub-toggle .ic { transition: transform .2s; }
.has-sub.open .sub-toggle .ic { transform: rotate(180deg); }
.sub { display: none; padding: 0 0 10px 12px; }
.has-sub.open .sub { display: block; }
.sub a { font-weight: 400; padding: 9px 4px; color: var(--muted); }
.nav-cta { margin-top: 20px; justify-content: center; width: 100%; }

@media (min-width: 1200px) {
  .site-header .wrap { width: min(100% - 48px, 1280px); }
  .nav-toggle { display: none; }
  .site-nav, .nav-open .site-nav { display: flex; align-items: center; gap: 18px; position: static; padding: 0; overflow: visible; }
  .nav-list { display: flex; gap: 2px; }
  .nav-list > li { border: 0; }
  .nav-list > li > a { padding: 22px 8px; font-size: 15px; white-space: nowrap; }
  .nav-list > li > a:hover { color: var(--teal-ink); }
  .sub-toggle { display: none; }
  .sub {
    display: block; position: absolute; top: 100%; left: 0; min-width: 210px; padding: 8px;
    background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow);
    opacity: 0; visibility: hidden; transform: translateY(6px); transition: .15s;
  }
  .has-sub:hover .sub, .has-sub:focus-within .sub { opacity: 1; visibility: visible; transform: none; }
  .sub a { padding: 8px 12px; border-radius: 8px; font-size: 15px; }
  .sub a:hover { background: var(--mist); color: var(--teal-ink); }
  .nav-cta { margin: 0; width: auto; padding: .55em 1.1em; font-size: 15px; white-space: nowrap; }
}

/* ---------- 主視覺 ---------- */
.hero { position: relative; color: #fff; overflow: hidden; min-height: min(76vh, 680px); display: flex; align-items: flex-end; }
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* 主視覺人物在右側，遮罩只壓左邊文字區，不蓋到臉 */
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(8,40,44,.82) 0%, rgba(8,40,44,.55) 38%, rgba(8,40,44,0) 62%); }
.hero-inner { position: relative; z-index: 1; padding: 48px 0 56px; }
.hero h1 { color: #fff; font-size: clamp(30px, 6vw, 52px); letter-spacing: .04em; margin-bottom: .3em; }
.eyebrow { display: block; font-size: .38em; font-weight: 600; letter-spacing: .2em; color: #bff0f3; margin-bottom: .5em; }
.hero .lead { font-size: clamp(20px, 3.4vw, 28px); margin: 0 0 .4em; font-weight: 600; }
.hero-sub { margin: 0 0 1.6em; color: #d9eeef; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
@media (min-width: 1200px) { .hero { min-height: min(50vw, 860px); } }
/* 手機版主視覺是直式臉部特寫：文字放到圖下方，不壓在臉上 */
@media (max-width: 719px) {
  .hero { display: block; min-height: 0; background: #0c3a40; }
  .hero-bg { position: static; height: auto; }
  .hero::after { content: none; }
  .hero-inner { padding: 24px 0 32px; }
}

/* ---------- 區塊 ---------- */
.section { padding: 64px 0; }
.tint { background: var(--mist); }
.sec-head { text-align: center; margin-bottom: 36px; }
.sec-head h2 { font-size: clamp(24px, 3.6vw, 32px); margin-bottom: .25em; }
.sec-head h2::after { content: ""; display: block; width: 44px; height: 3px; border-radius: 3px; background: var(--teal); margin: .45em auto 0; }
.sec-head p { color: var(--muted); margin: 0; }
.sec-head.left { text-align: left; }
.sec-head.left h2::after { margin-left: 0; }

.features { display: grid; gap: 28px; }
.feature { text-align: center; padding: 8px 12px; }
.feature h3 { font-size: 20px; margin: 14px 0 6px; }
.feature p { color: var(--muted); margin: 0; }
.feature .ic-lg { margin: 0 auto; }

.svc-grid { display: grid; gap: 18px; }
.svc { background: #fff; border-radius: var(--radius); padding: 24px 24px 20px; box-shadow: var(--shadow); border-top: 4px solid var(--teal); display: flex; flex-direction: column; }
.svc h3 { font-size: 21px; }
.svc h3 a { color: inherit; text-decoration: none; }
.svc ul { flex: 1; margin-bottom: 14px; }
.svc li a { display: block; padding: 6px 0; color: var(--ink); text-decoration: none; border-bottom: 1px dashed var(--line); }
.svc li a:hover { color: var(--teal-ink); }

.doctor { display: grid; gap: 32px; align-items: center; }
.doctor-photo img { border-radius: var(--radius); background: var(--mist); }
.creds { margin: 18px 0 20px; display: grid; gap: 6px; }
.creds li { padding-left: 1.3em; position: relative; }
.creds li::before { content: ""; position: absolute; left: 0; top: .72em; width: 8px; height: 8px; border-radius: 50%; background: var(--teal); }
.creds li:first-child { font-weight: 700; color: var(--deep); }

.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 24px; }
.gallery figure { margin: 0; position: relative; border-radius: 12px; overflow: hidden; aspect-ratio: 4 / 3; }
.gallery img { width: 100%; height: 100%; object-fit: cover; }
.gallery figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 12px 8px; color: #fff; font-size: 15px; background: linear-gradient(transparent, rgba(0,0,0,.55)); }

.two-col { display: grid; gap: 40px; }
.news-list { margin-bottom: 16px; }
.news-list a { display: block; padding: 16px 0; border-bottom: 1px solid var(--line); text-decoration: none; color: inherit; }
.news-list time { font-size: 14px; color: var(--teal-ink); font-weight: 600; }
.news-list h3 { font-size: 18px; margin: 4px 0; }
.news-list a:hover h3 { color: var(--teal-ink); }
.news-list p { margin: 0; color: var(--muted); font-size: 15.5px; }

.hours { width: 100%; border-collapse: separate; border-spacing: 0; text-align: center; background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.hours th, .hours td { padding: 12px 4px; border-bottom: 1px solid var(--line); }
.hours thead th { background: var(--teal); color: #fff; font-weight: 600; }
.hours tbody th { text-align: left; padding-left: 14px; font-weight: 700; color: var(--deep); white-space: nowrap; }
.hours tbody th small { display: block; font-weight: 400; color: var(--muted); font-size: 13px; }
.hours .on { color: var(--teal); font-size: 14px; }
.hours .off { color: #b0bcbf; }
.hours tr:last-child > * { border-bottom: 0; }
.note { color: var(--muted); font-size: 14px; margin-top: 12px; }

.contact-list { display: grid; gap: 18px; }
.contact-list li { display: flex; gap: 14px; align-items: flex-start; }
.contact-list .ic { width: 26px; height: 26px; color: var(--teal); margin-top: 3px; }
.contact-list strong { display: block; font-size: 18px; }
.contact-list strong a { color: var(--deep); text-decoration: none; }
.contact-list span { color: var(--muted); font-size: 15px; }
.map iframe { width: 100%; height: 320px; border: 0; border-radius: var(--radius); }

@media (min-width: 720px) {
  .features { grid-template-columns: repeat(3, 1fr); }
  .svc-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 960px) {
  .section { padding: 88px 0; }
  .svc-grid { grid-template-columns: repeat(4, 1fr); }
  .doctor { grid-template-columns: 5fr 7fr; gap: 56px; }
  .two-col { grid-template-columns: 1fr 1fr; gap: 56px; }
  .map iframe { height: 100%; min-height: 300px; }
}

/* ---------- 頁尾 ---------- */
.site-footer { background: var(--deep); color: #cfe3e5; padding: 56px 0 24px; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-grid { display: grid; gap: 32px; }
.footer-brand img { height: 44px; width: auto; background: #fff; padding: 8px 12px; border-radius: 10px; }
.footer-brand p { margin: 14px 0 0; }
.footer-contact { display: grid; gap: 10px; }
.footer-contact li { display: flex; gap: 10px; align-items: center; }
.footer-contact .ic { color: #7fd7dc; }
.footer-links { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; }
.copyright { text-align: center; font-size: 14px; color: #8fb0b3; margin: 40px 0 0; }
@media (min-width: 900px) { .footer-grid { grid-template-columns: 1.2fr 1.4fr 1fr; } }

/* ---------- 手機底部快速聯絡列 ---------- */
.quick-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: grid; grid-template-columns: 1fr 1fr; box-shadow: 0 -4px 16px rgba(0,0,0,.08); }
.quick-bar a { display: flex; align-items: center; justify-content: center; gap: 8px; height: 58px; color: #fff; font-weight: 700; text-decoration: none; }
.qb-line { background: var(--line-green); }
.qb-tel { background: var(--teal-ink); }
@media (min-width: 1200px) { .quick-bar { display: none; } body { padding-bottom: 0; } }

/* ================================================================
   內頁（2026-10-30 全站改版：文章、列表、照片、緣起、醫師頁）
   ================================================================ */
.page-head { background: var(--mist); padding: 20px 0 32px; border-bottom: 1px solid var(--line); }
.page-head h1 { font-size: clamp(26px, 4.4vw, 38px); margin: 8px 0 .3em; }
.page-head .lead { color: var(--muted); max-width: 760px; margin: 0; }
.page-head .intro { color: var(--muted); max-width: 760px; margin: 12px 0 0; }
.page-head .intro p { margin: 0 0 .6em; text-align: left !important; }
.page-head .intro span { color: inherit !important; }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 2px 0; margin: 0; padding: 0; list-style: none; font-size: 14.5px; color: var(--muted); }
.crumbs li + li::before { content: "/"; margin: 0 .55em; color: #a9bcbf; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--teal-ink); text-decoration: underline; }
.crumbs [aria-current] { color: var(--deep); }

/* 文章頁：正文樣式沿用 css/article.css（自有），這裡只處理外框 */
.article-page { padding: 18px 0 24px; }
.article-page > .wrap > .crumbs { max-width: 49rem; margin: 0 auto 18px; padding-inline: 1.25rem; }
@media (min-width: 768px) { .article-page > .wrap > .crumbs { padding-inline: 2rem; } }
.article-page .articlecontent { display: block; }

/* 醫師個人頁 */
.profile { display: grid; gap: 28px; align-items: start; padding-bottom: 24px; }
.profile-photo img { border-radius: var(--radius); background: var(--mist); width: 100%; max-width: 460px; margin-inline: auto; }
.profile .profile-text { padding: 0; max-width: none; }
.profile .motto { font-size: 1.25rem; font-weight: 700; color: var(--teal-ink); }
@media (min-width: 960px) {
  .profile { grid-template-columns: 5fr 7fr; gap: 56px; }
  .profile-photo { position: sticky; top: 92px; }
}

/* 列表頁卡片 */
.list-sec { padding-top: 32px; }
.cat-nav ul { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.cat-nav a { display: inline-block; padding: 7px 16px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--ink); text-decoration: none; font-size: 15px; }
.cat-nav a:hover { border-color: var(--teal); color: var(--teal-ink); }
.cat-nav a[aria-current] { background: var(--teal-ink); border-color: var(--teal-ink); color: #fff; }
.card-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.card a { display: flex; flex-direction: column; height: 100%; background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--line); text-decoration: none; color: inherit; transition: transform .15s, box-shadow .15s; }
.card a:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(12,58,64,.13); }
.card-img { aspect-ratio: 1 / 1; /* 舊站縮圖都是正方形，很多圖上方有標題字，裁成橫式會切掉 */ background: var(--mist); overflow: hidden; }
.card.tall .card-img { aspect-ratio: 4 / 5; }
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 16px 18px 20px; }
.card-body time { font-size: 14px; color: var(--teal-ink); font-weight: 600; }
.card-body h2 { font-size: 18px; line-height: 1.5; margin: 2px 0 6px; color: var(--deep); }
.card a:hover h2 { color: var(--teal-ink); }
.card-body p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.7; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* 說明文字＋照片頁（環境、儀器）、緣起 */
.prose-sec { padding-top: 36px; }
.narrow { max-width: 780px; }
.prose p { margin: 0 0 1em; }
.prose h3 { font-size: 19px; margin: 1.4em 0 .3em; }
.prose .lead { font-weight: 600; color: var(--deep); }
.prose a { text-decoration: underline; text-underline-offset: .2em; }
.dots { list-style: disc; padding-left: 1.4em; }
.dots li { margin: .4em 0; }
.photo-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); margin-top: 28px; }
.photo-grid a { display: block; border-radius: 12px; overflow: hidden; aspect-ratio: 1; background: var(--mist); }
.photo-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform .2s; }
.photo-grid a:hover img { transform: scale(1.03); }
.about-grid { display: grid; gap: 32px; align-items: start; }
.about-photo img { border-radius: var(--radius); }
.contact-list.cols span { display: block; font-size: 14px; }
.contact-list.cols strong { font-size: 17px; overflow-wrap: anywhere; }
@media (min-width: 720px) { .contact-list.cols { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) {
  .about-grid { grid-template-columns: 7fr 5fr; gap: 56px; }
  .contact-list.cols { grid-template-columns: repeat(3, 1fr); }
}
.article-page > .wrap.crumbs-wide > .crumbs { max-width: none; margin-left: 0; padding-inline: 0; }
