/* ================================================================
   Clinic CMS — Public Frontend Styles
   ================================================================ */

:root {
  /* Brand */
  --primary:            #06342F;
  --primary-dark:       #042421;
  --primary-light:      #03302B;
  --primary-gradient:   linear-gradient(135deg, #03302B, #042421);
  --accent:             #C09046;
  --accent-dark:        #AB731C;
  --accent-gradient:    linear-gradient(135deg, #C09046, #AB731C);

  /* Typography */
  --text:               #1a1a2e;
  --text-muted:         #6b7280;

  /* Surface */
  --bg:                 #f9fafb;
  --surface:            #ffffff;
  --border:             #e5e7eb;

  /* Semantic */
  --danger:             #e63946;
  --success:            #2d9d5b;

  /* Elevation */
  --shadow:             0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md:          0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.06);
  --shadow-lg:          0 10px 30px rgba(0,0,0,.1), 0 0 0 1px rgba(0,0,0,.04);

  /* Layout */
  --radius:             8px;
  --radius-lg:          14px;

  /* Glass reflex */
  --glass-reflex-light: 1;
  --glass-reflex-dark:  1;
  --glass-blur:         20px;
  --glass-saturation:   160%;
}

:root { --font-serif: 'Inria Serif', Georgia, serif; }

.font-serif  { font-family: var(--font-serif) !important; }
.font-grey    { color: #696969 !important; }
.font-primary   { color: #06342F !important; }
.font-secondary { color: #C09046 !important; }

.cms-cell--flex > * { width: 100%; min-width: 0; }

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; overflow-x: clip; }

/* Offset anchor targets so sticky header doesn't cover them */
[id] { scroll-margin-top: 88px; }

body {
  font-family: 'Noto Sans Thai', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--surface);
  position: relative;
  overflow-x: clip;
}

input, textarea, select, button { font-family: 'Noto Sans Thai', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; }

img { max-width: 100%; height: auto; display: block; }
a   { color: var(--primary); text-decoration: none; }
a:hover { opacity: .85; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ── BUTTONS ── */
.btn {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .65rem 1.5rem;
  border-radius: 50px;
  font-size: 14px; font-weight: 600;
  text-decoration: none; border: none; cursor: pointer;
  transition: all .2s;
  line-height: 1;
}
/* Filled */
.btn-primary   { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-gradient); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(6,52,47,.35); }
.btn-gold      { background: var(--accent); color: #fff; }
.btn-gold:hover { background: var(--accent-gradient); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(192,144,70,.4); }
/* Outline */
.btn-secondary { background: transparent; color: var(--primary); border: 2px solid var(--primary); }
.btn-secondary:hover { background: var(--primary); color: #fff; box-shadow: 0 4px 16px rgba(6,52,47,.25); }
.btn-ghost     { background: transparent; color: var(--text); border: 2px solid var(--border); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }
.btn-outline   { background: transparent; color: #fff; border: 2px solid rgba(255,255,255,.6); }
.btn-outline:hover { background: rgba(255,255,255,.1); border-color: #fff; }
/* Icon circle — compose with a variant: .btn-icon.btn-primary, .btn-icon.btn-ghost, etc. */
.btn-icon      { width: 44px; height: 44px; padding: 0; border-radius: 50%; flex-shrink: 0; }
.btn-icon.btn-sm { width: 36px; height: 36px; }
.btn-icon.btn-lg { width: 56px; height: 56px; }
/* Sizes */
.btn-sm { padding: .4rem 1rem; font-size: 13px; }
.btn-lg { padding: .85rem 2rem; font-size: 16px; }

/* ── SITE HEADER ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: color-mix(in srgb, #bbbcbc 10%, transparent);
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturation));
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturation));
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, #fff calc(var(--glass-reflex-light) * 12%), transparent),
    inset 0 1px 0 color-mix(in srgb, #fff calc(var(--glass-reflex-light) * 40%), transparent),
    inset 0 -1px 0 color-mix(in srgb, #fff calc(var(--glass-reflex-light) * 40%), transparent),
    0 4px 32px 0 color-mix(in srgb, #000 calc(var(--glass-reflex-dark) * 6%), transparent);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: .75rem 0;
  min-height: 76px;
}

/* ── LOGO ── */
.site-logo         { text-decoration: none; display: flex; align-items: center; flex-shrink: 0; }
.logo-img          { height: 56px; width: auto; display: block; }
.logo-brand        { display: flex; flex-direction: column; line-height: 1.1; }
.logo-top          { display: flex; align-items: baseline; gap: .35rem; }
.logo-pro          { font-size: 22px; font-weight: 900; color: var(--accent, #C09046); letter-spacing: -.5px; }
.logo-medical      { font-size: 22px; font-weight: 900; color: var(--primary, #06342F); letter-spacing: -.5px; }
.logo-tagline      { font-size: 8px; font-weight: 600; color: var(--primary, #06342F); letter-spacing: .18em; opacity: .55; margin-top: 2px; text-transform: uppercase; }

/* ── HEADER DIVIDER ── */
.header-divider    { width: 1px; height: 38px; background: currentColor; opacity: .15; flex-shrink: 0; margin: 0 .25rem; }

/* ── NAV ── */
.site-nav          { flex: 1; display: flex; justify-content: center; }
.site-nav > ul     { display: flex; list-style: none; gap: .1rem; margin: 0; padding: 0; }
.site-nav li       { position: relative; }
.site-nav a {
  display: inline-flex; align-items: center; gap: .3rem;
  padding: .55rem 1rem;
  font-size: 16px; font-weight: 500;
  color: inherit;
  text-decoration: none;
  border-radius: 8px;
  transition: background .15s;
  white-space: nowrap;
}
.site-nav a:hover           { background: rgba(128,128,128,.1); }
.site-nav a.active          { font-weight: 700; }
.nav-chevron                { flex-shrink: 0; transition: transform .2s; }
.has-dropdown.is-open .nav-chevron { transform: rotate(180deg); }

/* ── Mega menu ── */
.nav-megamenu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  transform: none;
  width: 300px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 40px rgba(0,0,0,.13);
  z-index: 300;
  overflow: hidden;
  transition: width .18s ease;
}
.nav-megamenu.show-right { width: 760px; }
.nav-megamenu::before {
  content: '';
  position: absolute;
  top: -6px; left: 0; right: 0; height: 6px;
}
.has-megamenu.is-open .nav-megamenu { display: flex; }
.megamenu-left {
  width: 300px;
  min-width: 300px;
  flex-shrink: 0;
  background: #f7f7f7;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.megamenu-cat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 13px 14px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 500;
  color: #222;
  cursor: pointer;
  transition: background .15s;
  text-decoration: none;
  min-width: 0;
  white-space: normal;
}
.megamenu-cat-item span { flex: 1; min-width: 0; }
.megamenu-cat-item svg { flex-shrink: 0; color: #aaa; transition: color .15s; }
.megamenu-cat-item:hover,
.megamenu-cat-item.is-active {
  background: #FEF4EA;
  color: #222;
}
.megamenu-cat-item.is-active svg { color: #555; }
.megamenu-cat-link { display: block; line-height: 1.4; }
.site-nav .nav-megamenu a.megamenu-cat-link { white-space: normal; }
.megamenu-right {
  flex: 1;
  min-width: 0;
  padding: 20px 22px 20px 18px;
  border-left: 1px solid #f0f0f0;
  display: none;
}
.nav-megamenu.show-right .megamenu-right { display: block; }
.megamenu-subgroup {
  display: none;
  flex-direction: column;
  gap: 0;
}
.megamenu-subgroup.is-active { display: flex; }
.megamenu-subgroup a {
  display: block;
  padding: 11px 10px;
  font-size: 15px;
  font-weight: 400;
  color: #222;
  border-radius: 8px;
  text-decoration: none;
  transition: background .12s, color .12s;
  white-space: nowrap;
}
.megamenu-subgroup a:hover { background: rgba(6,52,47,.05); color: var(--primary, #06342F); }

/* ── HEADER ACTIONS (right group) ── */
.header-actions    { display: flex; align-items: center; gap: .75rem; flex-shrink: 0; }

/* Language switcher */
.lang-switch       { display: flex; align-items: center; gap: .2rem; font-size: 14px; font-weight: 500; }
.lang-switch__item { color: #888; text-decoration: none; transition: color .15s; }
.lang-switch__item:hover { color: var(--primary); }
.lang-switch__item--active { color: var(--primary); font-weight: 700; }
.lang-switch__sep  { color: #bbb; }

/* Contact Us — outline pill */
.btn-header-outline {
  display: inline-flex; align-items: center;
  padding: .5rem 1.3rem;
  border-radius: 50px;
  background: transparent;
  color: #03302B;
  border: 1.5px solid #03302B;
  font-size: 13px; font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: background .2s;
}
.btn-header-outline:hover { background: #DAE1D9; color: #03302B; }

/* Call Us — dark filled pill */
.btn-header-call {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .5rem 1.4rem;
  background: linear-gradient(135deg, #03302B, #042421);
  border: 1.5px solid transparent;
  border-radius: 50px;
  color: #fff;
  font-size: 13px; font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: background .25s;
}
.btn-header-call:hover { background: linear-gradient(135deg, #042421, #042421); color: #fff; opacity: 1 !important;}

/* ── MOBILE TOGGLE ── */
.nav-toggle { display: none; background: none; border: none; padding: .4rem; cursor: pointer; flex-direction: column; gap: 5px; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: currentColor; border-radius: 2px; transition: transform .2s, opacity .2s; }

/* ── SITE MAIN ── */
.site-main { min-height: 60vh; }
.site-main--connect { margin-top: -76px; }

/* ── SITE FOOTER ── */
.site-footer { background: #fff; }
.footer-main { padding: 4rem 0 3.5rem; border-top: 1px solid #f0f0f0; }
.footer-grid {
    display: grid;
    grid-template-columns: 260px 1fr 1fr 1fr;
    gap: 3rem;
    align-items: start;
}
.footer-logo { width: 130px; display: block; margin-bottom: 1.25rem; }
.footer-map-wrap {
    width: 100%;
    height: 130px;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 1rem;
}
.footer-map-wrap iframe { width: 100%; height: 100%; border: 0; }
.footer-address { font-size: 13.5px; color: #6b7280; line-height: 1.7; margin-bottom: 1.25rem; }
.footer-socials { display: flex; gap: .55rem; flex-wrap: wrap; }
.footer-social {
    width: 36px; height: 36px; border-radius: 50%;
    background: #0d2d2a; color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; text-decoration: none;
    transition: background .2s, transform .2s;
}
.footer-social:hover { background: #C09046; transform: translateY(-2px); }
.footer-col-title {
    font-size: 15px; font-weight: 700;
    color: #0d2d2a; margin-bottom: .85rem;
}
.footer-col-title--mt { margin-top: 2rem; }
.footer-nav-col ul { list-style: none; }
.footer-nav-col ul li { margin-bottom: .5rem; }
.footer-nav-col ul a { font-size: 13.5px; color: #6b7280; text-decoration: none; transition: color .15s; }
.footer-nav-col ul a:hover { color: #0d2d2a; }
.footer-bottom { background: #0d2d2a; padding: 1.1rem 0; text-align: center; }
.footer-bottom p { font-size: 13.5px; color: rgba(255,255,255,.7); margin: 0; }

/* ── CMS PAGE RENDERER ── */
.cms-section { overflow: hidden; }
.section-effect-glassy {
  background-color: color-mix(in srgb, #bbbcbc 16%, transparent);
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturation));
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturation));
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, #fff calc(var(--glass-reflex-light) * 12%), transparent),
    inset 2px 3px 0 -2px color-mix(in srgb, #fff calc(var(--glass-reflex-light) * 80%), transparent),
    inset -2px -2px 0 -2px color-mix(in srgb, #fff calc(var(--glass-reflex-light) * 55%), transparent),
    inset -1px 2px 3px -1px color-mix(in srgb, #000 calc(var(--glass-reflex-dark) * 18%), transparent),
    inset 2px -6px 1px -5px color-mix(in srgb, #000 calc(var(--glass-reflex-dark) * 10%), transparent),
    0 8px 32px 0 color-mix(in srgb, #000 calc(var(--glass-reflex-dark) * 8%), transparent);
  overflow: hidden;
}
.section-effect-parallax {
  position: relative;
  overflow: hidden;
}
.section-effect-parallax > .container,
.section-effect-parallax > .cms-section-inner {
  position: relative;
  z-index: 1;
}
.section-video-bg {
  position: absolute;
  left: 0;
  right: 0;
  height: 100vh;
  z-index: 0;
  overflow: hidden;
}
.section-video-bg video {
  width: 100%; height: 100%; object-fit: cover; display: block;
  opacity: 0;
  transition: opacity 0.6s ease;
}
.section-video-bg video.banner-video--ready { opacity: 1; }
.cms-section-inner { padding: 0; }
.cms-grid { display: grid; width: 100%; }
.cms-cell { min-width: 0; }
.cms-element { display: block; width: 100%; }

/* ── PARALLAX HERO ELEMENT ── */
.cms-parallax-hero { width: 100%; }
.cms-ph-inner { max-width: 680px; }
.cms-ph-heading { text-transform: uppercase; line-height: 1.25; }
@media (max-width: 640px) {
  .cms-ph-inner { padding: 2rem 1.5rem !important; }
  .cms-ph-heading { font-size: 28px !important; }
}
.grid-cell { min-width: 0; }
.cms-empty-page { text-align: center; padding: 5rem 2rem; color: var(--text-muted); }

/* Headings */
.cms-heading { line-height: 1.2; }
h1.cms-heading { font-size: clamp(2rem, 5vw, 4rem); font-weight: 800; }
h2.cms-heading { font-size: clamp(1.5rem, 3vw, 2.5rem); font-weight: 700; }
h3.cms-heading { font-size: 1.5rem; font-weight: 700; }
h4.cms-heading { font-size: 1.25rem; font-weight: 600; }

/* Text */
.cms-text p { margin-bottom: 1em; }
.cms-text p:last-child { margin-bottom: 0; }
.text-left   { text-align: left; }
.text-center { text-align: center; }
.text-right  { text-align: right; }

/* Image */
.cms-image-wrap { width: 100%; }
.cms-image { display: block; border-radius: 4px; }

/* Button */
.cms-button-wrap { padding: .5rem 0; }

/* Card */
.cms-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface);
  transition: transform .2s, box-shadow .2s;
  height: 100%;
}
.cms-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,.1); }
.card-image img { width: 100%; height: 200px; object-fit: cover; }
.card-body { padding: 1.25rem; }
.card-title { font-size: 1.1rem; font-weight: 700; margin-bottom: .5rem; }
.card-link { color: inherit; text-decoration: none; }
.card-text  { color: var(--text-muted); font-size: 14px; }

/* List */
.cms-list { padding-left: 1.5rem; }
.cms-list li { margin-bottom: .4rem; }

/* Video */
.cms-video-wrap { width: 100%; position: relative; }
.cms-video-wrap.ratio-16\/9 { aspect-ratio: 16/9; }
.cms-video-wrap.ratio-4\/3  { aspect-ratio: 4/3; }
.cms-video-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: none; }

/* Posts grid */
.cms-posts { display: grid; gap: 1.5rem; }
.cms-posts-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.cms-posts-list .post-list-item { display: flex; gap: 1rem; }
.cms-posts-list .post-thumb { width: 100px; flex-shrink: 0; }
.cms-posts-list .post-thumb img { width: 100%; height: 75px; object-fit: cover; border-radius: 6px; }
.cms-posts-empty { text-align: center; padding: 2rem; color: var(--text-muted); }

/* ── SPLIT ── */
.cms-split { }
.cms-split-img { overflow: hidden; }
.cms-split-img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.cms-split-img a { display: block; width: 100%; height: 100%; }
.cms-split-img-placeholder { width: 100%; height: 200px; background: #e5e7eb; }
.cms-split-text { display: flex; flex-direction: column; gap: .75rem; }
.cms-split-heading { margin: 0; font-size: 1.75rem; line-height: 1.25; }
.cms-split-subtext { font-size: 1rem; line-height: 1.65; }
.cms-split-btn { display: inline-block; padding: .6rem 1.5rem; background: #06342F; color: #fff; border-radius: 6px; text-decoration: none; font-weight: 500; transition: background .2s; }
.cms-split-btn:hover { background: #0a4a3e; }
@media (max-width: 768px) { .cms-split { grid-template-columns: 1fr !important; } }

/* ── SLIDE ── */
.cms-banner { position: relative; overflow: hidden; }

/* Full layout */
.cms-banner--full { display: flex; align-items: center; justify-content: center; }
.cms-banner-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  z-index: 0;
}
.cms-banner-bg--img { background-color: #1a1a2e; }
.cms-banner-bg--color { }
.cms-banner-bg--video { background: #000; }
.cms-banner-bg--video video {
  width: 100%; height: 100%; object-fit: cover; display: block;
  opacity: 0;
  transition: opacity 0.6s ease;
}
.cms-banner-bg--video video.banner-video--ready { opacity: 1; }
.cms-banner-overlay { position: absolute; inset: 0; z-index: 1; }
.cms-banner--full .cms-banner-content { position: relative; z-index: 2; width: 100%; max-width: 900px; padding: 3rem 2rem; }

/* Split layout */
.cms-banner--split { display: flex; min-height: 480px; }
.cms-banner-half { flex: 1; position: relative; overflow: hidden; }
.cms-banner-half--media { background: #1a1a2e; }
.cms-banner-half-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  background-color: #374151;
}
.cms-banner-half-bg video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0;
  transition: opacity 0.6s ease;
}
.cms-banner-half-bg video.banner-video--ready { opacity: 1; }
.cms-banner-half--text {
  display: flex; align-items: center; justify-content: center; padding: 3rem 2.5rem;
  background: var(--surface, #fff);
}
.cms-banner-half--text .cms-banner-content { max-width: 480px; }

/* Shared content */
.cms-banner-heading { font-size: clamp(1.75rem, 3.5vw, 3rem); font-weight: 800; line-height: 1.15; margin: 0 0 1rem; }
.cms-banner-subtext { font-size: 1.1rem; line-height: 1.6; margin-bottom: 1.75rem; opacity: .9; }
.cms-banner-btn {
  display: inline-block; padding: .75rem 2rem;
  background: var(--accent-gradient, linear-gradient(135deg, #C09046, #AB731C)); color: #fff;
  border-radius: 50px; text-decoration: none; font-weight: 600; font-size: 1rem;
  transition: all .2s;
}
.cms-banner-btn:hover { opacity: .88; transform: translateY(-1px); box-shadow: 0 4px 16px rgba(192,144,70,.4); }

@media (max-width: 768px) {
  .cms-banner--split { flex-direction: column; }
  .cms-banner-half--media { min-height: 260px; }
  .cms-banner-half--text { padding: 2rem 1.25rem; }
}

/* ── QUICK NAV ── */
.cms-quicknav-wrap {
  display: flex;
  justify-content: center;
}
.cms-quicknav {
  display: flex;
  align-items: stretch;
  border-radius: 60px;
  border: 1px solid rgba(255,255,255,0.5);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  overflow: hidden;
  width: 100%;
  height: 128px;
  background: transparent;
}
.cms-quicknav-item {
  flex: 1;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  padding: .65rem 24px;
  text-decoration: none;
  color: inherit;
  transition: background .2s;
  position: relative;
}
.cms-quicknav-item:hover { background: rgba(0,0,0,0.04); opacity: 1; }
.cms-quicknav-item + .cms-quicknav-item::before {
  content: '';
  position: absolute;
  left: 0; top: 15%; height: 70%;
  width: 1px;
  background: currentColor;
  opacity: .12;
}
.cms-quicknav-item span { font-size: inherit; font-weight: inherit; white-space: nowrap; }

.cms-quicknav--glassy {
  background-color: color-mix(in srgb, #bbbcbc 14%, transparent) !important;
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturation));
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturation));
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, #fff calc(var(--glass-reflex-light) * 12%), transparent),
    inset 2px 2px 0 -2px color-mix(in srgb, #fff calc(var(--glass-reflex-light) * 75%), transparent),
    inset -2px -3px 1px -2px color-mix(in srgb, #fff calc(var(--glass-reflex-light) * 50%), transparent),
    inset -1px 2px 3px -1px color-mix(in srgb, #000 calc(var(--glass-reflex-dark) * 18%), transparent),
    0 6px 24px 0 color-mix(in srgb, #000 calc(var(--glass-reflex-dark) * 7%), transparent) !important;
  border: none !important;
}

.cms-quicknav-icon-circle {
  width: 56px; height: 56px;
  border-radius: 50%;
  flex-shrink: 0;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.cms-quicknav-icon-circle img { width: 24px; height: 24px; object-fit: contain; }
.cms-quicknav-icon-circle svg { stroke: #fff; flex-shrink: 0; color: #fff; }

@media (max-width: 640px) {
  .cms-quicknav { border-radius: 16px; }
  .cms-quicknav-item { padding: .6rem .4rem; gap: .4rem; }
  .cms-quicknav-item span { font-size: .7rem; }
  .cms-quicknav-icon-circle { width: 38px; height: 38px; }
  .cms-quicknav-icon-circle svg { width: 18px; height: 18px; }
}

/* ── BLOG ── */
.blog-hero {
  background: var(--primary);
  color: #fff;
  padding: 4rem 0;
  text-align: center;
}
.blog-hero h1 { font-size: 2.5rem; font-weight: 800; margin-bottom: .5rem; }
.blog-hero p  { opacity: .75; font-size: 1.1rem; }

.blog-section { padding: 4rem 0; }

.blog-layout { display: flex; gap: 3rem; align-items: flex-start; }
.blog-main { flex: 1; min-width: 0; }
.blog-sidebar { width: 280px; flex-shrink: 0; }

.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.5rem; margin-bottom: 2.5rem; }
.blog-grid--sm { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }

.post-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface);
  transition: transform .2s, box-shadow .2s;
}
.post-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,.1); }
.post-card-image { display: block; }
.post-card-image img { width: 100%; height: 200px; object-fit: cover; }
.post-card-body { padding: 1.25rem; }
.post-category { display: inline-block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--primary); background: rgba(6,52,47,.08); border-radius: 4px; padding: .2em .5em; margin-bottom: .6rem; }
.post-card-body h2 { font-size: 1.1rem; font-weight: 700; margin-bottom: .5rem; line-height: 1.3; }
.post-card-body h2 a { color: inherit; }
.post-card-body p { color: var(--text-muted); font-size: 14px; margin-bottom: .75rem; }
.post-card-body h4 { font-size: .95rem; font-weight: 600; }
.post-meta { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--text-muted); }
.read-more { color: var(--primary); font-weight: 600; }

.blog-empty { text-align: center; padding: 4rem 2rem; color: var(--text-muted); }

/* Sidebar */
.sidebar-widget { background: var(--bg); border-radius: 12px; padding: 1.25rem; margin-bottom: 1.5rem; }
.sidebar-widget h3 { font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 1rem; }
.category-list { list-style: none; }
.category-list li { margin-bottom: .4rem; }
.category-list a { display: flex; justify-content: space-between; padding: .4rem .6rem; border-radius: 6px; font-size: 14px; color: var(--text); transition: background .1s, color .1s; }
.category-list a:hover, .category-list a.active { background: var(--primary); color: #fff; }
.category-list a span { opacity: .6; font-size: 13px; }

/* Pagination */
.pagination { display: flex; gap: .4rem; justify-content: center; flex-wrap: wrap; }
.page-btn { display: inline-block; padding: .4rem .8rem; border: 1px solid var(--border); border-radius: 6px; font-size: 13px; color: var(--text); transition: all .15s; }
.page-btn:hover { border-color: var(--primary); color: var(--primary); }
.page-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ── BLOG SINGLE ── */
.post-single-hero { margin-bottom: 3rem; }
.post-hero-image img { width: 100%; max-height: 480px; object-fit: cover; }
.post-single-meta { display: flex; align-items: center; gap: 1rem; margin: 2rem 0 1rem; }
.post-single-meta time { font-size: 14px; color: var(--text-muted); }
.post-single h1 { font-size: clamp(1.75rem, 4vw, 3rem); font-weight: 800; line-height: 1.2; margin-bottom: 1rem; }
.post-excerpt { font-size: 1.15rem; color: var(--text-muted); }

.post-content {
  max-width: 720px;
  margin: 0 auto;
  font-size: 1.05rem;
  line-height: 1.8;
}
.post-content h2 { font-size: 1.75rem; font-weight: 700; margin: 2.5rem 0 1rem; }
.post-content h3 { font-size: 1.35rem; font-weight: 700; margin: 2rem 0 .75rem; }
.post-content p  { margin-bottom: 1.25rem; }
.post-content ul,
.post-content ol { padding-left: 1.5rem; margin-bottom: 1.25rem; }
.post-content li { margin-bottom: .4rem; }
.post-content img { border-radius: 8px; margin: 1.5rem auto; }
.post-content blockquote { border-left: 4px solid var(--primary); padding: .5rem 1.25rem; margin: 2rem 0; color: var(--text-muted); font-style: italic; }
.post-footer { margin: 3rem 0; }

.related-posts { margin-top: 4rem; padding-top: 3rem; border-top: 1px solid var(--border); }
.related-posts h3 { font-size: 1.35rem; font-weight: 700; margin-bottom: 1.5rem; }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .header-inner        { min-height: 64px; gap: .75rem; }
  .site-logo           { flex: 1; }
  .site-nav {
    display: none;
    position: absolute; top: 64px; left: 0; right: 0;
    background: #fff;
    border-top: 1px solid rgba(0,0,0,.07);
    box-shadow: 0 8px 24px rgba(0,0,0,.1);
    padding: .75rem 1rem;
    z-index: 200;
  }
  .site-nav.open       { display: block; }
  .site-nav > ul       { flex-direction: column; gap: .1rem; }
  .site-nav a          { padding: .65rem .85rem; }
  .header-divider      { display: none; }
  .nav-toggle          { display: flex; }
  .btn-header-outline  { display: none; }
}

@media (max-width: 600px) {
  .front-lang-switcher { display: none; }
  .btn-header-filled   { padding: .4rem .9rem; font-size: 12px; }
  .logo-row1, .logo-row2 { font-size: 18px; }
}

@media (max-width: 480px) {
  .btn-header-filled   { display: none; }
  .header-inner        { min-height: 56px; }
  .site-nav            { top: 56px; }
}

/* ── SPLIDE REUSABLE COMPONENTS ── */

/* Arrow buttons — use .splide-btn on any custom prev/next button */
.splide-btn {
  width: 40px; height: 40px;
  border-radius: 50%; border: none;
  background: var(--primary, #06342F);
  color: #fff;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: background .18s ease;
}
.splide-btn:hover    { background: var(--primary-dark, #042421); }
.splide-btn:disabled { opacity: .35; cursor: default; }
.splide-btn svg      { fill: none; stroke: #fff; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }

/* Arrow row wrapper */
.splide-arrows { display: flex; gap: .5rem; }

/* Bullets — global pagination style for all Splide instances */
.splide__pagination__page {
  background: #d1d5db;
  width: 8px; height: 8px;
  border-radius: 50%;
  opacity: 1;
  transition: background .25s, transform .25s;
}
.splide__pagination__page.is-active { background: var(--accent, #C09046); transform: scale(1.3); }

/* ── CMS CAROUSEL (admin builder) ── */
.cms-carousel--empty { text-align: center; padding: 2rem; color: #6b7280; background: #f9fafb; border: 2px dashed #e5e7eb; border-radius: 12px; }
.cms-carousel .splide__slide { overflow: hidden; }
.cms-carousel .splide__slide img { display: block; width: 100%; height: auto; }
.cms-carousel .splide__slide a { display: block; width: 100%; }
.cms-carousel .splide__arrow {
  background: rgba(255,255,255,.9);
  box-shadow: 0 2px 10px rgba(0,0,0,.15);
  width: 40px; height: 40px; border-radius: 50%;
  opacity: 1; transition: background .2s, opacity .2s;
}
.cms-carousel .splide__arrow:hover { background: #fff; }
.cms-carousel .splide__arrow:disabled { opacity: .3; }
.cms-carousel .splide__arrow svg { fill: #374151; width: 14px; height: 14px; }
.cms-carousel .splide__pagination { margin-top: .75rem; gap: .4rem; }

@media (max-width: 768px) {
  .blog-layout  { flex-direction: column; }
  .blog-sidebar { width: 100%; }
  .footer-grid  { grid-template-columns: 1fr 1fr; }
  .cms-grid { grid-template-columns: 1fr 1fr !important; }
}

@media (max-width: 480px) {
  .cms-grid { grid-template-columns: 1fr !important; }
  .blog-grid    { grid-template-columns: 1fr; }
  .footer-grid  { grid-template-columns: 1fr; }
}

/* ── SCROLL TO TOP ── */
.scroll-top-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0d2d2a;
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transform: translateY(12px);
    transition: opacity .3s ease, transform .3s ease, box-shadow .3s ease;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}
.scroll-top-btn.is-visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}
.scroll-top-btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

/* ── Mobile nav mega menu ── */
@media (max-width: 900px) {
  .has-megamenu .nav-megamenu {
    position: static;
    display: none;
    transform: none;
    width: 100%;
    box-shadow: none;
    border-radius: 0;
    flex-direction: column;
    background: none;
  }
  .has-megamenu.open .nav-megamenu { display: flex; }
  .megamenu-left {
    width: 100%;
    background: none;
    padding: 0 0 0 .75rem;
    border-left: 2px solid rgba(6,52,47,.12);
    gap: 0;
  }
  .megamenu-cat-item {
    padding: .45rem .85rem;
    border-radius: 0;
    font-size: 13.5px;
    color: #444;
  }
  .megamenu-cat-item:hover, .megamenu-cat-item.is-active { background: rgba(6,52,47,.05); }
  .megamenu-right { display: none; }
  .has-megamenu.open .nav-chevron { transform: rotate(180deg); }
}
