/* ═══════════════════════════════════════════════
   安心動物醫院 — 獸醫模板
   視覺參考:Bond Vet(teal 溫暖風)
   ═══════════════════════════════════════════════ */

:root {
  --primary: #1b9b8e;        /* teal 主色(Bond Vet 系)*/
  --primary-dark: #147a70;
  --primary-light: #e4f4f2;
  --ink: #2c3e50;            /* 炭灰內文 */
  --ink-soft: #5d6d7e;
  --bg: #ffffff;
  --bg-alt: #f5f7fa;         /* 淺灰區塊底 */
  --line-green: #06c755;     /* LINE 品牌綠 */
  --radius: 12px;
  --shadow: 0 6px 24px rgba(44, 62, 80, .08);
  --font: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body { font-family: var(--font); color: var(--ink); background: var(--bg); line-height: 1.75; font-size: 16px; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; }

.container { width: min(1200px, 92%); margin: 0 auto; }
.container-narrow { width: min(820px, 92%); }

/* ── 按鈕 ── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 20px; border-radius: 999px;
  font-weight: 700; font-size: 15px; white-space: nowrap;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-outline { border: 2px solid var(--primary); color: var(--primary); background: #fff; }
.btn-line { background: var(--line-green); color: #fff; }
.btn-lg { padding: 14px 28px; font-size: 17px; }

/* ── Header ── */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.96); backdrop-filter: blur(8px);
  border-bottom: 1px solid #e8ecef;
}
.header-inner { display: flex; align-items: center; gap: 24px; height: 76px; }
.logo { font-size: 22px; font-weight: 900; color: var(--ink); display: flex; align-items: center; gap: 8px; }
.logo-mark { font-size: 26px; }
.main-nav { display: flex; gap: 4px; margin-left: auto; }
.main-nav a { color: var(--ink); font-weight: 500; padding: 8px 12px; border-radius: 8px; font-size: 15px; }
.main-nav a:hover { background: var(--primary-light); color: var(--primary-dark); }
.header-cta { display: flex; gap: 10px; }
.nav-toggle { display: none; }

/* ── Hero ── */
.hero { padding: 72px 0; background: linear-gradient(160deg, var(--primary-light) 0%, #fff 55%); }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.hero-eyebrow { color: var(--primary-dark); font-weight: 700; letter-spacing: .12em; margin-bottom: 12px; }
.hero h1 { font-size: clamp(30px, 4.2vw, 46px); font-weight: 900; line-height: 1.35; margin-bottom: 18px; }
.hero h1 .accent { color: var(--primary); }
.hero-sub { color: var(--ink-soft); font-size: 17px; margin-bottom: 20px; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 28px; }
.badge {
  background: #fff; border: 1px solid #e0ebe9; border-radius: 999px;
  padding: 6px 14px; font-size: 14px; font-weight: 500; box-shadow: 0 2px 8px rgba(44,62,80,.05);
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-img img { border-radius: 20px; box-shadow: var(--shadow); }

/* ── 信任數字 ── */
.stats { background: var(--primary); color: #fff; padding: 34px 0; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; text-align: center; }
.stat strong { font-size: 34px; font-weight: 900; display: block; line-height: 1.2; }
.stat strong span { font-size: 18px; font-weight: 700; margin-left: 2px; }
.stat p { font-size: 14px; opacity: .92; }

/* ── 區塊通用 ── */
.section { padding: 84px 0; }
.section-alt { background: var(--bg-alt); }
.section-title { font-size: clamp(26px, 3.2vw, 36px); font-weight: 900; text-align: center; margin-bottom: 12px; }
.section-sub { text-align: center; color: var(--ink-soft); margin-bottom: 48px; }

/* ── 服務卡片 ── */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.card {
  background: #fff; border: 1px solid #eef1f4; border-radius: var(--radius);
  padding: 32px 26px; box-shadow: 0 2px 10px rgba(44,62,80,.04);
  transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card-icon {
  width: 58px; height: 58px; border-radius: 16px; background: var(--primary-light);
  display: flex; align-items: center; justify-content: center; font-size: 28px; margin-bottom: 18px;
}
.card h3 { font-size: 19px; font-weight: 700; margin-bottom: 8px; }
.card p { color: var(--ink-soft); font-size: 15px; }

/* ── 醫師卡片 ── */
.doctor-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.doctor-card { background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: 0 2px 10px rgba(44,62,80,.06); }
.doctor-card img { aspect-ratio: 4/5; object-fit: cover; width: 100%; }
.doctor-info { padding: 22px 22px 26px; }
.doctor-info h3 { font-size: 20px; font-weight: 700; }
.doctor-info h3 span { font-size: 14px; color: var(--primary); font-weight: 700; margin-left: 6px; }
.doctor-title { font-size: 13.5px; color: var(--ink-soft); margin: 4px 0 10px; padding-bottom: 10px; border-bottom: 1px dashed #e2e8ec; }
.doctor-info > p:last-child { font-size: 14.5px; color: var(--ink-soft); }

/* ── 環境相簿 ── */
.gallery-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.gallery-grid img { border-radius: var(--radius); aspect-ratio: 4/3; object-fit: cover; transition: transform .25s ease; }
.gallery-grid img:hover { transform: scale(1.03); }

/* ── 評論 ── */
.review-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.review {
  background: #fff; border-radius: var(--radius); padding: 26px;
  border: 1px solid #eef1f4; box-shadow: 0 2px 10px rgba(44,62,80,.04);
}
.review-stars { color: #f5a623; letter-spacing: 3px; margin-bottom: 10px; font-size: 15px; }
.review p { font-size: 15.5px; }
.review footer { margin-top: 12px; font-size: 13.5px; color: var(--ink-soft); }
.review-more { text-align: center; margin-top: 30px; font-weight: 700; }

/* ── 門診時間 ── */
.hours-wrap { max-width: 820px; margin: 0 auto; }
.hours-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.hours-table th, .hours-table td { padding: 14px 10px; text-align: center; border-bottom: 1px solid #eef1f4; font-size: 15px; }
.hours-table thead th { background: var(--primary); color: #fff; font-weight: 700; }
.hours-table tbody th { background: var(--primary-light); font-weight: 700; color: var(--primary-dark); white-space: nowrap; }
.hours-table td { color: var(--primary); font-weight: 700; }
.hours-note { margin-top: 14px; font-size: 14px; color: var(--ink-soft); text-align: center; }

/* ── FAQ ── */
.faq-item { background: #fff; border: 1px solid #eef1f4; border-radius: var(--radius); margin-bottom: 12px; overflow: hidden; }
.faq-item summary {
  cursor: pointer; list-style: none; padding: 18px 22px;
  font-weight: 700; font-size: 16.5px; position: relative; user-select: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; position: absolute; right: 22px; color: var(--primary); font-size: 22px; transition: transform .2s ease; }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { padding: 0 22px 18px; color: var(--ink-soft); font-size: 15px; }

/* ── 聯絡/地圖 ── */
.contact-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: 48px; align-items: start; }
.contact-grid .section-title { text-align: left; }
.contact-list { list-style: none; margin: 20px 0 26px; }
.contact-list li { display: flex; gap: 14px; padding: 10px 0; border-bottom: 1px dashed #e2e8ec; font-size: 15.5px; }
.contact-list strong { color: var(--primary-dark); flex-shrink: 0; min-width: 44px; }
.map-embed iframe { width: 100%; height: 420px; border: 0; border-radius: var(--radius); box-shadow: var(--shadow); }

/* ── Footer ── */
.site-footer { background: var(--ink); color: #cfd8de; padding: 40px 0; text-align: center; }
.footer-brand { font-size: 20px; font-weight: 900; color: #fff; margin-bottom: 8px; }
.site-footer a { color: #9fe3da; }
.footer-copy { margin-top: 12px; font-size: 13px; opacity: .7; }

/* ── 浮動 LINE 鈕 ── */
.line-float {
  position: fixed; right: 18px; bottom: 18px; z-index: 200;
  display: flex; align-items: center; gap: 8px;
  background: var(--line-green); color: #fff;
  padding: 12px 18px; border-radius: 999px; font-weight: 700;
  box-shadow: 0 8px 24px rgba(6,199,85,.4);
  animation: float-pulse 2.4s ease-in-out infinite;
}
@keyframes float-pulse {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

/* ── 捲動顯示動畫 ── */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
  .line-float { animation: none; }
}

/* ═══ RWD:平板 ═══ */
@media (max-width: 1024px) {
  .main-nav { display: none; }
  .card-grid, .doctor-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .hero-img { order: -1; }

  /* 手機選單 */
  .nav-toggle {
    display: flex; flex-direction: column; gap: 5px; justify-content: center;
    width: 44px; height: 44px; padding: 10px; margin-left: auto;
    background: none; border: 0; cursor: pointer;
  }
  .nav-toggle span { display: block; height: 2.5px; background: var(--ink); border-radius: 2px; transition: transform .25s, opacity .25s; }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }
  .main-nav.is-open {
    display: flex; flex-direction: column; gap: 0;
    position: absolute; top: 76px; left: 0; right: 0;
    background: #fff; border-bottom: 1px solid #e8ecef; box-shadow: var(--shadow);
    padding: 12px 4%;
  }
  .main-nav.is-open a { padding: 14px 12px; border-bottom: 1px solid #f2f5f7; font-size: 16px; }
}

/* ═══ RWD:手機(375px 優先)═══ */
@media (max-width: 640px) {
  .header-inner { gap: 12px; }
  .header-cta .btn-outline { display: none; }   /* 手機只留 LINE 鈕,電話在 hero/浮動可達 */
  .header-cta .btn-line { padding: 8px 14px; font-size: 14px; }
  .logo { font-size: 18px; }
  .hero { padding: 44px 0; }
  .section { padding: 56px 0; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 24px 12px; }
  .card-grid, .doctor-grid, .review-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; gap: 32px; }
  .map-embed iframe { height: 320px; }
  .hours-table { font-size: 13px; }
  .hours-table th, .hours-table td { padding: 10px 4px; }
  .hero-cta .btn { flex: 1; justify-content: center; }
  .line-float span { display: none; }           /* 手機縮成圓鈕 */
  .line-float { padding: 14px; }
}
