/* ==========================================================================
   THE7 FSE COMPANY DESIGN SYSTEM & VARIABLES
   ========================================================================== */
:root {
  /* Colors - corporate high-contrast hybrid */
  --bg-gradient: linear-gradient(180deg, #f4f7f9 0%, #ffffff 100%);
  --bg-solid: #ffffff;
  --bg-alternate: #f8fafc;
  --text-primary: #0a0f11;     /* High-contrast charcoal/black */
  --text-secondary: #4b5563;   /* Muted gray */
  --brand-blue: #2563eb;       /* Corporate Blue */
  --brand-blue-hover: #1d4ed8;
  --brand-blue-light: #f0f6ff;
  
  /* Specialty specific accents */
  --color-cardiology: #ef4444;   /* Red */
  --color-pediatrics: #f59e0b;   /* Orange/Yellow */
  --color-dental: #3b82f6;       /* Blue */
  --color-orthopedics: #10b981;  /* Green */

  /* Modular Spacing & Radius - matching FSE block design */
  --radius-btn: 8px;           /* Clean corporate corners */
  --radius-card: 12px;
  --radius-round: 50%;
  
  /* Borders & Shadows */
  --border-thin: 1px solid rgba(10, 15, 17, 0.08);
  --shadow-subtle: 0 4px 20px 0 rgba(0, 0, 0, 0.02);
  --shadow-premium: 0 10px 30px -10px rgba(10, 15, 17, 0.06);

  /* Fonts */
  --font-heading: 'Sarabun', 'Outfit', sans-serif;
  --font-body: 'Sarabun', 'Inter', sans-serif;
  
  /* Timings */
  --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: all 0.2s ease;
}

/* ==========================================================================
   RESET & BASE STYLES
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  scroll-padding-top: 50px;
  max-width: 100%;
  overflow-x: clip;
}

/* Keep section headings visible when navigating with header links. The header
   is fixed, so native hash navigation otherwise lands underneath it. */
main section[id] {
  scroll-margin-top: 50px;
}

body {
  font-family: var(--font-body);
  color: var(--text-secondary);
  background: linear-gradient(135deg, #cbdce6 0%, #f4f7f9 50%, #ffffff 100%);
  background-attachment: scroll;
  line-height: 1.65;
  max-width: 100%;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--text-primary);
  font-weight: 800;
  line-height: 1.2;
}

a {
  color: var(--brand-blue);
  text-decoration: none;
  transition: var(--transition-fast);
}

a:hover {
  color: var(--brand-blue-hover);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Google Drive gallery: scoped so its modal and carousel cannot alter other dialogs. */
.drive-gallery-section { padding: 78px 0; background: #fff; }
.drive-gallery-shell { position: relative; max-width: 1040px; margin: 0 auto; border-radius: 18px; overflow: hidden; box-shadow: 0 14px 34px rgba(15, 23, 42, .14); background: #0f172a; }
.drive-gallery-viewport { overflow: hidden; }
.drive-gallery-track { display: flex; transition: transform .45s ease; }
.drive-gallery-slide { position: relative; flex: 0 0 100%; min-width: 0; padding: 0; border: 0; background: #0f172a; color: #fff; text-align: left; }
.drive-gallery-slide img { width: 100%; height: min(58vw, 570px); min-height: 260px; object-fit: contain; background: #0f172a; }
.drive-gallery-caption { position: absolute; inset: auto 0 0; padding: 32px 24px 18px; font-weight: 700; background: linear-gradient(transparent, rgba(2, 6, 23, .88)); }
.drive-gallery-nav { position: absolute; z-index: 2; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(15, 23, 42, .76); color: #fff; font-size: 2rem; line-height: 1; }
.drive-gallery-nav:hover { background: var(--brand-blue); }
.drive-gallery-prev { left: 16px; }.drive-gallery-next { right: 16px; }
.drive-gallery-dots { position: absolute; z-index: 2; bottom: 12px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; }
.drive-gallery-dots button { width: 9px; height: 9px; border: 0; border-radius: 50%; background: rgba(255,255,255,.58); padding: 0; }.drive-gallery-dots button.is-active { background: #fff; transform: scale(1.22); }
.drive-gallery-modal { position: fixed; z-index: 10050; inset: 0; display: none; align-items: center; justify-content: center; padding: 24px; background: rgba(2, 6, 23, .84); }
.drive-gallery-modal.is-open { display: flex; }.drive-gallery-modal-card { position: relative; max-width: min(1100px, 100%); max-height: calc(100dvh - 48px); overflow: auto; padding: 14px; border-radius: 16px; background: #fff; box-shadow: 0 24px 64px rgba(0,0,0,.4); }.drive-gallery-modal-card img { max-width: 100%; max-height: calc(100dvh - 140px); margin: 0 auto; object-fit: contain; }.drive-gallery-modal-card p { margin: 12px 8px 5px; color: var(--text-primary); font-weight: 600; }.drive-gallery-modal-card a { display: inline-block; margin: 0 8px 8px; font-weight: 700; }.drive-gallery-modal-close { position: sticky; z-index: 1; top: 0; float: right; width: 38px; height: 38px; border: 0; border-radius: 50%; background: #0f172a; color: #fff; font-size: 1.8rem; line-height: 1; }
@media (max-width: 600px) { .drive-gallery-section { padding: 52px 0; }.drive-gallery-slide img { min-height: 210px; height: 58vw; }.drive-gallery-nav { width: 38px; height: 38px; }.drive-gallery-prev { left: 8px; }.drive-gallery-next { right: 8px; }.drive-gallery-caption { padding: 26px 16px 16px; font-size: .9rem; } }
.drive-gallery-guide-card { display:flex; flex-direction:column; gap:4px; padding:12px; border:1px solid #dbeafe; border-radius:9px; background:#f8fbff; color:#475569; font-size:.78rem; }.drive-gallery-guide-card strong { color:#1e3a8a; font-size:.88rem; }.drive-gallery-check-row { display:flex; align-items:center; gap:10px; padding:11px 13px; border:1px solid #e2e8f0; border-radius:8px; color:#475569; font-size:.86rem; }.drive-gallery-check-row.is-done { border-color:#86efac; background:#f0fdf4; color:#166534; }.drive-gallery-check-row input { width:17px; height:17px; flex:0 0 auto; }
.cookie-banner { position:fixed; z-index:10060; right:18px; bottom:18px; left:18px; display:flex; align-items:center; justify-content:space-between; gap:20px; max-width:980px; margin:0 auto; padding:17px 19px; border:1px solid #bfdbfe; border-radius:14px; background:rgba(255,255,255,.98); box-shadow:0 16px 44px rgba(15,23,42,.22); color:var(--text-primary); }.cookie-banner[hidden] { display:none; }.cookie-banner-copy { display:grid; gap:4px; }.cookie-banner-copy strong { font-size:.96rem; }.cookie-banner-copy span { font-size:.8rem; line-height:1.5; color:var(--text-secondary); }.cookie-banner-actions { display:flex; flex:0 0 auto; gap:8px; }.cookie-banner-actions .btn { white-space:nowrap; padding:9px 13px; font-size:.82rem; }.cookie-preferences-btn { padding:0; border:0; background:transparent; color:inherit; font:inherit; text-decoration:underline; cursor:pointer; } @media (max-width:650px) { .cookie-banner { right:10px; bottom:10px; left:10px; align-items:stretch; flex-direction:column; gap:13px; }.cookie-banner-actions { width:100%; }.cookie-banner-actions .btn { flex:1; } }

button {
  cursor: pointer;
  border: none;
  outline: none;
  font-family: var(--font-body);
  transition: var(--transition-fast);
}

ul {
  list-style: none;
}

/* ==========================================================================
   REUSABLE COMPONENTS
   ========================================================================== */
.container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
}

/* FSE Glass/Border Cards */
.glass-card {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.45);
  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.04);
  border-radius: var(--radius-card);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease, border-color 0.35s ease;
  transform: translateZ(0);
}

.glass-card:hover {
  box-shadow: 0 16px 40px 0 rgba(37, 99, 235, 0.08);
  border-color: rgba(37, 99, 235, 0.2);
  transform: translateY(-4px) translateZ(0);
}

/* Buttons with corporate radius */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 24px;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-btn);
  transition: var(--transition-smooth);
}

.btn-primary {
  background-color: var(--brand-blue);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.1);
}

.btn-primary:hover {
  background-color: var(--brand-blue-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.2);
}

.btn-outline {
  background-color: transparent;
  color: var(--text-primary);
  border: 1px solid rgba(10, 15, 17, 0.15);
}

.btn-outline:hover {
  background-color: rgba(10, 15, 17, 0.03);
  border-color: var(--text-primary);
  transform: translateY(-1px);
}

.btn-lg {
  padding: 14px 32px;
  font-size: 1rem;
}

.btn-full {
  width: 100%;
}

.btn-icon {
  padding: 12px;
  border-radius: var(--radius-btn);
  width: 46px;
  height: 46px;
}

/* Badges */
.badge-container {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.badge {
  background: var(--brand-blue-light);
  color: var(--brand-blue);
  padding: 6px 14px;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.badge-emergency {
  background: rgba(239, 68, 68, 0.05);
  color: var(--color-cardiology);
  border: 1px solid rgba(239, 68, 68, 0.1);
}

.badge-icon {
  width: 14px;
  height: 14px;
  stroke-width: 2.5;
}

/* Section Header */
.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 24px auto;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 16px;
  letter-spacing: -0.8px;
  color: var(--text-primary);
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
}

.text-gradient {
  color: var(--brand-blue);
}

/* ==========================================================================
   HEADER SECTION
   ========================================================================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: #ffffff;
  border-bottom: var(--border-thin);
  transition: var(--transition-smooth);
  will-change: padding, box-shadow;
  transform: translate3d(0, 0, 0); /* Force GPU compositing layer creation */
}

.site-header.sticky {
  box-shadow: 0 4px 20px 0 rgba(0, 0, 0, 0.03);
  padding-block: 4px;
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 100%;
  padding: 16px 48px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-icon {
  width: 28px;
  height: 28px;
  color: var(--brand-blue);
}

.logo-text {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

.logo-text .text-accent {
  color: var(--brand-blue);
}

.nav-menu ul {
  display: flex;
  gap: 32px;
}

/* The7 Elastic Underline Transition on Navigation Links */
.nav-link {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  position: relative;
  padding: 8px 0;
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px;
  line-height: 1;
}

.nav-link::after {
  content: "";
  position: absolute;
  width: auto;
  height: 2px;
  background: var(--brand-blue);
  left: 50%;
  right: 50%;
  bottom: -2px;
  opacity: 0;
  transition: left 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), right 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease;
}

.nav-link:hover, .nav-link.active {
  color: var(--brand-blue);
}

/* Navigation Submenu Dropdown Style */
.nav-menu ul li {
  position: relative;
}

.nav-menu ul li .dropdown-menu {
  display: block;
  visibility: hidden;
  opacity: 0;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(15px);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(16px);
  border: var(--border-thin);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  min-width: 220px;
  padding: 10px 0;
  margin: 0;
  list-style: none;
  z-index: 1000;
  transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
  pointer-events: none;
}

.nav-menu ul li:hover > .dropdown-menu,
.nav-menu ul li.submenu-open > .dropdown-menu {
  visibility: visible;
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

.dropdown-menu li {
  width: 100%;
  display: block;
}

.dropdown-menu li a {
  display: block;
  padding: 10px 20px;
  color: var(--text-secondary) !important;
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--transition-fast);
  text-align: left;
}

.dropdown-menu li a:hover {
  color: var(--brand-blue) !important;
  background: rgba(37, 99, 235, 0.08);
}

.dropdown-menu .dropdown-menu {
  top: -10px;
  left: calc(100% + 6px);
  transform: translateX(0) translateY(10px);
}

.dropdown-menu li:hover > .dropdown-menu,
.dropdown-menu li.submenu-open > .dropdown-menu {
  transform: translateX(0) translateY(0);
}

.submenu-link {
  display: block;
  padding: 10px 34px 10px 20px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
}

.submenu-link:hover { color: var(--brand-blue); background: rgba(37, 99, 235, 0.08); }

.submenu-toggle {
  position: absolute;
  right: 8px;
  top: 7px;
  border: 0;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 1rem;
  padding: 4px 7px;
}

/* Keep arrows for first-level menus beside their title, not below it. */
#nav-menu-list > li.has-submenu {
  display: inline-flex;
  align-items: center;
}

#nav-menu-list > li.has-submenu > .nav-link {
  padding-right: 3px;
}

#nav-menu-list > li.has-submenu > .submenu-toggle {
  position: static;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 0 3px 4px;
  line-height: 1;
  transform: translateY(-1px);
}

.nav-link:hover::after, .nav-link.active::after {
  left: 0;
  right: 0;
  opacity: 1;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-utilities {
  display: none;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  font-size: .76rem;
  white-space: nowrap;
}

.header-utility {
  display: none;
  align-items: center;
  min-height: 28px;
  padding: 4px 8px;
  border-radius: 7px;
  background: #f8fafc;
  color: var(--text-secondary);
}

.header-utility-phone:hover { color: var(--brand-blue); background: #f0f6ff; }

.header-utility-social {
  display: none;
  align-items: center;
  gap: 4px;
}

.header-utility-social a {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  border: 1px solid #e2e8f0;
  border-radius: 7px;
  background: #fff;
}

.header-utility-social a:hover { color: var(--brand-blue); border-color: rgba(37, 99, 235, .35); }
.header-utility-social svg { width: 14px; height: 14px; }

@media (max-width: 1280px) {
  .header-utility-date,
  .header-utility-social { display: none !important; }
}

@media (max-width: 768px) {
  .header-utilities { display: none !important; }
}

.admin-panel-icon {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  transition: color .2s ease, border-color .2s ease, background .2s ease, transform .2s ease;
}

.admin-panel-icon svg {
  width: 19px;
  height: 19px;
}

.admin-panel-icon:hover,
.admin-panel-icon:focus-visible {
  color: var(--brand-blue);
  background: #f8fbff;
  border-color: rgba(37, 99, 235, .35);
  transform: rotate(18deg);
}

.mobile-toggle-btn {
  display: none;
  background: transparent;
  color: var(--text-primary);
  padding: 4px;
}

.hamburger-icon {
  width: 28px;
  height: 28px;
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero-section {
  padding-top: 110px;
  padding-bottom: 40px;
  min-height: 60vh;
  display: flex;
  align-items: center;
  background-image: var(--bg-gradient);
  position: relative;
  overflow: hidden;
}

.hero-slider-background { position: absolute; inset: -50px; z-index: 0; overflow: hidden; pointer-events: none; }
.hero-slider-background-layer {
  position: absolute; inset: 0;
  background-image: linear-gradient(115deg, rgba(255,255,255,.72) 4%, rgba(255,255,255,.34) 52%, rgba(241,250,255,.62) 100%), var(--hero-slide-background);
  background-size: cover; background-position: center;
  filter: blur(var(--hero-background-blur, 10px)) saturate(1.12) contrast(1.04);
  transform: scale(1.08); opacity: 0; transition: opacity 900ms ease; will-change: opacity, transform;
}
.hero-slider-background-layer.is-active { opacity: .62; }
.hero-section.hero-slider-mode::before { display: none; }

.hero-section.hero-has-blur-bg::before {
  content: '';
  position: absolute;
  inset: -50px;
  background-image: linear-gradient(115deg, rgba(255, 255, 255, 0.72) 4%, rgba(255, 255, 255, 0.34) 52%, rgba(241, 250, 255, 0.62) 100%), var(--hero-background-image);
  background-size: cover;
  background-position: center;
  filter: blur(var(--hero-background-blur, 10px)) saturate(1.12) contrast(1.04);
  transform: scale(1.08);
  opacity: 0.62;
}

.hero-section.hero-has-blur-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 76% 22%, rgba(96, 165, 250, 0.20), transparent 28%),
    radial-gradient(circle at 20% 82%, rgba(45, 212, 191, 0.12), transparent 31%),
    linear-gradient(90deg, rgba(255, 255, 255, 0.24), transparent 50%, rgba(255, 255, 255, 0.14));
  z-index: 0;
}

.hero-container {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-layout-image-left .hero-content { order: 2; }
.hero-layout-image-left .hero-media { order: 1; }

.hero-layout-centered .hero-container {
  grid-template-columns: 1fr;
  text-align: center;
  gap: 28px;
}
.hero-layout-centered .badge-container,
.hero-layout-centered .hero-actions { justify-content: center; }
.hero-layout-centered .hero-desc { margin-left: auto; margin-right: auto; }
.hero-layout-centered .hero-media { max-width: min(760px, 100%); margin: 0 auto; }

.hero-title {
  font-size: 3.4rem;
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 24px;
  color: var(--text-primary);
}

.hero-desc {
  font-size: 1.1rem;
  line-height: 1.7;
  margin-bottom: 36px;
  max-width: 580px;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.hero-media {
  position: relative;
}

.image-wrapper {
  position: relative;
  border-radius: var(--radius-card);
  overflow: visible;
  padding: 8px;
}

.hero-img {
  width: 100%;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-premium);
  border: var(--border-thin);
  object-fit: cover;
  aspect-ratio: 4/3;
  transition: opacity .42s ease, transform .56s cubic-bezier(.2,.8,.2,1);
  will-change: opacity, transform;
}

.hero-img.hero-slide-changing { opacity: 0; transform: translateX(14px) scale(.985); }
.hero-section.hero-slider-effect-slide .hero-img.hero-slide-changing { transform: translateX(-18px) scale(.985); }
.hero-content { transition: opacity .35s ease, transform .45s ease; }
.hero-content.hero-slide-changing { opacity: .25; transform: translateY(6px); }
.hero-slider-controls { display: flex; align-items: center; justify-content: center; gap: 9px; margin-top: 15px; }
.hero-slider-controls[hidden] { display: none !important; }
.hero-slider-arrow { width: 34px; height: 34px; border: 1px solid rgba(37,99,235,.22); border-radius: 50%; background: rgba(255,255,255,.86); color: var(--brand-blue); font: 700 1.55rem/1 sans-serif; cursor: pointer; box-shadow: 0 4px 12px rgba(15,23,42,.10); }
.hero-slider-arrow:hover { background: var(--brand-blue); color: #fff; }
.hero-slider-dots { display: flex; align-items: center; gap: 7px; }
.hero-slider-dot { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 999px; background: rgba(100,116,139,.35); cursor: pointer; transition: width .3s ease, background .3s ease; }
.hero-slider-dot.is-active { width: 22px; background: var(--brand-blue); }

@media (prefers-reduced-motion: reduce) {
  .hero-slider-background-layer,
  .hero-img,
  .hero-content,
  .hero-slider-dot { transition: none !important; }
}

/* Floating Clean Overlay Cards */
.float-card {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 18px;
  border-radius: 8px;
  border: var(--border-thin);
  background: #ffffff;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  z-index: 10;
  animation: floatEffect 5s ease-in-out infinite;
}

.float-card-1 {
  top: 15%;
  left: -20px;
}

.float-card-2 {
  bottom: 15%;
  right: -20px;
  animation-delay: 2.5s;
}

.float-icon-wrapper {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.float-icon-wrapper svg {
  width: 18px;
  height: 18px;
}

.cardiology-color {
  background: rgba(239, 68, 68, 0.08);
  color: var(--color-cardiology);
}

.rating-color {
  background: rgba(245, 158, 11, 0.08);
  color: var(--color-pediatrics);
}

.float-label {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  font-weight: 600;
}

.float-value {
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
}

/* ==========================================================================
   METRICS SECTION
   ========================================================================== */
.metrics-section {
  padding: 20px 0;
  position: relative;
  z-index: 20;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  padding: 30px;
  text-align: center;
  background: #ffffff;
}

.metric-item:not(:last-child) {
  border-right: 1px solid rgba(10, 15, 17, 0.06);
}

.metric-num {
  font-size: 3rem;
  font-weight: 800;
  color: var(--brand-blue);
  margin-bottom: 6px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -1px;
}

.metric-label {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* ==========================================================================
   SPECIALTIES SECTION
   ========================================================================== */
.specialties-section {
  padding: 24px 0;
}

.showcase-container {
  padding: 12px;
  overflow: hidden;
  background: #ffffff;
}

.showcase-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  border-bottom: var(--border-thin);
  padding: 8px;
  background: var(--bg-alternate);
  border-radius: var(--radius-card) var(--radius-card) 0 0;
}

.tab-btn {
  padding: 14px 18px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: transparent;
  border-radius: 6px;
  transition: var(--transition-smooth);
}

.tab-btn:hover {
  background: rgba(10, 15, 17, 0.03);
  color: var(--text-primary);
}

.tab-btn.active {
  background: var(--brand-blue);
  color: #ffffff;
}

.showcase-content-wrapper {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 32px;
  padding: 16px 24px;
  align-items: center;
}

.showcase-image-pane {
  border-radius: var(--radius-card);
  overflow: hidden;
  border: var(--border-thin);
}

.specialty-showcase-img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.showcase-details-pane {
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.specialty-title {
  font-size: 1.6rem;
  margin-bottom: 8px;
  font-weight: 800;
  color: var(--text-primary);
}

.specialty-desc {
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 10px;
  color: var(--text-secondary);
}

.specialty-bullets {
  margin-bottom: 12px;
}

.specialty-bullets li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 6px;
  font-size: 0.92rem;
  color: var(--text-primary);
  font-weight: 500;
}

.bullet-icon {
  width: 18px;
  height: 18px;
  color: var(--brand-blue);
  flex-shrink: 0;
  margin-top: 2px;
}

.fade-out {
  opacity: 0;
  transform: translateY(8px);
}

.fade-in {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   SERVICES GRID SECTION
   ========================================================================== */
.services-section {
  padding: 24px 0;
  background-color: var(--bg-alternate);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.service-card {
  padding: 40px;
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #ffffff;
}

.service-card:hover {
  transform: translateY(-4px);
  border-color: rgba(37, 99, 235, 0.2);
}

.service-icon-container {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}

.service-icon {
  width: 28px;
  height: 28px;
}

.color-red {
  background: rgba(239, 68, 68, 0.06);
  color: var(--color-cardiology);
}

.color-blue {
  background: rgba(37, 99, 235, 0.06);
  color: var(--brand-blue);
}

.color-green {
  background: rgba(16, 185, 129, 0.06);
  color: var(--color-orthopedics);
}

.service-card-title {
  font-size: 1.25rem;
  margin-bottom: 14px;
  font-weight: 700;
}

.service-card-desc {
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ==========================================================================
   TESTIMONIALS SLIDER SECTION
   ========================================================================== */
.testimonials-section {
  padding: 24px 0;
}

.slider-outer {
  max-width: 800px;
  margin: 0 auto;
  padding: 50px;
  overflow: hidden;
  position: relative;
  background: #ffffff;
}

.slider-track {
  display: flex;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}

.testimonial-slide {
  width: 100%;
  flex-shrink: 0;
  text-align: center;
  padding: 0 10px;
}

.stars {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin-bottom: 20px;
}

.star-icon {
  width: 20px;
  height: 20px;
  color: #fbbf24;
}

.slide-quote {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 600;
  line-height: 1.6;
  color: var(--text-primary);
  margin-bottom: 28px;
}

.slide-author {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-align: left;
}

.author-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
}

.pediatrics-color {
  background: rgba(245, 158, 11, 0.08);
  color: var(--color-pediatrics);
}

.orthopedics-color {
  background: rgba(16, 185, 129, 0.08);
  color: var(--color-orthopedics);
}

.author-name {
  font-size: 1rem;
  font-weight: 700;
}

.author-meta {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.slider-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 30px;
  border-top: var(--border-thin);
  padding-top: 24px;
}

.slider-btn {
  background: #ffffff;
  border: var(--border-thin);
  width: 40px;
  height: 40px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  transition: var(--transition-fast);
}

.slider-btn:hover {
  background: var(--brand-blue);
  color: #ffffff;
  border-color: var(--brand-blue);
}

.slider-btn svg {
  width: 16px;
  height: 16px;
}

.slider-dots {
  display: flex;
  gap: 6px;
}

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(10, 15, 17, 0.15);
  cursor: pointer;
  transition: var(--transition-fast);
}

.dot:hover {
  background: rgba(10, 15, 17, 0.3);
}

.dot.active {
  background: var(--brand-blue);
  width: 18px;
  border-radius: 3px;
}

/* ==========================================================================
   NEWS & BLOG SECTION
   ========================================================================== */
.news-section {
  padding: 24px 0;
  background-color: var(--bg-alternate);
}

.news-layout-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  align-items: stretch;
  width: 100%;
}

@media (min-width: 992px) {
  .news-layout-container.split-layout {
    grid-template-columns: 2.1fr 1fr;
  }
}

.news-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}

/* ==========================================================================
   NEWS LAYOUT VIEW MODES
   ========================================================================== */
.news-grid.view-mode-grid {
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.news-grid.view-mode-category {
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.news-grid.view-mode-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 1000px;
  margin: 0 auto;
}

.news-grid.view-mode-list::-webkit-scrollbar {
  width: 6px;
}
.news-grid.view-mode-list::-webkit-scrollbar-track {
  background: transparent;
}
.news-grid.view-mode-list::-webkit-scrollbar-thumb {
  background: rgba(10, 15, 17, 0.12);
  border-radius: 10px;
}
.news-grid.view-mode-list::-webkit-scrollbar-thumb:hover {
  background: rgba(10, 15, 17, 0.25);
}

.news-pagination { display:flex; align-items:center; justify-content:space-between; gap:14px; flex-wrap:wrap; max-width:1000px; margin:24px auto 0; padding:14px 16px; border:var(--border-thin); border-radius:14px; background:rgba(255,255,255,.74); }
.news-result-count { color:var(--text-secondary); font-size:.84rem; font-weight:700; }
.news-page-controls { display:flex; align-items:center; gap:5px; flex-wrap:wrap; }
.news-page-btn { min-width:34px; height:34px; padding:0 10px; border:var(--border-thin); border-radius:8px; background:#fff; color:var(--text-secondary); font-size:.78rem; font-weight:800; cursor:pointer; transition:.2s ease; }
.news-page-btn:hover:not(:disabled), .news-page-btn.active { border-color:var(--brand-blue); background:var(--brand-blue); color:#fff; }
.news-page-btn:disabled { opacity:.42; cursor:not-allowed; }

/* Adjust card scaling when in compact grid */
.news-grid.view-mode-grid .news-title {
  font-size: 0.98rem;
  line-height: 1.4;
  margin-bottom: 8px;
}

.news-grid.view-mode-grid .news-excerpt {
  font-size: 0.82rem;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-grid.view-mode-grid .news-content {
  padding: 18px;
}

.news-grid.view-mode-grid .news-date {
  font-size: 0.75rem;
  margin-bottom: 6px;
}

.news-grid.view-mode-grid .news-link {
  font-size: 0.8rem;
  margin-top: 10px;
}

/* Responsive Overrides */
@media (max-width: 1200px) {
  .news-grid.view-mode-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .news-grid.view-mode-category {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .news-grid.view-mode-grid {
    grid-template-columns: 1fr;
  }
  .news-grid.view-mode-category {
    grid-template-columns: 1fr;
  }
  .news-pagination { align-items:stretch; flex-direction:column; }
  .news-page-controls { justify-content:center; }
}

.news-card {
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: #ffffff;
}

.news-card:hover {
  transform: translateY(-4px);
}

.news-image-wrapper {
  position: relative;
  aspect-ratio: 16/10;
  overflow: hidden;
  background: var(--bg-alternate);
}

.news-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
}

.neurology-color {
  background: rgba(139, 92, 246, 0.05);
  color: var(--color-neurology);
}

.news-card-icon {
  width: 40px;
  height: 40px;
  opacity: 0.5;
}

.news-card:hover .news-placeholder {
  transform: scale(1.03);
}

.news-tag {
  display: inline-block;
  padding: 4px 10px;
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: 4px;
  margin-bottom: 8px;
}

.cardiology-tag {
  background: rgba(239, 68, 68, 0.08);
  color: var(--color-cardiology);
  border: 1px solid rgba(239, 68, 68, 0.15);
}

.neurology-tag {
  background: rgba(139, 92, 246, 0.08);
  color: var(--color-neurology);
  border: 1px solid rgba(139, 92, 246, 0.15);
}

.pediatrics-tag {
  background: rgba(245, 158, 11, 0.08);
  color: var(--color-pediatrics);
  border: 1px solid rgba(245, 158, 11, 0.15);
}

.news-content {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.news-date {
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-secondary);
}

.news-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 12px;
  line-height: 1.45;
}

.news-title a {
  color: var(--text-primary);
}

.news-title a:hover {
  color: var(--brand-blue);
}

.news-excerpt {
  font-size: 0.92rem;
  line-height: 1.55;
  margin-bottom: 20px;
  flex-grow: 1;
}

.news-link {
  font-size: 0.9rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.arrow-right {
  width: 14px;
  height: 14px;
  transition: transform 0.2s ease;
}

.news-link:hover .arrow-right {
  transform: translateX(4px);
}

/* ==========================================================================
   FOOTER SECTION
   ========================================================================== */
.site-footer {
  background: #ffffff;
  border-top: var(--border-thin);
  padding: 80px 0 40px 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 60px;
}

.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

.brand-desc {
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 20px;
  max-width: 260px;
}

.social-links {
  display: flex;
  gap: 10px;
}

.social-links a {
  width: 34px;
  height: 34px;
  border-radius: 6px;
  background: rgba(10, 15, 17, 0.04);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}

.social-links a:hover {
  background: var(--brand-blue);
  color: #ffffff;
  transform: translateY(-1px);
}

.social-links svg {
  width: 16px;
  height: 16px;
}

.footer-col-title {
  font-size: 1.1rem;
  margin-bottom: 20px;
  font-weight: 700;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  color: var(--text-secondary);
  font-size: 0.92rem;
}

.footer-links a:hover {
  color: var(--brand-blue);
}

.footer-info li {
  margin-bottom: 10px;
  font-size: 0.92rem;
}

.tag-red {
  display: inline-block;
  background: rgba(239, 68, 68, 0.06);
  color: var(--color-cardiology);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.82rem;
}

.newsletter-desc {
  font-size: 0.92rem;
  margin-bottom: 16px;
}

.newsletter-form {
  display: flex;
  border: 1px solid rgba(10, 15, 17, 0.12);
  border-radius: var(--radius-btn);
  padding: 4px;
  background: rgba(10, 15, 17, 0.02);
  transition: var(--transition-fast);
}

.newsletter-form:focus-within {
  border-color: var(--brand-blue);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.newsletter-input {
  flex-grow: 1;
  border: none;
  background: transparent;
  padding: 8px 12px;
  outline: none;
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--text-primary);
  width: 100%;
}

.submit-arrow-icon {
  width: 16px;
  height: 16px;
  color: #ffffff;
}

.footer-bottom {
  border-top: var(--border-thin);
  padding-top: 40px;
}

.bottom-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 40px;
  align-items: center;
  margin-bottom: 30px;
}

.contact-details p {
  font-size: 0.9rem;
  margin-bottom: 6px;
}

/* Stylized Map */
.map-placeholder {
  height: 100px;
  border-radius: var(--radius-btn);
  overflow: hidden;
  position: relative;
  background: #f1f5f9;
  border: var(--border-thin);
}

.map-inner {
  width: 100%;
  height: 100%;
  background-image: radial-gradient(circle, #cbd5e1 1.5px, transparent 1.5px);
  background-size: 16px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.map-pulse {
  width: 14px;
  height: 14px;
  background: var(--brand-blue);
  border-radius: 50%;
  position: absolute;
  top: 45%;
  left: 40%;
  box-shadow: 0 0 0 rgba(37, 99, 235, 0.4);
  animation: pulseEffect 2s infinite;
}

.map-label {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.95);
  padding: 4px 10px;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.copyright {
  text-align: center;
  font-size: 0.82rem;
  border-top: 1px solid rgba(10, 15, 17, 0.04);
  padding-top: 24px;
}

/* ==========================================================================
   BOOKING & LOGIN MODALS (POPUP)
   ========================================================================== */
.modal-overlay {
  /* Keep every dialog completely out of the rendering tree until it is
     explicitly opened.  In Firefox an invisible fixed layer with
     backdrop-filter can still blur/dim the page after a refresh. */
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 15, 17, 0.4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  padding: 20px;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
    pointer-events: auto;
}

.modal-container {
  width: 100%;
  max-width: 600px;
  background: #ffffff;
  border: var(--border-thin);
  padding: 36px;
  position: relative;
  border-radius: var(--radius-card);
  transform: scale(0.95);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 20px 50px rgba(0,0,0,0.08);
}

.modal-overlay.active .modal-container {
  transform: scale(1);
}

.modal-close-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: rgba(10, 15, 17, 0.04);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}

.modal-close-btn:hover {
  background: rgba(10, 15, 17, 0.08);
  transform: rotate(90deg);
}

.modal-close-btn svg {
  width: 16px;
  height: 16px;
}

.modal-header {
  margin-bottom: 24px;
  padding-right: 24px;
}

.modal-title {
  font-size: 1.6rem;
  margin-bottom: 6px;
  font-weight: 800;
}

.modal-subtitle {
  font-size: 0.92rem;
  line-height: 1.5;
}

.modal-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
}

.form-input {
  width: 100%;
  padding: 10px 14px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  border: 1px solid rgba(10, 15, 17, 0.15);
  border-radius: var(--radius-btn);
  background: #ffffff;
  outline: none;
  transition: var(--transition-fast);
  color: var(--text-primary);
}

.form-input::placeholder {
  color: rgba(10, 15, 17, 0.35);
}

.form-input:focus {
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.10);
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%230a0f11' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 14px;
  padding-right: 36px;
}

/* ==========================================================================
   SUCCESS TOAST/POPUP
   ========================================================================== */
.success-toast-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 15, 17, 0.25);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  padding: 20px;
}

.success-toast-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.success-toast-container {
  width: 100%;
  max-width: 380px;
  padding: 36px 28px;
  text-align: center;
  background: #ffffff;
  border-radius: var(--radius-card);
  box-shadow: 0 20px 40px rgba(0,0,0,0.1);
  transform: scale(0.95);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.success-toast-overlay.active .success-toast-container {
  transform: scale(1);
}

.success-toast-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.08);
  color: var(--color-orthopedics);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px auto;
}

.success-toast-icon svg {
  width: 24px;
  height: 24px;
}

.success-toast-title {
  font-size: 1.35rem;
  margin-bottom: 10px;
  font-weight: 800;
}

.success-toast-msg {
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 20px;
}

/* ==========================================================================
   SCROLL REVEAL / TRANSITIONS (Smooth & hardware-accelerated)
   ========================================================================== */
.scroll-reveal {
  opacity: 0;
  transform: translateY(15px) translateZ(0);
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  backface-visibility: hidden;
}

.scroll-reveal.active {
  opacity: 1;
  transform: translateY(0) translateZ(0);
}

.scroll-reveal.fade-left {
  transform: translateX(-15px) translateZ(0);
}

.scroll-reveal.fade-left.active {
  transform: translateX(0) translateZ(0);
}

.scroll-reveal.fade-right {
  transform: translateX(15px) translateZ(0);
}

.scroll-reveal.fade-right.active {
  transform: translateX(0) translateZ(0);
}

.scroll-reveal.fade-up {
  transform: translateY(15px) translateZ(0);
}

.scroll-reveal.fade-up.active {
  transform: translateY(0) translateZ(0);
}

/* ==========================================================================
   KEYFRAME ANIMATIONS
   ========================================================================== */
@keyframes floatEffect {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-8px); }
  100% { transform: translateY(0px); }
}

@keyframes pulseEffect {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.6);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 10px rgba(37, 99, 235, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(37, 99, 235, 0);
  }
}

/* ==========================================================================
   ADMIN DASHBOARD & DATA TABLES
   ========================================================================== */
.admin-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
  text-align: left;
}

.admin-table th, .admin-table td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(10, 15, 17, 0.08);
}

.admin-table th {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--text-primary);
  background: rgba(10, 15, 17, 0.02);
  font-size: 0.9rem;
}

.admin-table td {
  font-size: 0.9rem;
}

.admin-table tr:hover {
  background: var(--brand-blue-light);
}

.status-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 700;
}

.status-pending {
  background: rgba(245, 158, 11, 0.08);
  color: var(--color-pediatrics);
  border: 1px solid rgba(245, 158, 11, 0.15);
}

.status-confirmed {
  background: rgba(16, 185, 129, 0.08);
  color: var(--color-orthopedics);
  border: 1px solid rgba(16, 185, 129, 0.15);
}

.btn-action {
  padding: 6px 12px;
  font-size: 0.8rem;
  font-weight: 700;
  border-radius: 4px;
  margin-left: 6px;
  transition: var(--transition-fast);
}

.approve-btn {
  background-color: var(--color-orthopedics);
  color: #ffffff;
}

.approve-btn:hover {
  background-color: #059669;
  transform: translateY(-1px);
}

.delete-btn, .delete-subscriber-btn {
  background-color: #ef4444;
  color: #ffffff;
}

.delete-btn:hover, .delete-subscriber-btn:hover {
  background-color: #dc2626;
  transform: translateY(-1px);
}

/* ==========================================================================
   RESPONSIVE DESIGN (MEDIA QUERIES)
   ========================================================================== */

@media (max-width: 1024px) {
  .hero-container {
    grid-template-columns: 1fr;
    gap: 48px;
    text-align: center;
  }
  
  .badge-container {
    justify-content: center;
  }
  
  .hero-desc {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-actions {
    justify-content: center;
  }
  
  .hero-media {
    max-width: 500px;
    margin: 0 auto;
  }

  .float-card-1 {
    left: -10px;
  }

  .float-card-2 {
    right: -10px;
  }

  .showcase-content-wrapper {
    grid-template-columns: 1fr;
    gap: 30px;
    padding: 30px;
  }
  
  .showcase-image-pane {
    order: 1;
    max-width: 450px;
    margin: 0 auto;
  }
  
  .showcase-details-pane {
    order: 2;
    text-align: center;
  }
  
  .specialty-bullets {
    display: inline-block;
    text-align: left;
  }

  .specialty-actions {
    display: flex;
    justify-content: center;
  }
  
  .services-grid, .news-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }

  .footer-grid {
    grid-template-columns: 1.2fr 0.8fr 1fr;
    gap: 32px;
  }
  
  .newsletter-col {
    grid-column: span 3;
    max-width: 500px;
  }
}

@media (max-width: 768px) {
  html {
    font-size: 15px;
  }

  .hero-title {
    font-size: 2.5rem;
    letter-spacing: -0.5px;
  }

  .section-title {
    font-size: 1.9rem;
  }

  .mobile-toggle-btn {
    display: block;
  }

  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 260px;
    height: 100vh;
    background: #ffffff;
    box-shadow: -10px 0 30px rgba(0,0,0,0.05);
    z-index: 999;
    padding: 100px 30px;
    transition: var(--transition-smooth);
    border-left: var(--border-thin);
  }

  .nav-menu.active {
    right: 0;
  }

  .nav-menu ul {
    flex-direction: column;
    gap: 20px;
  }

  .nav-menu ul li .dropdown-menu,
  .nav-menu .dropdown-menu .dropdown-menu {
    position: static;
    display: none;
    visibility: hidden;
    opacity: 0;
    transform: none;
    min-width: 0;
    margin: 6px 0 0 12px;
    padding: 4px 0;
    box-shadow: none;
    border-radius: 8px;
  }

  .nav-menu ul li.submenu-open > .dropdown-menu {
    display: block;
    visibility: visible;
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }

  .nav-menu .submenu-toggle {
    right: 0;
    top: 2px;
  }

  #nav-menu-list > li.has-submenu {
    display: block;
  }

  #nav-menu-list > li.has-submenu > .submenu-toggle {
    position: absolute;
    right: 0;
    top: 2px;
    padding: 4px 7px;
    transform: none;
  }

  .nav-link {
    font-size: 1.1rem;
    display: block;
  }
  
  .nav-link::after {
    bottom: -2px;
  }

  .site-header.menu-open .line-top {
    transform: translateY(6px) rotate(45deg);
    transform-origin: center;
  }

  .site-header.menu-open .line-mid {
    opacity: 0;
  }

  .site-header.menu-open .line-bot {
    transform: translateY(-6px) rotate(-45deg);
    transform-origin: center;
  }

  .slider-outer {
    padding: 24px;
  }

  .slide-quote {
    font-size: 1.15rem;
  }

  .metrics-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  
  .metric-item:not(:last-child) {
    border-right: none;
    border-bottom: 1px solid rgba(10, 15, 17, 0.06);
    padding-bottom: 20px;
  }

  .services-grid, .news-grid {
    grid-template-columns: 1fr;
  }

  .showcase-tabs {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .newsletter-col {
    grid-column: span 1;
  }

  .bottom-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .modal-container {
    padding: 24px 16px;
  }
}

/* ==========================================================================
   ADMIN CMS SIDEBAR LAYOUT
   ========================================================================== */
.admin-wrapper {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

.admin-sidebar {
  width: 280px;
  background: #ffffff;
  border-right: var(--border-thin);
  display: flex;
  flex-direction: column;
  padding: 30px 20px;
  position: fixed;
  height: 100vh;
  left: 0;
  top: 0;
  z-index: 100;
  border-radius: 0;
  box-shadow: none;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 10px 30px 10px;
  border-bottom: 1px solid rgba(10, 15, 17, 0.06);
  margin-bottom: 24px;
}

.sidebar-logo-text {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

.sidebar-nav {
  flex-grow: 1;
}

.sidebar-nav ul {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-link {
  width: 100%;
  background: transparent;
  border: none;
  padding: 12px 16px;
  text-align: left;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-secondary);
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: var(--transition-fast);
}

.sidebar-link svg {
  width: 18px;
  height: 18px;
  stroke-width: 2.2;
  color: var(--text-secondary);
  transition: var(--transition-fast);
  flex-shrink: 0;
}

.sidebar-link:hover {
  background: rgba(10, 15, 17, 0.03);
  color: var(--text-primary);
}

.sidebar-link.active {
  background: var(--brand-blue-light);
  color: var(--brand-blue);
}

.sidebar-link.active svg {
  color: var(--brand-blue);
}

.sidebar-footer {
  border-top: 1px solid rgba(10, 15, 17, 0.06);
  padding-top: 20px;
}

.admin-main {
  flex-grow: 1;
  margin-left: 280px;
  padding: 40px 48px;
  min-height: 100vh;
  box-sizing: border-box;
}

.admin-tab-pane {
  display: none;
}

.admin-tab-pane.active {
  display: block;
  animation: tabFadeIn 0.35s ease;
}

@keyframes tabFadeIn {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

.cms-header {
  margin-bottom: 30px;
}

.cms-header h2 {
  font-size: 1.85rem;
  font-weight: 800;
  margin-bottom: 6px;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

.cms-header p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.spec-select-btn.active {
  background: var(--brand-blue-light) !important;
  border-color: var(--brand-blue) !important;
  color: var(--brand-blue) !important;
}

/* Responsive sidebar */
@media (max-width: 1024px) {
  .admin-wrapper {
    flex-direction: column;
  }
  
  .admin-sidebar {
    width: 100%;
    height: auto;
    position: relative;
    padding: 20px;
    border-right: none;
    border-bottom: var(--border-thin);
  }
  
  .sidebar-brand {
    padding-bottom: 15px;
    margin-bottom: 15px;
    justify-content: center;
  }
  
  .sidebar-nav ul {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .sidebar-link {
    padding: 8px 14px;
    font-size: 0.88rem;
  }
  
  .admin-main {
    margin-left: 0;
    padding: 24px;
  }
}

@media (max-width: 768px) {
  .sidebar-nav ul {
    grid-template-columns: repeat(2, 1fr);
    display: grid;
    gap: 8px;
  }
}

/* Hide Online Booking Features for now */
.open-booking-btn {
  display: none !important;
}

/* Related Website Links Layout */
.related-links-section {
  padding: 24px 0;
  background-color: #ffffff;
}

#related-links-grid {
  display: grid;
  grid-template-columns: repeat(var(--related-links-cols, 5), 1fr);
  gap: 20px;
  justify-content: center;
  align-items: stretch;
}

@media (max-width: 1200px) {
  #related-links-grid {
    grid-template-columns: repeat(min(var(--related-links-cols, 5), 4), 1fr) !important;
  }
}

@media (max-width: 1024px) {
  #related-links-grid {
    grid-template-columns: repeat(min(var(--related-links-cols, 5), 3), 1fr) !important;
  }
}

@media (max-width: 768px) {
  #related-links-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

@media (max-width: 480px) {
  #related-links-grid {
    grid-template-columns: 1fr !important;
  }
}

.related-link-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 24px;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1.5px solid rgba(255, 255, 255, 0.75);
  border-left: 4px solid var(--brand-blue);
  border-radius: 14px;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(31, 38, 135, 0.04);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), 
              box-shadow 0.3s ease, 
              border-color 0.3s ease,
              background 0.3s ease;
  will-change: transform, box-shadow;
  overflow: hidden;
}

/* Pastel Themes for Related Link Cards */
.related-link-card.pastel-blue {
  background: #f5f8ff;
  border-color: #dbeafe;
  border-left-color: #3b82f6;
}
.related-link-card.pastel-blue:hover {
  background: #eff6ff;
  border-color: #bfdbfe;
  border-left-color: #2563eb;
}
.related-link-card.pastel-blue .related-link-logo-fallback {
  background: rgba(59, 130, 246, 0.1);
  color: #2563eb;
}

.related-link-card.pastel-green {
  background: #f6fdf9;
  border-color: #d1fae5;
  border-left-color: #10b981;
}
.related-link-card.pastel-green:hover {
  background: #f0fdf4;
  border-color: #a7f3d0;
  border-left-color: #059669;
}
.related-link-card.pastel-green .related-link-logo-fallback {
  background: rgba(16, 185, 129, 0.1);
  color: #059669;
}

.related-link-card.pastel-pink {
  background: #fffafb;
  border-color: #fce7f3;
  border-left-color: #ec4899;
}
.related-link-card.pastel-pink:hover {
  background: #fdf2f8;
  border-color: #fbcfe8;
  border-left-color: #db2777;
}
.related-link-card.pastel-pink .related-link-logo-fallback {
  background: rgba(236, 72, 153, 0.1);
  color: #db2777;
}

.related-link-card.pastel-orange {
  background: #fffbf7;
  border-color: #ffedd5;
  border-left-color: #f97316;
}
.related-link-card.pastel-orange:hover {
  background: #fff7ed;
  border-color: #fed7aa;
  border-left-color: #ea580c;
}
.related-link-card.pastel-orange .related-link-logo-fallback {
  background: rgba(249, 115, 22, 0.1);
  color: #ea580c;
}

.related-link-card.pastel-purple {
  background: #faf6fe;
  border-color: #f3e8ff;
  border-left-color: #a855f7;
}
.related-link-card.pastel-purple:hover {
  background: #faf5ff;
  border-color: #e9d5ff;
  border-left-color: #9333ea;
}
.related-link-card.pastel-purple .related-link-logo-fallback {
  background: rgba(168, 85, 247, 0.1);
  color: #9333ea;
}

.related-link-card.pastel-teal {
  background: #f5fdfb;
  border-color: #ccfbf1;
  border-left-color: #14b8a6;
}
.related-link-card.pastel-teal:hover {
  background: #f0fdfa;
  border-color: #99f6e4;
  border-left-color: #0d9488;
}
.related-link-card.pastel-teal .related-link-logo-fallback {
  background: rgba(20, 184, 166, 0.1);
  color: #0d9488;
}

.related-link-card:hover {
  transform: translateY(-4px) translateZ(0);
  box-shadow: 0 16px 36px rgba(37, 99, 235, 0.12);
}

.related-link-card:hover .related-link-bg {
  opacity: 0.22 !important;
  transform: scale(1.16) !important;
}

.related-link-logo-container {
  position: relative;
  z-index: 2;
  width: 76px;
  height: 46px;
  border-radius: 8px;
  background: #ffffff;
  border: 1px solid rgba(37, 99, 235, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), background 0.3s ease;
  box-shadow: var(--shadow-subtle);
}

.related-link-card:hover .related-link-logo-container {
  background: rgba(37, 99, 235, 0.04);
  transform: scale(1.05);
}

.related-link-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 2px;
}

.related-link-title {
  position: relative;
  z-index: 2;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.3s ease;
}

.related-link-card:hover .related-link-title {
  color: var(--brand-blue);
}

.related-link-card:hover .related-link-arrow {
  color: var(--brand-blue) !important;
  transform: translateX(4px);
}

/* Page Builder Responsive Column Stack Rules */
@media (max-width: 768px) {
  .page-builder-row {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }
}

.builder-text-toolbar button svg {
  width: 15px;
  height: 15px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.builder-text-toolbar button:hover,
.builder-text-toolbar button:focus-visible {
  color: var(--brand-blue) !important;
  border-color: rgba(37, 99, 235, .45) !important;
  background: #eff6ff !important;
}

/* Small illustrated guide shown beside every Page Builder widget selector. */
.widget-mini-preview {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 10px;
  padding: 8px 10px;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  background: linear-gradient(135deg, #f8fbff, #f1f5ff);
}

.widget-mini-preview-visual {
  width: 82px;
  height: 50px;
  flex: 0 0 82px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 7px;
  color: #2563eb;
  border: 1px solid #c7d2fe;
  border-radius: 6px;
  background: #ffffff;
}

.widget-mini-preview-visual i,
.widget-preview-copy i,
.widget-preview-copy b {
  display: block;
  width: 100%;
  height: 4px;
  margin: 3px 0;
  border-radius: 99px;
  background: #cbd5e1;
}

.widget-preview-copy { flex: 1; min-width: 0; }
.widget-preview-copy b { width: 76%; height: 6px; background: #64748b; }
.widget-preview-image, .widget-preview-thumb { display:block; width:100%; height:100%; border-radius:4px; background:linear-gradient(135deg,#bfdbfe 0 48%,#60a5fa 48% 52%,#dbeafe 52%); color:#1d4ed8; text-align:center; line-height:34px; font-size:1.35rem; }
.widget-preview-slide { font-size:1.15rem; font-weight:800; }
.widget-preview-icon, .widget-preview-embed, .widget-preview-video, .widget-preview-flip { width:30px; height:30px; display:inline-flex; align-items:center; justify-content:center; border-radius:50%; color:#fff; background:#2563eb; font-size:1.1rem; }
.widget-preview-copy { display:flex; flex-direction:column; justify-content:center; }
.widget-preview-list { font-size:.76rem; line-height:1.45; color:#16a34a; font-weight:800; }
.widget-preview-digits { font-size:.68rem; color:#1d4ed8; letter-spacing:-.4px; white-space:nowrap; }
.widget-preview-quote { font-size:2.5rem; line-height:1; color:#60a5fa; font-family:serif; }
.widget-preview-price { color:#1d4ed8; font-size:1.05rem; }
.widget-preview-social { width:19px; height:19px; border-radius:50%; display:inline-flex; align-items:center; justify-content:center; color:#fff; background:#2563eb; font-size:.62rem; font-weight:800; }
.widget-preview-button { padding:5px 7px; border-radius:4px; color:#fff; background:#2563eb; font-size:.48rem; font-weight:800; white-space:nowrap; }
.widget-preview-divider { width:100%; height:2px; background:#64748b; }
.widget-preview-spacer { height:25px; width:36px; border-top:1px dashed #94a3b8; border-bottom:1px dashed #94a3b8; }

/* Dense image controls keep the builder practical on a split editor/preview screen. */
.builder-image-editor-compact { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:7px 12px; }
.builder-image-upload-row { display:flex; align-items:center; gap:8px; min-width:0; }
.builder-image-link-row { display:flex; flex-direction:column; gap:3px; min-width:0; }
.builder-image-link-row input { width:100%; box-sizing:border-box; }
.builder-image-options-grid { grid-column:1 / -1; display:grid; grid-template-columns:repeat(3, minmax(0,1fr)); gap:7px; padding-top:7px; border-top:1px solid rgba(0,0,0,.06); }
.builder-image-options-grid select { display:block; width:100%; margin-top:3px; padding:5px; border:var(--border-thin); border-radius:5px; }

.accordion-editor-head { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-bottom:7px; color:#1e3a8a; font-size:.8rem; }
.accordion-items-editor { display:flex; flex-direction:column; gap:8px; }
.accordion-item-editor { padding:9px; border:1px solid #bfdbfe; border-radius:8px; background:#f8fbff; }
.accordion-item-editor-title { display:flex; align-items:center; justify-content:space-between; margin-bottom:7px; color:#2563eb; font-size:.75rem; }
.accordion-item-editor-title div { display:flex; gap:3px; }.accordion-item-editor-title button { width:24px; height:23px; border:1px solid #cbd5e1; border-radius:4px; background:#fff; color:#475569; cursor:pointer; font-weight:800; }.accordion-item-editor-title .accordion-remove { color:#ef4444; border-color:#fecaca; }
.accordion-item-editor-title button:disabled { opacity:.35; cursor:not-allowed; }
.accordion-item-meta { display:grid; grid-template-columns:1fr 1fr; gap:6px; margin-bottom:6px; }.accordion-item-meta input { min-width:0; padding:5px 7px; font-size:.76rem; }
.accordion-rich-toolbar { display:flex; flex-wrap:wrap; gap:3px; padding:5px; border:1px solid #cbd5e1; border-bottom:0; border-radius:6px 6px 0 0; background:#eaf2ff; }.accordion-rich-toolbar button { min-width:26px; border:1px solid #cbd5e1; border-radius:4px; background:#fff; padding:3px 5px; color:#334155; font-size:.7rem; cursor:pointer; }
.accordion-rich-editor { min-height:76px; padding:8px; border:1px solid #cbd5e1; border-radius:0 0 6px 6px; background:#fff; color:#1e293b; font-size:.82rem; line-height:1.55; outline:0; }.accordion-rich-editor:empty:before { content:attr(data-placeholder); color:#94a3b8; }.accordion-rich-editor p:first-child,.accordion-rich-editor h1:first-child,.accordion-rich-editor h2:first-child,.accordion-rich-editor h3:first-child { margin-top:0; }.accordion-rich-editor p:last-child { margin-bottom:0; }
.accordion-default-toggle { display:block; margin-top:7px; color:#64748b; font-size:.73rem; }.accordion-editor-help { margin:5px 0 0; color:#64748b; font-size:.68rem; line-height:1.4; }
.public-accordion details:last-child { border-bottom:0 !important; }.public-accordion summary::-webkit-details-marker { display:none; }.public-accordion details[open] summary > span:last-child { transform:rotate(45deg); }.public-accordion summary a:hover { color:var(--brand-blue) !important; text-decoration:underline !important; }

.widget-mini-preview-copy { min-width:0; display:flex; flex-direction:column; gap:1px; }
.widget-mini-preview-copy strong { color:#1e3a8a; font-size:.76rem; line-height:1.25; }
.widget-mini-preview-copy span { color:#64748b; font-size:.68rem; line-height:1.35; }

@media (max-width: 480px) {
  .widget-mini-preview-visual { width:70px; flex-basis:70px; }
  .builder-image-editor-compact { grid-template-columns:1fr; }
  .builder-image-options-grid { grid-template-columns:repeat(2, minmax(0,1fr)); }
  .accordion-item-meta { grid-template-columns:1fr; }
}

/* Page builder can expand without invoking the browser's native fullscreen API. */
#page-builder-modal.builder-fullscreen {
  padding: 0 !important;
}

#page-builder-modal.builder-fullscreen .page-builder-dialog {
  width: 100vw !important;
  max-width: none !important;
  height: 100vh;
  max-height: 100vh !important;
  padding: 24px 36px !important;
  border: 0 !important;
  border-radius: 0 !important;
}

/* When live preview is enabled, reserve a stable right-side canvas rather
   than squeezing the page controls into the original narrow modal. */
#page-builder-modal.builder-live-preview-open .page-builder-dialog {
  width: min(1600px, calc(100vw - 32px)) !important;
  max-width: 1600px !important;
  height: calc(100dvh - 32px);
  max-height: calc(100dvh - 32px) !important;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 440px);
  grid-template-rows: auto minmax(0, 1fr);
  column-gap: 24px;
  overflow: hidden !important;
}

#page-builder-modal.builder-fullscreen.builder-live-preview-open .page-builder-dialog {
  width: 100vw !important;
  max-width: none !important;
  height: 100dvh;
  max-height: 100dvh !important;
  padding: 22px 28px !important;
}

#page-builder-modal.builder-live-preview-open .page-builder-dialog > :first-child {
  grid-column: 1 / -1;
}

#page-builder-modal.builder-live-preview-open #builder-page-form {
  grid-column: 1;
  grid-row: 2;
  min-width: 0;
  overflow-y: auto;
  padding: 2px 10px 28px 1px;
  scrollbar-gutter: stable;
}

.builder-live-preview-panel {
  display: none;
}

#page-builder-modal.builder-live-preview-open .builder-live-preview-panel {
  grid-column: 2;
  grid-row: 2;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border: 1px solid #bfdbfe;
  border-radius: 16px;
  background: #eef6ff;
  box-shadow: 0 14px 34px rgba(37, 99, 235, .13);
}

.builder-live-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 13px 15px;
  border-bottom: 1px solid #bfdbfe;
  background: #fff;
}

.builder-live-preview-head div { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.builder-live-preview-head span { color: #2563eb; font-size: .67rem; font-weight: 800; letter-spacing: .02em; }
.builder-live-preview-head strong { overflow: hidden; color: #0f172a; font-size: .91rem; text-overflow: ellipsis; white-space: nowrap; }
.builder-live-preview-head em { flex: 0 0 auto; border-radius: 999px; background: #fef3c7; color: #92400e; padding: 4px 7px; font-size: .65rem; font-style: normal; font-weight: 800; }

.builder-live-preview-canvas { flex: 1; overflow: auto; padding: 14px; }
.builder-live-page { overflow: hidden; min-height: 100%; border-radius: 10px; background: #fff; box-shadow: 0 3px 12px rgba(15, 23, 42, .08); color: #1e293b; font-size: .76rem; }
.builder-live-page > header { padding: 22px 18px; background: linear-gradient(135deg, #eff6ff, #fff); text-align: center; }
.builder-live-page > header h1 { margin: 0; color: #0f172a; font-size: 1.35rem; line-height: 1.25; }
.builder-live-page > header p { margin: 7px 0 0; color: #64748b; font-size: .72rem; }
.builder-preview-row { display: grid; grid-template-columns: repeat(var(--preview-columns), minmax(0, 1fr)); gap: 10px; padding: 12px; border-top: 1px solid #f1f5f9; }
.builder-preview-column { min-width: 0; display: flex; flex-direction: column; gap: 9px; }
.builder-preview-text { line-height: 1.6; overflow-wrap: anywhere; }
.builder-preview-text :first-child { margin-top: 0; }
.builder-preview-text :last-child { margin-bottom: 0; }
.builder-preview-heading { margin: 0; color: #0f172a; font-size: 1.05rem; line-height: 1.3; }
.builder-preview-image { margin: 0; text-align: center; }
.builder-preview-image.align-left { text-align: left; }
.builder-preview-image.align-right { text-align: right; }
.builder-preview-image img, .builder-preview-blog img, .builder-preview-slider img { display: block; width: 100%; max-height: 220px; border-radius: 7px; object-fit: cover; }
.builder-preview-gallery { display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:4px; min-height:56px; }
.builder-preview-gallery span, .builder-preview-gallery img { display:block; width:100%; min-height:44px; border-radius:5px; background:#dbeafe; object-fit:cover; }
.builder-preview-placeholder { display: grid; min-height: 86px; place-items: center; border-radius: 7px; background: #dbeafe; color: #2563eb; font-size: 2rem; }
.builder-preview-slider { position: relative; overflow: hidden; border-radius: 7px; background: #dbeafe; }
.builder-preview-slider > span { position: absolute; top: 50%; z-index: 1; transform: translateY(-50%); color: #fff; font-size: 1.6rem; font-weight: 800; text-shadow: 0 1px 3px #000; }
.builder-preview-slider > span:nth-of-type(1) { left: 8px; }.builder-preview-slider > span:nth-of-type(2) { right: 8px; }
.builder-preview-slider b { position: absolute; right: 8px; bottom: 7px; left: 8px; overflow: hidden; color: #fff; font-size: .72rem; text-overflow: ellipsis; text-shadow: 0 1px 4px #000; white-space: nowrap; }
.builder-preview-feature, .builder-preview-blog { display: flex; gap: 9px; align-items: flex-start; padding: 10px; border-radius: 8px; background: #f8fafc; }
.builder-preview-feature i { display: grid; flex: 0 0 28px; width: 28px; height: 28px; place-items: center; border-radius: 50%; background: #2563eb; color: #fff; font-style: normal; }.builder-preview-feature strong,.builder-preview-blog strong { display: block; color: #0f172a; }.builder-preview-feature p,.builder-preview-blog p { margin: 4px 0; color: #64748b; line-height: 1.4; }.builder-preview-blog img { width: 66px; height: 58px; flex: 0 0 66px; }.builder-preview-blog a { color: #2563eb; font-weight: 800; }
.builder-preview-list { margin: 0; padding-left: 18px; line-height: 1.65; }.builder-preview-list li::marker { color: #2563eb; }
.builder-preview-accordion { overflow:hidden; border:1px solid #e2e8f0; border-radius:8px; }.builder-preview-accordion details + details { border-top:1px solid #e2e8f0; }.builder-preview-accordion summary { padding:9px; cursor:pointer; color:#0f172a; font-weight:800; }.builder-preview-accordion p { margin:0; padding:0 9px 9px; color:#64748b; line-height:1.45; }
.builder-preview-countdown { display: flex; justify-content: center; align-items: baseline; gap: 5px; padding: 13px 8px; border-radius: 8px; background: #1d4ed8; color: #fff; }.builder-preview-countdown strong { font-size: 1.25rem; }.builder-preview-countdown span { font-size: .65rem; opacity: .9; }
.builder-preview-embed, .builder-preview-video { display: grid; min-height: 90px; place-content: center; gap: 6px; border-radius: 8px; background: #e2e8f0; color: #475569; text-align: center; font-size: 1.4rem; }.builder-preview-video { background: #0f172a; color: #fff; }.builder-preview-embed small,.builder-preview-video small { font-size: .68rem; }
.builder-preview-testimonial { margin: 0; padding: 12px; border-left: 3px solid #60a5fa; background: #f8fafc; color: #334155; font-style: italic; line-height: 1.5; }.builder-preview-testimonial footer { margin-top: 7px; color: #2563eb; font-size: .7rem; font-style: normal; font-weight: 800; }
.builder-preview-pricing, .builder-preview-flip { display: flex; flex-direction: column; gap: 6px; padding: 14px; border-radius: 8px; background: linear-gradient(135deg,#eff6ff,#dbeafe); text-align: center; }.builder-preview-pricing b { color:#2563eb; font-size:1.25rem; }.builder-preview-flip { background: linear-gradient(135deg,#1d4ed8,#60a5fa); color:#fff; }
.builder-preview-toc { display:flex; flex-direction:column; gap:5px; padding:10px; border:1px solid #e2e8f0; border-radius:8px; }.builder-preview-toc a { color:#2563eb; text-decoration:underline; font-size:.7rem; }
.builder-preview-share { display:flex; align-items:center; gap:6px; }.builder-preview-share span { display:grid; width:24px; height:24px; place-items:center; border-radius:50%; background:#2563eb; color:#fff; font-size:.7rem; font-weight:800; }
.builder-preview-button { display:flex; }.builder-preview-button span { padding:8px 13px; border-radius:6px; background:#2563eb; color:#fff; font-size:.72rem; font-weight:800; }.builder-preview-divider { width:100%; border:0; border-top:1px solid #94a3b8; }.builder-preview-divider.dashed { border-top-style:dashed; }.builder-preview-empty { margin:12px; padding:26px 12px; border:1px dashed #93c5fd; border-radius:8px; color:#64748b; text-align:center; }

@media (max-width: 768px) {
  #page-builder-modal.builder-fullscreen .page-builder-dialog {
    padding: 18px !important;
  }
}

@media (max-width: 980px) {
  #page-builder-modal.builder-live-preview-open .page-builder-dialog,
  #page-builder-modal.builder-fullscreen.builder-live-preview-open .page-builder-dialog {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr) minmax(260px, 42vh);
    height: 100dvh;
    max-height: 100dvh !important;
    padding: 16px !important;
  }
  #page-builder-modal.builder-live-preview-open .page-builder-dialog > :first-child { grid-row: 1; }
  #page-builder-modal.builder-live-preview-open #builder-page-form { grid-column: 1; grid-row: 2; }
  #page-builder-modal.builder-live-preview-open .builder-live-preview-panel { grid-column: 1; grid-row: 3; }
}

.executive-section {
  padding: 24px 0;
}

.youtube-section {
  padding: 24px 0 !important;
}

/* ==========================================================================
   A4 ONE-PAGE NEWS 3D COVERFLOW SECTION
   ========================================================================== */
.onepage-news-section {
  padding: 24px 0;
}

.onepage-carousel {
  position: relative;
  width: 100%;
  max-width: 1100px;
  height: 440px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
  perspective: 1200px; /* Essential for 3D depth */
  overflow: visible;
}

.onepage-slide {
  position: absolute;
  width: 260px;
  aspect-ratio: 1 / 1.414; /* Exact A4 proportions */
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 15px 35px rgba(10, 15, 17, 0.15);
  border: var(--border-thin);
  overflow: hidden;
  transition: transform 1.25s cubic-bezier(0.22, 0.75, 0.25, 1), 
              opacity 1.1s ease, 
              z-index 1.25s step-end,
              box-shadow 0.3s ease;
  transform-style: preserve-3d;
  cursor: pointer;
  user-select: none;
  display: flex;
  flex-direction: column;
}

.onepage-slide:hover {
  box-shadow: 0 20px 45px rgba(10, 15, 17, 0.25);
}

.onepage-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  display: block;
}

@media (prefers-reduced-motion: reduce) {
  .onepage-slide { transition-duration: 0.01ms; }
}

/* Lightbox controls & elements styling */
.lightbox-overlay {
  display: none;
  transition: opacity 0.3s ease;
}

.lightbox-overlay.active {
  display: flex !important;
}

.lightbox-nav-btn {
  transition: background 0.2s ease, transform 0.2s ease;
}

.lightbox-nav-btn:hover {
  background: rgba(255, 255, 255, 0.2) !important;
  transform: scale(1.1);
}

/* coverflow slide visual pagination dots */
.opn-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(10, 15, 17, 0.15);
  cursor: pointer;
  transition: all 0.3s ease;
}

.opn-dot.active {
  background: var(--brand-blue);
  width: 24px;
  border-radius: 5px;
}

/* Modal Grid styling */
.opn-grid-card {
  aspect-ratio: 1 / 1.414;
  border-radius: 8px;
  border: var(--border-thin);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  background: #ffffff;
}

.opn-grid-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.opn-grid-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.opn-grid-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.2) 60%, rgba(0,0,0,0) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 16px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.opn-grid-card:hover .opn-grid-card-overlay {
  opacity: 1;
}

.opn-grid-card-title {
  color: #ffffff;
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1.4;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Stacking on mobile viewports */
@media (max-width: 576px) {
  .onepage-carousel {
    height: 380px;
  }
  .onepage-slide {
    width: 200px;
  }
}

/* ==========================================================================
   EXECUTIVE 3D COVERFLOW SECTION
   ========================================================================== */
.exec-slide {
  position: absolute;
  width: 320px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  border-radius: var(--radius-card);
  box-shadow: 0 15px 35px rgba(10, 15, 17, 0.1);
  border: 1px solid rgba(10, 15, 17, 0.05);
  overflow: hidden;
  transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1), 
              opacity 0.6s ease, 
              z-index 0.6s step-end,
              box-shadow 0.3s ease;
  transform-style: preserve-3d;
  cursor: pointer;
  user-select: none;
  display: flex;
  flex-direction: column;
}

.exec-slide:hover {
  box-shadow: 0 20px 45px rgba(10, 15, 17, 0.2);
}

.exec-slide-img-container {
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #f1f5f9;
  position: relative;
  border-bottom: 1px solid rgba(10, 15, 17, 0.05);
}

.exec-slide-img-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  transition: transform 0.5s ease;
}

.exec-slide:hover .exec-slide-img-container img {
  transform: scale(1.04);
}

.exec-slide-content {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: center;
}

@media (max-width: 576px) {
  .exec-carousel {
    height: 500px !important;
  }
  .exec-slide {
    width: 260px !important;
  }
}

/* ==========================================================================
   ORGANIZATIONAL CHART TREE STYLE
   ========================================================================== */
.org-tree {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  width: 100%;
}

.org-tree ul {
  padding-top: 24px;
  position: relative;
  transition: all 0.5s;
  display: flex;
  justify-content: center;
  gap: 32px;
}

.org-tree li {
  text-align: center;
  list-style-type: none;
  position: relative;
  padding: 24px 8px 0 8px;
  transition: all 0.5s;
}

/* Connectors */
.org-tree li::before, .org-tree li::after {
  content: '';
  position: absolute;
  top: 0;
  right: 50%;
  border-top: 2px solid #cbd5e1;
  width: 50%;
  height: 24px;
}

.org-tree li::after {
  right: auto;
  left: 50%;
  border-left: 2px solid #cbd5e1;
}

/* Disconnect single children or boundaries */
.org-tree li:only-child::after, .org-tree li:only-child::before {
  display: none;
}

.org-tree li:only-child {
  padding-top: 0;
}

.org-tree li:first-child::before, .org-tree li:last-child::after {
  border: 0 none;
}

.org-tree li:last-child::before {
  border-right: 2px solid #cbd5e1;
  border-radius: 0 6px 0 0;
}

.org-tree li:first-child::after {
  border-radius: 6px 0 0 0;
}

/* Downward connectors from parent */
.org-tree ul ul::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  border-left: 2px solid #cbd5e1;
  width: 0;
  height: 24px;
}

/* Tree Node Cards styling */
.org-node-card {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  padding: 14px 18px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(10, 15, 17, 0.04);
  width: 200px;
  transition: all 0.3s ease;
  position: relative;
  z-index: 10;
}

.org-node-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 20px rgba(37, 99, 235, 0.1);
  border-color: rgba(37, 99, 235, 0.3);
}

.org-node-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #ffffff;
  box-shadow: 0 3px 6px rgba(0,0,0,0.1);
  margin-bottom: 8px;
  background: #f1f5f9;
}

.org-node-badge {
  display: inline-block;
  background: rgba(37, 99, 235, 0.06);
  color: var(--brand-blue);
  padding: 2px 10px;
  border-radius: 30px;
  font-size: 0.72rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.org-node-name {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0 0 4px 0;
  line-height: 1.3;
}

.org-node-role {
  font-size: 0.72rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.3;
}

/* Keep the administration chart inside its modal.  The root is deliberately
   full width so the director stays centered; direct reports wrap into another
   line rather than forcing a horizontal overflow. */
.org-tree > ul {
  width: 100%;
  margin: 0;
  padding-left: 0;
}

.org-tree > ul > li {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.org-tree > ul > li > ul {
  width: 100%;
  margin: 0;
  padding: 28px 0 0;
  justify-content: center;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 28px 20px;
}

.org-tree > ul > li > ul > li {
  flex: 0 1 200px;
  padding-left: 0;
  padding-right: 0;
}

.org-tree > ul > li > ul > li > ul {
  max-width: 100%;
  flex-wrap: wrap;
  gap: 16px;
}

@media (max-width: 760px) {
  .org-tree > ul > li > ul {
    gap: 20px 12px;
  }
  .org-node-card {
    width: min(200px, 76vw);
  }
}

.memorial-preview {
  display: grid;
  grid-template-columns: minmax(190px, .9fr) minmax(180px, 1.1fr);
  gap: 14px;
  align-items: center;
  margin-top: 4px;
  padding: 12px;
  border: 1px solid rgba(37, 99, 235, .16);
  border-radius: 12px;
  background: #fff;
}

.memorial-preview-scene {
  position: relative;
  min-height: 116px;
  overflow: hidden;
  border-radius: 10px;
  background: linear-gradient(135deg, #7dd3fc, #60a5fa 48%, #86efac);
  transition: filter 140ms ease-out, opacity 140ms ease-out;
  transform: translateZ(0);
}

.memorial-preview-sky { position: absolute; inset: 0 0 42%; background: linear-gradient(135deg, #38bdf8, #a5f3fc); }
.memorial-preview-building { position: absolute; left: 12%; right: 10%; bottom: 0; height: 56%; border-radius: 8px 8px 0 0; background: linear-gradient(90deg, #166534, #4ade80 35%, #f0fdf4 36%, #e2e8f0); box-shadow: 0 -9px 20px rgba(20, 83, 45, .22); }
.memorial-preview-building::after { content: ''; position: absolute; inset: 18px 14% 18px; background: repeating-linear-gradient(90deg, rgba(15, 23, 42, .5) 0 9px, transparent 9px 18px); opacity: .55; }
.memorial-preview-message { position: absolute; right: 12px; top: 12px; display: grid; gap: 2px; padding: 8px 10px; border-radius: 8px; background: rgba(255,255,255,.9); color: #0f172a; box-shadow: 0 5px 14px rgba(15,23,42,.16); font-size: .72rem; }
.memorial-preview-message strong { font-size: .86rem; }
.memorial-preview-copy { display: grid; gap: 6px; color: var(--text-secondary); font-size: .82rem; line-height: 1.45; }
.memorial-preview-copy strong { color: var(--text-primary); font-size: .9rem; }

@media (max-width: 760px) {
  .memorial-preview { grid-template-columns: 1fr; }
}

/* ========================================================================
   MOBILE VIEWPORT HARDENING
   Keep public pages inside the phone viewport even when a CMS block, image,
   carousel or modal has desktop-oriented inline dimensions.
   ======================================================================== */
main, section, footer, .container, .page-wrapper, .page-container,
.page-body, .page-builder-row, .page-builder-column, .hero-content,
.hero-media, .news-layout-container, .home-blog-clone {
  min-width: 0;
}

iframe, video, embed, object {
  max-width: 100%;
}

@media (max-width: 768px) {
  html {
    scroll-padding-top: 76px;
  }

  main section[id] {
    scroll-margin-top: 76px;
  }

  .site-header {
    width: 100%;
    max-width: 100vw;
  }

  .header-container {
    min-height: 72px;
    padding: 12px 16px;
    gap: 12px;
  }

  .logo {
    min-width: 0;
    flex: 1 1 auto;
    gap: 8px;
  }

  .logo-icon {
    width: 34px;
    height: 34px;
    flex: 0 0 auto;
  }

  .logo-text {
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: clamp(1rem, 4.8vw, 1.25rem);
  }

  .logo-text > div,
  .logo-text > div > span {
    min-width: 0;
    max-width: 100%;
  }

  .logo-text > div > span:first-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: clamp(1rem, 4.8vw, 1.2rem) !important;
  }

  .header-actions {
    flex: 0 0 auto;
    gap: 8px;
  }

  .admin-panel-icon,
  .mobile-toggle-btn {
    width: 42px;
    height: 42px;
    padding: 4px;
    flex: 0 0 42px;
  }

  .nav-menu {
    width: min(86vw, 320px);
    max-width: 100vw;
    height: 100dvh;
    padding: 84px 22px 28px;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .hero-section {
    min-height: auto;
    padding-top: 96px;
    padding-bottom: 32px;
  }

  .hero-container {
    width: 100%;
    gap: 30px;
  }

  .hero-title {
    font-size: clamp(2rem, 9.2vw, 2.5rem) !important;
    line-height: 1.22;
    overflow-wrap: anywhere;
    margin-bottom: 18px;
  }

  .hero-desc {
    font-size: 1rem !important;
    line-height: 1.65;
    margin-bottom: 24px;
    overflow-wrap: anywhere;
  }

  .badge-container,
  .hero-actions {
    flex-wrap: wrap;
    gap: 10px;
  }

  .hero-actions .btn {
    max-width: 100%;
  }

  .hero-media {
    width: 100%;
    max-width: min(100%, 500px);
  }

  .image-wrapper {
    overflow: hidden;
    padding: 0;
  }

  .float-card {
    max-width: calc(100% - 20px);
    gap: 8px;
    padding: 8px 10px;
  }

  .float-card-1 { left: 10px; top: 12px; }
  .float-card-2 { right: 10px; bottom: 12px; }
  .float-card .float-label { font-size: 0.66rem; }

  .modal-overlay {
    width: 100dvw;
    height: 100dvh;
    max-width: 100vw;
    padding: 12px;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .modal-container,
  #news-detail-modal .modal-container,
  #exec-tree-modal .modal-container {
    width: 100% !important;
    max-width: calc(100vw - 24px) !important;
    max-height: calc(100dvh - 24px) !important;
  }

  #exec-tree-modal .modal-container {
    padding: 20px 12px !important;
  }

  .lightbox-overlay {
    width: 100dvw !important;
    height: 100dvh !important;
    max-width: 100vw;
    padding: 12px !important;
    overflow: hidden;
  }

  .lightbox-content {
    width: calc(100vw - 24px) !important;
    max-width: calc(100vw - 24px) !important;
    max-height: calc(100dvh - 24px) !important;
    gap: 10px !important;
  }

  .lightbox-content img {
    max-width: 100% !important;
    max-height: calc(100dvh - 150px) !important;
  }

  .lightbox-close-btn {
    top: 8px !important;
    right: 12px !important;
    font-size: 2.4rem !important;
  }

  .lightbox-nav-btn {
    width: 40px !important;
    height: 40px !important;
    font-size: 1.4rem !important;
  }

  .lightbox-nav-btn#lightbox-prev-btn { left: 8px !important; }
  .lightbox-nav-btn#lightbox-next-btn { right: 8px !important; }

  .onepage-news-section .container,
  .onepage-carousel-wrapper {
    overflow: hidden;
  }

  .onepage-carousel {
    width: 100%;
    height: min(105vw, 420px);
    overflow: hidden;
    perspective: none;
  }

  .onepage-slide {
    width: min(58vw, 230px);
  }

  .exec-carousel {
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
  }

  .exec-slide {
    width: min(74vw, 280px) !important;
  }

  .page-wrapper {
    width: calc(100% - 24px) !important;
    margin: 92px auto 32px !important;
  }

  .page-container {
    padding: 24px 16px !important;
  }

  .page-title {
    font-size: clamp(1.7rem, 7.2vw, 2.1rem) !important;
    overflow-wrap: anywhere;
  }

  .page-body {
    font-size: 1rem !important;
    overflow-wrap: anywhere;
  }

  .page-builder-column,
  .page-builder-column > *,
  .page-builder-column img {
    min-width: 0;
    max-width: 100%;
  }
}

@media (max-width: 420px) {
  .container { padding-left: 16px; padding-right: 16px; }
  .logo-text { font-size: 1rem; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .float-card { display: none; }
  .onepage-slide { width: min(62vw, 220px); }
}

/* Reusable gallery widget: every image keeps its natural height, or a height set per item. */
.builder-gallery-grid { display:grid; grid-template-columns:repeat(var(--gallery-columns, 3), minmax(0, 1fr)); gap:16px; align-items:start; width:100%; }
.builder-gallery-link { display:block; min-width:0; color:inherit; text-decoration:none; }
.builder-gallery-card { position:relative; min-width:0; margin:0; overflow:hidden; border-radius:20px; background:#e2e8f0; box-shadow:0 10px 26px rgba(15,23,42,.13); }
.builder-gallery-card img { display:block; width:100%; height:auto; min-height:0; object-fit:cover; transition:transform .25s ease; }
.builder-gallery-link:hover .builder-gallery-card img { transform:scale(1.025); }
.builder-gallery-caption { position:absolute; right:0; bottom:0; left:0; display:grid; gap:5px; padding:36px 16px 15px; color:#fff; background:linear-gradient(transparent, rgba(4,15,30,.84)); }
.builder-gallery-caption strong { font-size:1.08rem; line-height:1.25; }
.builder-gallery-caption span { font-size:.88rem; line-height:1.45; opacity:.94; }

.gallery-editor-head { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:8px; font-size:.78rem; }
.gallery-editor-head small { display:block; margin-top:2px; color:var(--text-secondary); font-weight:400; }
.gallery-editor-head > div:last-child { display:flex; align-items:center; gap:7px; }
.gallery-item-editor { margin-bottom:8px; padding:9px; border:1px solid #dbeafe; border-radius:9px; background:#f8fbff; }
.gallery-item-editor-head { display:flex; align-items:center; justify-content:space-between; margin-bottom:7px; font-size:.75rem; }
.gallery-item-editor-head button { min-width:25px; margin-left:3px; border:1px solid #cbd5e1; border-radius:5px; background:#fff; color:#475569; cursor:pointer; }
.gallery-item-editor-head .gallery-remove { color:#ef4444; }
.gallery-item-editor-grid { display:grid; grid-template-columns:102px minmax(0, 1fr); gap:9px; }
.gallery-upload-preview { display:flex; flex-direction:column; gap:6px; }
.gallery-upload-preview img { width:100%; height:76px; border-radius:7px; background:#e2e8f0; object-fit:cover; }
.gallery-upload-preview button { height:auto; padding:3px 5px; font-size:.7rem; }
.gallery-item-fields { display:grid; grid-template-columns:1fr 1fr; gap:5px; }
.gallery-item-fields textarea,.gallery-item-fields .gallery-image,.gallery-item-fields .gallery-link,.gallery-item-fields label { grid-column:1 / -1; }
.gallery-item-fields textarea { min-height:48px; resize:vertical; }
.gallery-item-fields label { font-size:.72rem; color:var(--text-secondary); }
.gallery-item-fields input { padding:5px 7px; font-size:.76rem; }

@media (max-width: 700px) {
  .builder-gallery-grid { grid-template-columns:repeat(2, minmax(0, 1fr)); gap:12px; }
  .gallery-item-editor-grid { grid-template-columns:76px minmax(0, 1fr); }
}

@media (max-width: 420px) {
  .builder-gallery-grid { grid-template-columns:1fr; }
  .gallery-editor-head { align-items:flex-start; flex-direction:column; }
  .gallery-item-fields { grid-template-columns:1fr; }
}
