/*
Theme Name: Welldent
Theme URI: https://welldent.local
Author: Welldent
Description: ธีมของ Welldent Dental Clinic แปลงมาจากเว็บ static เดิม โดยใช้ CSS ชุดเดิมทั้งหมด
Version: 0.1.0
Requires at least: 6.0
Requires PHP: 8.0
Text Domain: welldent
*/

/* ============================================================
   Welldent Dental Clinic — stylesheet หลัก
   โทนสี:
     #1c3544 กรมท่า | #52768c ฟ้าอมเทา | #fffef6 ครีม | #fdd459 เหลือง
   ฟอนต์: Anuphan (Google Fonts)
   ============================================================ */

:root {
  --navy: #1c3544;
  --blue: #52768c;
  --cream: #fffef6;
  --yellow: #fdd459;

  --font-main: "Anuphan", sans-serif;

  --container-w: 1240px;
  --radius-md: 18px;
  --radius-lg: 32px;
  --radius-pill: 999px;

  --shadow-card: 0 10px 30px rgba(28, 53, 68, 0.12);
}

/* ---------- base ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-main);
  font-weight: 400;
  background: var(--cream);
  color: var(--navy);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; margin: 0; padding: 0; }
button { font-family: var(--font-main); cursor: pointer; }

.container {
  width: 100%;
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 24px;
}

.ph {
  background: #d9d9d9;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #808080;
  font-size: 13px;
  font-weight: 500;
  text-align: center;
  padding: 8px;
}

/* ---------- ปุ่ม ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: var(--radius-pill);
  padding: 13px 32px;
  font-family: var(--font-main);
  font-weight: 600;
  font-size: 18px;
  transition: transform 0.15s ease, background-color 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--navy); color: var(--cream); }
.btn-primary:hover { background: #12242f; }
.btn-outline { background: transparent; color: var(--cream); border: 2px solid var(--cream); }
.btn-outline:hover { background: var(--cream); color: var(--navy); }
.btn-block { width: 100%; }

/* ---------- หัวข้อ section ---------- */
.section-title {
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 700;
  color: var(--navy);
  text-align: center;
  margin: 0 0 36px;
}
.section-title.light { color: var(--cream); margin-bottom: 18px; }
.section-title.big { font-size: clamp(30px, 3.4vw, 40px); letter-spacing: 0.02em; }

/* ============================================================
   1) NAVBAR
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--cream);
  border-bottom: 1px solid rgba(28, 53, 68, 0.08);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 84px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-shrink: 0;
  position: relative;
  left: -16px;        /* ← ตัวเลขนี้คือระยะขยับซ้าย ปรับได้ */
}

.brand-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.brand-icon svg { width: 18px; height: 18px; fill: var(--cream); }

.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-weight: 700; font-size: 17px; color: var(--navy); }
.brand-sub {
  font-size: 9px;
  letter-spacing: 0.1em;
  color: var(--blue);
  text-transform: uppercase;
  font-weight: 500;
}

/* โลโก้แบบรูปภาพ — ขยายด้วย scale ไม่ดัน layout */
.brand-logo-full {
  height: 175px;        /* ขนาดจริง จองพื้นที่เอง ไม่ทับเมนู (สูงสุดไม่เกิน 84px) */
  width: auto;
  max-width: 260px;
  object-fit: contain;
  display: block;
}

.main-nav { display: flex; align-items: center; gap: 24px; }
.main-nav a {
  font-size: 14px;
  font-weight: 500;
  color: var(--navy);
  white-space: nowrap;
  position: relative;
  padding: 4px 0;
}
.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 0;
  height: 2px;
  background: var(--yellow);
  transition: width 0.2s ease;
}
.main-nav a:hover::after,
.main-nav a.active::after { width: 100%; }

.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
  margin-left: auto;
}

.social-row { display: flex; align-items: center; gap: 10px; }
.social-btn {
  width: 36px;                    /* ← เดิม 40px */
  height: 36px;                   /* ← เดิม 40px */
  border-radius: 50%;
  background: var(--blue);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, transform 0.15s ease;
}
.social-btn:hover { background: var(--navy); transform: translateY(-2px); }
.social-btn svg { width: 20px; height: 20px; fill: var(--cream); }

.header-cta { padding: 9px 22px; font-size: 14px; }

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.nav-toggle span,
.nav-toggle::before,
.nav-toggle::after {
  content: "";
  display: block;
  width: 22px;
  height: 2px;
  background: var(--navy);
  margin: 4px auto;
}

/* ============================================================
   2) HERO — รูปเต็มพื้นที่ + ข้อความลอยทับ
   ============================================================ */
.hero {
  position: relative;
  overflow: hidden;
  min-height: 560px;
  display: flex;
  align-items: center;
}
.hero-media { position: absolute; inset: 0; z-index: 1; overflow: hidden; }
.hero-media img,
.hero-media .ph { width: 100%; height: 100%; object-fit: cover; display: block; }

.hero-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 24px;
  pointer-events: none;
}
.hero-copy { max-width: 480px; pointer-events: auto; }

.hero-title {
  font-size: clamp(36px, 4.6vw, 56px);
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 20px;
  color: var(--navy);
}
.hero-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--navy);
  font-size: 20px;                /* ← เดิม 15px (ตัวหนังสือใหญ่ขึ้น) */
  font-weight: 400;
  margin: 0 0 30px;
}

.hero-divider::before {
  content: "";
  width: 35px;
  height: 1.5px;                    /* ← เดิม 2px (เส้นบางลง) */
  background: var(--blue);
  flex-shrink: 0;
  position: relative;
  top: 1.5px;                       /* ← ขยับเส้นลงล่างเล็กน้อย */
}

/* ============================================================
   3) แถบไอคอนจุดเด่น 4 ช่อง
   ============================================================ */
.feature-strip { padding: 16px 0 56px; }
.feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); text-align: center; }
.feature-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-left: 1px solid rgba(28, 53, 68, 0.15);
}
.feature-item:first-child { border-left: none; }
.feature-icon svg { width: 34px; height: 34px; fill: none; stroke: var(--navy); stroke-width: 1.6; }
.feature-item p { margin: 0; font-size: 13.5px; font-weight: 500; color: var(--navy); line-height: 1.55; }

/* ============================================================
   3.5) SECTION ทำไมต้อง Welldent
   ============================================================ */
.why-welldent { padding: 8px 0 56px; }
.why-card {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 40px;
  align-items: center;
  background: var(--cream);
  border: 1px solid rgba(28, 53, 68, 0.12);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  padding: 40px 44px;
}
.why-title { font-size: 30px; font-weight: 700; color: var(--navy); margin: 0 0 18px; }
.why-text { font-size: 16px; line-height: 1.9; font-weight: 400; color: var(--navy); margin: 0 0 14px; }
.why-text:last-child { margin-bottom: 0; }
.why-media {
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 4 / 3;
}
.why-media img, .why-media .ph { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 820px) {
  .why-card { grid-template-columns: 1fr; gap: 26px; padding: 28px 24px; }
  .why-title { font-size: 25px; }
  .why-text { font-size: 15px; line-height: 1.8; }
}

/* ============================================================
   CAROUSEL (บริการ / รีวิว / before-after)
   ============================================================ */
.carousel { position: relative; }
.carousel-track {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding: 6px 2px 14px;
}
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-track > * { scroll-snap-align: start; flex-shrink: 0; }

.carousel-arrow {
  position: absolute;
  top: 45%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--cream);
  border: 1.5px solid var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  transition: opacity 0.2s ease;
}
.carousel-arrow.next { right: -14px; }
.carousel-arrow.prev { left: -14px; }
.carousel-arrow svg { width: 17px; height: 17px; stroke: var(--navy); fill: none; stroke-width: 2; }
.carousel-arrow.is-hidden { opacity: 0; pointer-events: none; }

/* ============================================================
   4) SECTION บริการของเรา
   ============================================================ */
.services { padding: 40px 0 64px; text-align: center; }
.service-card {
  width: min(262px, 72vw);
}
.service-card .ph { aspect-ratio: 1 / 1; border-radius: var(--radius-md); }
.service-card a { display: block; }
.service-card img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-md);
  box-shadow: 0 6px 18px rgba(28, 53, 68, 0.10);
}
.service-label { padding: 15px 10px; font-weight: 700; font-size: 17px; color: var(--navy); }
.services .btn { margin-top: 30px; }

/* ============================================================
   5) SECTION รีวิว GOOGLE (พื้นหลัง #52768c)
   ============================================================ */
.testimonials { background: var(--blue); padding: 56px 0 60px; text-align: center; }
.google-rating {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--cream);
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 32px;
}
.google-rating .stars { color: var(--yellow); letter-spacing: 1px; font-size: 15px; }

.review-card {
  width: min(360px, 82vw);
  background: var(--cream);
  color: var(--navy);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  text-align: left;
  box-shadow: var(--shadow-card);
}
.review-head { display: flex; align-items: center; gap: 11px; margin-bottom: 8px; }
.review-avatar { width: 40px; height: 40px; border-radius: 50%; overflow: hidden; flex-shrink: 0; }
.review-avatar .ph { font-size: 9px; }
.review-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.review-avatar-initial { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; font-size: 17px; }
.review-name { font-weight: 600; font-size: 14px; }
.review-meta { font-size: 12px; color: #6c7d86; }
.review-stars { color: var(--yellow); font-size: 13px; margin-bottom: 6px; }
.review-time { color: #6c7d86; font-weight: 400; margin-left: 4px; }
.badge-new {
  background: var(--yellow);
  color: var(--navy);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  margin-left: 6px;
}
.review-text { font-size: 13.5px; line-height: 1.7; color: #34434c; margin: 0; }
.testimonials .btn { margin-top: 28px; }
.testimonials .carousel-arrow { background: var(--cream); border-color: var(--cream); }
.testimonials .btn-outline { margin-top: 32px; }

/* ============================================================
   6) SECTION "REVIEWS" (Before / After หน้าแรก)
   ============================================================ */
.gallery { padding: 56px 0 30px; text-align: center; }
.gallery-card {
  position: relative;
  width: min(285px, 74vw);
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.gallery-card:hover { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(28, 53, 68, 0.16); }
.gallery-card a { display: block; width: 100%; height: 100%; }
.gallery-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(28, 53, 68, 0.75);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 4px 10px;
  border-radius: 4px;
  z-index: 2;
}
.gallery-tag.after { top: auto; left: auto; bottom: 12px; right: 12px; }
.gallery-caption {
  position: absolute;
  top: 50%;
  left: 12px;
  right: 12px;
  transform: translateY(-50%);
  background: rgba(82, 118, 140, 0.92);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: var(--radius-pill);
  z-index: 2;
}
.gallery-note { font-size: 12px; color: #7a8890; margin: 14px 0 0; }

/* ============================================================
   7) SECTION ทีมทันตแพทย์ (พื้นหลังฟ้าอมเทา)
   ============================================================ */
.team { background: var(--blue); color: var(--cream); padding: 60px 0; }
.team-inner { display: grid; grid-template-columns: 1fr 1.1fr; align-items: center; gap: 44px; }
.team-title { font-size: clamp(24px, 2.8vw, 34px); font-weight: 700; margin: 0 0 12px; line-height: 1.4; }
.team-sub { color: rgba(255, 254, 246, 0.85); margin: 0 0 30px; font-size: 15px; font-weight: 400; }
.team-media {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 16 / 10;
  box-shadow: var(--shadow-card);
}
.team-media img { filter: brightness(1.06); }
.team-chips {
  position: absolute;
  bottom: 12px;
  left: 12px;
  right: 12px;
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  z-index: 2;
}
.team-chips span {
  background: rgba(28, 53, 68, 0.8);
  color: #fff;
  font-size: 10px;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
}

/* ============================================================
   8) SECTION ติดต่อ / แผนที่ (หน้าแรก)
   ============================================================ */
.location { padding: 60px 0; }
.location-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; align-items: stretch; }
.map-media { border-radius: var(--radius-md); overflow: hidden; min-height: 340px; box-shadow: var(--shadow-card); }
.location-card { display: flex; flex-direction: column; justify-content: center; padding: 10px 0; }
.location-card h3 { font-size: clamp(24px, 2.4vw, 30px); font-weight: 700; margin: 0 0 6px; color: var(--navy); }
.location-hours { color: var(--navy); font-size: 15px; font-weight: 400; margin: 0 0 22px; }
.contact-list { display: flex; flex-direction: column; gap: 11px; margin-bottom: 26px; }
.contact-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  font-weight: 500;
  background: var(--cream);
  border: 1px solid rgba(28, 53, 68, 0.12);
  border-radius: var(--radius-pill);
  padding: 8px 16px;
}
.contact-icon {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.contact-icon svg { width: 18px; height: 18px; fill: var(--cream); }
.location-card .btn { align-self: flex-end; background: var(--blue); }
.location-card .btn:hover { background: var(--navy); }

/* ============================================================
   9) FOOTER
   ============================================================ */
.site-footer {
  background: var(--navy);
  color: rgba(255, 254, 246, 0.8);
  padding: 20px 0;
  text-align: center;
  font-size: 13px;
}
.footer-links a:hover { color: var(--yellow); }
.site-footer p { margin: 6px 0 0; }

/* ============================================================
   หน้า placeholder (stub)
   ============================================================ */
.stub-page { min-height: 55vh; display: flex; align-items: center; justify-content: center; text-align: center; padding: 80px 24px; }
.stub-page .stub-icon {
  width: 70px; height: 70px; border-radius: 50%;
  background: rgba(82, 118, 140, 0.12);
  display: flex; align-items: center; justify-content: center; margin: 0 auto 22px;
}
.stub-page .stub-icon svg { width: 32px; height: 32px; stroke: var(--navy); fill: none; stroke-width: 1.6; }
.stub-page h1 { font-size: 28px; font-weight: 700; margin: 0 0 12px; color: var(--navy); }
.stub-page p { color: #5a6b74; max-width: 440px; margin: 0 auto 26px; line-height: 1.7; }
.stub-page .btn-outline { color: var(--blue); border-color: var(--blue); }
.stub-page .btn-outline:hover { background: var(--blue); color: var(--cream); }

/* ============================================================
   RESPONSIVE (หน้าแรก)
   ============================================================ */
@media (max-width: 980px) {
  .main-nav {
    position: fixed;
    top: 0; right: 0;
    height: 100vh;
    width: min(320px, 80%);
    background: var(--cream);
    flex-direction: column;
    align-items: flex-start;
    padding: 90px 30px 30px;
    gap: 22px;
    box-shadow: -10px 0 30px rgba(28, 53, 68, 0.15);
    transform: translateX(100%);
    transition: transform 0.25s ease;
    z-index: 90;
  }
  .main-nav.open { transform: translateX(0); }
  .nav-toggle { display: flex; flex-direction: column; }
  .social-row { display: none; }
  .hero { min-height: 460px; }
  .hero-copy { max-width: 100%; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); gap: 10px 0; }
  .feature-item:nth-child(3) { border-left: none; }
  .team-inner, .location-inner { grid-template-columns: 1fr; }
  .location-card .btn { align-self: stretch; }
}

/* ============================================================
   หน้าบริการ (services.html)
   ============================================================ */
.services-page { padding: 56px 0 72px; }
.services-page .page-title { text-align: center; font-size: clamp(32px, 4.2vw, 50px); font-weight: 700; color: var(--blue); margin: 0 0 50px; }
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px 40px; align-items: start; }
.services-col { display: flex; flex-direction: column; gap: 40px; }
.service-pill {
  display: inline-block;
  background: var(--blue);
  color: #fff;
  font-weight: 600;
  font-size: 18px;
  padding: 10px 26px;
  border-radius: var(--radius-pill);
  margin-bottom: 20px;
}
.service-list { display: flex; flex-direction: column; gap: 13px; padding-left: 10px; }
.service-list li {
  position: relative;
  padding: 8px 16px 8px 36px;
  margin-left: -16px;
  border-radius: 12px;
  font-size: 17px;
  font-weight: 400;
  color: var(--navy);
  line-height: 1.4;
  transition: background-color 0.18s ease, color 0.18s ease;
}
.service-list li::before {
  content: "";
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--navy);
  transition: background-color 0.18s ease;
}
.service-list li:hover { background: var(--blue); color: #fff; }
.service-list li:hover::before { background: #fff; }
.service-list li a { display: block; }
.services-cta { text-align: center; margin-top: 58px; }
.services-cta .btn { font-size: 20px; padding: 18px 56px; }
@media (max-width: 860px) { .services-grid { grid-template-columns: 1fr; gap: 36px; } }

/* ============================================================
   หน้าทันตแพทย์ (dentists.html)
   ============================================================ */
.doctors-page { padding: 48px 0 72px; }
.doctors-page .page-title { text-align: center; font-size: clamp(30px, 4vw, 46px); font-weight: 700; color: var(--navy); margin: 0 0 44px; }
.doctors-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.doctor-card {
  background: var(--cream);
  border: 1.5px solid var(--blue);
  border-radius: 22px;
  padding: 16px 16px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.doctor-card:hover { box-shadow: var(--shadow-card); transform: translateY(-3px); }
.doctor-photo {
  width: 100%;
  aspect-ratio: 3 / 4;
  background: #d9d9d9;
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.doctor-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar-silhouette { width: 50%; height: 50%; fill: #b3b3b3; }
.doctor-name { font-size: 17px; font-weight: 600; color: var(--blue); text-align: center; margin: 0; }
.doctor-btn {
  font-size: 13px;
  padding: 6px 20px;
  background: transparent;
  color: var(--blue);
  border: 1.5px solid var(--blue);
  border-radius: var(--radius-pill);
}
.doctor-btn:hover { background: var(--blue); color: #fff; }
.doctors-cta { text-align: center; margin-top: 52px; }
.doctors-cta .btn { font-size: 19px; padding: 16px 50px; }
@media (max-width: 900px) { .doctors-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .doctors-grid { grid-template-columns: 1fr; } }

/* ============================================================
   Popup รูปประวัติคุณหมอ
   ============================================================ */
.doctor-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(28, 53, 68, 0.78);
}
.doctor-modal.open { display: flex; }
.doctor-modal-inner { position: relative; max-width: 900px; max-height: 90vh; }
.doctor-modal-inner img { max-width: 100%; max-height: 90vh; display: block; border-radius: 16px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4); }
.doctor-modal-close {
  position: absolute;
  top: -14px;
  right: -14px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: #fff;
  color: var(--navy);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}
body.no-scroll { overflow: hidden; }

/* ============================================================
   หน้าราคา / โปรโมชั่น (pricing.html)
   ============================================================ */
.pricing-page { padding: 40px 0 72px; }
.promo-banner { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 48px; }
.promo-item { display: block; border-radius: 16px; overflow: hidden; box-shadow: var(--shadow-card); transition: transform 0.18s ease; }
.promo-item:hover { transform: translateY(-3px); }
.promo-item img { width: 100%; height: auto; display: block; }
.pricing-title { color: var(--navy); margin-bottom: 28px; }
.price-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: start; }
.price-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  margin-bottom: 0;
}
.price-table thead th { background: var(--navy); color: #fff; font-weight: 600; font-size: 15px; text-align: left; padding: 12px 16px; }
.price-table thead th:last-child { text-align: right; }
.price-table td { padding: 10px 16px; font-size: 15px; color: var(--navy); border-bottom: 1px solid rgba(28, 53, 68, 0.06); vertical-align: top; }
.price-table tbody tr:nth-child(even) td { background: #f6f4ec; }
.price-table td:last-child { text-align: right; white-space: nowrap; }
.price-table tbody tr.cat td { background: #f0a24a; color: var(--navy); font-weight: 700; font-size: 15px; text-align: center; white-space: normal; padding: 11px 16px; }
.price-table tbody tr.subrow td { background: #e7ecef; color: var(--navy); font-weight: 600; text-align: center; white-space: normal; }
.price-ortho { margin-top: 28px; }
.price-ortho .cat-full { background: #f0a24a; color: var(--navy); font-weight: 700; font-size: 17px; text-align: center; padding: 12px 16px; border-radius: 12px; margin-bottom: 20px; }
.pricing-cta { text-align: center; margin-top: 52px; }
.pricing-cta .btn { font-size: 19px; padding: 16px 50px; }
@media (max-width: 820px) {
  .price-grid { grid-template-columns: 1fr; }
  .price-table td { white-space: nowrap; font-size: 14px; padding: 9px 12px; }
  .price-table thead th { font-size: 14px; padding: 11px 12px; }
  #price-left, #price-right, #ortho-left, #ortho-right { overflow-x: auto; -webkit-overflow-scrolling: touch; }
}
@media (max-width: 760px) {
  .promo-banner {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: 82%;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 8px;
  }
  .promo-item { scroll-snap-align: center; }
}

/* ============================================================
   หน้าบทความ (articles.html + article.html)
   ============================================================ */
.articles-page { padding: 40px 0 60px; }
.articles-layout { display: grid; grid-template-columns: 1fr 300px; gap: 40px; align-items: start; }
.article-list { display: flex; flex-direction: column; gap: 22px; }
.article-card {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 22px;
  background: #fff;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.article-card:hover { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(28, 53, 68, 0.16); }
.article-cover { position: relative; min-height: 180px; }
.article-cover img, .article-cover .ph { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.article-info { padding: 18px 20px 18px 0; display: flex; flex-direction: column; justify-content: center; }
.article-card-title { color: var(--blue); font-weight: 700; font-size: 19px; line-height: 1.35; margin: 0 0 10px; }
.article-card-excerpt { color: #5a6b74; font-size: 15px; line-height: 1.6; margin: 0; }
.article-empty { color: #7a8890; padding: 24px; }

.articles-sidebar { position: sticky; top: 104px; display: flex; flex-direction: column; gap: 16px; text-align: center; }
.sidebar-title { font-weight: 700; font-size: 20px; color: var(--navy); margin: 0 0 12px; }

/* custom dropdown หมวดหมู่ */
.dropdown { position: relative; text-align: left; }
.dropdown-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  border: 1.5px solid var(--blue);
  border-radius: var(--radius-pill);
  padding: 12px 20px;
  font-family: var(--font-main);
  font-size: 15px;
  font-weight: 500;
  color: var(--navy);
  cursor: pointer;
  transition: border-color 0.15s ease;
}
.dropdown-toggle:hover { border-color: var(--navy); }
.dropdown-caret {
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--blue);
  border-bottom: 2px solid var(--blue);
  transform: rotate(45deg);
  margin-top: -4px;
  transition: transform 0.2s ease, margin-top 0.2s ease;
  flex-shrink: 0;
}
.dropdown.open .dropdown-caret { transform: rotate(-135deg); margin-top: 2px; }
.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  list-style: none;
  margin: 0;
  padding: 6px;
  background: var(--cream);
  border: 1.5px solid rgba(82, 118, 140, 0.3);
  border-radius: 16px;
  box-shadow: var(--shadow-card);
  max-height: 320px;
  overflow-y: auto;
  z-index: 50;
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity 0.16s ease, transform 0.16s ease;
}
.dropdown.open .dropdown-menu { opacity: 1; transform: translateY(0); pointer-events: auto; }
.dropdown-menu li { padding: 11px 16px; border-radius: 10px; font-size: 15px; color: var(--navy); cursor: pointer; transition: background 0.12s ease, color 0.12s ease; }
.dropdown-menu li:hover { background: var(--blue); color: #fff; }
.dropdown-menu li.active { background: var(--navy); color: #fff; }

.article-pager { display: flex; justify-content: center; align-items: center; gap: 12px; margin-top: 40px; }
.pager-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1.5px solid var(--navy);
  background: transparent;
  color: var(--navy);
  font-family: var(--font-main);
  font-weight: 600;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, color 0.15s ease;
}
.pager-btn:hover { background: rgba(28, 53, 68, 0.08); }
.pager-btn.active { background: var(--navy); color: #fff; }
.pager-btn svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; }

/* บทความเดี่ยว */
.article-page { padding: 40px 0 60px; }
.article-single { max-width: 820px; margin: 0 auto; }
.article-title { text-align: center; font-size: clamp(24px, 3vw, 34px); font-weight: 700; color: var(--blue); line-height: 1.35; margin: 0 0 26px; }
.article-cover-lg { border-radius: var(--radius-md); overflow: hidden; aspect-ratio: 16 / 9; margin-bottom: 28px; }
.article-cover-lg img, .article-cover-lg .ph { width: 100%; height: 100%; object-fit: cover; }
.article-body { color: #34434c; font-size: 16px; line-height: 1.8; }
.article-heading { color: var(--blue); font-weight: 700; font-size: 20px; margin: 28px 0 12px; }
.article-paragraph { margin: 0 0 14px; }
.article-list { margin: 0 0 16px; padding-left: 4px; }
.article-list li { position: relative; padding-left: 20px; margin-bottom: 8px; }
.article-list li::before { content: ""; position: absolute; left: 2px; top: 11px; width: 6px; height: 6px; border-radius: 50%; background: var(--navy); }

.article-reviews { max-width: 980px; margin: 44px auto 0; }
.section-heading { color: var(--navy); font-weight: 700; font-size: 22px; margin: 0 0 20px; }
.section-heading.center { text-align: center; }
.article-reviews .ba-img { aspect-ratio: 4 / 5; }
.article-reviews .ba-card a { display: block; }
.article-review-cta { text-align: center; margin-top: 24px; }

.article-related { max-width: 820px; margin: 44px auto 0; }
.related-list { display: flex; flex-direction: column; gap: 12px; }
.related-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  border: 1.5px solid rgba(28, 53, 68, 0.15);
  border-radius: var(--radius-pill);
  padding: 12px 20px;
  color: var(--navy);
  font-weight: 500;
  font-size: 15px;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.related-item:hover { background: var(--blue); color: #fff; border-color: var(--blue); }
.related-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--blue); flex-shrink: 0; }
.related-item:hover .related-dot { background: #fff; }

.article-fallback { text-align: center; padding: 80px 24px; }
.article-fallback h1 { color: var(--navy); font-size: 26px; margin: 0 0 12px; }
.article-fallback p { color: #5a6b74; max-width: 440px; margin: 0 auto 24px; line-height: 1.7; }

@media (max-width: 900px) {
  .articles-layout { grid-template-columns: 1fr; }
  .articles-sidebar { position: static; order: -1; }
}
@media (max-width: 620px) {
  .article-card { grid-template-columns: 1fr; }
  .article-cover { aspect-ratio: 16 / 9; }
  .article-info { padding: 16px 18px 20px; }
  .ba-row { grid-template-columns: 1fr; }
}

/* ============================================================
   หน้ารีวิว (reviews.html)
   ============================================================ */
.reviews-page { padding: 48px 0 0; }
.reviews-title { text-align: center; font-size: clamp(30px, 4vw, 48px); font-weight: 700; color: var(--blue); margin: 0 0 40px; }
.video-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-bottom: 56px; }
.video-card {
  position: relative;
  aspect-ratio: 9 / 16;
  background: #d9d9d9;
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.video-card img, .video-card video, .video-card iframe { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border: 0; }
.video-play {
  position: relative;
  z-index: 2;
  width: 66px;
  height: 66px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
}
.video-play svg { width: 26px; height: 26px; fill: var(--navy); margin-left: 4px; }

.ba-card { position: relative; width: min(300px, 78vw); border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-card); }
.ba-img { position: relative; aspect-ratio: 4 / 3; }
.ba-img .ph { position: absolute; inset: 0; }
.ba-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ba-tag { position: absolute; top: 10px; left: 10px; color: #fff; font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5); z-index: 2; }
.ba-tag.after { top: auto; left: auto; bottom: 10px; right: 10px; }
.ba-label {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--blue);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  padding: 7px 16px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
  z-index: 3;
}
@media (max-width: 820px) {
  .video-grid {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: 72%;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 16px;
  }
  .video-card { scroll-snap-align: center; }
}

/* ============================================================
   หน้าติดต่อเรา (contact.html)
   ============================================================ */
.contact-page { padding: 48px 0 60px; }
.contact-head { text-align: center; margin-bottom: 40px; }
.contact-head h1 { font-size: clamp(30px, 3.6vw, 46px); font-weight: 700; color: var(--navy); margin: 0 0 8px; }
.contact-hours { color: var(--blue); font-size: 16px; font-weight: 500; margin: 0; }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; max-width: 900px; margin: 0 auto; }
.contact-item {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--cream);
  border: 1.5px solid var(--navy);
  border-radius: var(--radius-pill);
  padding: 10px 20px;
  font-size: 16px;
  font-weight: 500;
  color: var(--navy);
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.contact-item:hover { background: var(--blue); color: #fff; border-color: var(--blue); }
.contact-item .contact-icon { width: 40px; height: 40px; flex-shrink: 0; background: var(--navy); }
.contact-item .contact-icon svg { width: 24px; height: 24px; fill: var(--cream); }
.contact-item:hover .contact-icon { background: var(--navy); }
.contact-item:hover .contact-icon svg { fill: var(--cream); }
.contact-cta { text-align: center; margin: 38px 0 0; }
.contact-cta .btn { font-size: 19px; padding: 16px 48px; }
.contact-map { max-width: var(--container-w); margin: 44px auto 0; padding: 0 24px; }
.contact-map-frame { position: relative; height: 460px; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-card); }
.contact-map-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.contact-map .map-link { display: inline-block; margin-top: 14px; color: var(--blue); font-weight: 600; }
.contact-map .map-link:hover { color: var(--navy); }
@media (max-width: 720px) {
  .contact-grid { grid-template-columns: 1fr; }
  .contact-map-frame { height: 360px; }
}

/* ============================================================
   RESPONSIVE รวม (จอเล็กสุด)
   ============================================================ */
@media (max-width: 560px) {
  .header-cta { display: none; }
  .carousel-arrow.prev { left: 4px; }
  .carousel-arrow.next { right: 4px; }
}
/* หน้ารีวิว (reviews.html): การ์ดรูปเดียว แนวตั้ง ไม่มีข้อความ (ใส่รูปเอง) */
#ba-track .ba-img {
  aspect-ratio: 3 / 4;
}

/* หน้าแรก REVIEWS: เอาป้าย BEFORE/AFTER + label ออก เหลือกรอบเทาเปล่า */
.gallery-card .gallery-tag,
.gallery-card .gallery-caption {
  display: none;
}
.gallery-card .ph {
  font-size: 0;   /* ซ่อนข้อความ "Before / After" ในกล่อง */
}
.gallery-card img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* หน้าแรก ทีมทันตแพทย์: เอาป้ายชื่อออก เหลือกรอบเทา */
.team-chips {
  display: none;
}

/* รายการติดต่อหน้าแรก: ทำให้ทั้งกล่องเป็นลิงก์กดได้ */
.contact-list li a {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  color: inherit;
}

/* ============================================================
   หน้านโยบาย (privacy-policy.html, cookie-policy.html)
   ============================================================ */
.legal-page { padding: 40px 0 60px; }
.legal-single { max-width: 820px; margin: 0 auto; }
.legal-title { text-align: center; font-size: clamp(24px, 3vw, 34px); font-weight: 700; color: var(--blue); line-height: 1.35; margin: 0 0 30px; }
.legal-body { color: #34434c; font-size: 16px; line-height: 1.8; }
.legal-body h2 { color: var(--blue); font-weight: 700; font-size: 20px; margin: 32px 0 12px; }
.legal-body h2:first-child { margin-top: 0; }
.legal-body h3 { color: var(--navy); font-weight: 600; font-size: 17px; margin: 20px 0 10px; }
.legal-body p { margin: 0 0 14px; }
.legal-body ul { margin: 0 0 16px; padding-left: 4px; }
.legal-body li { position: relative; padding-left: 20px; margin-bottom: 8px; }
.legal-body li::before { content: ""; position: absolute; left: 2px; top: 11px; width: 6px; height: 6px; border-radius: 50%; background: var(--navy); }
.legal-body a { color: var(--blue); text-decoration: underline; text-underline-offset: 2px; }
.legal-body a:hover { color: var(--navy); }
@media (max-width: 620px) {
  .legal-page { padding: 28px 0 44px; }
  .legal-body { font-size: 15px; }
}
/* ============================================================
   เนื้อหาบทความที่มาจาก Block Editor
   CSS เดิม (บรรทัด 881-885) ผูกกับ class ที่ js/article.js สร้างขึ้น
   คือ .article-heading / .article-paragraph / .article-list
   แต่ Block Editor ออก markup มาตรฐานของตัวเอง (h2 / p / ul เปล่า)
   จึงต้องชี้สไตล์ชุดเดิมมาที่ markup ใหม่ด้วย เพื่อให้บทความที่
   เจ้าของเว็บเขียนเองในอนาคตหน้าตาเหมือนบทความเดิมทุกประการ
   ============================================================ */
.article-body h2 { color: var(--blue); font-weight: 700; font-size: 20px; margin: 28px 0 12px; }
.article-body p { margin: 0 0 14px; }
.article-body ul { display: flex; flex-direction: column; gap: 22px; margin: 0 0 16px; padding-left: 4px; list-style: none; }
.article-body ul li { position: relative; padding-left: 20px; margin-bottom: 8px; }
.article-body ul li::before { content: ""; position: absolute; left: 2px; top: 11px; width: 6px; height: 6px; border-radius: 50%; background: var(--navy); }

/* ที่อยู่คลินิกเหนือแผนที่ในหน้าติดต่อ (ข้อมูลใหม่ เว็บเดิมไม่เคยมี) */
.contact-address { color: #34434c; font-size: 16px; line-height: 1.7; text-align: center; margin: 0 0 18px; }
