/* =====================================================
   Al-Barkat Hospital — Design System
   Modern healthcare palette, responsive-first
   ===================================================== */

/* ---------- 1. CSS Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

:root {
  /* Brand */
  --teal-50:  #F0FDFA;
  --teal-100: #CCFBF1;
  --teal-200: #99F6E4;
  --teal-500: #14B8A6;
  --teal-600: #0D9488;
  --teal-700: #0F766E;
  --teal-800: #115E59;
  --teal-900: #134E4A;

  --amber-50:  #FFFBEB;
  --amber-500: #F59E0B;
  --amber-600: #D97706;

  --rose-500: #F43F5E;
  --rose-600: #E11D48;

  --red-600: #DC2626;

  --slate-50:  #F8FAFC;
  --slate-100: #F1F5F9;
  --slate-200: #E2E8F0;
  --slate-300: #CBD5E1;
  --slate-400: #94A3B8;
  --slate-500: #64748B;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-800: #1E293B;
  --slate-900: #0F172A;

  --white: #FFFFFF;
  --bg-soft: #FAFBFC;

  /* Semantic */
  --color-primary: var(--teal-700);
  --color-primary-dark: var(--teal-800);
  --color-accent: var(--amber-500);
  --color-danger: var(--red-600);
  --color-text: var(--slate-900);
  --color-text-muted: var(--slate-600);
  --color-border: var(--slate-200);
  --color-bg: var(--white);
  --color-bg-soft: var(--bg-soft);

  /* Layout */
  --container: 1200px;
  --container-narrow: 960px;
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --shadow-sm: 0 1px 2px rgba(15,23,42,.06), 0 1px 3px rgba(15,23,42,.04);
  --shadow: 0 4px 6px -1px rgba(15,23,42,.08), 0 2px 4px -2px rgba(15,23,42,.06);
  --shadow-lg: 0 10px 30px -10px rgba(15,23,42,.18), 0 4px 8px -2px rgba(15,23,42,.05);
  --shadow-xl: 0 25px 50px -12px rgba(15,23,42,.22);
  --shadow-teal: 0 10px 30px -10px rgba(15,118,110,.40);

  /* Type */
  --font-sans: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-display: 'Plus Jakarta Sans', 'Inter', system-ui, sans-serif;

  /* Motion */
  --ease: cubic-bezier(.2, .8, .2, 1);
  --dur: 220ms;
}

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; height: auto; }
a { color: var(--color-primary); text-decoration: none; transition: color var(--dur) var(--ease); }
a:hover { color: var(--color-primary-dark); }
button { font: inherit; cursor: pointer; border: none; background: none; }
ul, ol { list-style: none; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--slate-900);
}
h1 { font-size: clamp(2rem, 4.5vw, 3.5rem); letter-spacing: -0.03em; }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); }
h4 { font-size: 1.125rem; }

p { color: var(--color-text-muted); }

/* ---------- 2. Layout helpers ---------- */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 1.25rem; }
.container-narrow { max-width: var(--container-narrow); margin: 0 auto; padding: 0 1.25rem; }
.section { padding: 5rem 0; }
.section-tight { padding: 3.5rem 0; }
@media (min-width: 768px) { .section { padding: 6.5rem 0; } }

.eyebrow {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-primary);
  background: var(--teal-50);
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}
.eyebrow--accent { color: var(--amber-600); background: var(--amber-50); }
.eyebrow--danger { color: var(--color-danger); background: #FEF2F2; }

.section-head { text-align: center; max-width: 720px; margin: 0 auto 3rem; }
.section-head p { margin-top: 0.75rem; font-size: 1.0625rem; }

.grid { display: grid; gap: 1.5rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
@media (min-width: 900px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

/* ---------- 3. Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.5rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.9375rem;
  letter-spacing: 0.01em;
  border: 2px solid transparent;
  transition: all var(--dur) var(--ease);
  white-space: nowrap;
  line-height: 1.2;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary { background: var(--color-primary); color: var(--white); box-shadow: var(--shadow-teal); }
.btn-primary:hover { background: var(--color-primary-dark); color: var(--white); box-shadow: 0 14px 35px -10px rgba(15,118,110,.5); }

.btn-accent { background: var(--color-accent); color: var(--slate-900); }
.btn-accent:hover { background: var(--amber-600); color: var(--slate-900); }

.btn-whatsapp { background: #25D366; color: var(--white); }
.btn-whatsapp:hover { background: #1DAB54; color: var(--white); }

.btn-outline { background: transparent; color: var(--color-primary); border-color: var(--color-primary); }
.btn-outline:hover { background: var(--color-primary); color: var(--white); }

.btn-ghost { background: var(--slate-100); color: var(--slate-700); }
.btn-ghost:hover { background: var(--slate-200); color: var(--slate-900); }

.btn-lg { padding: 1rem 1.85rem; font-size: 1rem; }
.btn-sm { padding: 0.55rem 1rem; font-size: 0.8125rem; }

/* ---------- 4. Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.92);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: all var(--dur) var(--ease);
}
.site-header.scrolled { border-bottom-color: var(--color-border); box-shadow: var(--shadow-sm); }

.header-top {
  background: var(--slate-900);
  color: var(--slate-200);
  font-size: 0.8125rem;
  padding: 0.5rem 0;
}
.header-top .container { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.header-top a { color: var(--slate-200); }
.header-top a:hover { color: var(--teal-200); }
.header-top .top-info { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.header-top .top-info span { display: inline-flex; align-items: center; gap: 0.4rem; }
.header-top .top-info svg { width: 14px; height: 14px; }
@media (max-width: 640px) { .header-top .top-info span:not(:first-child) { display: none; } }

.header-main { padding: 0.75rem 0; }
.header-main .container { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }

.brand { display: flex; align-items: center; gap: 0.75rem; text-decoration: none; }
.brand-mark {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  display: block;
  object-fit: contain;
}
.brand-text { line-height: 1.1; }
.brand-text .brand-name { display: block; font-family: var(--font-display); font-weight: 800; font-size: 1.125rem; color: var(--slate-900); letter-spacing: -0.02em; }
.brand-text .brand-tag { display: block; font-size: 0.7rem; color: var(--color-text-muted); letter-spacing: 0.08em; text-transform: uppercase; font-weight: 600; }
@media (max-width: 480px) { .brand-text { display: none; } }

.main-nav { display: flex; align-items: center; gap: 0.25rem; }
.main-nav a {
  color: var(--slate-700);
  font-weight: 500;
  font-size: 0.9375rem;
  padding: 0.55rem 0.85rem;
  border-radius: var(--radius-sm);
  transition: all var(--dur) var(--ease);
}
.main-nav a:hover { color: var(--color-primary); background: var(--teal-50); }
.main-nav a.active { color: var(--color-primary); background: var(--teal-50); }

.header-cta { display: flex; align-items: center; gap: 0.5rem; }

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--slate-700);
}
.menu-toggle:hover { background: var(--slate-100); }
.menu-toggle svg { width: 24px; height: 24px; }

@media (max-width: 960px) {
  .menu-toggle { display: inline-flex; }
  .main-nav {
    position: fixed;
    top: 0; right: 0;
    height: 100vh;
    width: 320px;
    max-width: 85vw;
    background: var(--white);
    flex-direction: column;
    align-items: stretch;
    padding: 5rem 1.5rem 2rem;
    gap: 0.25rem;
    box-shadow: -10px 0 30px rgba(15,23,42,0.12);
    transform: translateX(100%);
    transition: transform 320ms var(--ease);
    overflow-y: auto;
  }
  .main-nav.open { transform: translateX(0); }
  .main-nav a { font-size: 1rem; padding: 0.75rem 1rem; }
  .header-cta .btn { display: none; }
  .header-cta .btn-whatsapp { display: inline-flex; }
}
.nav-overlay {
  position: fixed; inset: 0;
  background: rgba(15,23,42,0.4);
  opacity: 0; pointer-events: none;
  transition: opacity 220ms var(--ease);
  z-index: 99;
}
.nav-overlay.show { opacity: 1; pointer-events: auto; }

/* ---------- 5. Hero ---------- */
.hero {
  position: relative;
  padding: 5rem 0 4rem;
  background:
    radial-gradient(ellipse at top right, rgba(15,118,110,0.08), transparent 50%),
    radial-gradient(ellipse at bottom left, rgba(245,158,11,0.06), transparent 50%),
    linear-gradient(180deg, var(--teal-50) 0%, var(--white) 100%);
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -100px; right: -100px;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(15,118,110,0.12) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}
.hero .container { position: relative; z-index: 1; }
.hero-grid { display: grid; grid-template-columns: 1fr; gap: 3rem; align-items: center; }
@media (min-width: 960px) { .hero-grid { grid-template-columns: 1.1fr 0.9fr; gap: 4rem; } }

.hero h1 { margin-bottom: 1.25rem; }
.hero h1 .accent { color: var(--color-primary); }
.hero-lede { font-size: 1.125rem; color: var(--color-text-muted); margin-bottom: 2rem; max-width: 540px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-bottom: 2.5rem; }
.hero-trust { display: flex; flex-wrap: wrap; gap: 1.5rem; }
.hero-trust-item { display: flex; align-items: center; gap: 0.5rem; font-size: 0.875rem; color: var(--slate-700); font-weight: 500; }
.hero-trust-item svg { color: var(--color-primary); width: 20px; height: 20px; flex-shrink: 0; }

.hero-visual {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, var(--teal-700), var(--teal-500) 60%, var(--teal-200));
  box-shadow: var(--shadow-xl), 0 0 0 8px rgba(255,255,255,0.5);
  overflow: hidden;
}
.hero-visual-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
.hero-visual-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15,118,110,0.30) 0%, rgba(15,118,110,0.45) 50%, rgba(15,118,110,0.65) 100%);
  z-index: 1;
}
.hero-visual::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 20% 80%, rgba(255,255,255,0.10), transparent 40%),
    radial-gradient(circle at 80% 20%, rgba(245,158,11,0.20), transparent 40%);
  z-index: 2;
  pointer-events: none;
}
.hero-visual-grid { display: none; }
.hero-visual-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 2.5rem;
  color: var(--white);
  text-align: center;
  z-index: 2;
}
.hero-visual-content .cross {
  width: 100px;
  height: 100px;
  background: rgba(255,255,255,0.95);
  color: var(--color-primary);
  border-radius: 24px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 20px 50px rgba(0,0,0,0.2);
  margin-bottom: 1.5rem;
  animation: float 4s ease-in-out infinite;
}
.hero-visual-content .cross svg { width: 56px; height: 56px; }
.hero-visual-content h3 { color: var(--white); font-size: 1.75rem; margin-bottom: 0.5rem; }
.hero-visual-content p { color: rgba(255,255,255,0.85); font-size: 0.9375rem; }
.hero-visual-badge {
  position: absolute;
  background: var(--white);
  border-radius: var(--radius);
  padding: 0.85rem 1.1rem;
  box-shadow: var(--shadow-lg);
  display: flex; align-items: center; gap: 0.75rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--slate-900);
  z-index: 3;
}
.hero-visual-badge .icon { width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.hero-visual-badge--top { top: 1.5rem; left: -1rem; animation: float 5s ease-in-out infinite; }
.hero-visual-badge--top .icon { background: var(--teal-50); color: var(--color-primary); }
.hero-visual-badge--bottom { bottom: 1.5rem; right: -1rem; animation: float 5s ease-in-out infinite 1s; }
.hero-visual-badge--bottom .icon { background: var(--amber-50); color: var(--amber-600); }
.hero-visual-badge small { display: block; font-weight: 500; color: var(--color-text-muted); font-size: 0.75rem; }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* Stats strip */
.stats-strip {
  background: var(--white);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  padding: 2.5rem 0;
}
.stats-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
@media (min-width: 768px) { .stats-grid { grid-template-columns: repeat(4, 1fr); } }
.stat { text-align: center; }
.stat-num { font-family: var(--font-display); font-size: clamp(1.75rem, 3.5vw, 2.5rem); font-weight: 800; color: var(--color-primary); line-height: 1; }
.stat-label { font-size: 0.875rem; color: var(--color-text-muted); margin-top: 0.5rem; font-weight: 500; }

/* ---------- 6. Cards ---------- */
.card {
  background: var(--white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  transition: all var(--dur) var(--ease);
  position: relative;
  overflow: hidden;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--teal-200); }

.card-icon {
  width: 56px; height: 56px;
  border-radius: 14px;
  background: var(--teal-50);
  color: var(--color-primary);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1.25rem;
  transition: all var(--dur) var(--ease);
}
.card:hover .card-icon { background: var(--color-primary); color: var(--white); transform: scale(1.05); }
.card-icon svg { width: 28px; height: 28px; }
.card h3 { margin-bottom: 0.5rem; }
.card p { font-size: 0.9375rem; }
.card-link {
  display: inline-flex; align-items: center; gap: 0.3rem;
  margin-top: 1rem;
  font-weight: 600; font-size: 0.875rem;
  color: var(--color-primary);
}
.card-link::after { content: '→'; transition: transform var(--dur) var(--ease); }
.card-link:hover::after { transform: translateX(3px); }

.dept-card { display: flex; flex-direction: column; height: 100%; }
.dept-card .card-icon { background: linear-gradient(135deg, var(--teal-50), var(--teal-100)); }

/* Department detail card */
.dept-feature {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  border: 1px solid var(--color-border);
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: center;
  margin-bottom: 2rem;
}
@media (min-width: 800px) { .dept-feature { grid-template-columns: 1fr 1fr; padding: 3rem; } }
.dept-feature.reverse > :first-child { order: 1; }
@media (min-width: 800px) { .dept-feature.reverse > :first-child { order: 2; } }
.dept-feature .dept-visual {
  aspect-ratio: 1;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--teal-100), var(--teal-50));
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
}
.dept-feature .dept-visual svg { width: 60%; height: 60%; color: var(--color-primary); opacity: 0.85; }
.dept-feature .dept-visual::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(15,118,110,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15,118,110,0.05) 1px, transparent 1px);
  background-size: 24px 24px;
}
.dept-feature h2 { margin-bottom: 1rem; color: var(--color-primary); }
.dept-feature ul { margin-top: 1rem; }
.dept-feature ul li {
  padding: 0.4rem 0 0.4rem 1.5rem;
  position: relative;
  color: var(--color-text-muted);
}
.dept-feature ul li::before {
  content: '';
  position: absolute;
  left: 0; top: 0.85rem;
  width: 8px; height: 8px;
  background: var(--color-accent);
  border-radius: 50%;
}

/* Doctor card */
.doctor-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  padding: 1.75rem;
  text-align: center;
  transition: all var(--dur) var(--ease);
  display: flex;
  flex-direction: column;
}
.doctor-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--teal-200); }
.doctor-avatar {
  width: 110px; height: 110px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--teal-600), var(--teal-800));
  color: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 2.25rem;
  position: relative;
  box-shadow: 0 10px 25px -8px rgba(15,118,110,0.4);
}
.doctor-avatar::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid var(--teal-200);
}
.doctor-card h4 { margin-bottom: 0.25rem; }
.doctor-card .doctor-title { color: var(--color-primary); font-size: 0.875rem; font-weight: 600; margin-bottom: 0.75rem; }
.doctor-card .doctor-dept { display: inline-block; font-size: 0.75rem; color: var(--color-text-muted); background: var(--slate-100); padding: 0.25rem 0.6rem; border-radius: 999px; margin-bottom: 0.75rem; font-weight: 500; }
.doctor-card .doctor-qual { font-size: 0.8125rem; color: var(--color-text-muted); line-height: 1.5; }

/* ---------- 7. Sections ---------- */
.section--soft { background: var(--slate-50); }
.section--dark {
  background: linear-gradient(135deg, var(--slate-900), var(--teal-900));
  color: var(--white);
}
.section--dark h2, .section--dark h3 { color: var(--white); }
.section--dark p { color: rgba(255,255,255,0.75); }
.section--dark .eyebrow { background: rgba(255,255,255,0.1); color: var(--teal-200); }

/* Service feature block */
.service-block {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: center;
  padding: 2.5rem;
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  margin-bottom: 1.5rem;
}
@media (min-width: 800px) { .service-block { grid-template-columns: 1.4fr 1fr; } }
.service-block-icon {
  width: 72px; height: 72px;
  border-radius: 18px;
  background: var(--teal-50);
  color: var(--color-primary);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1.25rem;
}
.service-block-icon svg { width: 36px; height: 36px; }
.service-block ul li {
  padding: 0.4rem 0 0.4rem 1.5rem;
  position: relative;
  color: var(--color-text-muted);
  font-size: 0.9375rem;
}
.service-block ul li::before {
  content: '✓';
  position: absolute; left: 0; top: 0.4rem;
  width: 18px; height: 18px;
  background: var(--teal-100);
  color: var(--color-primary);
  border-radius: 50%;
  font-size: 0.7rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}

/* Page header */
.page-header {
  background:
    linear-gradient(180deg, var(--teal-50), var(--white));
  padding: 4rem 0 3rem;
  text-align: center;
  border-bottom: 1px solid var(--color-border);
}
.page-header h1 { color: var(--color-primary); margin-bottom: 0.75rem; }
.page-header p { font-size: 1.0625rem; max-width: 640px; margin: 0 auto; }
.breadcrumb { font-size: 0.875rem; color: var(--color-text-muted); margin-bottom: 1rem; }
.breadcrumb a { color: var(--color-text-muted); }
.breadcrumb a:hover { color: var(--color-primary); }
.breadcrumb span { color: var(--slate-300); margin: 0 0.5rem; }

/* ---------- 8. Test Rate Calculator ---------- */
.calc-layout { display: grid; grid-template-columns: 1fr; gap: 2rem; }
@media (min-width: 960px) { .calc-layout { grid-template-columns: 1fr 380px; } }

.calc-toolbar {
  background: var(--white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
  position: sticky;
  top: 120px;
  z-index: 10;
}
.calc-search { position: relative; }
.calc-search input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.5rem;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius);
  font-size: 0.9375rem;
  background: var(--slate-50);
  transition: all var(--dur) var(--ease);
  font-family: inherit;
}
.calc-search input:focus { outline: none; border-color: var(--color-primary); background: var(--white); box-shadow: 0 0 0 3px rgba(15,118,110,0.1); }
.calc-search svg { position: absolute; left: 0.85rem; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--slate-400); }

.calc-tabs { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.calc-tab {
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--slate-600);
  background: var(--slate-100);
  border: 1px solid transparent;
  transition: all var(--dur) var(--ease);
}
.calc-tab:hover { background: var(--teal-50); color: var(--color-primary); }
.calc-tab.active { background: var(--color-primary); color: var(--white); }

.test-list {
  background: var(--white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.test-group { border-bottom: 1px solid var(--color-border); }
.test-group:last-child { border-bottom: none; }
.test-group-head {
  padding: 0.85rem 1.25rem;
  background: var(--slate-50);
  display: flex; justify-content: space-between; align-items: center;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--slate-700);
  user-select: none;
}
.test-group-head:hover { background: var(--teal-50); }
.test-group-head .count { font-size: 0.75rem; color: var(--color-text-muted); font-weight: 500; }
.test-group-head .chev { transition: transform var(--dur) var(--ease); }
.test-group.open .test-group-head .chev { transform: rotate(180deg); }
.test-group-items { display: none; padding: 0.5rem 0; }
.test-group.open .test-group-items { display: block; }

.test-item {
  display: flex; align-items: center; gap: 0.85rem;
  padding: 0.65rem 1.25rem;
  cursor: pointer;
  transition: background var(--dur) var(--ease);
}
.test-item:hover { background: var(--teal-50); }
.test-item input[type="checkbox"] {
  width: 18px; height: 18px;
  accent-color: var(--color-primary);
  flex-shrink: 0;
  cursor: pointer;
}
.test-item .test-name { flex: 1; font-size: 0.9375rem; color: var(--slate-700); }
.test-item .test-price { font-weight: 600; color: var(--slate-900); font-size: 0.9375rem; font-variant-numeric: tabular-nums; }
.test-item.selected { background: var(--teal-50); }
.test-item.selected .test-name { color: var(--color-primary); font-weight: 500; }

/* Cart sidebar */
.cart {
  background: var(--white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  position: sticky;
  top: 120px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 140px);
}
.cart-head {
  padding: 1.25rem 1.5rem;
  background: linear-gradient(135deg, var(--teal-700), var(--teal-800));
  color: var(--white);
}
.cart-head h3 { color: var(--white); font-size: 1.125rem; margin: 0; }
.cart-head p { color: rgba(255,255,255,0.75); font-size: 0.8125rem; margin-top: 0.25rem; }
.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 0.5rem 0;
  min-height: 120px;
  max-height: 320px;
}
.cart-empty { padding: 2rem 1.5rem; text-align: center; color: var(--color-text-muted); font-size: 0.875rem; }
.cart-item {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.65rem 1.5rem;
  border-bottom: 1px solid var(--slate-100);
}
.cart-item:last-child { border-bottom: none; }
.cart-item .ci-name { flex: 1; font-size: 0.875rem; color: var(--slate-700); }
.cart-item .ci-price { font-weight: 600; font-size: 0.875rem; color: var(--slate-900); font-variant-numeric: tabular-nums; }
.cart-item .ci-remove { color: var(--slate-400); padding: 0.25rem; border-radius: 4px; }
.cart-item .ci-remove:hover { color: var(--color-danger); background: #FEF2F2; }
.cart-item .ci-remove svg { width: 16px; height: 16px; }
.cart-foot {
  padding: 1.25rem 1.5rem;
  border-top: 1px solid var(--color-border);
  background: var(--slate-50);
}
.cart-total { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 1rem; }
.cart-total .label { font-weight: 600; color: var(--slate-700); }
.cart-total .value { font-family: var(--font-display); font-weight: 800; font-size: 1.5rem; color: var(--color-primary); font-variant-numeric: tabular-nums; }
.cart-foot .btn { width: 100%; }
.cart-clear { font-size: 0.8125rem; color: var(--color-text-muted); text-align: center; margin-top: 0.5rem; cursor: pointer; }
.cart-clear:hover { color: var(--color-danger); }

/* ---------- 9. Forms ---------- */
.form { display: grid; gap: 1rem; }
.form-row { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 600px) { .form-row { grid-template-columns: 1fr 1fr; } }
.form-group { display: flex; flex-direction: column; gap: 0.35rem; }
.form-group label { font-size: 0.875rem; font-weight: 600; color: var(--slate-700); }
.form-group input, .form-group select, .form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius);
  font-size: 0.9375rem;
  font-family: inherit;
  background: var(--white);
  transition: all var(--dur) var(--ease);
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(15,118,110,0.1);
}
.form-group textarea { resize: vertical; min-height: 120px; }

/* ---------- 10. Footer ---------- */
.site-footer {
  background: var(--slate-900);
  color: var(--slate-300);
  padding: 4rem 0 0;
}
.footer-grid { display: grid; gap: 2.5rem; grid-template-columns: 1fr; }
@media (min-width: 700px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }
.site-footer h4 { color: var(--white); font-size: 0.9375rem; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 1.25rem; }
.site-footer p, .site-footer li { color: var(--slate-400); font-size: 0.875rem; line-height: 1.7; }
.site-footer li { margin-bottom: 0.5rem; }
.site-footer a { color: var(--slate-400); }
.site-footer a:hover { color: var(--teal-200); }
.footer-brand { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1rem; }
.footer-brand .brand-mark { width: 48px; height: 48px; }
.footer-brand .brand-text .brand-name { color: var(--white); }
.footer-brand .brand-text .brand-name { color: var(--white); }
.footer-brand .brand-text .brand-tag { color: var(--slate-400); }
.footer-contact-item { display: flex; gap: 0.75rem; margin-bottom: 0.85rem; align-items: flex-start; }
.footer-contact-item svg { width: 18px; height: 18px; color: var(--teal-500); flex-shrink: 0; margin-top: 2px; }
.footer-socials { display: flex; gap: 0.5rem; margin-top: 1.25rem; }
.footer-socials a {
  width: 38px; height: 38px;
  background: rgba(255,255,255,0.05);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: var(--slate-300);
  transition: all var(--dur) var(--ease);
}
.footer-socials a:hover { background: var(--color-primary); color: var(--white); }
.footer-socials svg { width: 18px; height: 18px; }

.footer-bottom {
  margin-top: 3rem;
  padding: 1.5rem 0;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.8125rem;
  color: var(--slate-500);
}
.footer-bottom a { color: var(--teal-200); }

/* ---------- 11. Floating WhatsApp ---------- */
.float-whatsapp {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 50;
  width: 58px; height: 58px;
  background: #25D366;
  color: var(--white);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 25px -5px rgba(37,211,102,0.5);
  transition: all var(--dur) var(--ease);
  text-decoration: none;
}
.float-whatsapp:hover { background: #1DAB54; color: var(--white); transform: scale(1.08); }
.float-whatsapp svg { width: 30px; height: 30px; }
.float-whatsapp::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: #25D366;
  opacity: 0.4;
  z-index: -1;
  animation: pulse-ring 1.8s ease-out infinite;
}
@keyframes pulse-ring {
  0% { transform: scale(0.8); opacity: 0.5; }
  100% { transform: scale(1.5); opacity: 0; }
}

/* ---------- 12. About / Story ---------- */
.story-grid { display: grid; grid-template-columns: 1fr; gap: 3rem; align-items: center; }
@media (min-width: 900px) { .story-grid { grid-template-columns: 1fr 1fr; } }
.story-visual {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, var(--teal-700), var(--teal-500));
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  box-shadow: var(--shadow-xl);
}
.story-visual::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.08) 1px, transparent 1px);
  background-size: 28px 28px;
}
.story-visual .story-logo {
  position: relative;
  z-index: 1;
  width: 50%;
  height: auto;
  background: var(--white);
  padding: 1.25rem;
  border-radius: var(--radius);
  filter: drop-shadow(0 20px 40px rgba(0,0,0,0.25));
}
.story-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
.story-visual::before {
  background: linear-gradient(180deg, rgba(15,118,110,0.05) 0%, transparent 30%, transparent 70%, rgba(15,118,110,0.20) 100%);
}
.story-stat-card {
  position: absolute;
  background: var(--white);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  box-shadow: var(--shadow-lg);
  display: flex; align-items: center; gap: 0.85rem;
  z-index: 2;
}
.story-stat-card .icon { width: 44px; height: 44px; border-radius: 12px; background: var(--teal-50); color: var(--color-primary); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.story-stat-card .num { font-family: var(--font-display); font-weight: 800; color: var(--slate-900); font-size: 1.25rem; line-height: 1; }
.story-stat-card .lbl { font-size: 0.75rem; color: var(--color-text-muted); }
.story-stat-card--tl { top: 1.5rem; left: -1.25rem; }
.story-stat-card--br { bottom: 1.5rem; right: -1.25rem; }
.story-stat-card--br .icon { background: var(--amber-50); color: var(--amber-600); }

.values-grid { display: grid; gap: 1.5rem; grid-template-columns: 1fr; }
@media (min-width: 600px) { .values-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .values-grid { grid-template-columns: repeat(4, 1fr); } }
.value-card {
  background: var(--white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  text-align: center;
  transition: all var(--dur) var(--ease);
}
.value-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--teal-200); }
.value-card .card-icon { margin: 0 auto 1rem; }
.value-card h4 { margin-bottom: 0.5rem; color: var(--color-primary); }
.value-card p { font-size: 0.875rem; }

/* ---------- 13. xMed EMR highlight ---------- */
.emr-banner {
  background: linear-gradient(135deg, var(--teal-800), var(--teal-600) 60%, var(--teal-500));
  color: var(--white);
  border-radius: var(--radius-xl);
  padding: 3rem 2.5rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: center;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-xl);
}
@media (min-width: 900px) { .emr-banner { grid-template-columns: 1.4fr 1fr; padding: 4rem 3.5rem; } }
.emr-banner::before {
  content: '';
  position: absolute; top: -100px; right: -100px;
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(255,255,255,0.15), transparent 70%);
  border-radius: 50%;
}
.emr-banner h2 { color: var(--white); margin-bottom: 1rem; }
.emr-banner p { color: rgba(255,255,255,0.85); font-size: 1.0625rem; margin-bottom: 1.5rem; }
.emr-features { display: grid; gap: 0.5rem; margin-bottom: 1.5rem; }
.emr-features li { display: flex; align-items: center; gap: 0.5rem; color: rgba(255,255,255,0.9); font-size: 0.9375rem; }
.emr-features svg { width: 18px; height: 18px; color: var(--amber-500); flex-shrink: 0; }

.emr-visual {
  position: relative;
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(20px);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  border: 1px solid rgba(255,255,255,0.2);
}
.emr-screen {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1rem;
  color: var(--slate-900);
  font-size: 0.8125rem;
  box-shadow: 0 20px 50px rgba(0,0,0,0.2);
}
.emr-screen-head { display: flex; gap: 0.3rem; margin-bottom: 0.85rem; }
.emr-screen-head span { width: 10px; height: 10px; border-radius: 50%; background: #EF4444; }
.emr-screen-head span:nth-child(2) { background: #F59E0B; }
.emr-screen-head span:nth-child(3) { background: #10B981; }
.emr-row { display: flex; justify-content: space-between; padding: 0.4rem 0; border-bottom: 1px solid var(--slate-100); }
.emr-row:last-child { border-bottom: none; }
.emr-row .lbl { color: var(--color-text-muted); }
.emr-row .val { font-weight: 600; color: var(--color-primary); }

/* ---------- 14. CTA banner ---------- */
.cta-banner {
  background: linear-gradient(135deg, var(--teal-700), var(--teal-600));
  color: var(--white);
  border-radius: var(--radius-xl);
  padding: 3rem 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-banner::before, .cta-banner::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
}
.cta-banner::before { width: 200px; height: 200px; top: -100px; left: -50px; }
.cta-banner::after { width: 300px; height: 300px; bottom: -150px; right: -100px; }
.cta-banner > * { position: relative; }
.cta-banner h2 { color: var(--white); margin-bottom: 0.75rem; }
.cta-banner p { color: rgba(255,255,255,0.85); max-width: 600px; margin: 0 auto 2rem; }
.cta-banner .btn-group { display: inline-flex; gap: 0.75rem; flex-wrap: wrap; justify-content: center; }

/* ---------- 15. Misc ---------- */
.muted { color: var(--color-text-muted); }
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; } .mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; } .mb-2 { margin-bottom: 1rem; } .mb-3 { margin-bottom: 1.5rem; } .mb-4 { margin-bottom: 2rem; }

.fade-in { opacity: 0; transform: translateY(20px); transition: opacity 600ms var(--ease), transform 600ms var(--ease); }
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* Photo card (large image with caption overlay) */
.photo-card {
  position: relative;
  background: var(--white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--dur) var(--ease);
  box-shadow: var(--shadow);
}
.photo-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--teal-200); }
.photo-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  display: block;
  transition: transform 600ms var(--ease);
}
.photo-card:hover img { transform: scale(1.04); }
.photo-card-cap { padding: 1.5rem; }
.photo-card-cap h4 { color: var(--color-primary); margin-bottom: 0.35rem; }
.photo-card-cap p { font-size: 0.9375rem; }

/* Department photo block (replaces .dept-visual when used with img) */
.dept-photo-block {
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  background: linear-gradient(135deg, var(--teal-100), var(--teal-50));
}
.dept-photo-block img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 600ms var(--ease);
}
.dept-photo-block:hover img { transform: scale(1.04); }
.dept-photo-block::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(15,23,42,0.55) 100%);
  pointer-events: none;
}
.dept-photo-block .dept-photo-label {
  position: absolute;
  bottom: 1.25rem; left: 1.25rem;
  color: var(--white);
  z-index: 2;
  font-weight: 700;
  font-family: var(--font-display);
  font-size: 1.125rem;
  letter-spacing: -0.01em;
  text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}
.contact-grid { display: grid; gap: 1.5rem; grid-template-columns: 1fr; }
@media (min-width: 700px) { .contact-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .contact-grid { grid-template-columns: repeat(3, 1fr); } }
.contact-card {
  background: var(--white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  display: flex; gap: 1rem;
  align-items: flex-start;
  transition: all var(--dur) var(--ease);
}
.contact-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--teal-200); }
.contact-card .card-icon { margin-bottom: 0; flex-shrink: 0; }
.contact-card h4 { margin-bottom: 0.35rem; }
.contact-card p { font-size: 0.875rem; line-height: 1.6; }

.map-wrap {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--color-border);
  background: var(--slate-100);
  aspect-ratio: 21/9;
  min-height: 280px;
}
.map-wrap iframe { width: 100%; height: 100%; border: 0; }

/* Top bar inline link */
.muted-link { color: rgba(255,255,255,0.7); font-size: 0.8125rem; transition: color var(--dur) var(--ease); }
.muted-link:hover { color: var(--teal-200); }

/* Notice */
.notice {
  background: var(--teal-50);
  border-left: 4px solid var(--color-primary);
  padding: 1rem 1.25rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 0.9375rem;
  color: var(--slate-700);
  display: flex; gap: 0.75rem; align-items: flex-start;
}
.notice svg { width: 20px; height: 20px; color: var(--color-primary); flex-shrink: 0; margin-top: 1px; }
