/* ===================================================================
   عيادات نبض التخصصية — Design Tokens
   Brand colors sampled directly from the logo:
   Blue  #016394  |  Red #C5010B
=================================================================== */
:root {
  --color-primary: #016394;
  --color-primary-dark: #014a70;
  --color-primary-light: #0c84bd;
  --color-accent: #C5010B;
  --color-accent-dark: #9c000a;
  --color-accent-light: #e63947;

  --color-bg: #ffffff;
  --color-bg-alt: #f4f9fb;
  --color-bg-soft: #eef6f9;
  --color-ink: #0d2733;
  --color-ink-soft: #4a6472;
  --color-border: #dfeaef;

  --color-on-primary: #ffffff;
  --color-on-accent: #ffffff;

  --font-heading: 'Cairo', 'Tajawal', sans-serif;
  --font-body: 'Tajawal', 'Cairo', sans-serif;

  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 28px;
  --radius-full: 999px;

  --shadow-sm: 0 2px 10px rgba(1, 99, 148, 0.08);
  --shadow-md: 0 12px 30px rgba(1, 99, 148, 0.12);
  --shadow-lg: 0 24px 60px rgba(1, 99, 148, 0.16);
  --shadow-accent: 0 14px 30px rgba(197, 1, 11, 0.22);

  --ease-standard: cubic-bezier(.4,0,.2,1);
  --ease-out-back: cubic-bezier(.34,1.56,.64,1);

  --header-h: 84px;
}


/* ===================================================================
   Reset & Base
=================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3 { font-family: var(--font-heading); margin: 0; color: var(--color-primary-dark); }
p { margin: 0; }
button { font: inherit; cursor: pointer; }
svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.container {
  width: 100%;
  max-width: 1220px;
  margin: 0 auto;
  padding: 0 24px;
}

:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ===================================================================
   Loader
=================================================================== */
.loader {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--color-bg);
  display: flex; align-items: center; justify-content: center;
  transition: opacity .5s var(--ease-standard), visibility .5s;
}
.loader.is-hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.loader-pulse { width: 180px; color: var(--color-accent); }
.loader-ekg polyline {
  fill: none; stroke: currentColor; stroke-width: 3;
  stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 400;
  stroke-dashoffset: 400;
  animation: draw-ekg 1.4s var(--ease-standard) infinite;
}
@keyframes draw-ekg {
  0% { stroke-dashoffset: 400; }
  60% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: -400; }
}

/* ===================================================================
   Buttons
=================================================================== */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 28px;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.98rem;
  border: 2px solid transparent;
  appearance: none;
  transition: transform .25s var(--ease-out-back), box-shadow .25s var(--ease-standard), background .25s, color .25s, border-color .25s;
  white-space: nowrap;
}
.btn .icon-inline { width: 18px; height: 18px; flex-shrink: 0; }
.btn-primary {
  background: linear-gradient(135deg, var(--color-accent), var(--color-accent-dark));
  color: var(--color-on-accent);
  box-shadow: var(--shadow-accent);
}
.btn-primary:hover { transform: translateY(-3px) scale(1.02); box-shadow: 0 18px 36px rgba(197,1,11,.3); }
.btn-primary:active { transform: translateY(0) scale(0.98); }
.btn-outline {
  background: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}
.btn-outline:hover { background: var(--color-primary); color: #fff; transform: translateY(-3px); }

/* ===================================================================
   Header
=================================================================== */
.site-header {
  position: fixed; inset-inline: 0; top: 0; z-index: 1000;
  height: var(--header-h);
  display: flex; align-items: center;
  background: transparent;
  transition: background .35s var(--ease-standard), box-shadow .35s, height .35s;
}
.site-header.is-scrolled {
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  box-shadow: 0 4px 24px rgba(1,99,148,.1);
  height: 72px;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 100%; }
.brand { display: flex; align-items: center; flex-shrink: 0; }
.brand-logo { height: 58px; width: auto; transition: height .35s var(--ease-standard); }
.is-scrolled .brand-logo { height: 46px; }

.main-nav ul { display: flex; align-items: center; gap: 8px; }
.nav-link {
  position: relative;
  padding: 10px 16px;
  font-weight: 600;
  color: var(--color-ink-soft);
  border-radius: var(--radius-full);
  transition: color .25s, background .25s;
}
.nav-link:hover { color: var(--color-primary); background: var(--color-bg-soft); }
.nav-link.active-link { color: var(--color-primary); }
.nav-link.active-link::after {
  content: ''; position: absolute; bottom: 2px; right: 50%; transform: translateX(50%);
  width: 6px; height: 6px; border-radius: 50%; background: var(--color-accent);
}

.header-cta { padding: 12px 22px; font-size: 0.9rem; }
.header-cta .icon-inline { width: 16px; height: 16px; }

.lang-toggle {
  display: flex; align-items: center; gap: 7px;
  padding: 9px 16px;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--color-border);
  background: transparent;
  color: var(--color-ink-soft);
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
  transition: color .25s, border-color .25s, background .25s, transform .25s var(--ease-out-back);
}
.lang-toggle .icon-inline { width: 16px; height: 16px; flex-shrink: 0; }
.lang-toggle:hover { color: var(--color-primary); border-color: var(--color-primary); background: var(--color-bg-soft); transform: translateY(-2px); }

.nav-toggle {
  display: none; flex-direction: column; justify-content: center; gap: 5px;
  width: 44px; height: 44px; background: none; border: none; border-radius: var(--radius-sm);
}
.nav-toggle span { display: block; width: 24px; height: 2.5px; background: var(--color-primary-dark); border-radius: 2px; margin: 0 auto; transition: transform .3s var(--ease-standard), opacity .3s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* ===================================================================
   Hero
=================================================================== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex; align-items: center;
  padding-top: var(--header-h);
  overflow: hidden;
  background: linear-gradient(180deg, #ffffff 0%, var(--color-bg-alt) 100%);
}
.hero-bg { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
.hero-ekg-line { position: absolute; top: 58%; left: 0; width: 100%; height: 220px; color: var(--color-accent); opacity: 0.35; }
.ekg-path {
  fill: none; stroke: currentColor; stroke-width: 2.5;
  stroke-dasharray: 2000; stroke-dashoffset: 2000;
  animation: draw-hero-ekg 3.5s var(--ease-standard) 0.6s forwards, pulse-glow 2.4s ease-in-out 4.2s infinite;
}
@keyframes draw-hero-ekg { to { stroke-dashoffset: 0; } }
@keyframes pulse-glow { 0%,100% { opacity: .35; } 50% { opacity: .7; } }

.hero-blob { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .25; animation: float-blob 10s ease-in-out infinite; }
.blob-blue { width: 420px; height: 420px; background: var(--color-primary-light); top: -120px; left: -100px; }
.blob-red { width: 340px; height: 340px; background: var(--color-accent-light); bottom: -100px; right: -80px; animation-delay: -4s; }
@keyframes float-blob { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(30px,-20px) scale(1.08); } }

.hero-dot { position: absolute; width: 10px; height: 10px; border-radius: 50%; background: var(--color-accent); opacity: .6; animation: dot-drift 6s ease-in-out infinite; }
.dot-1 { top: 22%; left: 12%; animation-delay: 0s; }
.dot-2 { top: 65%; left: 22%; background: var(--color-primary); animation-delay: -2s; }
.dot-3 { top: 40%; right: 16%; animation-delay: -4s; }
@keyframes dot-drift { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-18px); } }

.hero-inner { position: relative; z-index: 1; text-align: center; max-width: 820px; margin: 0 auto; padding-block: 40px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 700; font-size: 0.9rem; letter-spacing: .02em;
  color: var(--color-accent);
  background: rgba(197,1,11,0.08);
  padding: 8px 18px; border-radius: var(--radius-full);
  margin-bottom: 22px;
}
.hero-title { font-size: clamp(2.4rem, 6vw, 4.2rem); font-weight: 900; line-height: 1.15; display: flex; flex-direction: column; gap: 4px; }
.hero-title-brand { color: var(--color-primary); position: relative; }
.dot-accent { color: var(--color-accent); }
.hero-sub { display: block; margin: 26px auto 0; max-width: 620px; font-size: clamp(1.05rem, 1.6vw, 1.2rem); color: var(--color-ink-soft); }
.hero-actions { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 38px; flex-wrap: wrap; }

.hero-stats { display: flex; align-items: center; justify-content: center; gap: 28px; margin-top: 56px; flex-wrap: wrap; }
.stat { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.stat-num { font-family: var(--font-heading); font-size: 2rem; font-weight: 800; color: var(--color-primary); }
.stat-num.heart-live { color: var(--color-accent); animation: heartbeat 1.1s ease-in-out infinite; }
@keyframes heartbeat { 0%,100% { transform: scale(1); } 25% { transform: scale(1.22); } 40% { transform: scale(0.98); } 55% { transform: scale(1.14); } 70% { transform: scale(1); } }
.stat-label { font-size: 0.85rem; color: var(--color-ink-soft); font-weight: 600; }
.stat-sep { width: 1px; height: 34px; background: var(--color-border); }

.scroll-cue {
  position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%);
  width: 28px; height: 44px; border: 2px solid var(--color-primary); border-radius: var(--radius-full);
  display: flex; justify-content: center; padding-top: 8px; opacity: .6;
}
.scroll-cue span { width: 4px; height: 8px; border-radius: 2px; background: var(--color-accent); animation: scroll-cue-move 1.6s ease-in-out infinite; }
@keyframes scroll-cue-move { 0% { transform: translateY(0); opacity: 1; } 100% { transform: translateY(14px); opacity: 0; } }

/* Reveal helpers driven by GSAP; provide sane fallback for no-js */
.hero-reveal, .reveal-up { opacity: 1; }
.js .hero-reveal, .js .reveal-up { opacity: 0; }

/* ===================================================================
   Section shared
=================================================================== */
section { padding: 110px 0; }
.section-head { max-width: 680px; margin: 0 auto 60px; text-align: center; }
.section-head h2 { font-size: clamp(1.9rem, 3.4vw, 2.6rem); font-weight: 800; margin: 6px 0 16px; }
.section-desc { color: var(--color-ink-soft); font-size: 1.05rem; }

/* ===================================================================
   About
=================================================================== */
.about { background: var(--color-bg); }
.about-intro { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: center; margin-bottom: 64px; }
.about-intro-text { text-align: start; }
.about-intro-text h2 { font-size: clamp(1.9rem, 3.4vw, 2.6rem); font-weight: 800; margin: 6px 0 16px; }
.about-photo {
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4 / 5;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-lg);
}
.about-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.features-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.feature-card {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 32px 26px;
  text-align: center;
  transition: transform .35s var(--ease-out-back), box-shadow .35s, border-color .35s;
}
.feature-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-md); border-color: transparent; }
.feature-icon {
  width: 62px; height: 62px; margin: 0 auto 20px;
  color: var(--color-primary);
  background: #fff;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  padding: 14px;
  box-shadow: var(--shadow-sm);
  transition: transform .35s var(--ease-out-back), color .35s;
}
.feature-card:hover .feature-icon { transform: rotate(-6deg) scale(1.08); color: var(--color-accent); }
.feature-card h3 { font-size: 1.15rem; margin-bottom: 10px; }
.feature-card p { color: var(--color-ink-soft); font-size: 0.95rem; }

/* ===================================================================
   Departments
=================================================================== */
.departments { background: var(--color-bg-alt); position: relative; }
.dept-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.dept-card {
  position: relative;
  background: var(--color-bg);
  border-radius: var(--radius-md);
  padding: 30px 26px;
  border: 1px solid var(--color-border);
  overflow: hidden;
  transition: transform .4s var(--ease-out-back), box-shadow .4s, border-color .4s;
}
.dept-card::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  opacity: 0;
  transition: opacity .4s var(--ease-standard);
  z-index: 0;
}
.dept-card:hover { transform: translateY(-10px); box-shadow: var(--shadow-lg); border-color: transparent; }
.dept-card:hover::before { opacity: 1; }
.dept-icon, .dept-card h3, .dept-card p { position: relative; z-index: 1; transition: color .4s var(--ease-standard); }
.dept-icon {
  width: 56px; height: 56px;
  color: var(--color-accent);
  margin-bottom: 20px;
  transition: color .4s var(--ease-standard), transform .4s var(--ease-out-back);
}
.dept-card:hover .dept-icon { color: #fff; transform: scale(1.12) rotate(4deg); }
.dept-card h3 { font-size: 1.2rem; margin-bottom: 10px; transition: color .4s; }
.dept-card:hover h3 { color: #fff; }
.dept-card p { color: var(--color-ink-soft); font-size: 0.94rem; }
.dept-card:hover p { color: rgba(255,255,255,0.9); }

/* ===================================================================
   Doctors
=================================================================== */
.doctors { background: var(--color-bg); }
.doctors-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; align-items: start; }
.doctor-card {
  position: relative;
  text-align: center;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  padding: 0 0 26px;
  transition: transform .35s var(--ease-out-back), box-shadow .35s;
}
.doctor-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-md); }
.doctor-avatar {
  width: 100%;
  aspect-ratio: 3 / 4;
  margin: 0 0 20px;
  background: var(--color-bg-soft);
}
.doctor-avatar img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform .5s var(--ease-standard);
}
.doctor-card:hover .doctor-avatar img { transform: scale(1.05); }
.doctor-card h3 { font-size: 1.05rem; margin-bottom: 6px; line-height: 1.4; padding: 0 20px; }
.doctor-dept { color: var(--color-ink-soft); font-size: 0.9rem; font-weight: 600; padding: 0 20px; }
.doctor-credentials {
  text-align: start;
  margin: 14px 20px 0;
  padding-top: 14px;
  border-top: 1px solid var(--color-border);
  display: flex; flex-direction: column; gap: 7px;
}
.doctor-credentials li {
  position: relative;
  padding-inline-start: 15px;
  font-size: 0.82rem;
  line-height: 1.55;
  color: var(--color-ink-soft);
}
.doctor-credentials li::before {
  content: '';
  position: absolute; inset-inline-start: 0; top: 0.55em;
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--color-accent);
}

/* ===================================================================
   Location
=================================================================== */
.location { background: var(--color-bg-alt); }
.location-inner { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 60px; align-items: center; }
.address-card {
  display: flex; align-items: flex-start; gap: 16px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 22px;
  margin: 30px 0 32px;
}
.address-icon { width: 44px; height: 44px; flex-shrink: 0; color: var(--color-accent); }
.address-text { display: flex; flex-direction: column; gap: 4px; }
.address-text strong { color: var(--color-primary-dark); font-family: var(--font-heading); }
.address-text span { color: var(--color-ink-soft); }

.location-visual { position: relative; }
.map-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-lg);
  background: var(--color-bg);
}
.map-frame iframe { width: 100%; height: 100%; border: 0; display: block; filter: saturate(1.05); pointer-events: none; }

.map-overlay { position: absolute; inset: 0; z-index: 3; cursor: pointer; }

.map-pin { position: absolute; top: 50%; left: 50%; z-index: 2; width: 0; height: 0; }
.map-pin-ring {
  position: absolute; top: 50%; left: 50%;
  width: 20px; height: 20px;
  margin: -10px 0 0 -10px;
  border-radius: 50%;
  background: var(--color-accent);
  opacity: .55;
  animation: map-pin-pulse 2.2s ease-out infinite;
}
.map-pin-ring-delay { animation-delay: 1.1s; }
.map-pin-dot {
  position: absolute; top: 50%; left: 50%;
  width: 16px; height: 16px;
  margin: -8px 0 0 -8px;
  border-radius: 50%;
  background: var(--color-accent);
  border: 3px solid #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,.35);
}
@keyframes map-pin-pulse {
  0% { transform: scale(1); opacity: .55; }
  100% { transform: scale(4.5); opacity: 0; }
}

.map-badge {
  position: absolute;
  bottom: -22px;
  right: 28px;
  z-index: 2;
  width: 74px; height: 74px;
  background: var(--color-bg);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  padding: 12px;
  box-shadow: var(--shadow-md);
  border: 3px solid var(--color-bg);
  animation: badge-drop .6s var(--ease-out-back) .3s both;
}
.map-badge img { width: 100%; height: 100%; object-fit: contain; }
@keyframes badge-drop { 0% { opacity: 0; transform: translateY(-14px) scale(.8); } 100% { opacity: 1; transform: translateY(0) scale(1); } }

/* ===================================================================
   Contact
=================================================================== */
.contact { background: var(--color-bg); }
.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.contact-card {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: 6px;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 34px 26px;
  transition: transform .35s var(--ease-out-back), box-shadow .35s, border-color .35s, background .35s;
}
.contact-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-md); border-color: transparent; background: var(--color-bg); }
.contact-icon {
  width: 60px; height: 60px; margin-bottom: 14px;
  color: var(--color-primary);
  background: #fff;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  padding: 14px;
  box-shadow: var(--shadow-sm);
  transition: transform .35s var(--ease-out-back), color .35s, background .35s;
}
.contact-card:hover .contact-icon { transform: rotate(-6deg) scale(1.08); color: #fff; background: var(--color-primary); }
.contact-card-whatsapp:hover .contact-icon { background: #25D366; }
.contact-card h3 { font-size: 1.1rem; margin-bottom: 2px; }
.contact-value { color: var(--color-ink-soft); font-size: 0.95rem; font-weight: 600; }

/* ===================================================================
   Floating WhatsApp button
=================================================================== */
.whatsapp-float {
  position: fixed; bottom: 28px; right: 28px; z-index: 500;
  width: 58px; height: 58px; border-radius: 50%;
  background: #25D366;
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  padding: 15px;
  box-shadow: 0 12px 28px rgba(37, 211, 102, 0.4);
  animation: whatsapp-pulse 2.6s ease-in-out infinite;
  transition: transform .3s var(--ease-out-back);
}
.whatsapp-float:hover { transform: scale(1.08); }
@keyframes whatsapp-pulse {
  0%, 100% { box-shadow: 0 12px 28px rgba(37, 211, 102, 0.4); }
  50% { box-shadow: 0 12px 28px rgba(37, 211, 102, 0.4), 0 0 0 10px rgba(37, 211, 102, 0.12); }
}

/* ===================================================================
   Footer
=================================================================== */
.site-footer { background: var(--color-primary-dark); color: rgba(255,255,255,0.85); padding-top: 60px; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 24px; padding-bottom: 40px; border-bottom: 1px solid rgba(255,255,255,0.14); }
.footer-brand { display: flex; align-items: center; gap: 16px; }
.footer-logo { height: 50px; filter: brightness(0) invert(1); }
.footer-brand p { color: rgba(255,255,255,0.7); font-size: 0.92rem; }
.footer-nav { display: flex; gap: 26px; flex-wrap: wrap; }
.footer-nav a { font-weight: 600; opacity: .85; transition: opacity .25s; }
.footer-nav a:hover { opacity: 1; color: var(--color-accent-light); }
.footer-contact { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.footer-contact a { font-weight: 600; opacity: .85; transition: opacity .25s; }
.footer-contact a:hover { opacity: 1; color: var(--color-accent-light); }
.footer-bottom { padding: 22px 24px; text-align: center; font-size: 0.85rem; color: rgba(255,255,255,0.6); }
.footer-credit {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin-top: 10px; font-size: 0.8rem; color: rgba(255,255,255,0.5);
}
.footer-credit-logo { height: 30px; width: auto; opacity: 0.92; transition: opacity .25s, transform .25s var(--ease-out-back); }
.footer-credit a:hover .footer-credit-logo { opacity: 1; transform: scale(1.06); }

/* ===================================================================
   Back to top
=================================================================== */
.back-to-top {
  position: fixed; bottom: 28px; left: 28px; z-index: 500;
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-md);
  opacity: 0; visibility: hidden; transform: translateY(16px);
  transition: opacity .3s, transform .3s, visibility .3s, background .3s;
}
.back-to-top svg { width: 20px; height: 20px; }
.back-to-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { background: var(--color-accent); }

/* ===================================================================
   Booking Modal
=================================================================== */
.modal-overlay {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(13, 39, 51, 0.55);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  opacity: 0; visibility: hidden;
  transition: opacity .3s var(--ease-standard), visibility .3s;
}
.modal-overlay.is-open { opacity: 1; visibility: visible; }
.modal-card {
  position: relative;
  width: 100%; max-width: 460px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--color-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 36px 30px 30px;
  transform: scale(.94) translateY(10px);
  opacity: 0;
  transition: transform .35s var(--ease-out-back), opacity .3s var(--ease-standard);
}
.modal-overlay.is-open .modal-card { transform: scale(1) translateY(0); opacity: 1; }
.modal-card h3 { font-size: 1.4rem; margin-bottom: 8px; }
.modal-subtitle { color: var(--color-ink-soft); font-size: 0.92rem; margin-bottom: 24px; }
.modal-close {
  position: absolute; top: 16px; inset-inline-end: 16px;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--color-bg-alt);
  color: var(--color-ink-soft);
  display: flex; align-items: center; justify-content: center;
  border: none; transition: background .25s, color .25s, transform .25s;
}
.modal-close svg { width: 16px; height: 16px; }
.modal-close:hover { background: var(--color-accent); color: #fff; transform: rotate(90deg); }

.form-field { margin-bottom: 16px; text-align: start; }
.form-field label { display: block; font-weight: 700; font-size: 0.88rem; color: var(--color-primary-dark); margin-bottom: 6px; }
.form-field input, .form-field select {
  width: 100%;
  font: inherit;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--color-border);
  background: var(--color-bg);
  color: var(--color-ink);
  transition: border-color .25s, box-shadow .25s;
}
.form-field input:focus, .form-field select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(1,99,148,.12);
}
.form-field select:disabled { color: var(--color-ink-soft); cursor: not-allowed; }
.modal-submit { width: 100%; justify-content: center; margin-top: 6px; }

/* ===================================================================
   Responsive
=================================================================== */
@media (max-width: 1024px) {
  .about-intro { grid-template-columns: 1fr; text-align: center; gap: 32px; }
  .about-intro-text { text-align: center; }
  .about-photo { max-width: 420px; margin: 0 auto; }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .dept-grid { grid-template-columns: repeat(2, 1fr); }
  .doctors-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: repeat(2, 1fr); }
  .location-inner { grid-template-columns: 1fr; text-align: center; }
  .address-card { text-align: start; }
  .footer-inner { justify-content: center; text-align: center; }
  .footer-contact { align-items: center; }
}

@media (max-width: 1200px) {
  .main-nav { position: fixed; top: 72px; inset-inline: 0; background: var(--color-bg); border-top: 1px solid var(--color-border); box-shadow: var(--shadow-md); padding: 12px 24px 24px; transform: translateY(-12px); opacity: 0; visibility: hidden; transition: opacity .3s, transform .3s, visibility .3s; }
  .main-nav.is-open { opacity: 1; visibility: visible; transform: translateY(0); }
  .main-nav ul { flex-direction: column; align-items: stretch; gap: 4px; }
  .nav-link { display: block; padding: 14px 16px; }
  .nav-toggle { display: flex; }
  .header-cta { display: none; }
}

@media (max-width: 640px) {
  section { padding: 76px 0; }
  .features-grid, .dept-grid, .doctors-grid, .contact-grid { grid-template-columns: 1fr; }
  .hero-stats { gap: 18px; }
  .stat-sep { display: none; }
  .header-inner { gap: 12px; }
  .brand-logo { height: 46px; }
  .lang-toggle { padding: 9px; }
  .lang-toggle-label { display: none; }
  .back-to-top { bottom: 18px; left: 18px; width: 44px; height: 44px; }
  .whatsapp-float { bottom: 18px; right: 18px; width: 52px; height: 52px; padding: 13px; }
}

@media (max-width: 375px) {
  .container { padding: 0 16px; }
  .hero-title { font-size: 2.1rem; }
}
