/* ==========================================================================
   LIFELINE — VIBRANT ULTRA-MODERN DESIGN SYSTEM & STYLESHEET
   Inspired by the Official Brand Logo: Ruby Crimson Drop & Electric Cyan Pulse
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Outfit:wght@300;400;500;600;700;800;900&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  /* Core Brand Colors */
  --crimson: #FF1753;
  --crimson-bright: #FF2E6B;
  --crimson-deep: #C70039;
  --crimson-hover: #E60042;
  --crimson-glow: rgba(255, 23, 83, 0.5);
  --crimson-soft: rgba(255, 23, 83, 0.15);
  --crimson-gradient: linear-gradient(135deg, #FF1753 0%, #FF3D77 50%, #C70039 100%);
  
  /* Electric Pulse Cyan (Heartbeat Accent) */
  --pulse-mint: #00F5D4;
  --pulse-mint-bright: #38EF7D;
  --pulse-mint-glow: rgba(0, 245, 212, 0.5);
  --pulse-mint-soft: rgba(0, 245, 212, 0.15);
  --mint-gradient: linear-gradient(135deg, #00F5D4 0%, #00D2B4 100%);
  
  /* Cyber Violet & Radiant Accents */
  --violet-cyber: #8B5CF6;
  --violet-bright: #A855F7;
  --violet-glow: rgba(139, 92, 246, 0.45);
  --violet-soft: rgba(139, 92, 246, 0.15);
  --violet-gradient: linear-gradient(135deg, #A855F7 0%, #6366F1 100%);

  /* Sunset Amber & Alerts */
  --warning-amber: #FFB703;
  --warning-amber-glow: rgba(255, 183, 3, 0.5);
  --amber-soft: rgba(255, 183, 3, 0.15);
  --amber-gradient: linear-gradient(135deg, #FFB703 0%, #FB8500 100%);

  /* Emerald Life */
  --emerald-life: #05FFA1;
  --emerald-glow: rgba(5, 255, 161, 0.45);

  /* Rose & Coral */
  --rose: #FF5E89;
  --rose-glow: rgba(255, 94, 137, 0.4);

  /* Multicolor Fluid Gradients */
  --tri-gradient: linear-gradient(135deg, #FF1753 0%, #A855F7 50%, #00F5D4 100%);
  --hero-glow-radial: radial-gradient(circle, rgba(255, 23, 83, 0.35) 0%, rgba(139, 92, 246, 0.2) 40%, rgba(0, 245, 212, 0.15) 70%, transparent 100%);

  /* Background Palette (Velvet Obsidian Space) */
  --bg-space: #07040D;
  --bg-deep: #0D0718;
  --bg-panel: rgba(22, 12, 34, 0.72);
  --bg-panel-solid: #150A24;
  --bg-card: rgba(28, 15, 44, 0.65);
  --bg-card-hover: rgba(45, 22, 70, 0.85);
  --bg-raised: rgba(55, 26, 86, 0.85);

  /* Borders & Glassmorphism */
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-highlight: rgba(255, 255, 255, 0.18);
  --border-crimson: rgba(255, 23, 83, 0.45);
  --border-cyan: rgba(0, 245, 212, 0.4);
  --glass-blur: blur(24px);

  /* Typography Colors */
  --text-white: #FFFFFF;
  --text-ivory: #F7EFF5;
  --text-muted: #B3A5B7;
  --text-dim: #7F7085;

  /* Font Families */
  --font-display: 'Bebas Neue', sans-serif;
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;

  /* Shadows & Illuminations */
  --shadow-sm: 0 4px 14px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.55);
  --shadow-lg: 0 16px 54px rgba(0, 0, 0, 0.7);
  --shadow-crimson: 0 0 35px var(--crimson-glow);
  --shadow-cyan: 0 0 30px var(--pulse-mint-glow);
  --shadow-violet: 0 0 35px var(--violet-glow);
}

/* ==========================================================================
   BASE RESET & ATMOSPHERE
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-space);
  color: var(--text-ivory);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 90% 12%, rgba(255, 23, 83, 0.22) 0%, transparent 45%),
    radial-gradient(circle at 10% 38%, rgba(0, 245, 212, 0.15) 0%, transparent 40%),
    radial-gradient(circle at 80% 65%, rgba(139, 92, 246, 0.18) 0%, transparent 45%),
    radial-gradient(circle at 20% 90%, rgba(255, 183, 3, 0.12) 0%, transparent 35%);
  background-attachment: fixed;
}

/* Ambient Medical Grid Pattern with Luminous Pulse */
body::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  z-index: 0;
}

/* Ambient Floating Glowing Auroras */
.ambient-aurora {
  position: fixed;
  pointer-events: none;
  z-index: 0;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.6;
  animation: auroraFloat 18s ease-in-out infinite alternate;
}

.ambient-aurora.aurora-1 {
  width: 480px;
  height: 480px;
  top: -100px;
  right: -80px;
  background: radial-gradient(circle, rgba(255, 23, 83, 0.35) 0%, transparent 70%);
}

.ambient-aurora.aurora-2 {
  width: 520px;
  height: 520px;
  top: 40%;
  left: -120px;
  background: radial-gradient(circle, rgba(0, 245, 212, 0.22) 0%, transparent 70%);
  animation-duration: 22s;
  animation-delay: -5s;
}

.ambient-aurora.aurora-3 {
  width: 450px;
  height: 450px;
  bottom: 5%;
  right: 5%;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.28) 0%, transparent 70%);
  animation-duration: 25s;
  animation-delay: -10s;
}

@keyframes auroraFloat {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(40px, -30px) scale(1.1); }
  100% { transform: translate(-30px, 40px) scale(0.95); }
}

.wrap {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 28px;
  position: relative;
  z-index: 1;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.25s ease, transform 0.25s ease;
}

.display {
  font-family: var(--font-display);
  letter-spacing: 0.02em;
}

.tabular {
  font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   VIBRANT GRADIENT TEXT & HEADINGS
   ========================================================================== */
.text-gradient {
  background: linear-gradient(135deg, #FFFFFF 20%, #FF6584 60%, #00F5D4 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-gradient-crimson {
  background: linear-gradient(135deg, #FF6B8B 0%, #FF1753 50%, #C70039 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 16px rgba(255, 23, 83, 0.35));
}

.text-gradient-mint {
  background: linear-gradient(135deg, #84FFF2 0%, #00F5D4 60%, #00B89F 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 16px rgba(0, 245, 212, 0.35));
}

.text-gradient-violet {
  background: linear-gradient(135deg, #C4B5FD 0%, #A855F7 60%, #6366F1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-gradient-amber {
  background: linear-gradient(135deg, #FDE68A 0%, #FFB703 60%, #FB8500 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ==========================================================================
   TOP EMERGENCY TICKER — VIBRANT NEON MARQUEE
   ========================================================================== */
.emergency-ticker {
  background: linear-gradient(90deg, #180816 0%, #2A0E28 30%, #15092A 70%, #180816 100%);
  border-bottom: 1px solid rgba(255, 23, 83, 0.35);
  font-size: 12.5px;
  font-weight: 600;
  padding: 9px 0;
  overflow: hidden;
  position: relative;
  z-index: 50;
  box-shadow: 0 2px 20px rgba(255, 23, 83, 0.2);
}

.ticker-inner {
  display: flex;
  align-items: center;
  gap: 42px;
  white-space: nowrap;
  animation: tickerSlide 34s linear infinite;
}

.ticker-inner:hover {
  animation-play-state: paused;
}

.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text-ivory);
}

.ticker-item strong {
  color: #fff;
  font-weight: 700;
}

.ticker-badge {
  background: var(--crimson-gradient);
  color: #fff;
  font-size: 10.5px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 6px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  box-shadow: 0 0 12px var(--crimson-glow);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.ticker-badge.mint {
  background: var(--mint-gradient);
  color: #07040D;
  box-shadow: 0 0 12px var(--pulse-mint-glow);
}

.ticker-badge.amber {
  background: var(--amber-gradient);
  color: #07040D;
  box-shadow: 0 0 12px var(--warning-amber-glow);
}

.ticker-badge.violet {
  background: var(--violet-gradient);
  color: #fff;
  box-shadow: 0 0 12px var(--violet-glow);
}

@keyframes tickerSlide {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ==========================================================================
   HEADER & NAVIGATION
   ========================================================================== */
header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(10, 5, 18, 0.82);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

header.scrolled {
  background: rgba(10, 5, 18, 0.95);
  border-bottom: 1px solid rgba(255, 23, 83, 0.4);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.65), 0 0 24px rgba(255, 23, 83, 0.15);
}

nav.wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-white);
  transition: transform 0.25s ease;
}

.logo:hover {
  transform: scale(1.03);
}

.logo-brand-img {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  object-fit: contain;
  box-shadow: 0 0 20px var(--crimson-glow), 0 0 10px var(--pulse-mint-glow);
  transition: box-shadow 0.3s ease;
}

.logo:hover .logo-brand-img {
  box-shadow: 0 0 28px rgba(255, 23, 83, 0.7), 0 0 16px rgba(0, 245, 212, 0.6);
}

.logo span.brand-name {
  font-family: var(--font-display);
  font-size: 30px;
  letter-spacing: 0.04em;
  background: linear-gradient(135deg, #FFFFFF 30%, #FF7096 80%, #00F5D4 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.badge-beta {
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #07040D;
  background: var(--pulse-mint);
  padding: 3px 8px;
  border-radius: 20px;
  box-shadow: 0 0 12px var(--pulse-mint-glow);
  margin-left: 2px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 34px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
}

.nav-links a {
  position: relative;
  padding: 8px 0;
  transition: color 0.25s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-white);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2.5px;
  background: linear-gradient(90deg, var(--crimson) 0%, var(--pulse-mint) 100%);
  border-radius: 3px;
  box-shadow: 0 0 8px var(--crimson-glow);
  transition: width 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* ==========================================================================
   BUTTONS & MICRO-INTERACTIONS
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 13px 26px;
  font-size: 14px;
  font-weight: 700;
  border-radius: 14px;
  letter-spacing: 0.01em;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
  text-align: center;
  user-select: none;
  position: relative;
  overflow: hidden;
}

.btn-sm {
  padding: 8px 18px;
  font-size: 12.5px;
  border-radius: 10px;
}

.btn-lg {
  padding: 16px 34px;
  font-size: 15.5px;
  border-radius: 16px;
}

/* Primary Crimson Button with Light Shimmer */
.btn-primary {
  background: var(--crimson-gradient);
  color: #fff;
  box-shadow: 0 6px 24px var(--crimson-glow);
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    60deg,
    transparent 40%,
    rgba(255, 255, 255, 0.25) 50%,
    transparent 60%
  );
  transform: translateX(-100%);
  transition: transform 0.6s ease;
  pointer-events: none;
}

.btn-primary:hover::before {
  transform: translateX(100%);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 36px rgba(255, 23, 83, 0.65), 0 0 20px rgba(255, 23, 83, 0.4);
}

.btn-primary:active {
  transform: translateY(0);
}

/* Pulse Glowing Button Variant */
.btn-pulse-glow {
  animation: buttonPulse 2.8s infinite;
}

@keyframes buttonPulse {
  0%, 100% { box-shadow: 0 6px 24px var(--crimson-glow); }
  50% { box-shadow: 0 8px 34px rgba(255, 23, 83, 0.8), 0 0 25px rgba(0, 245, 212, 0.4); }
}

/* Outline Glass Button */
.btn-outline {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-white);
  border: 1px solid var(--border-highlight);
  backdrop-filter: blur(10px);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(0, 245, 212, 0.6);
  box-shadow: 0 0 20px var(--pulse-mint-glow);
  transform: translateY(-2px);
  color: #fff;
}

/* Mint Turquoise Button */
.btn-mint {
  background: var(--mint-gradient);
  color: #07040D;
  font-weight: 800;
  box-shadow: 0 6px 22px var(--pulse-mint-glow);
}

.btn-mint:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 32px rgba(0, 245, 212, 0.65);
}

/* Mobile Nav Toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.nav-toggle:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--crimson);
}

.nav-toggle span {
  display: block;
  height: 2.2px;
  width: 22px;
  background: var(--text-white);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.nav-toggle.open span:nth-child(1) { transform: translateY(7.2px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7.2px) rotate(-45deg); }

/* ==========================================================================
   ANIMATED ECG HEARTBEAT MONITOR COMPONENT
   ========================================================================== */
.ecg-monitor-ribbon {
  width: 100%;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  margin: 18px 0 24px;
}

.ecg-svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 0 8px var(--pulse-mint)) drop-shadow(0 0 16px rgba(0, 245, 212, 0.5));
}

.ecg-path {
  fill: none;
  stroke: var(--pulse-mint);
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1200;
  stroke-dashoffset: 1200;
  animation: ecgFlow 3.5s linear infinite;
}

@keyframes ecgFlow {
  0% { stroke-dashoffset: 1200; }
  100% { stroke-dashoffset: 0; }
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero {
  position: relative;
  padding: 80px 0 85px;
  overflow: visible;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 58px;
  align-items: center;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 16px;
  border-radius: 30px;
  background: rgba(255, 23, 83, 0.16);
  border: 1px solid rgba(255, 23, 83, 0.4);
  color: var(--rose);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 22px;
  box-shadow: 0 0 18px rgba(255, 23, 83, 0.2);
}

.hero-tag .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--crimson);
  box-shadow: 0 0 12px var(--crimson);
  animation: pulseBeacon 1.8s infinite;
}

@keyframes pulseBeacon {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.6; }
}

.hero h1 {
  font-size: clamp(48px, 5.5vw, 78px);
  font-family: var(--font-display);
  line-height: 0.95;
  letter-spacing: 0.02em;
  color: var(--text-white);
}

.hero h1 span.highlight {
  display: inline-block;
  background: linear-gradient(135deg, #FFFFFF 20%, #FF5A84 60%, #00F5D4 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 24px rgba(255, 23, 83, 0.35));
}

.hero p.lede {
  margin-top: 22px;
  font-size: 17px;
  color: var(--text-ivory);
  opacity: 0.88;
  max-width: 50ch;
  line-height: 1.7;
}

.hero .cta-row {
  margin-top: 34px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* Hero Showcase Visual with Floating Glass Badges */
.hero-visual-wrap {
  margin-top: 34px;
  position: relative;
  border-radius: 22px;
  padding: 2px;
  background: linear-gradient(135deg, rgba(255, 23, 83, 0.6) 0%, rgba(139, 92, 246, 0.4) 50%, rgba(0, 245, 212, 0.5) 100%);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7), 0 0 35px rgba(255, 23, 83, 0.25);
}

.hero-visual-inner {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  height: 220px;
}

.hero-visual-inner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-visual-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 35%, rgba(7, 4, 13, 0.95) 100%);
}

.hero-visual-footer {
  position: absolute;
  bottom: 14px;
  left: 18px;
  right: 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Floating Micro-Cards */
.floating-hero-badge {
  position: absolute;
  z-index: 10;
  background: rgba(18, 9, 29, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  padding: 10px 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 20px rgba(0, 245, 212, 0.25);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: badgeFloat 5s ease-in-out infinite alternate;
}

.floating-hero-badge.pos-top-right {
  top: -18px;
  right: -20px;
  border-color: rgba(0, 245, 212, 0.5);
  animation-duration: 4.5s;
}

.floating-hero-badge.pos-bottom-left {
  bottom: -18px;
  left: -20px;
  border-color: rgba(255, 23, 83, 0.5);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 20px rgba(255, 23, 83, 0.3);
  animation-duration: 5.5s;
  animation-delay: -2s;
}

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

.badge-icon-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
}

.badge-icon-circle.cyan {
  background: rgba(0, 245, 212, 0.2);
  color: var(--pulse-mint);
  border: 1px solid rgba(0, 245, 212, 0.4);
}

.badge-icon-circle.crimson {
  background: rgba(255, 23, 83, 0.2);
  color: var(--rose);
  border: 1px solid rgba(255, 23, 83, 0.4);
}

.badge-text-primary {
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
}

.badge-text-sub {
  font-size: 10.5px;
  color: var(--text-muted);
}

/* ==========================================================================
   INTERACTIVE BLOOD COMPATIBILITY MATRIX WIDGET (HERO RIGHT)
   ========================================================================== */
.widget-card-glow-wrap {
  position: relative;
  border-radius: 26px;
  padding: 1.5px;
  background: linear-gradient(135deg, rgba(255, 23, 83, 0.6) 0%, rgba(139, 92, 246, 0.4) 50%, rgba(0, 245, 212, 0.5) 100%);
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.7), 0 0 30px rgba(255, 23, 83, 0.2);
}

.widget-card-inner {
  background: var(--bg-panel-solid);
  border-radius: 24px;
  padding: 30px;
  position: relative;
  overflow: hidden;
}

.widget-card-inner::before {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 180px; height: 180px;
  background: radial-gradient(circle, rgba(255, 23, 83, 0.28) 0%, transparent 70%);
  pointer-events: none;
}

.widget-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 22px;
}

.widget-title {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 800;
  color: var(--text-white);
  letter-spacing: -0.01em;
}

.widget-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

.widget-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  background: rgba(0, 245, 212, 0.14);
  border: 1px solid rgba(0, 245, 212, 0.35);
  border-radius: 20px;
  color: var(--pulse-mint);
  font-size: 11.5px;
  font-weight: 700;
  box-shadow: 0 0 12px rgba(0, 245, 212, 0.25);
}

/* Blood Type Chips Grid */
.blood-selector-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 22px;
}

.blood-chip {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 12px 4px;
  text-align: center;
  font-family: var(--font-display);
  font-size: 23px;
  letter-spacing: 0.04em;
  color: var(--text-ivory);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  user-select: none;
}

.blood-chip:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 23, 83, 0.5);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.blood-chip.active {
  background: var(--crimson-gradient);
  border-color: var(--crimson-bright);
  color: #fff;
  box-shadow: 0 6px 24px var(--crimson-glow), 0 0 12px var(--crimson);
  transform: scale(1.05);
}

.blood-chip.is-urgent::after {
  content: '';
  position: absolute;
  top: 5px;
  right: 5px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--pulse-mint);
  box-shadow: 0 0 8px var(--pulse-mint);
}

/* Compatibility Breakdown Panel */
.compatibility-panel {
  background: rgba(14, 7, 23, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  padding: 20px;
  transition: all 0.3s ease;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.4);
}

.compat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  font-size: 13.5px;
}

.compat-row:not(:last-child) {
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.compat-label {
  color: var(--text-muted);
  font-weight: 500;
}

.compat-value {
  font-weight: 700;
  color: var(--text-white);
}

.compat-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.compat-pill {
  font-family: var(--font-display);
  font-size: 15px;
  padding: 3px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-white);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.compat-pill.match {
  background: rgba(0, 245, 212, 0.16);
  color: var(--pulse-mint);
  border: 1px solid rgba(0, 245, 212, 0.4);
  box-shadow: 0 0 10px rgba(0, 245, 212, 0.2);
}

.compat-pill.receive {
  background: rgba(255, 23, 83, 0.16);
  color: var(--rose);
  border: 1px solid rgba(255, 23, 83, 0.4);
}

.widget-cta {
  margin-top: 22px;
}

.widget-cta .btn {
  width: 100%;
}

/* ==========================================================================
   LIVE URGENCY FEED SECTION
   ========================================================================== */
.feed-section {
  padding: 95px 0;
  position: relative;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 40px;
  flex-wrap: wrap;
  gap: 22px;
}

.section-eyebrow {
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--rose);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(36px, 4.2vw, 54px);
  line-height: 1;
  color: var(--text-white);
  letter-spacing: 0.02em;
}

.feed-filters {
  display: flex;
  gap: 8px;
  background: rgba(255, 255, 255, 0.05);
  padding: 5px;
  border-radius: 14px;
  border: 1px solid var(--border-subtle);
}

.filter-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-btn:hover {
  color: var(--text-white);
}

.filter-btn.active {
  background: var(--crimson-gradient);
  color: #fff;
  box-shadow: 0 4px 16px var(--crimson-glow);
}

.feed-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feed-card {
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-subtle);
  border-radius: 24px;
  padding: 28px;
  position: relative;
  overflow: hidden;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.feed-card:hover {
  background: var(--bg-card-hover);
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-highlight);
}

/* Critical Feed Card */
.feed-card.critical {
  border-top: 4px solid var(--crimson);
  background: linear-gradient(180deg, rgba(255, 23, 83, 0.08) 0%, var(--bg-card) 40%);
}

.feed-card.critical:hover {
  box-shadow: 0 16px 45px rgba(255, 23, 83, 0.3);
  border-color: rgba(255, 23, 83, 0.5);
}

/* Low Supply Feed Card */
.feed-card.low {
  border-top: 4px solid var(--warning-amber);
  background: linear-gradient(180deg, rgba(255, 183, 3, 0.08) 0%, var(--bg-card) 40%);
}

.feed-card.low:hover {
  box-shadow: 0 16px 45px rgba(255, 183, 3, 0.28);
  border-color: rgba(255, 183, 3, 0.5);
}

/* Routine Feed Card */
.feed-card.routine {
  border-top: 4px solid var(--pulse-mint);
  background: linear-gradient(180deg, rgba(0, 245, 212, 0.08) 0%, var(--bg-card) 40%);
}

.feed-card.routine:hover {
  box-shadow: 0 16px 45px rgba(0, 245, 212, 0.28);
  border-color: rgba(0, 245, 212, 0.5);
}

.feed-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.badge-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 20px;
}

.badge-status.critical {
  background: rgba(255, 23, 83, 0.18);
  color: var(--rose);
  border: 1px solid rgba(255, 23, 83, 0.4);
  box-shadow: 0 0 12px rgba(255, 23, 83, 0.2);
}

.badge-status.low {
  background: rgba(255, 183, 3, 0.18);
  color: var(--warning-amber);
  border: 1px solid rgba(255, 183, 3, 0.4);
  box-shadow: 0 0 12px rgba(255, 183, 3, 0.2);
}

.badge-status.routine {
  background: rgba(0, 245, 212, 0.18);
  color: var(--pulse-mint);
  border: 1px solid rgba(0, 245, 212, 0.4);
  box-shadow: 0 0 12px rgba(0, 245, 212, 0.2);
}

.blood-type-display {
  font-family: var(--font-display);
  font-size: 46px;
  line-height: 1;
  color: var(--text-white);
  text-shadow: 0 0 25px rgba(255, 255, 255, 0.25);
}

.feed-card-body {
  margin: 20px 0;
}

.feed-title {
  font-size: 19px;
  font-weight: 700;
  color: var(--text-white);
  line-height: 1.3;
}

.feed-location {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 8px;
  font-size: 13.5px;
  color: var(--text-muted);
}

.feed-location svg {
  width: 15px;
  height: 15px;
  stroke: var(--rose);
  flex-shrink: 0;
}

/* Progress bar */
.feed-progress-wrap {
  margin-top: 20px;
}

.feed-progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 12.5px;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 7px;
}

.feed-progress-bar {
  height: 7px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 6px;
  transition: width 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.progress-fill.crimson {
  background: var(--crimson-gradient);
  box-shadow: 0 0 14px var(--crimson-glow);
}

.progress-fill.amber {
  background: var(--amber-gradient);
  box-shadow: 0 0 14px var(--warning-amber-glow);
}

.progress-fill.mint {
  background: var(--mint-gradient);
  box-shadow: 0 0 14px var(--pulse-mint-glow);
}

.feed-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 18px;
  border-top: 1px solid var(--border-subtle);
  margin-top: 10px;
}

.feed-time {
  font-size: 12px;
  color: var(--text-dim);
  font-weight: 600;
}

/* ==========================================================================
   PATH TO IMPACT (HOW IT WORKS)
   ========================================================================== */
.path-section {
  padding: 95px 0;
  position: relative;
}

.path-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 58px;
  align-items: center;
}

.steps-container {
  margin-top: 38px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  position: relative;
}

.step-card {
  display: flex;
  gap: 22px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  padding: 24px;
  transition: all 0.3s ease;
}

.step-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 23, 83, 0.4);
  transform: translateX(8px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

.step-icon-box {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(255, 23, 83, 0.25) 0%, rgba(139, 92, 246, 0.25) 100%);
  border: 1px solid rgba(255, 23, 83, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #fff;
  font-family: var(--font-display);
  font-size: 26px;
  box-shadow: 0 0 20px rgba(255, 23, 83, 0.25);
}

.step-card:nth-child(2) .step-icon-box {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.25) 0%, rgba(0, 245, 212, 0.25) 100%);
  border-color: rgba(0, 245, 212, 0.4);
  color: var(--pulse-mint);
  box-shadow: 0 0 20px rgba(0, 245, 212, 0.25);
}

.step-card:nth-child(3) .step-icon-box {
  background: linear-gradient(135deg, rgba(0, 245, 212, 0.25) 0%, rgba(5, 255, 161, 0.25) 100%);
  border-color: rgba(5, 255, 161, 0.4);
  color: var(--emerald-life);
  box-shadow: 0 0 20px rgba(5, 255, 161, 0.25);
}

.step-info h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-white);
}

.step-info p {
  margin-top: 6px;
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Hero Showcase Card Right */
.showcase-card {
  background: var(--bg-panel);
  border: 1px solid var(--border-highlight);
  border-radius: 28px;
  overflow: hidden;
  box-shadow: var(--shadow-lg), 0 0 60px rgba(255, 23, 83, 0.18), 0 0 40px rgba(0, 245, 212, 0.12);
  position: relative;
}

.showcase-banner {
  height: 230px;
  position: relative;
  overflow: hidden;
}

.showcase-content {
  padding: 34px;
}

.showcase-content h3 {
  font-family: var(--font-display);
  font-size: 32px;
  letter-spacing: 0.02em;
  color: var(--text-white);
}

.showcase-content p {
  margin-top: 12px;
  font-size: 14.5px;
  color: var(--text-muted);
  line-height: 1.6;
}

.showcase-perks {
  margin-top: 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.perk-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13.5px;
  color: var(--text-ivory);
}

.perk-item svg {
  width: 18px;
  height: 18px;
  stroke: var(--pulse-mint);
  flex-shrink: 0;
  filter: drop-shadow(0 0 6px var(--pulse-mint));
}

/* ==========================================================================
   ANNUAL IMPACT STATS
   ========================================================================== */
.stats-section {
  padding: 85px 0 110px;
}

.stats-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 22px;
  margin-top: 40px;
}

.stat-card {
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-subtle);
  border-radius: 24px;
  padding: 36px;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.stat-card:hover {
  background: var(--bg-card-hover);
  transform: translateY(-5px);
  border-color: var(--border-highlight);
  box-shadow: var(--shadow-lg);
}

.stat-card.hero-stat {
  background: linear-gradient(135deg, rgba(46, 18, 48, 0.85) 0%, rgba(22, 10, 32, 0.85) 100%);
  border: 1px solid rgba(255, 23, 83, 0.45);
  box-shadow: 0 12px 45px rgba(255, 23, 83, 0.2);
}

.stat-num {
  font-family: var(--font-display);
  font-size: clamp(52px, 5vw, 74px);
  line-height: 1;
  color: var(--text-white);
}

.stat-label {
  margin-top: 12px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-white);
}

.stat-desc {
  margin-top: 6px;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
footer {
  background: rgba(9, 4, 16, 0.98);
  border-top: 1px solid rgba(255, 23, 83, 0.25);
  padding: 70px 0 42px;
  position: relative;
  z-index: 10;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.5);
}

.footer-top {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 45px;
  margin-bottom: 50px;
}

.footer-brand {
  max-width: 340px;
}

.footer-brand p {
  margin-top: 16px;
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}

.footer-links-grid {
  display: flex;
  gap: 58px;
  flex-wrap: wrap;
}

.footer-col h4 {
  font-family: var(--font-heading);
  font-size: 13.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-white);
  margin-bottom: 18px;
}

.footer-col a {
  display: block;
  font-size: 14px;
  color: var(--text-muted);
  padding: 6px 0;
  transition: color 0.2s ease, transform 0.2s ease;
}

.footer-col a:hover {
  color: var(--rose);
  transform: translateX(4px);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 34px;
  border-top: 1px solid var(--border-subtle);
  font-size: 13px;
  color: var(--text-dim);
  flex-wrap: wrap;
  gap: 18px;
}

/* ==========================================================================
   FORM & INNER PAGES STYLING (Request, Find, Login, Hospitals, Dashboard)
   ========================================================================== */
.inner-hero {
  padding: 65px 0 45px;
  text-align: center;
}

.inner-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(40px, 4.8vw, 60px);
  letter-spacing: 0.02em;
  color: var(--text-white);
}

.inner-hero p {
  margin: 14px auto 0;
  font-size: 16px;
  color: var(--text-muted);
  max-width: 58ch;
  line-height: 1.6;
}

.glass-form-card {
  max-width: 720px;
  margin: 0 auto;
  background: var(--bg-panel);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-highlight);
  border-radius: 28px;
  padding: 44px;
  box-shadow: var(--shadow-lg), 0 0 50px rgba(255, 23, 83, 0.15);
  position: relative;
  overflow: hidden;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 22px;
}

.form-group {
  margin-top: 22px;
}

.form-group:first-child {
  margin-top: 0;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-ivory);
  margin-bottom: 8px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 14px 18px;
  background: rgba(14, 7, 24, 0.75);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text-white);
  transition: all 0.25s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--crimson);
  box-shadow: 0 0 20px var(--crimson-glow);
  background: rgba(22, 11, 36, 0.95);
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

/* Urgency Selector Radio Chips */
.urgency-chips {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.urgency-chip {
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.05);
  border-radius: 14px;
  padding: 16px 12px;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s ease;
  user-select: none;
}

.urgency-chip:hover {
  background: rgba(255, 255, 255, 0.09);
  transform: translateY(-2px);
}

.urgency-chip input {
  display: none;
}

.urgency-chip .chip-title {
  font-weight: 800;
  font-size: 13.5px;
  display: block;
}

.urgency-chip .chip-sub {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 3px;
  display: block;
}

.urgency-chip.selected-critical {
  background: rgba(255, 23, 83, 0.22);
  border-color: var(--crimson);
  color: var(--rose);
  box-shadow: 0 0 20px var(--crimson-glow);
}

.urgency-chip.selected-moderate {
  background: rgba(255, 183, 3, 0.22);
  border-color: var(--warning-amber);
  color: var(--warning-amber);
  box-shadow: 0 0 20px var(--warning-amber-glow);
}

.urgency-chip.selected-routine {
  background: rgba(0, 245, 212, 0.22);
  border-color: var(--pulse-mint);
  color: var(--pulse-mint);
  box-shadow: 0 0 20px var(--pulse-mint-glow);
}

/* Modal Popup */
.modal-backdrop {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-box {
  background: var(--bg-panel-solid);
  border: 1px solid var(--border-highlight);
  border-radius: 28px;
  padding: 40px;
  max-width: 500px;
  width: 100%;
  box-shadow: var(--shadow-lg), 0 0 60px var(--crimson-glow);
  transform: scale(0.95);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.modal-backdrop.open .modal-box {
  transform: scale(1);
}

.modal-close {
  position: absolute;
  top: 22px;
  right: 22px;
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: var(--text-muted);
  font-size: 22px;
  cursor: pointer;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.modal-close:hover {
  background: rgba(255, 23, 83, 0.25);
  color: #fff;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.toast {
  background: rgba(24, 11, 38, 0.96);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 23, 83, 0.4);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.6), 0 0 24px rgba(255, 23, 83, 0.25);
  color: #fff;
  padding: 16px 22px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 12px;
  animation: toastIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes toastIn {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* ==========================================================================
   RESPONSIVE QUERIES
   ========================================================================== */
@media (max-width: 992px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 45px;
  }
  
  .feed-grid {
    grid-template-columns: 1fr;
  }

  .path-grid {
    grid-template-columns: 1fr;
    gap: 45px;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .nav-links {
    position: absolute;
    top: 80px;
    left: 0;
    right: 0;
    background: rgba(12, 5, 22, 0.98);
    backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--border-subtle);
    flex-direction: column;
    align-items: stretch;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .nav-links.open {
    max-height: 440px;
    padding: 18px 28px 28px;
  }

  .nav-links a {
    padding: 14px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }

  .nav-toggle {
    display: flex;
  }

  .desktop-only {
    display: none !important;
  }
}

@media (max-width: 640px) {
  .wrap {
    padding: 0 20px;
  }

  .hero h1 {
    font-size: 46px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .blood-selector-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .urgency-chips {
    grid-template-columns: 1fr;
  }

  .glass-form-card {
    padding: 26px 22px;
  }

  .floating-hero-badge {
    display: none;
  }
}
