/* ==========================================================================
   Lokseva Ambulance Service — Stylesheet
   Design tokens: 60% Navy / 30% Medical Blue / 10% Emergency Red
   Signature element: "Siren Bar" — alternating red/blue light strip
   ========================================================================== */

:root {
  /* 60% Primary */
  --primary-dark: #0F172A;
  --primary-dark-light: #1E293B;
  --primary-dark-soft: #16213D;

  /* 30% Secondary */
  --secondary-light: #F8FAFC;
  --secondary-gray: #E2E8F0;

  /* 10% Accent */
  --accent-red: #EF4444;
  --accent-red-dark: #DC2626;

  /* Extra */
  --medical-blue: #2563EB;
  --medical-blue-light: #3B82F6;
  --siren-amber: #F59E0B;
  --text-dark: #1E293B;
  --text-light: #FFFFFF;
  --text-muted: #94A3B8;

  /* Typography */
  --font-display: 'Manrope', sans-serif;
  --font-body: 'Inter', sans-serif;

  /* Radii & shadows */
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --shadow-card: 0 10px 30px -10px rgba(15, 23, 42, 0.25);
  --shadow-glow-red: 0 0 40px -5px rgba(239, 68, 68, 0.4);
  --shadow-glow-blue: 0 0 40px -5px rgba(37, 99, 235, 0.4);
}

* { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--text-dark);
  background: var(--secondary-light);
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, .font-display {
  font-family: var(--font-display);
}

/* ==========================================================================
   SIREN BAR — signature element. Thin strip of alternating red/blue
   segments that pulse in sequence, echoing an ambulance light bar.
   ========================================================================== */
.siren-bar {
  display: flex;
  width: 100%;
  height: 4px;
  overflow: hidden;
}
.siren-bar span {
  flex: 1;
  height: 100%;
}
.siren-bar span:nth-child(odd) {
  background: var(--accent-red);
  animation: siren-pulse-red 1.2s ease-in-out infinite;
}
.siren-bar span:nth-child(even) {
  background: var(--medical-blue);
  animation: siren-pulse-blue 1.2s ease-in-out infinite;
}
@keyframes siren-pulse-red {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.25; }
}
@keyframes siren-pulse-blue {
  0%, 100% { opacity: 0.25; }
  50% { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .siren-bar span { animation: none !important; opacity: 1 !important; }
}

/* Badge with mini siren dots (hero "24/7 Available" badge) */
.siren-dot-group { display: inline-flex; gap: 4px; align-items: center; }
.siren-dot {
  width: 7px; height: 7px; border-radius: 50%;
}
.siren-dot.red { background: var(--accent-red); animation: dot-blink 1s ease-in-out infinite; }
.siren-dot.blue { background: var(--medical-blue); animation: dot-blink 1s ease-in-out infinite reverse; }
@keyframes dot-blink {
  0%, 100% { opacity: 1; box-shadow: 0 0 8px currentColor; }
  50% { opacity: 0.3; box-shadow: none; }
}

/* ==========================================================================
   Glassmorphism utility
   ========================================================================== */
.glass {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.glass-light {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.5);
}

/* ==========================================================================
   Scroll reveal (IntersectionObserver driven)
   ========================================================================== */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: padding 0.3s ease, box-shadow 0.3s ease;
}
.site-header.scrolled {
  box-shadow: 0 4px 20px rgba(0,0,0,0.25);
}
.nav-link {
  position: relative;
  color: var(--text-light);
  font-weight: 500;
  transition: color 0.25s ease;
}
.nav-link::after {
  content: '';
  position: absolute;
  left: 0; bottom: -6px;
  width: 0; height: 2px;
  background: var(--accent-red);
  transition: width 0.25s ease;
}
.nav-link:hover { color: var(--medical-blue-light); }
.nav-link:hover::after { width: 100%; }

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn-emergency {
  background: var(--accent-red);
  color: var(--text-light);
  box-shadow: var(--shadow-glow-red);
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}
.btn-emergency:hover {
  background: var(--accent-red-dark);
  transform: translateY(-2px);
  box-shadow: 0 0 50px -5px rgba(239, 68, 68, 0.6);
}
.btn-whatsapp {
  background: #25D366;
  color: var(--text-light);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.btn-whatsapp:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px -5px rgba(37, 211, 102, 0.5);
}
.btn-outline-light {
  border: 1.5px solid rgba(255,255,255,0.35);
  color: var(--text-light);
  transition: all 0.25s ease;
}
.btn-outline-light:hover {
  background: rgba(255,255,255,0.1);
  border-color: var(--medical-blue-light);
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero-section {
  position: relative;
  background: radial-gradient(circle at 80% 20%, var(--primary-dark-soft) 0%, var(--primary-dark) 60%);
  overflow: hidden;
}
.hero-glow-red {
  position: absolute;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(239,68,68,0.25) 0%, transparent 70%);
  border-radius: 50%;
  filter: blur(20px);
  animation: float-glow 8s ease-in-out infinite;
}
.hero-glow-blue {
  position: absolute;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(37,99,235,0.25) 0%, transparent 70%);
  border-radius: 50%;
  filter: blur(20px);
  animation: float-glow 10s ease-in-out infinite reverse;
}
@keyframes float-glow {
  0%, 100% { transform: translate(0,0) scale(1); }
  50% { transform: translate(-30px, 30px) scale(1.1); }
}
.hero-image-wrap {
  position: relative;
}
.hero-image-wrap img {
  border-radius: var(--radius-lg);
  box-shadow: 0 30px 60px -20px rgba(0,0,0,0.5);
}
.floating-chip {
  position: absolute;
  animation: chip-float 4s ease-in-out infinite;
}
@keyframes chip-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* ==========================================================================
   Service cards
   ========================================================================== */
.service-card {
  background: var(--text-light);
  border-radius: var(--radius-md);
  border: 1px solid var(--secondary-gray);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.service-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-card);
  border-color: var(--medical-blue);
}
.service-icon-wrap {
  width: 56px; height: 56px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--medical-blue) 0%, var(--primary-dark) 100%);
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.3s ease;
}
.service-card:hover .service-icon-wrap {
  transform: scale(1.1) rotate(-5deg);
}

/* ==========================================================================
   Why choose us
   ========================================================================== */
.feature-pill {
  background: var(--text-light);
  border-radius: var(--radius-sm);
  border: 1px solid var(--secondary-gray);
  transition: all 0.25s ease;
}
.feature-pill:hover {
  border-color: var(--accent-red);
  box-shadow: 0 8px 20px -8px rgba(0,0,0,0.15);
}

/* ==========================================================================
   Counters
   ========================================================================== */
.counter-section {
  background: var(--primary-dark);
  position: relative;
}
.counter-number {
  font-family: var(--font-display);
  font-weight: 800;
  background: linear-gradient(135deg, var(--text-light) 0%, var(--medical-blue-light) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ==========================================================================
   CTA section
   ========================================================================== */
.cta-section {
  background: linear-gradient(135deg, var(--accent-red-dark) 0%, var(--accent-red) 50%, var(--primary-dark) 100%);
  position: relative;
}

/* ==========================================================================
   Testimonials
   ========================================================================== */
.testimonial-card {
  background: var(--text-light);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
}
.testimonial-slide { transition: opacity 0.5s ease; }

/* ==========================================================================
   FAQ accordion
   ========================================================================== */
.faq-item {
  border: 1px solid var(--secondary-gray);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: border-color 0.25s ease;
}
.faq-item.active { border-color: var(--medical-blue); }
.faq-question {
  cursor: pointer;
  user-select: none;
}
.faq-icon { transition: transform 0.3s ease; }
.faq-item.active .faq-icon { transform: rotate(45deg); }
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}

/* ==========================================================================
   Floating action buttons
   ========================================================================== */
.fab-stack {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.fab-btn {
  width: 56px; height: 56px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
  transition: transform 0.25s ease;
}
.fab-btn:hover { transform: scale(1.08); }
.fab-call { background: var(--accent-red); color: #fff; }
.fab-whatsapp { background: #25D366; color: #fff; }

/* Mobile sticky bottom bar */
.mobile-sticky-bar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 95;
  background: var(--primary-dark);
  border-top: 1px solid rgba(255,255,255,0.1);
}

/* Back to top */
#backToTop {
  position: fixed;
  right: 20px;
  bottom: 90px;
  z-index: 90;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--primary-dark);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: all 0.3s ease;
}
#backToTop.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* ==========================================================================
   Loader
   ========================================================================== */
#pageLoader {
  position: fixed; inset: 0; z-index: 200;
  background: var(--primary-dark);
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}
#pageLoader.hidden { opacity: 0; visibility: hidden; }
.loader-ambulance {
  position: relative;
  width: 70px; height: 70px;
}
.loader-ring {
  position: absolute; inset: 0;
  border: 4px solid rgba(255,255,255,0.1);
  border-top-color: var(--accent-red);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ==========================================================================
   Mobile menu
   ========================================================================== */
#mobileMenu {
  transform: translateX(100%);
  transition: transform 0.35s ease;
}
#mobileMenu.open { transform: translateX(0); }

/* ==========================================================================
   Misc utility
   ========================================================================== */
.section-eyebrow {
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.8rem;
  font-weight: 700;
}
.divider-siren { height: 3px; border-radius: 2px; overflow: hidden; }

::selection { background: var(--medical-blue); color: #fff; }

@media (max-width: 768px) {
  .hero-glow-red, .hero-glow-blue { display: none; }
}
