:root {
  --primary-blue: #0B6EFD;
  --secondary-blue: #00AEEF;
  --success-green: #28A745;
  --emergency-red: #DC3545;
  --accent-purple: #7C3AED;
  --accent-teal: #06B6D4;
  --accent-pink: #EC4899;
  --accent-amber: #F59E0B;
  --brand-gradient: linear-gradient(120deg, #0B6EFD 0%, #00AEEF 45%, #7C3AED 100%);
  --background: #F6F9FE;
  --white: #FFFFFF;
  --dark-text: #1F2937;
  --muted: #6B7280;
  --border: rgba(11, 110, 253, 0.12);
  --shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
  --radius: 1.5rem;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Plus Jakarta Sans', 'Segoe UI', sans-serif;
  color: var(--dark-text);
  background: var(--background);
  line-height: 1.7;
}
h1, h2, h3, h4, h5, h6,
.hero-title, .section-title h2, .brand-title, .stat-number, .navbar-brand .brand-title {
  font-family: 'Sora', 'Plus Jakarta Sans', sans-serif;
  letter-spacing: -0.01em;
}
a { text-decoration: none; }
img { max-width: 100%; display: block; }
section { scroll-margin-top: 90px; }

.page-loader {
  position: fixed;
  inset: 0;
  background: rgba(248, 250, 252, 0.98);
  display: grid;
  place-items: center;
  z-index: 9999;
  transition: opacity 0.4s ease;
}
.page-loader.hidden { opacity: 0; pointer-events: none; }
.page-loader .spinner {
  width: 60px;
  height: 60px;
  border: 5px solid rgba(11, 110, 253, 0.15);
  border-top-color: var(--primary-blue);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.topbar {
  background: linear-gradient(90deg, var(--primary-blue), var(--secondary-blue));
  color: var(--white);
  font-size: 0.95rem;
}
.topbar a { color: var(--white); }
.navbar {
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(18px);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
  border-bottom: 1px solid rgba(11,110,253,0.08);
  padding-top: 0.6rem;
  padding-bottom: 0.6rem;
}
.navbar-brand img { width: 48px; height: 48px; }
.navbar-brand span { display: block; }
.navbar-brand .brand-title { font-weight: 800; font-size: 1.25rem; color: var(--primary-blue); line-height: 1.1; }
.navbar-brand .brand-subtitle { font-size: 0.78rem; color: var(--muted); }
.nav-link {
  position: relative;
  font-weight: 600;
  color: var(--dark-text);
  padding: 0.5rem 0.95rem !important;
  border-radius: 12px;
  transition: color 0.2s ease, background 0.2s ease;
}
.nav-link::after {
  content: '';
  position: absolute;
  left: 0.95rem;
  right: 0.95rem;
  bottom: 0.3rem;
  height: 2.5px;
  border-radius: 3px;
  background: var(--brand-gradient);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.28s ease;
}
.nav-link:hover {
  color: var(--primary-blue);
  background: rgba(11,110,253,0.06);
}
.nav-link:hover::after,
.nav-link.active::after { transform: scaleX(1); }
.nav-link.active {
  color: var(--primary-blue);
  background: rgba(11,110,253,0.07);
}
.navbar-toggler { border: 0; }
.navbar-toggler:focus { box-shadow: 0 0 0 3px rgba(11,110,253,0.2); }
.btn-primary {
  background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
  border: 0;
  color: var(--white);
  box-shadow: 0 10px 24px rgba(11,110,253,0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(11,110,253,0.3);
  color: var(--white);
}
.btn-outline-primary {
  border-color: var(--primary-blue);
  color: var(--primary-blue);
}
.btn-outline-primary:hover {
  background: var(--primary-blue);
  color: var(--white);
}
.btn-danger { background: var(--emergency-red); border: 0; }

.hero-section {
  padding: 6rem 0 4rem;
  background: radial-gradient(circle at top left, rgba(0,174,239,0.18), transparent 38%), linear-gradient(135deg, #eef7ff 0%, #f8fcff 100%);
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem 1rem;
  border-radius: 999px;
  background: rgba(11,110,253,0.08);
  color: var(--primary-blue);
  font-weight: 600;
}
.hero-title {
  font-size: clamp(2rem, 4.4vw, 3.6rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--dark-text);
}
.hero-title .text-primary {
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--primary-blue);
}
.hero-subtitle { font-size: 1.05rem; color: var(--muted); }
.hero-card {
  background: rgba(255,255,255,0.9);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}
.hero-image {
  border-radius: 1.5rem;
  overflow: hidden;
  box-shadow: 0 30px 60px rgba(11,110,253,0.22);
  aspect-ratio: 4 / 3;
  position: relative;
}
.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}
.hero-image:hover img { transform: scale(1.03); }

.section-title {
  margin-bottom: 1.5rem;
}
.section-title .eyebrow {
  display: inline-block;
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--primary-blue);
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.8rem;
}
.section-title h2 {
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  font-weight: 700;
  color: var(--dark-text);
}
.section-title p { color: var(--muted); }

.card {
  border: 0;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  background: linear-gradient(160deg, #ffffff 0%, #f4f8ff 62%, #eef4ff 100%);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover { transform: translateY(-6px); box-shadow: 0 22px 44px rgba(15,23,42,0.12); }
.card-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(11,110,253,0.16), rgba(0,174,239,0.12));
  color: var(--primary-blue);
  font-size: 1.5rem;
}
/* Colorful icon cycle across cards in a row */
.row > [class*="col"]:nth-child(4n+1) .card-icon {
  background: linear-gradient(135deg, rgba(6,182,212,0.18), rgba(6,182,212,0.08));
  color: var(--accent-teal);
}
.row > [class*="col"]:nth-child(4n+2) .card-icon {
  background: linear-gradient(135deg, rgba(124,58,237,0.18), rgba(124,58,237,0.08));
  color: var(--accent-purple);
}
.row > [class*="col"]:nth-child(4n+3) .card-icon {
  background: linear-gradient(135deg, rgba(236,72,153,0.18), rgba(236,72,153,0.08));
  color: var(--accent-pink);
}
.row > [class*="col"]:nth-child(4n+4) .card-icon {
  background: linear-gradient(135deg, rgba(245,158,11,0.2), rgba(245,158,11,0.08));
  color: var(--accent-amber);
}
/* Colored top accent bar on cards */
.card { position: relative; overflow: hidden; }
.card:not(.doctor-card)::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--brand-gradient);
  opacity: 0;
  transition: opacity 0.25s ease;
}
.card:not(.doctor-card):hover::before { opacity: 1; }

.stat-box {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 1.25rem;
  padding: 1.2rem;
  box-shadow: var(--shadow);
}
.stat-number {
  font-size: 2rem;
  font-weight: 800;
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--primary-blue);
}

.feature-list li { margin-bottom: .65rem; color: var(--muted); }
.feature-list li i { color: var(--success-green); margin-right: .5rem; }

.department-card .card-body { min-height: 250px; }
.department-card .badge { font-weight: 600; }

.doctor-card img { height: 260px; width: 100%; object-fit: cover; }
.doctor-card .doctor-role { color: var(--primary-blue); font-weight: 600; }
.doctor-avatar {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin: 0 0 1rem 0;
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 2rem;
  line-height: 1;
  color: #fff;
  letter-spacing: 0.02em;
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.16);
  border: 3px solid rgba(255, 255, 255, 0.7);
}
.doctor-card.text-center .doctor-avatar { margin-left: auto; margin-right: auto; }

.emergency-banner {
  background: linear-gradient(135deg, var(--emergency-red), #ff4d4f);
  border-radius: 1.75rem;
  color: var(--white);
  padding: 2.2rem;
}

.testimonial-card { background: var(--white); border: 1px solid var(--border); }
.quote-mark { color: var(--secondary-blue); font-size: 2rem; }

.gallery-card { overflow: hidden; border-radius: 1.25rem; position: relative; cursor: pointer; }
.gallery-card img { width: 100%; height: 240px; object-fit: cover; transition: transform 0.35s ease; }
.gallery-card:hover img { transform: scale(1.05); }
.gallery-card .gallery-caption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 1rem;
  color: var(--white);
  background: linear-gradient(180deg, transparent, rgba(0,0,0,0.7));
}

.faq-item .accordion-button:not(.collapsed) {
  color: var(--primary-blue);
  background: rgba(11,110,253,0.08);
}

.map-frame {
  border: 0;
  border-radius: var(--radius);
  width: 100%;
  min-height: 320px;
  box-shadow: var(--shadow);
}

.footer {
  background: #0f172a;
  color: #dbeafe;
  padding: 4rem 0 1.5rem;
}
.footer a { color: #dbeafe; }
.footer a:hover { color: var(--secondary-blue); }

.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 1000;
  display: none;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
  color: var(--white);
  border: 0;
  box-shadow: var(--shadow);
}
.floating-actions {
  position: fixed;
  right: 24px;
  bottom: 90px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.floating-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 0;
  display: grid;
  place-items: center;
  box-shadow: var(--shadow);
  color: var(--white);
}
.floating-btn.whatsapp { background: #25D366; }
.floating-btn.call { background: var(--emergency-red); }

.breadcrumb { background: transparent; padding: 0; }
.breadcrumb-item + .breadcrumb-item::before { color: var(--primary-blue); }
.page-hero {
  background: linear-gradient(120deg, #0B6EFD 0%, #00AEEF 45%, #7C3AED 100%);
  color: var(--white);
  padding: 5rem 0 3rem;
}
.page-hero h1 { font-size: clamp(2rem, 3.2vw, 2.8rem); font-weight: 700; }
.page-hero p { color: rgba(255,255,255,.9); max-width: 700px; }

.timeline-item { position: relative; padding-left: 24px; margin-bottom: 1rem; }
.timeline-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 7px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--primary-blue);
}

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(17,24,39,0.88);
  display: none;
  place-items: center;
  z-index: 2000;
  padding: 1rem;
}
.lightbox.show { display: grid; }
.lightbox img { max-width: 100%; max-height: 84vh; border-radius: 1rem; box-shadow: var(--shadow); }
.lightbox .close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  color: var(--white);
  font-size: 2rem;
  background: transparent;
  border: 0;
}

.badge-success { background: rgba(40,167,69,0.12); color: var(--success-green); }

.marquee-band {
  width: 100%;
  overflow: hidden;
  margin: 1.5rem 0;
  background: #F6C500;
  border-top: 3px solid rgba(220,53,69,0.85);
  border-bottom: 3px solid rgba(220,53,69,0.85);
  box-shadow: 0 10px 24px rgba(15,23,42,0.06);
}
.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee-scroll 32s linear infinite;
}
.marquee-band:hover .marquee-track { animation-play-state: paused; }
.marquee-track img {
  height: 62px;
  width: auto;
  display: block;
  flex: 0 0 auto;
}
@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; }
}

.poster-frame {
  max-width: 1000px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  background: var(--white);
  padding: 0.5rem;
}
.poster-frame img {
  width: 100%;
  height: auto;
  border-radius: calc(var(--radius) - 0.6rem);
}
