/* ============================================================
   雅術牙醫 — 首頁專屬樣式
   只放首頁區塊，共用的頁首／頁尾／基準在 base.css（唯讀）

   區塊 padding／字級／欄寬全部照原站 1280 寬實測值
   （量測表在 raw/home_spec.json 的 desktop_1280_sections）
   ============================================================ */

/* ---------- 通用區塊 ---------- */
.section { padding-block: 40px 80px; }
.section--alt { background: var(--bg-alt); }        /* rgb(247,248,250) */
.section--flush { padding-block: 0; }
/* ⚠️ 原站這兩行是「19px/400 靠左的段落」，不是大標題。
   我先前量到的「H2 45px/700 置中」是隱藏的裝飾元素，量錯對象了。
   語意上仍用 h2（利於結構與 SEO），視覺照原站實測值。 */
.section__head { text-align: left; margin-bottom: 26px; }
.section__title {
  font-size: 19px;
  font-weight: 400;
  color: var(--text);          /* rgb(51,51,51) */
  line-height: 30.4px;
}
.section__lead {
  font-size: 19px;
  line-height: 30.4px;
  color: var(--text);
}

/* ---------- 主視覺輪播（原站 RevSlider，實測 1280×635） ---------- */
.hero {
  position: relative;
  aspect-ratio: 1280 / 635;
  overflow: hidden;
  background: #f2f2f2;
}
.hero__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .9s ease;
}
.hero__slide.is-active { opacity: 1; }
.hero__slide img { width: 100%; height: 100%; object-fit: cover; }
.hero__dots {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  display: flex;
  gap: 9px;
  z-index: 2;
}
.hero__dots button {
  width: 10px; height: 10px; padding: 0;
  border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, .55);
  cursor: pointer;
}
.hero__dots button[aria-current="true"] { background: #fff; }

/* ---------- 三欄圖卡（#1 數位設備、#9 水雷射） ---------- */
/* 原站欄寬 373×3（1120 容器內），標題 h3 19px/600 置中 */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;              /* 原站實測：圖 333×333、間距 40px（1080 容器內 3×333+2×40）*/
}
.feature-card { text-align: center; }
.feature-card img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.feature-card__title {
  margin-top: 16px;
  font-size: 19px;
  font-weight: 600;
  color: var(--text-strong);
}

/* ---------- 滿版橫幅（#2、#6） ---------- */
.banner img { width: 100%; }

/* ---------- 兩欄圖文（#3 諾保科、#15 診所資訊） ---------- */
/* 原站欄寬 540+540（#3）／555+555（#15） */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;                 /* 原站實測：諾保科圖 540 寬 = 1080/2，兩欄之間沒有間距 */
  align-items: center;
}
.split__body { padding-left: 30px; }   /* 間距做在內容側，不吃掉圖片寬度 */
/* 原站逐行實測（三行樣式各不相同，先前我做成同一種 29px）：
   第1行 29px/600 lh46.4 mb15 ｜ 第2行 20px/200 lh30 mb5 ｜ 內文 19px/400 lh30.4 mb15 */
.split__kicker {
  font-size: 29px;
  font-weight: 600;
  line-height: 46.4px;
  color: var(--text-strong);
  margin-bottom: 15px;
}
.split__kicker--sub {
  font-size: 20px;
  font-weight: 200;
  line-height: 30px;
  margin-bottom: 5px;
}
.split__text { font-size: 19px; line-height: 30.4px; color: var(--text); margin-bottom: 15px; }
.split__list { font-size: 19px; line-height: 30.4px; color: var(--text); }
.split__list li + li { margin-top: 6px; }

/* ---------- 區塊滿版底圖（原站 #5 院長引言、#7 植牙流程、#14 徵才都有） ----------
   先前整批漏掉，因為抽規格時只掃 <img> 沒掃 CSS 背景圖 → 這幾區變成純色底，差很多 */
.has-bg {
  background-size: cover;
  background-position: 50% 50%;
  background-repeat: no-repeat;
}

/* ---------- 三欄認證（#4，原站是圖 333×300 + 標題，不是只有文字） ---------- */
.badge-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;              /* 原站實測：圖 333×300、間距 40px（同 feature-grid）*/
  text-align: center;
}
.badge img {
  width: 100%;
  aspect-ratio: 333 / 300;   /* 原站實測尺寸 */
  object-fit: cover;
  object-position: 50% 50%;
}
.badge__img--bottom { object-position: 50% 100%; }   /* 原站第三張是靠下裁切 */
.badge__title { margin-top: 16px; font-size: 19px; font-weight: 600; color: var(--text-strong); }

/* ---------- 院長引言（#5，原站 pad 120/120、內容寬 747、內文 17px/27.2） ---------- */
.quote { padding-block: 120px; }   /* 底圖由 .has-bg 提供，不要再壓純色 */
/* 原站實測：引言放在**白色卡片**裡（先前我讓文字直接壓在底圖上，所以看不清也差很多）
   卡片 588 寬、padding 30px 30px 20px、白底｜照片 202×282｜名 17px/400｜引言 29px/300 lh32 非斜體黑字
   卡片在 1280 下位於 x=135（偏左，非置中） */
.quote__inner {
  max-width: 588px;
  margin-left: max(15px, min(135px, calc((100vw - 1010px) / 2)));
  padding: 30px 30px 20px;
  background: #fff;
  display: grid;
  grid-template-columns: 202px 1fr;
  gap: 15px;
  align-items: start;
}
.quote__photo img { width: 202px; height: 282px; object-fit: cover; }
.quote__name { font-size: 17px; font-weight: 400; color: var(--text-strong); }
.quote__text {
  margin-top: 15px;
  font-size: 29px;
  font-weight: 300;
  line-height: 32px;
  color: #000;
  font-style: normal;
}

/* ---------- 植牙流程（#7，原站 pad 180/100，5 個 icon 222 寬） ---------- */
.process { padding-block: 46px 60px; }   /* 原站實測：流程圖距區塊頂端 46px（先前誤用 .fg-container 的 180px）*/

.process__figure { margin-bottom: 60px; text-align: center; }
.process__figure img { width: 300px; margin-inline: auto; }   /* 原站實測 300×92 置中小圖，不是滿寬 */
.process__steps {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 30px;              /* 原站實測：icon 189×189、間距 30px */
  align-items: start;
}
/* 原站圓圈之間有一條貫穿的連接線（Dennis 截圖指出） */
.process__steps.has-line { position: relative; }
.process__steps.has-line::before {
  content: "";
  position: absolute;
  left: 10%;
  right: 10%;
  top: 94px;              /* icon 189 的垂直中心 */
  height: 1px;
  background: rgba(51, 51, 51, .45);
  z-index: 0;
}
.process__step { position: relative; z-index: 1; }
.process__step { text-align: center; }
.process__step img { width: 100%; margin-inline: auto; }

/* ---------- 環境相簿（#8，原站 363×3；#10/#12 320×4） ---------- */
/* 原站實測不是均等格，是「混合高度」：
   3 欄各 353 寬、間距 10px；列高 236；第 1 張與第 7 張各跨 2 列（479 高）
   col1: 高圖(跨1-2列) + 矮圖 ｜ col2: 矮×3 ｜ col3: 矮圖 + 高圖(跨2-3列) */
.gallery {
  display: grid;
  gap: 10px;
}
/* 明確指定每張圖的格位，避免自動流排出破洞
   原站：col1 高圖(1-2列)+矮圖(3列)｜col2 矮×3｜col3 矮圖(1列)+高圖(2-3列) */
.gallery--3 {
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 236px);
}
.gallery--3 img:nth-child(1) { grid-column: 1; grid-row: 1 / span 2; }
.gallery--3 img:nth-child(2) { grid-column: 1; grid-row: 3; }
.gallery--3 img:nth-child(3) { grid-column: 2; grid-row: 1; }
.gallery--3 img:nth-child(4) { grid-column: 2; grid-row: 2; }
.gallery--3 img:nth-child(5) { grid-column: 2; grid-row: 3; }
.gallery--3 img:nth-child(6) { grid-column: 3; grid-row: 1; }
.gallery--3 img:nth-child(7) { grid-column: 3; grid-row: 2 / span 2; }
.gallery--4 { grid-template-columns: repeat(4, 1fr); }
.gallery img { width: 100%; height: 100%; object-fit: cover; background: #ececec; }
.gallery--4 img { aspect-ratio: 1 / 1; height: auto; }

/* ---------- 照片牆中間文字塊（#11） ---------- */
/* ⚠️ 原站這塊是淺灰字 rgb(207,207,207) 壓純白底＝看不見（全站唯一一處，
   FreshBuilder 裡底色設成白但文字設定留著「淺色字」）。
   Dennis 2026-07-30 拍板走 (a)：白底 ＋ 深色字。 */
.photo-wall {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.photo-wall img { width: 100%; aspect-ratio: 320 / 213; object-fit: cover; background: #ececec; }  /* 原站實測 320×213 橫式，非正方 */
.photo-wall__note {
  grid-column: span 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  padding: 24px 30px;
  background: #fff;
  text-align: center;
}
.photo-wall__title {
  font-size: 27px;
  font-weight: 600;
  color: var(--text-muted);   /* rgb(28,28,28)，照原站標題色 */
}
.photo-wall__text {
  font-size: 19px;
  line-height: 30.4px;
  color: var(--text);          /* 原站是 rgb(207,207,207) 看不見 → 改深色 */
}

/* ---------- 評價（#13，原站 pad 80/80、標題 30px/300、內文 16px/25.6） ---------- */
.reviews { padding-block: 80px; background: var(--bg-alt); }
.reviews__title {
  font-size: 30px;
  font-weight: 300;
  color: var(--text-strong);
  text-align: center;
  margin-bottom: 34px;
}
/* 原站是 owl-carousel：一次顯示 3 張、卡寬 382、間距 30，共 13 則 */
.reviews__viewport {
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
}
.reviews__viewport::-webkit-scrollbar { display: none; }
.reviews__track {
  display: flex;
  gap: 30px;              /* 原站實測間距 */
}
.reviews__track .review {
  flex: 0 0 calc((100% - 60px) / 3);
}
.reviews__nav { display: flex; justify-content: center; gap: 12px; margin-top: 22px; }
.reviews__nav button {
  width: 36px; height: 36px; padding: 0;
  font-size: 20px; line-height: 1;
  color: var(--text-strong); background: #fff;
  border: 1px solid rgba(52,52,60,.25); cursor: pointer;
}
.reviews__nav button:hover { background: var(--bg-alt); }
.review {
  padding: 24px;
  background: #fff;
}
.review__stars {
  color: #f5b301;          /* 原站評價卡的實星 */
  font-size: 20px;
  letter-spacing: 2px;
  margin-bottom: 10px;
}
.review__text { font-size: 16px; line-height: 25.6px; color: var(--text); }
.review__by {
  margin-top: 14px;
  font-size: 19px;          /* 原站實測 19px/400，姓名與療程分兩行（<br>） */
  font-weight: 400;
  line-height: 1.5;
  color: var(--text-strong);
}

/* ---------- 徵才橫幅（#14，原站 pad 140/160、容器 970、字 36px/57.6 置中） ---------- */
.recruit {
  padding-block: 140px 160px;
  text-align: center;
}
.recruit__inner { max-width: 970px; margin-inline: auto; }
.recruit__title { font-size: 36px; line-height: 57.6px; color: var(--text); }
.recruit__link {
  display: inline-block;
  margin-top: 18px;
  padding: 10px 26px;
  font-size: 16px;
  color: var(--text-strong);
  border: 1px solid rgba(52, 52, 60, .4);
}
.recruit__link:hover { background: rgba(0, 0, 0, .04); }

/* ---------- 預約表單（原站 Quform；測試站不接後端） ----------
   原站實測：兩欄各 249、間距 19px｜輸入框 39 高、1px solid rgb(227,227,227)
   label 壓在框內（14px/700 rgb(58,58,68)，距框左上各 9px），紅星 rgb(204,1,1) 同行不換行 */
.booking-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 23px 19px;
  align-items: start;
}
.field--full { grid-column: 1 / -1; }
.field { position: relative; margin: 0; }

.booking-form input,
.booking-form select {
  width: 100%;
  height: 39px;
  padding: 0 9px;
  font: inherit;
  font-size: 14px;
  color: var(--text);
  background: #fff;
  border: 1px solid rgb(227, 227, 227);
  border-radius: 0;
}
.booking-form input:focus,
.booking-form select:focus { outline: 2px solid rgba(52,52,60,.25); outline-offset: -2px; }

.field__label {
  position: absolute;
  left: 9px;
  top: 9px;
  font-size: 14px;
  font-weight: 700;
  line-height: 21px;
  color: rgb(58, 58, 68);
  pointer-events: none;
  transition: opacity .12s;
}
.field__label i { font-style: normal; color: rgb(204, 1, 1); }   /* 紅星與文字同一行 */
/* 有輸入或聚焦時讓出位置 */
.field input:focus + .field__label,
.field input:not(:placeholder-shown) + .field__label { opacity: 0; }

/* 「預約項目」的 label 在框外（原站唯一一個在外面的） */
.field__label--above {
  position: static;
  display: block;
  margin-bottom: 6px;
}

.booking-form button {
  height: 39px;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  background: rgb(52, 52, 60);
  border: 0;
  cursor: pointer;
  align-self: start;
}
.booking-form button[disabled] { opacity: .45; cursor: not-allowed; }
.booking-form__captcha {
  grid-column: 1;
  width: 130px; height: 40px;
  white-space: nowrap;      /* 115px 配字距 3px 會擠成兩行 */
  display: flex; align-items: center; justify-content: center;
  font: 600 17px/1 ui-monospace, monospace;
  letter-spacing: 2px; color: #555;
  background: #f2f2f2; border: 1px solid #e0e0e0;
}
.booking-form__note { font-size: 13px; color: #888; }

/* ---------- 診所資訊（#15，原站 H1 45px/600、內文 21px/33.6） ---------- */
.clinic { padding-block: 60px 0; }   /* 下留白拿掉：地圖要直接接黑色頁尾，中間不留白條 */
.clinic__title {
  display: flex; align-items: center; gap: 14px;
  font-size: 45px; font-weight: 600; color: var(--text-strong);
}
.clinic__title img { width: 50px; height: 60px; object-fit: contain; }  /* 原站實測 50×60 */
.clinic__info { margin-top: 18px; font-size: 21px; line-height: 33.6px; color: var(--text-heading); }
.clinic__info p + p { margin-top: 0; }   /* 原站是連續單行，行距靠 line-height */
.clinic__social { display: flex; gap: 12px; margin-top: 20px; }
.clinic__social img { width: 48px; height: 48px; }  /* 原站實測 */
/* 滿版：跳出 .container 的寬度限制（Dennis 2026-07-30 指定，原站亦為滿版） */
.clinic__map {
  margin-top: 24px;
  margin-bottom: 0;
  line-height: 0;        /* 消掉 iframe 當行內元素時底部的基線縫隙 */
  width: 100vw;
  margin-left: 50%;
  transform: translateX(-50%);
}
.clinic__map iframe { width: 100%; height: 450px; border: 0; display: block; }  /* 原站實測 100%×450 */

/* 快捷鈕尺寸照原站實測（box 56 寬、圖 40、字 14px），圖示用原站原圖 */
.quick-actions a { width: 56px; padding: 6px 4px; font-size: 14px; }
.quick-actions img { width: 40px; height: auto; }

/* ---------- 手機 ---------- */
@media (max-width: 991px) {
  .section { padding-block: 30px 40px; }
  .section__title { font-size: 17px; }
  .section__lead { font-size: 16px; line-height: 26px; }

  .feature-grid,
  .badge-grid,
  .reviews__list,
  .split { grid-template-columns: 1fr; }
  .feature-grid { gap: 20px; }
  .split__body { padding-left: 0; }
  .gallery--3 { grid-template-rows: none; }
  .gallery--3 img { grid-column: auto !important; grid-row: auto !important; }
  .gallery--3 img { aspect-ratio: 1 / 1; height: auto; }
  .split { gap: 20px; }

  .quote { padding-block: 50px; }
  .quote__inner {
    grid-template-columns: 1fr;
    margin-inline: 15px;
    gap: 18px;
    padding: 20px;
  }
  .quote__text { font-size: 20px; line-height: 28px; }
  .quote__photo img { margin-inline: auto; }

  .process { padding-block: 50px 40px; }
  .process__steps { grid-template-columns: repeat(2, 1fr); gap: 18px; }

  .gallery--3, .gallery--4 { grid-template-columns: repeat(2, 1fr); }

  .photo-wall { grid-template-columns: repeat(2, 1fr); }
  .photo-wall__note { grid-column: span 2; padding: 20px; }
  .photo-wall__title { font-size: 21px; }
  .photo-wall__text { font-size: 16px; line-height: 26px; }

  .reviews { padding-block: 40px; }
  .reviews__track .review { flex: 0 0 100%; }
  .recruit { padding-block: 50px 60px; }
  .recruit__title { font-size: 22px; line-height: 36px; }

  .clinic__title { font-size: 28px; }
  .clinic__info { font-size: 17px; line-height: 28px; }
  .clinic__map iframe { height: 300px; }
  .booking-form { grid-template-columns: 1fr; }
  .clinic__title { font-size: 26px; }
}
