/* =====================================================
   Warin Hospital — Public Theme (ยึดเลย์เอาต์จากภาพตัวอย่าง)
   ===================================================== */
:root {
  --brand-900: #082e24;
  --brand-800: #0b3b2f;
  --brand-700: #0d4a3a;
  --brand-600: #128a67;
  --brand-500: #178a68;
  --mint: #35c39a;
  --mint-soft: #bfe9db;
  --mint-ghost: #eefaf5;
  --ink: #17241f;
  --ink-soft: #5c6f68;
  --line: #e3eee9;
  --card: #ffffff;
  --radius-lg: 24px;
  --radius: 16px;
  --shadow-sm: 0 2px 10px rgba(8, 46, 36, .06);
  --shadow-md: 0 12px 30px rgba(8, 46, 36, .10);
  --font-head: 'Poppins', 'Noto Sans Thai', sans-serif;
  --font-body: 'Noto Sans Thai', 'Poppins', sans-serif;
}

html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  color: var(--ink);
  background: #fbfdfc;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 700; color: var(--brand-800); }
a { text-decoration: none; }
img { max-width: 100%; }

.text-success-dark { color: var(--brand-700); }

/* ============ Buttons ============ */
.btn-primary-brand {
  --bs-btn-bg: var(--brand-700); --bs-btn-border-color: var(--brand-700);
  --bs-btn-hover-bg: var(--brand-600); --bs-btn-hover-border-color: var(--brand-600);
  --bs-btn-active-bg: var(--brand-800); --bs-btn-active-border-color: var(--brand-800);
  --bs-btn-color: #fff; --bs-btn-hover-color: #fff;
  --bs-btn-active-color: #fff; --bs-btn-disabled-color: #fff; --bs-btn-focus-shadow-rgb: 18,138,103;
  color: #fff;
  --bs-btn-padding-y: .72rem; --bs-btn-padding-x: 1.5rem;
  border-radius: 999px; font-weight: 600; font-size: .95rem;
  display: inline-flex; align-items: center; gap: .5rem;
  box-shadow: 0 8px 20px rgba(13, 74, 58, .22);
}
.btn-primary-brand i { transition: transform .2s; }
.btn-primary-brand:hover i { transform: translateX(3px); }
.btn-outline-brand {
  --bs-btn-color: var(--brand-700); --bs-btn-border-color: var(--brand-700);
  --bs-btn-hover-bg: var(--brand-700); --bs-btn-hover-border-color: var(--brand-700); --bs-btn-hover-color: #fff;
  --bs-btn-padding-y: .72rem; --bs-btn-padding-x: 1.5rem;
  border-radius: 999px; font-weight: 600; font-size: .95rem;
  display: inline-flex; align-items: center; gap: .5rem; border-width: 1.5px;
}
.btn-light-brand {
  --bs-btn-bg: var(--mint); --bs-btn-border-color: var(--mint);
  --bs-btn-hover-bg: #2eb58b; --bs-btn-hover-border-color: #2eb58b;
  --bs-btn-color: var(--brand-900); --bs-btn-hover-color: var(--brand-900);
  --bs-btn-padding-y: .72rem; --bs-btn-padding-x: 1.6rem;
  border-radius: 999px; font-weight: 700;
  display: inline-flex; align-items: center; gap: .5rem;
}

/* ============ Header ============ */
.site-header {
  position: sticky; top: 0; z-index: 1030;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem; min-height: 74px;
}
.brand { display: inline-flex; align-items: center; gap: .6rem; }
.brand img { height: 44px; width: auto; }
.brand-text { font-family: var(--font-head); font-weight: 700; font-size: 1.3rem; color: var(--brand-700); gap: .5rem; }
.brand-mark {
  width: 40px; height: 40px; border-radius: 12px; background: var(--brand-700);
  color: var(--mint); display: inline-flex; align-items: center; justify-content: center; font-size: 1.2rem;
}
.header-actions { display: flex; align-items: center; gap: .9rem; }
.btn-header { padding: .55rem 1.3rem; font-size: .88rem; white-space: nowrap; }
.nav-list { display: flex; gap: .15rem; list-style: none; margin: 0; padding: 0; }
.nav-list .nav-link {
  color: var(--ink); font-weight: 500; font-size: .84rem;
  padding: .5rem .6rem; border-radius: 10px; white-space: nowrap;
}
.nav-list .nav-link:hover, .nav-list .nav-item.active > .nav-link { color: var(--brand-600); background: var(--mint-ghost); }
.dropdown-menu {
  border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-md);
  padding: .5rem; margin-top: .35rem !important;
}
.dropdown-item { border-radius: 10px; padding: .55rem .9rem; font-size: .92rem; }
.dropdown-item:hover { background: var(--mint-ghost); color: var(--brand-700); }
.nav-list .dropdown-menu { max-height: 72vh; overflow-y: auto; }
.nav-list .dropdown-menu.has-sub { max-height: none; overflow: visible; }
.nav-list .dropdown-menu::-webkit-scrollbar { width: 6px; }
.nav-list .dropdown-menu::-webkit-scrollbar-thumb { background: var(--mint-soft); border-radius: 3px; }
.lang-toggle {
  display: inline-flex; border: 1.5px solid var(--line); border-radius: 999px; overflow: hidden;
}
.lang-toggle button {
  border: 0; background: transparent; padding: .35rem .8rem; font-size: .8rem; font-weight: 700;
  color: var(--ink-soft); letter-spacing: .04em;
}
.lang-toggle button.active { background: var(--brand-700); color: #fff; }
.hamburger { border: 1.5px solid var(--line); background: #fff; border-radius: 12px; width: 42px; height: 42px; font-size: 1.3rem; color: var(--brand-700); }
.mobile-nav { background: var(--mint-ghost); }
/* เมื่อไม่ได้เปิด ซ่อนสนิท กัน offcanvas ล้นขวาบนจอกว้าง */
.mobile-nav:not(.show):not(.showing):not(.hiding) { display: none; }
.mobile-list { list-style: none; padding: 0; margin: 0; }
.mobile-link { display: block; padding: .65rem .5rem; color: var(--ink); font-weight: 600; border-bottom: 1px dashed var(--line); }
.mobile-link.strong { color: var(--brand-700); }
.mobile-link.d1 { padding-left: 1.3rem; }
.mobile-link.d2 { padding-left: 2.2rem; }
.mobile-group > ul { list-style: none; padding: 0; }

/* ============ Breadcrumb bar ============ */
#breadcrumb-bar {
  background: var(--mint-ghost);
  border-bottom: 1px solid var(--line);
  padding: .85rem 0;
}
#breadcrumb-bar .breadcrumb { margin: 0; }
.breadcrumb-item a { color: var(--brand-600); font-weight: 600; font-size: .9rem; }
.breadcrumb-item.active { color: var(--ink-soft); font-size: .9rem; }
.breadcrumb-item + .breadcrumb-item::before { color: var(--mint); }
.share-btn {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  border: 1.5px solid var(--mint); background: #fff; color: var(--brand-600);
  padding: .35rem .95rem; border-radius: 999px; font-size: .8rem; font-weight: 700;
  display: inline-flex; align-items: center; gap: .4rem; transition: all .15s;
}
.share-btn:hover { background: var(--brand-700); border-color: var(--brand-700); color: #fff; }
.share-btn.copied { background: var(--mint); color: var(--brand-900); border-color: var(--mint); }
#breadcrumb-bar > .container-xxl { position: relative; padding-right: 130px; }

/* ============ Sections ============ */
.blk { padding: 0px 0; }
.blk-hero { padding: 22px 0 26px; }
.blk-hero.hero-image-full { padding: 16px 0 22px; }
.sec-head { max-width: 640px; margin-bottom: 2.4rem; }
.sec-head.text-center { margin-inline: auto; }
.sec-badge {
  display: inline-flex; align-items: center; gap: .45rem;
  color: var(--brand-600); background: var(--mint-ghost);
  border: 1px solid var(--mint-soft);
  font-size: .8rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  padding: .38rem 1rem; border-radius: 999px; margin-bottom: 1rem;
}
.sec-badge i { font-size: .8rem; color: var(--mint); }
.sec-title { font-size: clamp(1.6rem, 3vw, 2.3rem); line-height: 1.22; margin-bottom: .8rem; }
.sec-sub { color: var(--ink-soft); font-size: 1rem; margin-bottom: 0; }
.link-more { color: var(--brand-600); font-weight: 700; font-size: .95rem; white-space: nowrap; }
.link-more:hover { color: var(--brand-800); }
.page-loading { display: flex; justify-content: center; padding: 120px 0; }

/* ============ Hero ============ */
.blk-hero {
  background:
    radial-gradient(1100px 480px at 85% -10%, var(--mint-soft) 0%, transparent 60%),
    linear-gradient(180deg, #f4fbf8 0%, #fbfdfc 100%);
  overflow: hidden;
}
.hero-title { font-size: clamp(2.1rem, 4.6vw, 3.4rem); line-height: 1.12; margin: .4rem 0 1.1rem; color: var(--brand-900); }
.hero-title .accent { color: var(--brand-600); display: block; }
.hero-sub { color: var(--ink-soft); font-size: 1.05rem; max-width: 540px; margin-bottom: 1.8rem; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: .8rem; margin-bottom: 2.2rem; }

/* Hero: จัดวางหัวข้อกับปุ่มแถวเดียวกัน (ซ้ายหัวข้อ-ขวาปุ่ม) */
.hero-copy-flex { display: flex; align-items: center; justify-content: space-between; gap: 1.6rem; }
.hero-copy-flex .hero-copy-text { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.hero-copy-flex .hero-copy-text .hero-title,
.hero-copy-flex .hero-copy-text .hero-sub { margin-bottom: .4rem; }
.hero-ctas-side { flex-shrink: 0; display: flex; flex-direction: row; flex-wrap: wrap; justify-content: flex-end; gap: .7rem; margin-bottom: 0; align-self: center; }
.hero-ctas-col { flex-direction: column !important; align-items: flex-start; gap: .7rem; }
.hero-ctas-side.hero-ctas-col { align-items: flex-end; }
@media (max-width: 992px) {
  .hero-copy-flex { flex-direction: column; align-items: flex-start; gap: .9rem; }
  .hero-ctas-side { justify-content: flex-start; }
}
.hero-stats { display: flex; flex-wrap: wrap; gap: 1.6rem 2.4rem; }
.hero-stats.hero-stats-col { flex-direction: column; gap: .6rem; }
.hero-stats.hero-stats-right { flex-direction: column; gap: .7rem; align-items: flex-start; min-width: 230px; }
.hero-copy-main { flex: 1; min-width: 0; }
.hero-copy-main .hero-title, .hero-copy-main .hero-sub { overflow-wrap: anywhere; }
@media (max-width: 992px) { .hero-copy-flex { flex-wrap: wrap; } }
.hero-stats-col .hero-stat { width: 100%; }
.hero-stat { display: flex; align-items: center; gap: .7rem; }
.hero-stat-icon {
  width: 46px; height: 46px; border-radius: 14px; background: var(--mint-ghost);
  border: 1px solid var(--mint-soft); color: var(--brand-600);
  display: inline-flex; align-items: center; justify-content: center; font-size: 1.15rem;
}
.hero-stat strong { display: block; font-family: var(--font-head); font-size: 1.15rem; color: var(--brand-800); line-height: 1.1; }
.hero-stat small { color: var(--ink-soft); font-size: .8rem; }
.hero-media img { border-radius: 28px 28px 28px 120px; box-shadow: var(--shadow-md); }

/* Hero โหมดรูปเต็มความกว้าง content */
.hero-image-full .hero-copy { max-width: 820px; }

/* Hero v2: บน=ข้อความ+สถิติ / ล่าง=ปุ่ม (สลับซ้าย-ขวาได้) */
.hero-v2-row1 { display: flex; align-items: flex-start; justify-content: space-between; gap: 2rem; }
.hero-v2-row1 .hero-copy-main { flex: 1; min-width: 0; }
.hero-v2-row1 .hero-stats { flex-shrink: 0; margin-top: .4rem; }
.hero-v2-row2 { margin-top: 1rem; }
.hero-v2-side { display: flex; flex-direction: column; gap: 1.15rem; align-items: flex-end; flex-shrink: 0; }
.hero-v2-side .hero-ctas { margin-bottom: 0; justify-content: flex-end; }
.hero-v2-side .hero-stats { min-width: 240px; }
.hero-v2-side .hero-stats.hero-stats-col { gap: .55rem; }
@media (max-width: 992px) { .hero-v2-side { align-items: flex-start; width: 100%; } }
.hero-v2.v2-swap .hero-v2-row1 { flex-direction: row-reverse; }
.hero-v2.v2-swap .hero-v2-row1 .hero-copy-main { text-align: left; }
.hero-v2.v2-swap .hero-v2-row2 { display: flex; justify-content: flex-start; }
.hero-v2-row1 .hero-stats.hero-stats-right { min-width: 250px; }
@media (max-width: 992px) {
  .hero-v2-row1 { flex-direction: column !important; gap: 1.2rem; }
  .hero-v2-row1 .hero-stats { width: 100%; }
}
.hero-full-img { margin-top: 1.1rem; border-radius: 20px; overflow: hidden; box-shadow: var(--shadow-md); }
.hero-full-img img { width: 100%; display: block; aspect-ratio: 16 / 9; object-fit: cover; }
/* สไลด์รูปภาพใน hero */
.hero-carousel, .hero-carousel .carousel-inner, .hero-carousel .carousel-item { border-radius: inherit; overflow: hidden; }
.hero-carousel .carousel-item img { width: 100%; display: block; aspect-ratio: 16 / 9; object-fit: cover; }
.hero-media .hero-carousel { border-radius: 28px 28px 28px 120px; box-shadow: var(--shadow-md); }
.hero-media .hero-carousel .carousel-item img { border-radius: 0; aspect-ratio: 4 / 3.4; }
.hero-media.image-left-mode .hero-carousel { border-radius: 28px 120px 28px 28px; }
.hero-carousel .carousel-control-prev, .hero-carousel .carousel-control-next { width: 42px; height: 42px; top: 50%; transform: translateY(-50%); background: rgba(8,46,36,.55); border-radius: 50%; opacity: .9; }
.hero-carousel .carousel-control-prev { left: 12px; }
.hero-carousel .carousel-control-next { right: 12px; }


.hero-fs-slider { width: 100%; }
.hero-fs-slider .hero-carousel { border-radius: 0; box-shadow: none; }
.hero-fs-slider .carousel-item img { width: 100%; height: 82vh; min-height: 420px; object-fit: cover; aspect-ratio: auto; }
.hero-fullscreen + * { margin-top: 0 !important; }
/* มือถือ: แสดงแบนเนอร์เต็มภาพตามสัดส่วนจริง ไม่ crop ข้อความในภาพ */
@media (max-width: 768px) { .hero-fs-slider .carousel-item img { height: auto; min-height: 0; aspect-ratio: auto; object-fit: contain; } }
.hero-fs-media { position: absolute; inset: 0; }
.hero-fs-media .hero-carousel, .hero-fs-media .carousel-inner, .hero-fs-media .carousel-item { height: 100%; border-radius: 0; }
.hero-fs-media .carousel-item img { height: 100vh; width: 100%; object-fit: cover; aspect-ratio: auto; }
.hero-fs-overlay { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(8,46,36,.82) 0%, rgba(8,46,36,.45) 55%, rgba(8,46,36,.15) 100%); }
.hero-fs-content { position: relative; z-index: 2; min-height: 100vh; display: flex; align-items: center; padding-top: 84px; }
.hero-fs-text { max-width: 660px; }
.hero-fs-text .hero-title, .hero-fs-text h1 { color: #fff; }
.hero-fs-text .hero-title .accent { color: var(--mint); }
.hero-fs-text .hero-sub { color: rgba(255,255,255,.88); }
.hero-fs-text .sec-badge { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.35); color: #fff; }
.hero-fs-text .sec-badge i { color: var(--mint); }
.hero-fs-text .hero-stats .hero-stat strong { color: #fff; }
.hero-fs-text .hero-stats .hero-stat small { color: rgba(255,255,255,.75); }
.hero-fs-text .hero-stat-icon { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.3); color: var(--mint); }
.hero-fs-text .btn-primary-brand { background: var(--brand-700); border-color: var(--brand-700); color: #fff; box-shadow: 0 8px 24px rgba(0,0,0,.35); }
.hero-fs-text .btn-primary-brand:hover { background: var(--brand-600); border-color: var(--brand-600); color: #fff; }
.hero-fs-text .btn-outline-brand { border-color: rgba(255,255,255,.6); color: #fff; }
.hero-fs-text .btn-outline-brand:hover { background: rgba(255,255,255,.15); border-color: #fff; color: #fff; }
@media (max-width: 768px) {
  .hero-fs-media .carousel-item img { height: 100svh; }
  .hero-fs-content { min-height: 100svh; padding-top: 76px; }
  .hero-fs-text .hero-title { font-size: 2rem; }
}
.hero-carousel .carousel-control-next { right: 12px; }
.hero-carousel .carousel-indicators { margin-bottom: .6rem; }
@media (max-width: 768px) { .hero-carousel .carousel-item img { aspect-ratio: 16 / 10; } }
@media (max-width: 768px) { .hero-full-img img { aspect-ratio: 16 / 10; } .hero-full-img { margin-top: 1.4rem; } }

/* ============ Services ============ */
.service-grid { display: grid; gap: 1.1rem; grid-template-columns: repeat(4, 1fr); }
.service-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.service-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.service-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.6rem 1.4rem; display: flex; flex-direction: column; gap: .55rem;
  color: inherit; transition: transform .18s ease, box-shadow .18s ease, border-color .18s;
}
.service-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); border-color: var(--mint); color: inherit; }
.service-icon {
  width: 54px; height: 54px; border-radius: 16px;
  background: linear-gradient(135deg, var(--mint-ghost), var(--mint-soft));
  color: var(--brand-600); display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.45rem; margin-bottom: .3rem;
}
.service-photo {
  display: block; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 12px; margin-bottom: .6rem;
  background: var(--mint-ghost);
}
.service-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.service-card:hover .service-photo img { transform: scale(1.05); }

/* แถบค้นหา/กรองคลินิก */
.clinic-filter {
  display: flex; gap: .8rem; flex-wrap: wrap; align-items: center;
  background: #fff; border: 1px solid var(--line); border-radius: 16px;
  padding: .85rem 1.1rem; margin-bottom: 1.5rem; box-shadow: var(--shadow-sm);
}
.cf-search { position: relative; flex: 1; min-width: 220px; }
.cf-search i { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--ink-soft); }
.cf-input {
  width: 100%; padding: .68rem 1rem .68rem 2.7rem;
  border: 1.5px solid var(--line); border-radius: 999px; font: inherit; color: var(--ink);
  background: var(--mint-ghost);
}
.cf-input:focus { outline: none; border-color: var(--mint); background: #fff; box-shadow: 0 0 0 .2rem rgba(53, 195, 154, .15); }
.cf-combo {
  padding: .68rem 1rem; border: 1.5px solid var(--line); border-radius: 999px;
  font: inherit; color: var(--ink); background: #fff; min-width: 230px; max-width: 100%;
}
.cf-combo:focus { outline: none; border-color: var(--mint); box-shadow: 0 0 0 .2rem rgba(53, 195, 154, .15); }
.cf-count { color: var(--ink-soft); font-size: .85rem; font-weight: 700; white-space: nowrap; }
.cf-empty { text-align: center; color: var(--ink-soft); padding: 2.5rem 1rem; font-weight: 600; }
.cf-empty i { font-size: 1.8rem; color: var(--mint); display: block; margin-bottom: .5rem; }
.service-card h3 { font-size: 1.05rem; margin: 0; }
.service-card p { color: var(--ink-soft); font-size: .88rem; margin: 0; flex: 1; }
.service-more { color: var(--brand-600); font-weight: 700; font-size: .85rem; display: inline-flex; align-items: center; gap: .35rem; }

/* ============ About ============ */
.blk-about { background: #fff; }
.about-img-wrap { position: relative; }
.about-img-wrap img { border-radius: var(--radius-lg); box-shadow: var(--shadow-md); }
.about-badge {
  position: absolute; right: 18px; bottom: 18px;
  background: var(--brand-800); color: #fff; border-radius: 16px;
  padding: .8rem 1.1rem; display: flex; align-items: center; gap: .7rem;
  box-shadow: var(--shadow-md);
}
.about-badge i { color: var(--mint); font-size: 1.5rem; }
.about-badge strong { font-family: var(--font-head); font-size: 1.15rem; display: block; line-height: 1.1; }
.about-badge small { font-size: .78rem; opacity: .85; }
.check-list { list-style: none; padding: 0; margin: 0 0 1.8rem; display: grid; gap: .8rem; }
.check-list li { display: flex; align-items: center; gap: .75rem; font-weight: 600; }
.check-list i { color: var(--mint); font-size: 1.25rem; }
.prose-sm p { color: var(--ink-soft); font-size: .97rem; }

/* ============ Stats band ============ */
.stats-band {
  background: linear-gradient(135deg, var(--brand-800), var(--brand-700) 55%, #11654e);
  border-radius: var(--radius-lg); color: #fff;
  padding: 3rem 2.5rem; position: relative; overflow: hidden;
}
.stats-band::after {
  content: ''; position: absolute; right: -80px; top: -80px;
  width: 320px; height: 320px; border-radius: 50%;
  background: rgba(53, 195, 154, .15);
}
.stats-title { margin-bottom: 1.8rem; }
.stats-title .sec-badge { background: rgba(255, 255, 255, .1); border-color: rgba(53, 195, 154, .4); color: var(--mint); }
.stats-title h2 { color: #fff; margin: 0; font-size: clamp(1.4rem, 2.6vw, 1.9rem); }
.stats-items { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; position: relative; z-index: 1; }
.stat-item { display: flex; flex-direction: column; align-items: center; text-align: center; gap: .35rem; }
.stat-icon {
  width: 56px; height: 56px; border-radius: 18px; background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(53, 195, 154, .45); color: var(--mint);
  display: inline-flex; align-items: center; justify-content: center; font-size: 1.5rem; margin-bottom: .5rem;
}
.stat-item strong { font-family: var(--font-head); font-size: clamp(1.5rem, 2.8vw, 2.2rem); line-height: 1.05; }
.stat-item small { color: rgba(255, 255, 255, .78); font-size: .85rem; }

/* ============ Doctors ============ */
.doctor-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; }
.doctor-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; transition: transform .18s, box-shadow .18s;
}
.doctor-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.doctor-photo { aspect-ratio: 1 / 1.08; overflow: hidden; background: var(--mint-ghost); }
.doctor-photo img { width: 100%; height: 100%; object-fit: cover; }
.doctor-body { padding: 1rem 1.1rem 1.2rem; text-align: center; }
.doctor-body h3 { font-size: 1rem; margin-bottom: .25rem; }
.doctor-body p { color: var(--brand-600); font-size: .85rem; font-weight: 600; margin: 0; }

/* ============ Testimonials ============ */
.blk-testimonials { background: linear-gradient(180deg, #fbfdfc, var(--mint-ghost)); }
.testimonial-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.testimonial-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.7rem 1.6rem; position: relative; display: flex; flex-direction: column; gap: .8rem;
}
.testimonial-card.featured { background: var(--brand-800); border-color: var(--brand-800); color: #fff; }
.testimonial-card.featured .quote { color: rgba(255, 255, 255, .92); }
.testimonial-card.featured .who small { color: rgba(255, 255, 255, .7); }
.quote-mark { color: var(--mint); font-size: 2.6rem; line-height: .5; }
.stars { color: #f5b93c; letter-spacing: .12em; font-size: .95rem; }
.quote { color: var(--ink-soft); font-size: .97rem; margin: 0; flex: 1; }
.who { display: flex; align-items: center; gap: .8rem; }
.who img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; }
.who strong { display: block; font-size: .95rem; line-height: 1.2; }
.who small { color: var(--ink-soft); font-size: .8rem; }

/* ============ Articles ============ */
.article-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.3rem; }
.article-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; color: inherit; transition: transform .18s, box-shadow .18s;
  display: flex; flex-direction: column;
}
.article-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); color: inherit; }
.article-img { position: relative; aspect-ratio: 3 / 2; overflow: hidden; }
.article-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.article-card:hover .article-img img { transform: scale(1.05); }
.date-chip {
  position: absolute; left: 12px; bottom: 12px;
  background: rgba(8, 46, 36, .82); color: #fff; font-size: .74rem; font-weight: 600;
  padding: .3rem .75rem; border-radius: 999px; display: inline-flex; gap: .35rem; align-items: center;
}
.article-body { padding: 1.2rem 1.3rem 1.4rem; display: flex; flex-direction: column; gap: .55rem; flex: 1; }
.cat-chip {
  align-self: flex-start; background: var(--mint-ghost); color: var(--brand-600);
  font-size: .74rem; font-weight: 700; padding: .26rem .8rem; border-radius: 999px;
}
.article-body h3 { font-size: 1.02rem; line-height: 1.4; margin: 0; flex: 1; }

/* ============ CTA band ============ */
.cta-band {
  background: linear-gradient(120deg, var(--brand-900), var(--brand-700));
  border-radius: var(--radius-lg); color: #fff;
  padding: 3rem; display: grid; grid-template-columns: 1.2fr 1fr; gap: 2.5rem; align-items: center;
  position: relative; overflow: hidden;
}
.cta-band::before {
  content: ''; position: absolute; left: -60px; bottom: -100px;
  width: 300px; height: 300px; border-radius: 50%; background: rgba(53, 195, 154, .12);
}
.cta-copy { position: relative; z-index: 1; }
.cta-copy .sec-badge { background: rgba(255, 255, 255, .1); border-color: rgba(53, 195, 154, .4); color: var(--mint); }
.cta-copy h2 { color: #fff; font-size: clamp(1.5rem, 2.8vw, 2.1rem); }
.cta-copy p { color: rgba(255, 255, 255, .8); margin: .8rem 0 1.6rem; max-width: 520px; }
.cta-side { display: flex; flex-direction: column; gap: 1.2rem; align-items: stretch; }
.cta-img { border-radius: var(--radius); box-shadow: var(--shadow-md); width: 100%; }
.cta-feats { display: grid; gap: .9rem; }
.cta-feat {
  display: flex; align-items: center; gap: .9rem;
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(53, 195, 154, .35);
  border-radius: 14px; padding: .8rem 1rem; font-weight: 600; font-size: .95rem;
}
.cta-feat-icon {
  width: 42px; height: 42px; border-radius: 12px; background: var(--mint); color: var(--brand-900);
  display: inline-flex; align-items: center; justify-content: center; font-size: 1.1rem; flex-shrink: 0;
}

/* ============ Contact ============ */
.contact-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.6rem; display: grid; gap: 1.2rem;
}
.contact-row { display: flex; gap: .9rem; align-items: flex-start; }
.contact-icon {
  width: 46px; height: 46px; border-radius: 14px; background: var(--mint-ghost);
  border: 1px solid var(--mint-soft); color: var(--brand-600); flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center; font-size: 1.15rem;
}
.contact-row small { display: block; color: var(--ink-soft); font-size: .8rem; }
.contact-row a, .contact-row span:not(.contact-icon) { font-weight: 600; color: var(--ink); font-size: .98rem; }
.contact-row a:hover { color: var(--brand-600); }
.map-placeholder {
  height: 100%; min-height: 260px; border-radius: var(--radius);
  background: linear-gradient(135deg, var(--mint-ghost), var(--mint-soft));
  border: 1px dashed var(--mint);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .6rem;
  color: var(--brand-600); text-align: center; padding: 2rem; font-weight: 600;
}
.map-placeholder i { font-size: 2.2rem; }
.map-embed iframe { width: 100%; min-height: 300px; border: 0; border-radius: var(--radius); }

/* ============ Rich text prose ============ */
.prose { max-width: 820px; margin: 0 auto; font-size: 1.02rem; color: #2c3a34; }
.prose h2 { font-size: 1.55rem; margin: 1.8rem 0 .8rem; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 1.2rem; margin: 1.4rem 0 .6rem; }
.prose p, .prose ul, .prose ol { margin-bottom: 1rem; }
.prose li { margin-bottom: .35rem; }
.prose img { border-radius: var(--radius); margin: 1rem 0; }
.prose a:not(.btn) { color: var(--brand-600); font-weight: 600; }
.prose .clinic-info { background: var(--mint-ghost); border: 1px solid var(--mint-soft); border-radius: 16px; padding: 1.3rem 1.6rem; margin: 1.2rem 0; }
.prose .clinic-info h3 { font-size: 1.05rem; color: var(--brand-700); margin: .2rem 0 .6rem; }
.prose .clinic-info ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .55rem; }
.prose .clinic-info li { padding-left: 1.6rem; position: relative; color: #2c3a34; }
.prose .clinic-info li strong { color: var(--brand-700); }
.prose .clinic-info li::before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--mint); font-weight: 700; }
.prose blockquote {
  border-left: 4px solid var(--mint); background: var(--mint-ghost);
  padding: 1rem 1.3rem; border-radius: 0 var(--radius) var(--radius) 0; margin: 1.2rem 0;
}

/* ============ Image / Gallery / Video / Divider ============ */
.img-figure { margin: 0; }
.img-figure img { border-radius: var(--radius-lg); box-shadow: var(--shadow-md); width: 100%; }
.img-figure figcaption { text-align: center; color: var(--ink-soft); font-size: .88rem; margin-top: .8rem; }
.blk-image.full-width { padding: 0; }
.blk-image.full-width img { border-radius: 0; box-shadow: none; }
.gallery-grid { display: grid; gap: 1rem; grid-template-columns: repeat(3, 1fr); }
.gallery-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.gallery-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.gallery-item { margin: 0; position: relative; border-radius: var(--radius); overflow: hidden; }
.gallery-item img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .3s; display: block; }
.gallery-item:hover img { transform: scale(1.06); }
.gallery-item figcaption {
  position: absolute; inset: auto 0 0 0;
  background: linear-gradient(transparent, rgba(8, 46, 36, .85));
  color: #fff; font-size: .85rem; font-weight: 600; padding: 1.6rem .9rem .7rem;
}
.video-frame { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-md); background: var(--brand-900); }
.video-frame iframe, .video-frame video { width: 100%; height: 100%; border: 0; display: block; }
.divider-line { height: 1px; background: var(--line); }
.divider-wave { height: 4px; border-radius: 999px; background: linear-gradient(90deg, transparent, var(--mint), transparent); }
.divider-space { height: 24px; }
.blk-unknown, .blk-custom { padding: 24px 0; }

/* ============ Footer ============ */
#site-footer {
  background: linear-gradient(180deg, var(--brand-800), var(--brand-900));
  color: rgba(255, 255, 255, .82); padding: 56px 0 0; margin-top: 40px;
}
#site-footer h4 { color: #fff; font-size: 1.02rem; margin-bottom: 1.1rem; }
.brand-footer { color: #fff; font-family: var(--font-head); font-weight: 700; font-size: 1.25rem; margin-bottom: 1rem; }
.footer-about { font-size: .92rem; max-width: 320px; }
.footer-col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .6rem; }
.footer-col a { color: rgba(255, 255, 255, .78); font-size: .92rem; }
.footer-col a:hover { color: var(--mint); }
.footer-contact li { display: flex; gap: .6rem; align-items: flex-start; font-size: .92rem; }
.footer-contact i { color: var(--mint); margin-top: .15rem; }
.socials { display: flex; gap: .6rem; margin-top: 1.1rem; }
.socials a {
  width: 38px; height: 38px; border-radius: 12px; background: rgba(255, 255, 255, .09);
  color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 1.05rem;
  transition: background .15s, color .15s;
}
.socials a:hover { background: var(--mint); color: var(--brand-900); }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, .12); margin-top: 2.6rem;
  padding: 1.1rem 0; display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap;
  font-size: .85rem;
}
.admin-link { color: rgba(255, 255, 255, .55); font-size: .85rem; }
.admin-link:hover { color: var(--mint); }

/* ============ 404 ============ */
.notfound-badge {
  width: 92px; height: 92px; border-radius: 28px;
  background: linear-gradient(135deg, var(--brand-700), var(--brand-600));
  color: var(--mint); font-size: 2.4rem;
  display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-md);
}

/* ============ Skeleton ============ */
.header-skeleton { display: flex; gap: 1rem; align-items: center; width: 100%; }
.logo-skeleton { width: 150px; height: 34px; border-radius: 10px; background: var(--line); }
.nav-skeleton { flex: 1; max-width: 420px; height: 20px; border-radius: 8px; background: var(--line); }

/* ============ Responsive ============ */
@media (max-width: 1200px) {
  .service-grid { grid-template-columns: repeat(3, 1fr); }
  .doctor-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 992px) {
  .blk { padding: 40px 0; }
  .service-grid, .service-grid.cols-3 { grid-template-columns: repeat(2, 1fr); }
  .testimonial-grid, .article-grid { grid-template-columns: 1fr 1fr; }
  .stats-items { grid-template-columns: repeat(2, 1fr); gap: 2rem; }
  .cta-band { grid-template-columns: 1fr; padding: 2.2rem; }
  .cta-side { flex-direction: column; }
  .gallery-grid, .gallery-grid.cols-4 { grid-template-columns: repeat(2, 1fr); }
  #breadcrumb-bar > .container-xxl { padding-right: 12px; }
  .share-btn { position: static; transform: none; margin-top: .5rem; }
}
@media (max-width: 768px) {
  .doctor-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-media img { border-radius: 22px; }
  .stats-band { padding: 2rem 1.4rem; }
}
@media (max-width: 576px) {
  .service-grid, .service-grid.cols-3, .service-grid.cols-2 { grid-template-columns: 1fr; }
  .testimonial-grid, .article-grid, .doctor-grid { grid-template-columns: 1fr; }
  .hero-ctas .btn { width: 100%; justify-content: center; }
}

/* ============ About section components ============ */
.prose .lead-text { font-size: 1.12rem; color: var(--brand-800); font-weight: 500; }
.prose .timeline { display: grid; gap: .9rem; margin: 1.2rem 0 1.6rem; }
.prose .tl-item { display: flex; gap: 1.1rem; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: .95rem 1.15rem; box-shadow: var(--shadow-sm); }
.prose .tl-year { flex-shrink: 0; min-width: 118px; font-weight: 700; color: var(--brand-600); font-family: var(--font-head); }
.prose .tl-body { color: #2c3a34; }
.prose .tl-body small { color: var(--ink-soft); }
.prose .duty-list { padding-left: 1.4rem; }
.prose .duty-list li { margin-bottom: .7rem; }
.prose .value-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: .9rem; }
.prose .value-card { background: var(--mint-ghost); border: 1px solid var(--mint-soft); border-radius: 14px; padding: 1rem 1.15rem; }
.prose .value-card h4 { color: var(--brand-700); font-size: .96rem; margin: 0 0 .35rem; }
.prose .value-card p { margin: 0; font-size: .89rem; color: var(--ink-soft); }
.prose .highlight-box { background: linear-gradient(135deg, var(--brand-800), var(--brand-700)); border-radius: 18px; padding: 1.4rem 1.6rem; margin: 1.4rem 0; }
.prose .highlight-box h3 { color: var(--mint); font-size: 1rem; margin: 0 0 .35rem; }
.prose .highlight-box p { color: #fff; font-size: 1.15rem; font-weight: 600; margin: 0 0 1.1rem; }
.prose .highlight-box p:last-child { margin-bottom: 0; }
.prose .org-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: .9rem; margin-bottom: 1.6rem; }
.prose .org-card { background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--mint); border-radius: 12px; padding: .9rem 1.1rem; box-shadow: var(--shadow-sm); }
.prose .org-card h3 { font-size: .9rem; color: var(--ink-soft); margin: 0 0 .25rem; font-weight: 600; }
.prose .org-card p { margin: 0; font-weight: 700; color: var(--brand-800); }
.prose .dl-list { display: grid; gap: .8rem; margin: 1.2rem 0; }
.prose .dl-card { display: flex; align-items: center; gap: .9rem; background: var(--mint-ghost); border: 1px solid var(--mint-soft); border-radius: 12px; padding: .95rem 1.15rem; font-weight: 600; color: var(--brand-700); }
.prose .dl-card i { font-size: 1.6rem; color: #d05050; flex-shrink: 0; }
.prose .dl-card:hover { background: var(--mint-soft); }
.prose .two-col { columns: 2; column-gap: 2.4rem; }
.prose .two-col li { break-inside: avoid; margin-bottom: .45rem; }
@media (max-width: 768px) { .prose .two-col { columns: 1; } .prose .tl-item { flex-direction: column; gap: .25rem; } }

/* การ์ดโหมดรูปพื้นหลัง + ข้อความบนแผงขาวจาง (imageMode: overlay) */
.service-card.photo-overlay {
  position: relative; display: flex; flex-direction: column; justify-content: flex-end;
  padding: 0; min-height: 230px; overflow: hidden;
}
.service-card.photo-overlay .service-bg {
  position: absolute; inset: 0; background-size: cover; background-position: center;
  transition: transform .35s ease; z-index: 0;
}
.service-card.photo-overlay:hover .service-bg { transform: scale(1.06); }
.service-card.photo-overlay:hover { border-color: var(--mint); }
.service-overlay-text {
  position: relative; z-index: 1; display: flex; flex-direction: column; gap: .28rem;
  background: rgba(255, 255, 255, .82);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  padding: .85rem 1rem 1rem; margin-top: auto;
}
.service-overlay-text h3 { margin: 0; font-size: 1.02rem; }
.service-overlay-text p {
  margin: 0; font-size: .85rem; color: var(--ink-soft);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.service-overlay-text .service-more { font-size: .82rem; }

/* =====================================================
   Mobile refinements — พอดีแนวกว้าง, การ์ดมินิมอล, ระยะห่างกระชับ
   ===================================================== */
@media (max-width: 768px) {
  /* กันเลื่อนซ้ายขวา */
  html, body { overflow-x: clip; }

  /* ระยะห่าง section แนวตั้ง — พอดี ๆ ไม่ชิด/ไม่ห่างเกิน (จอ ≤992px = 40px, ≤768px = 20px) */
  .blk { padding: 20px 0; }
  .blk-hero { padding: 14px 0 18px; }
  .blk-hero.hero-image-full { padding: 12px 0 16px; }
  .blk-cta { padding: 26px 0; }
  /* blk-section: ระยะห่างกับเนื้อหาถัดไปจัดที่ container ด้านใน ตัว section ไม่กินพื้นที่ */
  #page-content .blk.blk-section { padding: 0; }
  #page-content .blk.blk-section > .container-xxl { padding-bottom: 16px; }
  /* ปุ่ม/สถิติฝั่งข้าง: เว้นระยะจากสไลด์เต็มจอด้านล่าง (เดิมชิด 0px) */
  .hero-v2-side { padding-bottom: 18px; }
  .sec-head { margin-bottom: 1rem; }
  .sec-title { margin-bottom: .35rem; }
  .sec-sub { font-size: .88rem; }

  /* การ์ดบริการ: 3 คอลัมน์ ครบทุกรายการ มินิมอล */
  .service-grid, .service-grid.cols-2, .service-grid.cols-3, .service-grid.cols-4 {
    grid-template-columns: repeat(3, 1fr); gap: .45rem;
  }
  .service-card { padding: .45rem .35rem .55rem; border-radius: 11px; gap: .2rem; }
  .service-card h3 {
    font-size: .8rem; line-height: 1.3; text-align: center;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  }
  .service-card p, .service-card .service-more { display: none; }
  .service-card .service-icon {
    width: 34px; height: 34px; font-size: .95rem; border-radius: 10px; margin: .1rem auto .2rem;
  }
  .service-card .service-photo { aspect-ratio: 1 / 1; border-radius: 9px; margin-bottom: .3rem; }

  /* การ์ด overlay บนมือถือ: ชื่ออย่างเดียวบนแผงขาวจาง */
  .service-card.photo-overlay { min-height: 92px; }
  .service-overlay-text { padding: .32rem .4rem .42rem; gap: .08rem; }
  .service-overlay-text h3 { font-size: .8rem; }
  .service-overlay-text p, .service-overlay-text .service-more { display: none; }

  /* ชิ้นส่วนอื่นกระชับ */
  .cta-band { padding: 1.25rem 1rem; }
  .cta-copy p { margin: .55rem 0 1.1rem; }
  .stats-band { padding: 1.3rem .9rem; border-radius: 18px; }
  .stats-items { gap: 1rem; }
  .stat-item strong { font-size: 1.3rem; }
  .stat-icon { width: 44px; height: 44px; font-size: 1.15rem; border-radius: 13px; }
  .stats-title h2 { font-size: 1.15rem; }
  #breadcrumb-bar { padding: .55rem 0; }
  .doctor-grid, .article-grid, .testimonial-grid { gap: .8rem; }
  .gallery-grid { gap: .6rem; }
  .contact-card { padding: 1.05rem; gap: .85rem; }
  .footer-bottom { flex-direction: column; gap: .3rem; text-align: center; justify-content: center; }
  .img-figure img { border-radius: 14px; }
  .prose table { display: block; overflow-x: auto; }
  .prose .timeline { gap: .6rem; }
  .prose .tl-item { padding: .7rem .8rem; }
  .prose .tl-year { min-width: 96px; font-size: .86rem; }
  .prose .clinic-info { padding: 1rem 1.05rem; }
  .video-frame { border-radius: 14px; }
}


/* แสดง/ซ่อนบล็อกแยกอุปกรณ์ */
@media (max-width: 768px) { .hide-mobile { display: none !important; } }
@media (min-width: 769px) { .hide-desktop { display: none !important; } }


/* ============ Sections & Widgets ============ */
.sec-grid { display: grid; gap: 1.2rem; }
.sec-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.sec-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.sec-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.sec-slot { min-width: 0; min-height: 40px; }
@media (max-width: 768px) {
  .sec-grid, .sec-grid.cols-2, .sec-grid.cols-3, .sec-grid.cols-4 { grid-template-columns: 1fr; }
}
.wg-heading { color: var(--brand-800); font-size: clamp(1.15rem, 2vw, 1.55rem); margin: 0 0 .5rem; }
.wg-text { font-size: .98rem; color: #2c3a34; }
.wg-text p { margin-bottom: .7rem; }
.wg-image { margin: 0; }
.wg-image img { width: 100%; border-radius: 12px; box-shadow: var(--shadow-sm); }
.wg-image figcaption { font-size: .82rem; color: var(--ink-soft); text-align: center; margin-top: .45rem; }
.wg-button .btn { display: inline-flex; }
.wg-video .video-frame { border-radius: 14px; aspect-ratio: 16/9; position: relative; overflow: hidden; box-shadow: var(--shadow-sm); }
.wg-video iframe, .wg-video video { width: 100%; height: 100%; border: 0; display: block; }
.wg-quote {
  margin: 0; background: var(--mint-ghost); border-left: 4px solid var(--mint);
  border-radius: 0 14px 14px 0; padding: 1rem 1.2rem;
}
.wg-quote p { margin: 0 0 .4rem; font-style: italic; color: var(--brand-800); }
.wg-quote footer { font-size: .84rem; color: var(--ink-soft); }
.wg-counter { background: var(--brand-700); color: #fff; border-radius: 16px; padding: 1.1rem .8rem; }
.wg-counter strong { display: block; font-family: var(--font-head); font-size: 1.7rem; line-height: 1.1; color: var(--mint); }
.wg-counter small { color: rgba(255,255,255,.8); }
.wg-form .form-control { border-radius: 10px; border-color: var(--line); font-size: .92rem; }
.wg-form .form-control:focus { border-color: var(--mint); box-shadow: 0 0 0 .2rem rgba(53,195,154,.15); }
.wg-unknown { color: var(--ink-soft); font-size: .8rem; }

/* ============ ปุ่มลอยลากได้ (Draggable FAB) ============ */
#wg-fab {
  position: fixed; z-index: 3000; width: 60px;
  touch-action: none; user-select: none;
}
#wg-fab.dragging { cursor: grabbing; }
#wg-fab.dragging .wg-fab-submenu { opacity: 0; pointer-events: none; }

.wg-fab-main {
  width: 60px; height: 60px; border-radius: 50%;
  background: linear-gradient(135deg, #da1cb0, #b0128a);
  border: 0; cursor: grab; position: relative;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 1.5rem;
  box-shadow: 0 6px 18px rgba(218, 28, 176, .45);
  transition: transform .15s, box-shadow .15s;
}
.wg-fab-main:hover { transform: scale(1.06); box-shadow: 0 8px 24px rgba(218, 28, 176, .55); }
#wg-fab.dragging .wg-fab-main { cursor: grabbing; transform: scale(1.02); }
.wg-fab-main .wg-fab-close { display: none; }
#wg-fab.open .wg-fab-main { background: linear-gradient(135deg, #0d4a3a, #0b3b2f); box-shadow: 0 6px 18px rgba(8, 46, 36, .45); }
#wg-fab.open .wg-fab-main .bi-headset { display: none !important; }
#wg-fab.open .wg-fab-main .wg-fab-close { display: inline !important; }
.wg-fab-main::after {
  content: ''; position: absolute; inset: -6px; border-radius: 50%;
  border: 2px solid rgba(218, 28, 176, .35); animation: fabPulse 2.2s ease-out infinite;
}
@keyframes fabPulse {
  0% { transform: scale(.9); opacity: 1; }
  100% { transform: scale(1.25); opacity: 0; }
}

.wg-fab-submenu {
  position: absolute; bottom: 70px; left: 0; right: 0;
  display: flex; flex-direction: column; gap: .55rem; align-items: center;
  pointer-events: none;
}
.wg-fab-item {
  display: flex; flex-direction: column; align-items: center; gap: .2rem;
  opacity: 0; transform: translateY(12px) scale(.6);
  transition: opacity .18s ease, transform .22s cubic-bezier(.34,1.56,.64,1);
  transition-delay: 0ms; pointer-events: none;
}
#wg-fab.open .wg-fab-item {
  opacity: 1; transform: translateY(0) scale(1);
  transition-delay: var(--fab-delay); pointer-events: auto;
}
.wg-fab-btn {
  width: 46px; height: 46px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 1.15rem; text-decoration: none;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .28);
  transition: transform .12s;
}
.wg-fab-btn:hover { transform: scale(1.12); color: #fff; }
.wg-fab-label {
  background: rgba(23, 36, 31, .88); color: #fff;
  font-size: .68rem; font-weight: 600; white-space: nowrap;
  padding: .14rem .5rem; border-radius: 6px;
}

/* ==== หน้าต่าง Chatbot ฝังในหน้า (จากเมนู FAB) — ขวาล่าง desktop, เต็มจอมือถือ ==== */
#wg-chat {
  position: fixed; right: 18px; bottom: 96px;
  width: 400px; height: min(620px, calc(100vh - 130px));
  display: flex; flex-direction: column; overflow: hidden;
  background: #fff; border: 1px solid var(--line); border-radius: 18px;
  box-shadow: 0 18px 50px rgba(8, 46, 36, .35);
  z-index: 2999;
  opacity: 0; pointer-events: none; transform: translateY(16px) scale(.97);
  transition: opacity .2s ease, transform .22s ease;
  transform-origin: bottom right;
}
#wg-chat.show { opacity: 1; pointer-events: auto; transform: translateY(0) scale(1); }
.wg-chat-head {
  display: flex; align-items: center; gap: .55rem;
  background: linear-gradient(135deg, var(--brand-700), var(--brand-600));
  color: #fff; font-weight: 600; font-size: .92rem;
  padding: .7rem 1rem; flex: none;
}
.wg-chat-head i { font-size: 1.1rem; color: var(--mint); }
.wg-chat-head span { flex: 1; }
.wg-chat-close {
  border: 0; background: rgba(255,255,255,.14); color: #fff;
  width: 28px; height: 28px; border-radius: 8px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; font-size: .85rem;
}
.wg-chat-close:hover { background: rgba(255,255,255,.28); }
.wg-chat-frame { flex: 1; border: 0; width: 100%; background: #f6faf8; }
@media (max-width: 768px) {
  #wg-chat { inset: 0; right: 0; bottom: 0; width: 100%; height: 100%; border-radius: 0; border: 0; z-index: 3001; }
  .wg-chat-head { padding-top: max(.7rem, env(safe-area-inset-top)); }
}