/* 杏安藥局資訊站：光復山谷・墨綠暖白 */
:root {
  color-scheme: light;
  --paper: #f7f8f5;
  --ink: #15352e;
  --pine: #17473d;
  --pine-deep: #0f352d;
  --mist: #e9f0e9;
  --line: #dce5dd;
  --muted: #435a50;
  --gold: #b7791f;
  --bronze: #96660f; /* 文字用深金，白底對比 4.69:1 */
  --gold-soft: #e7d3a7;
  --card: #ffffff;
  --radius: 18px;
  --font-body: system-ui, -apple-system, "Noto Sans TC", "Microsoft JhengHei", "PingFang TC", sans-serif;
  --font-display: "Noto Serif TC", "Songti TC", "PMingLiU", "Hiragino Mincho ProN", serif;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  line-height: 1.7;
  -webkit-text-size-adjust: 100%;
}

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

a { color: inherit; }

.wrap { width: min(100% - 40px, 1080px); margin-inline: auto; }

/* Skip link */
.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: #fff;
  color: var(--pine);
  font-weight: 700;
  padding: 10px 16px;
  border-radius: 0 0 12px 0;
  z-index: 50;
}
.skip:focus { left: 0; }

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Header：暖白紙面＋字標，細金線收邊 */
.site-head {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  box-shadow: inset 0 -3px 0 var(--gold-soft);
}
.head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 14px;
}
.brand { display: inline-flex; text-decoration: none; }
.brand-mark { height: 44px; width: auto; }
.locale {
  margin: 0;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  color: var(--muted);
  text-align: right;
  min-width: 0;
}

/* 窄版 header：locale 允許換行（不斷字裁切），品牌圖保持比例不擠壓 */
@media (max-width: 480px) {
  .head-row { gap: 10px; }
  .brand { flex-shrink: 0; }
  .brand-mark { height: 36px; }
  .locale { font-size: 0.75rem; letter-spacing: 0.06em; line-height: 1.5; }
}

/* Hero：手機先疊放，桌面文字壓在山景留白上 */
.hero { position: relative; overflow: clip; }
.hero-grid { padding-block: 44px 8px; }
.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 10px;
  color: var(--pine);
  font-weight: 700;
  letter-spacing: 0.22em;
  font-size: 0.85rem;
}
.eyebrow-rule {
  display: inline-block;
  width: 34px;
  height: 3px;
  background: var(--gold);
  border-radius: 2px;
}
h1 {
  font-family: var(--font-display);
  font-size: clamp(2.75rem, 8vw, 4.25rem);
  line-height: 1.15;
  letter-spacing: 0.06em;
  margin: 0 0 6px;
  color: var(--pine-deep);
}
.tagline {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--pine);
}
.sub {
  margin: 2px 0 0;
  font-size: 1rem;
  letter-spacing: 0.28em;
  color: var(--muted);
}
.intro {
  margin: 18px 0 24px;
  max-width: 34rem;
  color: var(--muted);
  font-size: 1.02rem;
}
.actions { display: grid; gap: 12px; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 1.02rem;
  letter-spacing: 0.04em;
  text-decoration: none;
  border: 2px solid var(--pine);
  transition: background-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}
.button.primary { background: var(--pine); color: #fff; }
.button.primary:hover { background: var(--pine-deep); }
.button.secondary { background: #fff; color: var(--pine); }
.button.secondary:hover { background: var(--mist); }
.hero-media { padding: 28px 0 0; }
.hero-media img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: 72% 50%;
  border-radius: var(--radius) var(--radius) 0 0;
  border: 1px solid var(--line);
  border-bottom: 0;
}

/* 介紹：篇章式留白，與 hero 墨綠暖白相承 */
.about { padding-block: 48px 8px; }
.about-grid {
  display: grid;
  gap: 18px;
  border-top: 1px solid var(--line);
  padding-top: 36px;
}
.about-head h2, .services h2 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  letter-spacing: 0.1em;
  margin: 6px 0 0;
}
.about-body { max-width: 38rem; }
.about-body p { margin: 0 0 14px; color: var(--ink); font-size: 1.05rem; }
.about-body p:last-child { margin-bottom: 0; color: var(--muted); }

/* 服務：三卡片，手機單欄、桌面三欄，墨綠描邊＋暖白底 */
.services { padding-block: 40px 8px; }
.service-list {
  list-style: none;
  margin: 22px 0 0;
  padding: 0;
  display: grid;
  gap: 16px;
}
.service-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-top: 4px solid var(--pine);
  border-radius: var(--radius);
  padding: 22px 20px;
}
.service-card h3 {
  margin: 0 0 8px;
  font-size: 1.12rem;
  letter-spacing: 0.06em;
  color: var(--pine-deep);
}
.service-card p { margin: 0; color: var(--muted); }
@media (min-width: 768px) {
  .about-grid { grid-template-columns: 0.9fr 1.1fr; gap: 48px; align-items: start; }
  .service-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* 資訊區：非卡片堆疊，左右篇章式排版 */
.info { padding-block: 48px 64px; }
.info-grid {
  display: grid;
  gap: 40px;
  border-top: 1px solid var(--line);
  padding-top: 36px;
}
.section-no {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.3em;
  color: var(--bronze);
}
.section-no.light { color: var(--gold-soft); }
.place h2, .hours-panel h2 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  letter-spacing: 0.1em;
  margin: 6px 0 16px;
}
.address {
  font-style: normal;
  font-size: clamp(1.35rem, 4.6vw, 1.9rem);
  font-weight: 800;
  line-height: 1.5;
  letter-spacing: 0.04em;
  color: var(--pine-deep);
  margin: 0;
}
.place-note { color: var(--muted); margin: 12px 0 18px; max-width: 30rem; }
.text-link {
  font-weight: 800;
  color: var(--pine);
  text-decoration: underline;
  text-decoration-color: var(--gold);
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}
.hours-panel {
  background: var(--pine);
  color: #f2f7f3;
  border-radius: var(--radius);
  padding: 28px 26px;
  box-shadow: 0 18px 44px -22px #0f352d99;
}
.hours-panel h2 { color: #fff; }
.hours { width: 100%; border-collapse: collapse; margin-top: 4px; }
.hours th, .hours td {
  text-align: left;
  vertical-align: top;
  padding: 12px 0;
  border-bottom: 1px solid #ffffff2e;
}
.hours tr:last-child th, .hours tr:last-child td { border-bottom: 0; }
.hours th { width: 88px; font-weight: 700; color: var(--gold-soft); }
.hours td { font-size: 1.08rem; font-weight: 600; letter-spacing: 0.03em; }
.hours-call { margin: 16px 0 0; color: #d5e8df; }
.hours-call a { color: #fff; font-weight: 800; }

/* Footer：深綠收束，三項重列 */
.site-foot { background: var(--pine-deep); color: #e6f0ea; }
.foot-grid {
  display: grid;
  gap: 6px;
  padding-block: 26px;
  font-size: 0.95rem;
}
.foot-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: #fff;
}
.foot-brand img { height: 26px; width: auto; }
.foot-address { font-style: normal; margin: 0; }
.foot-tel { margin: 0; }
.foot-tel a { color: #fff; font-weight: 700; }

/* 404 頁沿用本站樣式 */
.notfound { padding-block: 72px 88px; }
.notfound h1 { font-size: clamp(2rem, 6vw, 3rem); }

/* 平板以上：雙欄篇章 */
@media (min-width: 768px) {
  .actions { display: flex; flex-wrap: wrap; }
  .actions .button { flex: 0 0 auto; min-width: 240px; }
  .info-grid { grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: start; }
  .hours-panel { padding: 34px 32px; }
  .foot-grid { grid-template-columns: auto 1fr auto; align-items: center; gap: 20px; }
  .foot-address { text-align: center; }
}

/* 桌面：hero 文字壓圖，山景全幅為底 */
@media (min-width: 1024px) {
  .hero { min-height: 600px; display: grid; }
  .hero-grid { padding-block: 88px; align-items: center; }
  .hero-text { position: relative; z-index: 2; max-width: 540px; }
  .hero-media {
    position: absolute;
    inset: 0;
    padding: 0;
    z-index: 1;
  }
  .hero-media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(100deg, var(--paper) 30%, #f7f8f5e6 44%, transparent 68%);
  }
  .hero-media img {
    height: 100%;
    aspect-ratio: auto;
    border: 0;
    border-radius: 0;
    object-position: center;
  }
}

/* 動效偏好：關閉平滑捲動與過渡 */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
