:root {
  --bg: #0f172a;
  --surface: #111827;
  --surface-soft: #1f2937;
  --text: #f8fafc;
  --text-muted: #cbd5e1;
  --primary: #38bdf8;
  --secondary: #67e8f9;
  --accent: #fb7185;
  --success: #34d399;
  --border: rgba(148, 163, 184, 0.18);
  --glow: rgba(56, 189, 248, 0.3);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top, rgba(56, 189, 248, 0.12), transparent 32%), #020617;
  color: var(--text);
}

/* Loading State */
body.loading {
  opacity: 0;
  transition: opacity 0.3s ease;
}

body:not(.loading) {
  opacity: 1;
}

/* Scroll Progress Bar */
.scroll-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--secondary), var(--accent));
  width: 0%;
  z-index: 9999;
  box-shadow: 0 0 20px var(--glow);
  transition: width 0.1s ease-out;
}

/* Animation Classes */
.animate-in {
  animation: fadeInUp 0.6s ease-out forwards;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Professional Reveal Animation */
.reveal-advance {
  opacity: 0;
  filter: blur(10px);
  transform: translateY(30px) scale(0.95);
  transition: all 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal-advance.active {
  opacity: 1;
  filter: blur(0);
  transform: translateY(0) scale(1);
}

/* Staggered Animation */
.stagger-item {
  opacity: 0;
  transform: translateY(20px);
}

.stagger-item.animate {
  animation: staggerFadeIn 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes staggerFadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

img {
  max-width: 100%;
}

.container {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
}

/* ── Sticky-header scroll offset ──────────────────────────────
   Prevents the fixed/sticky header from covering section headings
   when the user clicks a nav anchor link.
   We use 120px to provide ample breathing room for the expanded nav.
────────────────────────────────────────────────────────────── */
html {
  scroll-padding-top: 120px;
}

section[id] {
  scroll-margin-top: 120px;
}

/* ══════════════════════════════════════════════════════════════
   GLOBAL FORM ELEMENT DARK THEME
   Forces all select dropdowns, options, inputs, and textareas
   to use the dark colour scheme — fixing the white dropdown bug.
══════════════════════════════════════════════════════════════ */

select,
input[type="text"],
input[type="email"],
input[type="number"],
input[type="range"],
textarea {
  color: #f8fafc;
  background-color: #111827;
  color-scheme: dark;
}

/* The dropdown popup panel */
select option {
  background-color: #111827;
  color: #f8fafc;
}

/* Highlighted (hovered / keyboard-focused) option */
select option:hover,
select option:focus,
select option:checked {
  background-color: #1e3a4c;
  color: #38bdf8;
}

/* Placeholder-style for the first disabled option */
select option[value=""][disabled] {
  color: #64748b;
}

/* Remove the white outline some browsers add on focus */
select:focus,
input:focus,
textarea:focus {
  outline: none;
  border-color: rgba(56, 189, 248, 0.5) !important;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.12);
}


.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(16px);
  background: rgba(2, 6, 23, 0.88);
  border-bottom: 1px solid rgba(148, 163, 184, 0.08);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
  flex-wrap: wrap;
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.hamburger span {
  width: 24px;
  height: 3px;
  background: var(--primary);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(8px, 8px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--primary);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.2rem;
}

.brand-logo {
  width: 40px;
  height: 40px;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.site-nav a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
  font-size: 0.85rem;
  white-space: nowrap;
}

.site-nav a:hover {
  color: var(--text);
}

.site-nav a.active {
  color: var(--primary);
  font-weight: 600;
}

@media (max-width: 1100px) {
  .site-nav a {
    font-size: 0.78rem;
  }
  .site-nav {
    gap: 0.45rem;
  }
}

/* Carousel Styles */
.carousel-container {
  margin-top: 2rem;
  position: relative;
}

.carousel-wrapper {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  box-shadow: 0 32px 80px rgba(15, 23, 42, 0.45);
}

.carousel {
  display: flex;
  transition: transform 0.5s ease-in-out;
  width: 100%;
}

.carousel-slide {
  min-width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.carousel-image {
  width: 100%;
  height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 20px;
}

.carousel-image-img {
  width: 100%;
  height: 400px;
  object-fit: cover;
  border-radius: 20px;
  display: block;
}

.carousel-caption {
  padding: 1.5rem;
  text-align: center;
  background: rgba(15, 23, 42, 0.92);
  width: 100%;
  color: var(--text);
  font-size: 1.2rem;
  font-weight: 600;
  border-bottom-left-radius: 24px;
  border-bottom-right-radius: 24px;
}

.carousel-control {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(56, 189, 248, 0.8);
  color: white;
  border: none;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
  z-index: 10;
}

.carousel-control:hover {
  background: rgba(56, 189, 248, 1);
}

.carousel-control.prev {
  left: 20px;
}

.carousel-control.next {
  right: 20px;
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 1.5rem;
  background: rgba(15, 23, 42, 0.92);
}

.carousel-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(148, 163, 184, 0.4);
  border: none;
  cursor: pointer;
  transition: background 0.2s ease;
}

.carousel-dot.active {
  background: var(--primary);
}

.section-gradient,
.section-gradient-alt {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.18), rgba(59, 130, 246, 0.06));
}

.section-gradient-alt {
  background: linear-gradient(180deg, rgba(15, 23, 42, 1), rgba(15, 23, 42, 0.95));
}

.section-light {
  background: #071223;
}

.section-dark {
  background: #020617;
}

.hero {
  padding: 4rem 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.08), rgba(2, 6, 23, 0.15)), url('rapidrescueindia-hero-bg.png') center/cover no-repeat;
  background-blend-mode: overlay;
  background-position: center center;
  background-size: cover;
  background-attachment: fixed;
  position: relative;
  overflow: hidden;
  min-height: 100vh;
  display: flex;
  align-items: center;
  animation: heroPanZoom 20s ease-in-out infinite;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(2, 6, 23, 0.15), rgba(2, 6, 23, 0.25));
  z-index: 1;
  animation: fadeOverlay 1.5s ease-out forwards;
}

/* Hero Background Pan & Zoom Animation */
@keyframes heroPanZoom {
  0% {
    background-position: center calc(center - 20px);
    background-size: 105% auto;
  }
  50% {
    background-position: center calc(center + 20px);
    background-size: 108% auto;
  }
  100% {
    background-position: center calc(center - 20px);
    background-size: 105% auto;
  }
}

@keyframes fadeOverlay {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.hero > * {
  position: relative;
  z-index: 2;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2rem;
  align-items: center;
  transform: translateX(140px);
  opacity: 0;
  will-change: transform, opacity;
  animation: heroSlideInEnhanced 1s cubic-bezier(0.22, 1, 0.36, 1) 0.3s forwards;
}

.hero-grid.visible,
.hero-grid.animate-in {
  animation: heroSlideIn 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes heroSlideIn {
  from {
    opacity: 0;
    transform: translateX(140px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes heroSlideInEnhanced {
  0% {
    opacity: 0;
    transform: translateX(140px) scale(0.98);
  }
  100% {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

.eyebrow,
.section-title span {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.8rem;
  color: var(--secondary);
}

.hero h1,
.section-title h2 {
  font-size: clamp(2.5rem, 3vw, 4rem);
  line-height: 1.05;
  margin: 1rem 0 1rem;
  background: linear-gradient(135deg, var(--text) 0%, var(--secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.hero h1 {
  text-shadow: 0 0 60px rgba(56, 189, 248, 0.1);
}

.hero-copy,
.section-title p,
.feature-card p,
.pitch-card p,
.contact-grid p {
  color: var(--text-muted);
  line-height: 1.75;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.9rem 1.8rem;
  border: none;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.btn:hover::before {
  opacity: 1;
}

.btn-primary {
  background: var(--primary);
  color: #020617;
  box-shadow: 0 0 0 0 var(--glow);
}

.btn-primary:hover {
  box-shadow: 0 0 25px var(--glow), 0 8px 20px rgba(56, 189, 248, 0.15);
  transform: translateY(-2px);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(56, 189, 248, 0.4);
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.15);
}

.btn-tertiary {
  background: rgba(59, 130, 246, 0.16);
  color: var(--secondary);
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.btn-tertiary:hover {
  background: rgba(59, 130, 246, 0.25);
  box-shadow: 0 0 20px rgba(103, 232, 249, 0.2);
}

.hero-card,
.feature-card,
.pitch-card,
.map-card,
.contact-form {
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.06);
  border-radius: 24px;
  padding: 1.75rem;
  transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.hero-card {
  box-shadow: 0 32px 80px rgba(15, 23, 42, 0.45);
}

.feature-card:hover,
.pitch-card:hover {
  transform: translateY(-8px);
  border-color: rgba(148, 163, 184, 0.15);
  box-shadow: 0 20px 60px rgba(56, 189, 248, 0.1), 0 0 30px var(--glow);
}

.map-card:hover {
  border-color: rgba(148, 163, 184, 0.12);
  box-shadow: 0 15px 50px rgba(56, 189, 248, 0.08);
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
  margin: 1rem 0 0.75rem;
}

.status-item {
  border-radius: 16px;
  padding: 0.9rem 1rem;
  font-weight: 700;
  font-size: 0.95rem;
}

.status-item.green { background: rgba(52, 211, 153, 0.13); color: #a7f3d0; }
.status-item.blue { background: rgba(56, 189, 248, 0.14); color: #7dd3fc; }
.status-item.orange { background: rgba(251, 146, 60, 0.16); color: #fdba74; }
.status-item.red { background: rgba(248, 113, 113, 0.16); color: #fca5a5; }

.tracking-panel {
  margin-top: 1.75rem;
}

.map-placeholder {
  min-height: 180px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.8), rgba(15, 23, 42, 0.5));
  display: grid;
  place-items: center;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.section-title,
.contact-grid {
  display: grid;
  gap: 1rem;
}

.feature-grid,
.pitch-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
  }

  .stat-card {
    background: rgba(15, 23, 42, 0.92);
    border: 1px solid rgba(148, 163, 184, 0.06);
    border-radius: 24px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  }

  .stat-card:hover {
    transform: translateY(-6px);
    border-color: rgba(56, 189, 248, 0.15);
    box-shadow: 0 15px 40px rgba(56, 189, 248, 0.1);
  }

  .stat-number {
    font-size: 3rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
    text-shadow: 0 0 40px rgba(56, 189, 248, 0.1);
  }

  .stat-label {
    color: var(--text-muted);
    font-size: 1rem;
}

.tracking-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2rem;
  padding: 4rem 0;
}

.process-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 1rem;
}

.process-list li {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(148, 163, 184, 0.08);
  border-radius: 16px;
  padding: 1rem 1.15rem;
}

.map-card {
  display: grid;
  gap: 1rem;
}

.map-status {
  font-weight: 700;
  letter-spacing: 0.04em;
}

.map-route {
  display: flex;
  align-items: center;
  gap: 0.75rem;
    position: relative;
  }

  .route-point {
    min-width: 86px;
    border-radius: 999px;
    padding: 0.7rem 0.95rem;
    background: rgba(255, 255, 255, 0.05);
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    z-index: 2;
    position: relative;
  }

  .route-point.active {
    background: var(--primary);
    color: #020617;
  }

  .route-line {
    flex: 1;
    height: 4px;
    border-radius: 999px;
    background: rgba(56, 189, 248, 0.25);
    position: relative;
    overflow: hidden;
  }

  .route-line::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: var(--progress, 0%);
    background: var(--primary);
    border-radius: 999px;
    transition: width 0.5s ease;
}

.contact-form label {
  display: grid;
  gap: 0.5rem;
  margin-bottom: 1rem;
  color: var(--text);
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(15, 23, 42, 0.92);
  color: var(--text);
  border-radius: 14px;
  padding: 0.95rem 1rem;
  outline: none;
  transition: all 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: rgba(56, 189, 248, 0.55);
  background: rgba(15, 23, 42, 1);
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.15), inset 0 0 10px rgba(56, 189, 248, 0.05);
  transform: scale(1.01);
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: rgba(203, 213, 225, 0.5);
  transition: color 0.3s ease;
}

.contact-form input:focus::placeholder,
.contact-form textarea:focus::placeholder {
  color: rgba(203, 213, 225, 0.7);
}

  .resource-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin: 1rem 0 1.25rem;
  }

  .resource-btn {
    min-width: 90px;
    padding: 0.75rem 1rem;
  }

  .resource-btn.active {
    background: rgba(56, 189, 248, 0.95);
    color: #020617;
  }

  .resource-details {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 18px;
    padding: 1rem 1.25rem;
    color: var(--text-muted);
  }

  .resource-summary {
    font-weight: 700;
    margin-bottom: 0.85rem;
    color: var(--text);
  }

  .resource-list {
    display: grid;
    gap: 0.75rem;
  }

  .btn-alert {
    background: #dc2626;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
  }

  .btn-alert:hover {
    background: #b91c1c;
  }

  .emergency-selector {
    margin-bottom: 1.5rem;
  }

  .emergency-dropdown {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(148, 163, 184, 0.16);
    padding: 1rem;
    border-radius: 16px;
    margin-top: 1rem;
  }

  .emergency-dropdown label {
    display: block;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
    color: var(--text);
    font-weight: 600;
  }

  .emergency-dropdown select {
    width: 100%;
    padding: 0.85rem 1rem;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    background: rgba(15, 23, 42, 0.95);
    color: var(--text);
    outline: none;
  }

  .emergency-dropdown select:focus {
    border-color: rgba(56, 189, 248, 0.55);
  }

  .map-placeholder {
    min-height: 180px;
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.8), rgba(15, 23, 42, 0.5));
    display: grid;
    place-items: center;
    color: var(--text-muted);
    font-size: 0.95rem;
  }

.hospital-table-container {
    overflow-x: auto;
    margin-top: 2rem;
  }

  .hospital-table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(15, 23, 42, 0.92);
    border: 1px solid rgba(148, 163, 184, 0.06);
    border-radius: 24px;
    overflow: hidden;
  }

  .hospital-table th,
  .hospital-table td {
    padding: 1rem 1.25rem;
    text-align: left;
    border-bottom: 1px solid rgba(148, 163, 184, 0.08);
  }

  .hospital-table th {
    background: rgba(56, 189, 248, 0.1);
    color: var(--primary);
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
  }

  .hospital-table td {
    color: var(--text);
    font-size: 0.95rem;
  }

  .hospital-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  color: var(--text-muted);
}

.footer-links {
  margin-top: 1rem;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  margin: 0 0.5rem;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--primary);
}

/* Emergency Modal */
.emergency-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  animation: fadeIn 0.3s ease-out;
}

.modal-content {
  background: var(--surface);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 24px;
  padding: 0;
  max-width: 500px;
  width: 90%;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.5);
  animation: slideIn 0.3s ease-out;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 2rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.modal-header h3 {
  margin: 0;
  color: var(--primary);
  font-size: 1.5rem;
}

.modal-close {
  background: none;
  border: none;
  font-size: 2rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.modal-close:hover {
  background: rgba(248, 113, 113, 0.1);
  color: var(--accent);
}

.modal-body {
  padding: 2rem;
}

.emergency-message {
  text-align: center;
}

.emergency-text {
  font-size: 1.2rem;
  color: var(--text);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.hospital-prep {
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 16px;
  padding: 1.5rem;
  text-align: left;
}

.hospital-prep h4 {
  margin: 0 0 1rem 0;
  color: var(--primary);
  font-size: 1.1rem;
}

.hospital-prep ul {
  margin: 0;
  padding-left: 1.5rem;
}

.hospital-prep li {
  color: var(--success);
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.modal-footer {
  padding: 1.5rem 2rem;
  border-top: 1px solid rgba(148, 163, 184, 0.1);
  text-align: center;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-30px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Continuous Image Slider */
.continuous-slider {
  margin-top: 3rem;
  overflow: hidden;
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.8);
  padding: 1rem;
}

.slider-track {
  display: flex;
  width: calc(200px * 10); /* 10 images for seamless loop */
  animation: scroll 25s linear infinite;
}

.slide-item {
  width: 200px;
  height: 150px;
  margin-right: 1rem;
  border-radius: 12px;
  overflow: hidden;
  flex-shrink: 0;
}

.slide-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.slide-item:hover img {
  transform: scale(1.05);
}

@keyframes scroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(calc(-200px * 5)); /* Move by the width of unique images for seamless loop */
  }
}

@media (max-width: 900px) {
  .hero-grid,
  .tracking-grid,
  .feature-grid,
  .pitch-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 3rem;
  }

  .patient-app-demo {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

@media (max-width: 768px) {
  .emergency-modal {
    padding: 1rem;
  }

  .modal-content {
    width: 95%;
    max-width: none;
  }

  .modal-header {
    padding: 1rem 1.5rem;
  }

  .modal-body {
    padding: 1.5rem;
  }

  .modal-footer {
    padding: 1rem 1.5rem;
  }

  .continuous-slider {
    margin-top: 2rem;
    padding: 0.75rem;
  }

  .slider-track {
    width: calc(150px * 12);
    animation: scroll 20s linear infinite;
  }

  .hamburger {
    display: flex;
  }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: 100%;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
    padding: 1rem 1.25rem 1.25rem;
    background: rgba(2, 6, 23, 0.98);
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
    backdrop-filter: blur(10px);
    z-index: 20;
  }

  .site-nav.active {
    display: flex;
  }

  .site-nav a {
    display: block;
    width: 100%;
    padding: 0.9rem 1rem;
    border-radius: 14px;
    color: var(--text);
  }

  .site-nav a:hover {
    background: rgba(56, 189, 248, 0.12);
    color: var(--text);
  }

  .header-inner {
    padding: 0.75rem 0;
  }

  .slide-item {
    width: 150px;
    height: 120px;
    margin-right: 0.75rem;
  }

  .carousel-image {
    height: 300px;
  }

  .carousel-control {
    width: 40px;
    height: 40px;
    font-size: 18px;
  }

  @keyframes scroll {
    0% {
      transform: translateX(0);
    }
    100% {
      transform: translateX(calc(-150px * 6));
    }
  }
}

@media (max-width: 768px) {
  .hero {
    background-attachment: scroll;
    min-height: 70vh;
  }

  .hero::before {
    background: rgba(2, 6, 23, 0.18);
  }
}

@media (max-width: 640px) {
  .site-header {
    position: relative;
  }

  .hero {
    background-attachment: scroll;
    min-height: 60vh;
  }

  .header-inner {
    padding: 0.75rem 0;
  }

  .brand-logo {
    width: 32px;
    height: 32px;
  }

  .brand span {
    font-size: 1rem;
  }

  .hero {
    padding: 2rem 0;
  }

  .hero h1 {
    font-size: 1.8rem;
  }

  .hero-copy,
  .section-title p,
  .feature-card p,
  .pitch-card p,
  .contact-grid p {
    font-size: 0.95rem;
  }

  .hero-actions {
    flex-direction: column;
    gap: 0.75rem;
  }

  .btn {
    width: 100%;
    text-align: center;
  }

  .hero-card {
    padding: 1.25rem;
  }

  .resource-actions {
    flex-direction: column;
  }

  .resource-btn {
    width: 100%;
  }

  .tracking-panel h3 {
    font-size: 1.1rem;
  }

  .map-route {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .route-point {
    min-width: 70px;
    font-size: 0.8rem;
    padding: 0.6rem 0.85rem;
  }

  .carousel-image {
    height: 250px;
  }

  .carousel-caption {
    font-size: 1rem;
    padding: 1rem;
  }

  .carousel-control {
    width: 36px;
    height: 36px;
    font-size: 16px;
  }

  .carousel-control.prev {
    left: 10px;
  }

  .carousel-control.next {
    right: 10px;
  }

  .carousel-dots {
    padding: 1rem;
    gap: 8px;
  }

  .carousel-dot {
    width: 10px;
    height: 10px;
  }

  .hospital-table {
    font-size: 0.8rem;
  }

  .hospital-table th,
  .hospital-table td {
    padding: 0.75rem 0.5rem;
  }

  .patient-app-demo {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .app-mockup {
    padding: 1rem;
  }

  .location-bar,
  .search-bar {
    font-size: 0.85rem;
  }

  .hospital-item {
    flex-direction: column;
    gap: 1rem;
  }

  .alert-actions {
    display: flex;
    gap: 0.5rem;
    width: 100%;
  }

  .alert-btn {
    flex: 1;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .stat-card {
    padding: 1.5rem;
  }

  .stat-number {
    font-size: 2.2rem;
  }

  .stat-label {
    font-size: 0.9rem;
  }

  .contact-form label {
    margin-bottom: 0.75rem;
  }

  .contact-form input,
  .contact-form textarea {
    padding: 0.8rem 0.85rem;
    font-size: 0.95rem;
  }

  .section-title h2 {
    font-size: 1.8rem;
  }

  .app-description ul {
    padding-left: 1.5rem;
  }

  .app-description li {
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
  }
}

@media (max-width: 480px) {
  .modal-header h3 {
    font-size: 1.3rem;
  }

  .emergency-text {
    font-size: 1rem;
  }

  .hospital-prep {
    padding: 1rem;
  }

  .continuous-slider {
    margin-top: 1.5rem;
    padding: 0.5rem;
  }

  .slider-track {
    width: calc(120px * 12);
    animation: scroll 15s linear infinite;
  }

  .slide-item {
    width: 120px;
    height: 100px;
    margin-right: 0.5rem;
  }

  @keyframes scroll {
    0% {
      transform: translateX(0);
    }
    100% {
      transform: translateX(calc(-120px * 6));
    }
  }
}

.patient-app-demo {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 3rem;
  align-items: start;
  justify-items: stretch;
}

.app-description {
  width: 100%;
}

.app-mockup {
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.06);
  border-radius: 24px;
  padding: 2rem;
  box-shadow: 0 32px 80px rgba(15, 23, 42, 0.45);
}

.app-header {
  margin-bottom: 2rem;
}

.location-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.search-bar {
  display: flex;
  gap: 0.5rem;
}

.search-bar input {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(15, 23, 42, 0.92);
  color: var(--text);
  border-radius: 12px;
  outline: none;
}

.search-bar input:focus {
  border-color: rgba(56, 189, 248, 0.55);
}

.mic-btn {
  padding: 0.75rem 1rem;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 12px;
  color: var(--primary);
  cursor: pointer;
  transition: background 0.2s ease;
}

.mic-btn:hover {
  background: rgba(56, 189, 248, 0.2);
}

.hospital-list {
  display: grid;
  gap: 1rem;
  margin-bottom: 2rem;
}

.hospital-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(148, 163, 184, 0.08);
  border-radius: 16px;
}

.hospital-info h4 {
  margin: 0 0 0.25rem 0;
  color: var(--text);
  font-size: 1rem;
}

.hospital-info p {
  margin: 0 0 0.5rem 0;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.availability {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
}

.doctor-status {
  font-weight: 600;
}

.timestamp {
  color: var(--text-muted);
}

.alert-actions {
  display: flex;
  gap: 0.5rem;
}

.alert-btn {
  padding: 0.5rem 0.75rem;
  border: none;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.alert-btn:hover {
  opacity: 0.8;
}

.alert-btn.sms {
  background: #10b981;
  color: white;
}

.alert-btn.whatsapp {
  background: #25d366;
  color: white;
}

.app-description h3 {
  margin-bottom: 1rem;
  color: var(--text);
}

.app-description ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 1rem;
}

.app-description li {
  padding-left: 1.5rem;
  position: relative;
  color: var(--text-muted);
  line-height: 1.6;
}

.app-description li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: bold;
}

/* Enhanced Hero CTA Buttons */
.btn-lg {
  padding: 1.2rem 2.5rem;
  font-size: 1.1rem;
  min-width: 200px;
}

/* Data Integrity Section */
.integrity-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  padding: 2rem 0;
}

.integrity-card {
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 20px;
  padding: 2rem;
  text-align: center;
}

.integrity-card h3 {
  font-size: 1.8rem;
  margin-bottom: 1rem;
  color: var(--text);
}

.integrity-card h4 {
  font-size: 1.3rem;
  margin-bottom: 0.75rem;
  color: var(--primary);
}

.integrity-card p {
  color: var(--text-muted);
  line-height: 1.7;
}

/* Pulse Animation for Tracking */
.pulse-animation {
  display: inline-block;
  width: 12px;
  height: 12px;
  background: #10b981;
  border-radius: 50%;
  margin-right: 0.5rem;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(16, 185, 129, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

/* Roadmap Section */
.roadmap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  padding: 2rem 0;
}

.roadmap-item {
  background: rgba(15, 23, 42, 0.92);
  border: 2px solid rgba(56, 189, 248, 0.3);
  border-radius: 16px;
  padding: 2rem;
  position: relative;
}

.roadmap-marker {
  display: inline-block;
  background: var(--primary);
  color: #020617;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.roadmap-item h4 {
  font-size: 1.3rem;
  margin-bottom: 0.75rem;
  color: var(--text);
}

.roadmap-item p {
  color: var(--text-muted);
  line-height: 1.6;
}

/* Enhanced Footer */
.footer-inner {
  padding: 3rem 0 1rem !important;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section h4 {
  color: var(--primary);
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

.footer-section p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 0.75rem;
}

.footer-section a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-section a:hover {
  color: var(--secondary);
}

.footer-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-section ul li {
  margin-bottom: 0.5rem;
}

.social-links {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.social-links a {
  display: inline-block;
  padding: 0.75rem 1.25rem;
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.2s ease;
}

.social-links a:hover {
  background: rgba(56, 189, 248, 0.25);
  border-color: var(--primary);
}

.footer-bottom {
  border-top: 1px solid rgba(148, 163, 184, 0.1);
  padding-top: 1.5rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Responsive Footer */
@media (max-width: 640px) {
  .btn-lg {
    padding: 1rem 1.5rem;
    font-size: 1rem;
    min-width: 150px;
    width: 100%;
  }

  .integrity-grid {
    grid-template-columns: 1fr;
  }

  .roadmap-grid {
    grid-template-columns: 1fr;
  }

  .footer-content {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   Interactive Diagram Section
   ========================================================================== */
.diagram-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  margin-bottom: 2rem;
}

@media (max-width: 768px) {
  .diagram-steps {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
}

.diagram-step-btn {
  background: none;
  border: 1px solid transparent;
  border-bottom: 3px solid rgba(255, 255, 255, 0.05);
  padding: 1rem;
  color: var(--text-muted);
  font-family: var(--font-display);
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  font-size: 0.9rem;
  outline: none;
  transition: all 0.3s ease;
  border-radius: 12px 12px 0 0;
}

.diagram-step-btn:hover {
  color: var(--text);
  border-bottom-color: rgba(56, 189, 248, 0.3);
}

.diagram-step-btn.active {
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-bottom: 3px solid var(--primary);
  color: var(--text);
}

.diagram-overlay {
  position: absolute;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 5;
  opacity: 0;
}

.diagram-overlay.active {
  opacity: 1;
}

/* Mock Google Map Styles */
.map-roads {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.08;
  pointer-events: none;
}

.road {
  position: absolute;
  background: rgba(255, 255, 255, 0.2);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
}

.road.horizontal {
  height: 16px;
  width: 100%;
}

.road.vertical {
  width: 16px;
  height: 100%;
}

.map-label {
  position: absolute;
  font-size: 0.58rem;
  color: rgba(255, 255, 255, 0.2);
  font-family: monospace;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  pointer-events: none;
  font-weight: bold;
}

.map-pin {
  user-select: none;
  pointer-events: none;
}

.pulse-ring {
  box-shadow: 0 0 8px currentColor;
}

/* Keyframe Animations */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

@keyframes pulse-ring {
  0% { transform: translate(-50%, -50%) scale(0.5); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(1.6); opacity: 0; }
}

@keyframes dash {
  to {
    stroke-dashoffset: -20;
  }
}

/* ── How It Works: Step Navigation Buttons ──────────────────── */
.diagram-steps {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.diagram-step-btn {
  padding: 0.6rem 1.25rem;
  border-radius: 99px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--text-muted);
  font-family: 'Outfit', sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.diagram-step-btn:hover {
  background: rgba(56,189,248,0.1);
  border-color: rgba(56,189,248,0.3);
  color: var(--primary);
}

.diagram-step-btn.active {
  background: rgba(244,63,94,0.12);
  border-color: rgba(244,63,94,0.35);
  color: #f43f5e;
  box-shadow: 0 0 18px rgba(244,63,94,0.15);
}

/* ── Diagram Overlay Highlights ─────────────────────────────── */
.diagram-overlay {
  position: absolute;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 6;
  border-radius: 4px;
}

.diagram-overlay.active {
  opacity: 1;
}

/* ── Roadmap Grid ────────────────────────────────────────────── */
.roadmap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.roadmap-item {
  background: rgba(17,24,39,0.6);
  border: 1px solid rgba(56,189,248,0.12);
  border-radius: 20px;
  padding: 1.75rem;
  transition: all 0.3s ease;
  position: relative;
}

.roadmap-item:hover {
  border-color: rgba(56,189,248,0.3);
  box-shadow: 0 16px 40px rgba(56,189,248,0.08);
  transform: translateY(-4px);
}

.roadmap-marker {
  display: inline-block;
  padding: 0.3rem 0.85rem;
  background: linear-gradient(135deg, rgba(244,63,94,0.15), rgba(56,189,248,0.12));
  border: 1px solid rgba(244,63,94,0.25);
  border-radius: 99px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #f43f5e;
  margin-bottom: 1rem;
  letter-spacing: 0.02em;
}

.roadmap-item h4 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
  margin-top: 0;
  color: var(--text);
}

.roadmap-item p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.55;
  margin: 0;
}

/* ── Integrity Cards (Crisis Section) ───────────────────────── */
.integrity-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.integrity-card {
  background: rgba(17,24,39,0.6);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 18px;
  padding: 1.75rem;
  transition: all 0.3s ease;
}

.integrity-card:hover {
  border-color: rgba(56,189,248,0.2);
  box-shadow: 0 12px 32px rgba(0,0,0,0.3);
}

.integrity-card h4 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.65rem;
  margin-top: 0;
  color: var(--text);
}

.integrity-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
  margin: 0;
}

/* Roadmap Flip Cards */
.roadmap-item.flip-card {
  background: transparent !important;
  perspective: 1000px;
  height: 240px; /* Increased height */
  border: none !important;
  padding: 0 !important;
}
.roadmap-item.flip-card:hover {
  transform: none !important;
  box-shadow: none !important;
}
.roadmap-item.flip-card .flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: center;
  transition: transform 0.6s cubic-bezier(0.4, 0.2, 0.2, 1);
  transform-style: preserve-3d;
}
.roadmap-item.flip-card:hover .flip-card-inner {
  transform: rotateY(180deg);
}
.flip-card-front, .flip-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  border-radius: 20px;
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: rgba(17,24,39,0.8);
  border: 1px solid rgba(56,189,248,0.12);
}
.flip-card-back {
  transform: rotateY(180deg);
  border-color: rgba(56,189,248,0.4);
  background: rgba(15,23,42,0.95);
}
.flip-card-front h4 { text-align: center; margin-bottom: 0; }
.flip-card-back p { text-align: center; font-size: 1rem; color: #f8fafc; }
