/* ===========================
   BLOOD DONATION APP - CSS
   قطرة دم - التنسيقات
=========================== */

/* === ROOT & VARIABLES === */
:root {
  --red-900: #4a0000;
  --red-800: #6b0000;
  --red-700: #8b0000;
  --red-600: #b20000;
  --red-500: #dc143c;
  --red-400: #e83558;
  --red-300: #f06080;
  --red-200: #f9a0b0;
  --red-100: #fde8ec;

  --dark-950: #0a0a0f;
  --dark-900: #0f0f18;
  --dark-800: #161625;
  --dark-700: #1e1e35;
  --dark-600: #272744;
  --dark-500: #333360;

  --glass-bg: rgba(255, 255, 255, 0.04);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-bg-hover: rgba(255, 255, 255, 0.08);

  --text-primary: #f0f0f8;
  --text-secondary: #a0a0c0;
  --text-muted: #666688;

  --accent: #dc143c;
  --accent-glow: rgba(220, 20, 60, 0.4);

  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --radius-full: 9999px;

  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.4);
  --shadow-red: 0 8px 32px rgba(220, 20, 60, 0.3);
  --shadow-red-lg: 0 16px 64px rgba(220, 20, 60, 0.4);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Cairo', 'Tajawal', sans-serif;
  background-color: var(--dark-950);
  color: var(--text-primary);
  
  text-align: start;
  line-height: 1.7;
  overflow-x: hidden;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--dark-900); }
::-webkit-scrollbar-thumb { background: var(--red-700); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--red-500); }

/* === CONTAINER === */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* === NAVBAR === */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 0;
  transition: all var(--transition);
  background: transparent;
}

.navbar.scrolled {
  background: rgba(10, 10, 15, 0.92);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  cursor: pointer;
}

.logo-drop {
  font-size: 28px;
  animation: dropFloat 3s ease-in-out infinite;
}

@keyframes dropFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

.logo-text {
  font-family: 'Cairo', sans-serif;
  font-size: 22px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

.logo-accent {
  color: var(--red-500);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}

.nav-link {
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 15px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  transition: all var(--transition);
  position: relative;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text-primary);
  background: var(--glass-bg-hover);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--red-500);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-request,
.btn-donate {
  padding: 10px 18px;
  border-radius: var(--radius-full);
  font-family: 'Cairo', sans-serif;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
}

.btn-request {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-secondary);
}

.btn-request:hover {
  background: rgba(220, 20, 60, 0.15);
  border-color: var(--red-500);
  color: var(--red-400);
  transform: translateY(-1px);
}

.btn-donate {
  background: linear-gradient(135deg, var(--red-600), var(--red-500));
  color: white;
  box-shadow: var(--shadow-red);
}

.btn-donate:hover {
  background: linear-gradient(135deg, var(--red-500), var(--red-400));
  transform: translateY(-2px);
  box-shadow: var(--shadow-red-lg);
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.hamburger span {
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all var(--transition);
}

/* === HERO === */
.hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding: 120px 60px 80px;
  gap: 40px;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 30% 50%, rgba(139, 0, 0, 0.25) 0%, transparent 60%),
              radial-gradient(ellipse at 70% 20%, rgba(220, 20, 60, 0.12) 0%, transparent 50%),
              linear-gradient(135deg, var(--dark-950) 0%, var(--dark-900) 100%);
  z-index: 0;
}

.hero-particles {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.particle {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(220, 20, 60, 0.6), transparent);
  animation: particleFloat linear infinite;
}

@keyframes particleFloat {
  0% { transform: translateY(100vh) rotate(0deg); opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 0.6; }
  100% { transform: translateY(-100px) rotate(360deg); opacity: 0; }
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(220, 20, 60, 0.1);
  border: 1px solid rgba(220, 20, 60, 0.3);
  padding: 8px 18px;
  border-radius: var(--radius-full);
  font-size: 14px;
  font-weight: 600;
  color: var(--red-300);
  margin-bottom: 24px;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background: var(--red-500);
  border-radius: 50%;
  animation: pulseDot 1.5s ease-in-out infinite;
}

@keyframes pulseDot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.5); opacity: 0.5; }
}

.hero-title {
  font-size: clamp(40px, 5vw, 64px);
  font-weight: 900;
  line-height: 1.25;
  color: var(--text-primary);
  margin-bottom: 20px;
  letter-spacing: -1px;
}

.gradient-text {
  background: linear-gradient(135deg, var(--red-400), var(--red-500), #ff6b6b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 18px;
  color: var(--text-secondary);
  margin-bottom: 36px;
  line-height: 1.8;
}

.hero-subtitle strong {
  color: var(--red-400);
}

.hero-buttons {
  display: flex;
  gap: 14px;
  margin-bottom: 50px;
  flex-wrap: wrap;
}

.btn-primary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 28px;
  background: linear-gradient(135deg, var(--red-600), var(--red-500));
  color: white;
  border: none;
  border-radius: var(--radius-full);
  font-family: 'Cairo', sans-serif;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: var(--shadow-red);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-red-lg);
  background: linear-gradient(135deg, var(--red-500), var(--red-400));
}

.btn-secondary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 28px;
  background: var(--glass-bg);
  color: var(--text-primary);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-full);
  font-family: 'Cairo', sans-serif;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
  backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  background: var(--glass-bg-hover);
  border-color: rgba(220, 20, 60, 0.4);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.hero-stats {
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 20px 30px;
  backdrop-filter: blur(10px);
  width: fit-content;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 24px;
}

.stat-number {
  font-size: 32px;
  font-weight: 900;
  color: var(--red-400);
  line-height: 1;
}

.stat-label {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
  font-weight: 600;
}

.stat-divider {
  width: 1px;
  height: 40px;
  background: var(--glass-border);
}

/* === HERO VISUAL === */
.hero-visual {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.drop-container {
  position: relative;
  width: 340px;
  max-width: 100%;
  height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.blood-drop {
  position: relative;
  width: 200px;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.drop-inner {
  width: 160px;
  height: 160px;
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  background: radial-gradient(ellipse at 40% 35%, rgba(220, 60, 60, 0.9), rgba(139, 0, 0, 0.95));
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 20px 60px rgba(220, 20, 60, 0.5), inset 0 -10px 30px rgba(0, 0, 0, 0.3);
  animation: dropBreath 4s ease-in-out infinite;
}

@keyframes dropBreath {
  0%, 100% { transform: scale(1); box-shadow: 0 20px 60px rgba(220, 20, 60, 0.5), inset 0 -10px 30px rgba(0, 0, 0, 0.3); }
  50% { transform: scale(1.05); box-shadow: 0 30px 80px rgba(220, 20, 60, 0.7), inset 0 -10px 30px rgba(0, 0, 0, 0.3); }
}

.drop-icon {
  font-size: 60px;
  animation: dropBreath 4s ease-in-out infinite;
}

.drop-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(220, 20, 60, 0.4);
  animation: ringExpand 3s ease-out infinite;
}

.ring-1 { width: 200px; height: 200px; animation-delay: 0s; }
.ring-2 { width: 260px; height: 260px; animation-delay: 1s; }
.ring-3 { width: 320px; height: 320px; animation-delay: 2s; }

@keyframes ringExpand {
  0% { opacity: 0.8; transform: scale(0.8); }
  100% { opacity: 0; transform: scale(1.2); }
}

.floating-badges {
  position: absolute;
  inset: 0;
}

.float-badge {
  position: absolute;
  padding: 10px 16px;
  border-radius: var(--radius-full);
  font-size: 16px;
  font-weight: 900;
  color: white;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  animation: badgeFloat ease-in-out infinite;
}

.badge-a-pos { top: 20px; right: 20px; background: rgba(220, 20, 60, 0.7); animation-duration: 3s; animation-delay: 0s; }
.badge-b-neg { top: 20px; left: 20px; background: rgba(139, 0, 0, 0.7); animation-duration: 4s; animation-delay: 0.5s; }
.badge-o-pos { bottom: 60px; right: 30px; background: rgba(176, 0, 32, 0.7); animation-duration: 3.5s; animation-delay: 1s; }
.badge-ab    { bottom: 60px; left: 30px; background: rgba(100, 0, 20, 0.7); animation-duration: 4.5s; animation-delay: 1.5s; }

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

/* === HERO SCROLL === */
.hero-scroll {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 13px;
  z-index: 1;
}

.scroll-arrow {
  width: 20px;
  height: 20px;
  border-right: 2px solid var(--text-muted);
  border-bottom: 2px solid var(--text-muted);
  transform: rotate(45deg);
  animation: arrowBounce 1.5s ease-in-out infinite;
}

@keyframes arrowBounce {
  0%, 100% { transform: rotate(45deg) translateY(0); }
  50% { transform: rotate(45deg) translateY(4px); }
}

/* === SECTION COMMON === */
section {
  padding: 100px 0;
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-tag {
  display: inline-block;
  background: rgba(220, 20, 60, 0.1);
  border: 1px solid rgba(220, 20, 60, 0.3);
  color: var(--red-400);
  padding: 6px 16px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 14px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.section-title {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 900;
  color: var(--text-primary);
  margin-bottom: 14px;
  letter-spacing: -0.5px;
}

.section-desc {
  font-size: 17px;
  color: var(--text-secondary);
  max-width: 520px;
  margin: 0 auto;
}

/* === HOW IT WORKS === */
.how-it-works {
  background: linear-gradient(180deg, var(--dark-950) 0%, var(--dark-900) 50%, var(--dark-950) 100%);
}

.steps-grid {
  display: flex;
  align-items: center;
  gap: 0;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
}

.step-card {
  flex: 1;
  min-width: 200px;
  max-width: 240px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  text-align: center;
  position: relative;
  transition: all var(--transition);
  overflow: hidden;
}

.step-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(220, 20, 60, 0.08), transparent 70%);
  opacity: 0;
  transition: all var(--transition);
}

.step-card:hover::before { opacity: 1; }
.step-card:hover {
  transform: translateY(-8px);
  border-color: rgba(220, 20, 60, 0.3);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4), 0 0 30px rgba(220, 20, 60, 0.1);
}

.step-icon-wrap {
  width: 70px;
  height: 70px;
  background: linear-gradient(135deg, rgba(220, 20, 60, 0.2), rgba(139, 0, 0, 0.2));
  border: 1px solid rgba(220, 20, 60, 0.3);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

.step-icon { font-size: 30px; }

.step-number {
  font-size: 48px;
  font-weight: 900;
  color: rgba(220, 20, 60, 0.12);
  line-height: 1;
  position: absolute;
  top: 12px;
  left: 16px;
  font-family: 'Cairo', sans-serif;
}

.step-card h3 {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 10px;
  color: var(--text-primary);
}

.step-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.step-connector {
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, rgba(220, 20, 60, 0.4), rgba(220, 20, 60, 0.1));
  flex-shrink: 0;
}

/* === BLOOD TYPES === */
.blood-types {
  background: var(--dark-950);
}

.blood-types-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.blood-type-card {
  background: var(--glass-bg);
  border: 2px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 28px 20px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.blood-type-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--red-700), var(--red-500));
  transform: scaleX(0);
  transition: transform var(--transition);
}

.blood-type-card:hover::after,
.blood-type-card.active::after { transform: scaleX(1); }

.blood-type-card:hover,
.blood-type-card.active {
  border-color: rgba(220, 20, 60, 0.5);
  transform: translateY(-6px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3), 0 0 30px rgba(220, 20, 60, 0.15);
  background: rgba(220, 20, 60, 0.06);
}

.blood-type-badge {
  font-size: 36px;
  font-weight: 900;
  color: var(--red-400);
  line-height: 1;
  margin-bottom: 8px;
  font-family: 'Cairo', sans-serif;
}

.blood-type-name {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 600;
  margin-bottom: 12px;
}

.blood-type-count {
  display: inline-block;
  background: rgba(220, 20, 60, 0.15);
  border: 1px solid rgba(220, 20, 60, 0.3);
  color: var(--red-300);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
}

.blood-type-compat {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 8px;
}

/* === DONORS === */
.donors-section {
  background: linear-gradient(180deg, var(--dark-950) 0%, var(--dark-800) 50%, var(--dark-950) 100%);
}

.filters-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 40px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  flex-wrap: wrap;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 180px;
}

.filter-group label {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-secondary);
  white-space: nowrap;
}

.filter-group select,
.search-group input {
  flex: 1;
  background: var(--dark-700);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: var(--text-primary);
  font-family: 'Cairo', sans-serif;
  font-size: 14px;
  outline: none;
  transition: all var(--transition);
  
}

.filter-group select:focus,
.search-group input:focus {
  border-color: var(--red-600);
  box-shadow: 0 0 0 3px rgba(220, 20, 60, 0.1);
}

.search-group {
  flex: 2;
  min-width: 250px;
}

.search-group input {
  width: 100%;
}

.donors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.donor-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.donor-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--red-700), var(--red-500));
}

.donor-card:hover {
  transform: translateY(-6px);
  border-color: rgba(220, 20, 60, 0.3);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4), 0 0 20px rgba(220, 20, 60, 0.1);
  background: rgba(220, 20, 60, 0.04);
}

.donor-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.donor-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--red-800), var(--red-600));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
  border: 2px solid rgba(220, 20, 60, 0.4);
}

.donor-info h3 {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 3px;
}

.donor-info .donor-city {
  font-size: 13px;
  color: var(--text-muted);
}

.donor-blood-badge {
  margin-inline-start: auto;
  font-size: 22px;
  font-weight: 900;
  color: var(--red-400);
  background: rgba(220, 20, 60, 0.1);
  border: 2px solid rgba(220, 20, 60, 0.3);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.donor-details {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.donor-tag {
  background: var(--dark-700);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-full);
  padding: 4px 12px;
  font-size: 12px;
  color: var(--text-secondary);
}

.donor-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 8px #22c55e;
  animation: pulseDot 1.5s infinite;
}

.status-dot.unavailable {
  background: var(--text-muted);
  box-shadow: none;
  animation: none;
}

.status-text { color: #22c55e; }
.status-text.unavailable { color: var(--text-muted); }

.donor-contact-btn {
  width: 100%;
  padding: 10px;
  margin-top: 14px;
  background: linear-gradient(135deg, rgba(220, 20, 60, 0.15), rgba(139, 0, 0, 0.15));
  border: 1px solid rgba(220, 20, 60, 0.3);
  border-radius: var(--radius-sm);
  color: var(--red-300);
  font-family: 'Cairo', sans-serif;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
}

.donor-contact-btn:hover {
  background: linear-gradient(135deg, rgba(220, 20, 60, 0.3), rgba(139, 0, 0, 0.3));
  border-color: rgba(220, 20, 60, 0.5);
  color: var(--red-200);
}

.no-results {
  text-align: center;
  padding: 60px;
  color: var(--text-muted);
  font-size: 18px;
  grid-column: 1 / -1;
}

.no-results span { font-size: 48px; display: block; margin-bottom: 12px; }

/* === EMERGENCY BANNER === */
.emergency-banner {
  padding: 0;
  background: linear-gradient(135deg, var(--red-900), var(--red-800));
  border-top: 1px solid rgba(220, 20, 60, 0.3);
  border-bottom: 1px solid rgba(220, 20, 60, 0.3);
}

.emergency-content {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 40px 24px;
  flex-wrap: wrap;
}

.emergency-icon {
  font-size: 48px;
  animation: emergencyPulse 1s ease-in-out infinite;
}

@keyframes emergencyPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

.emergency-text { flex: 1; min-width: 200px; }
.emergency-text h3 { font-size: 24px; font-weight: 900; margin-bottom: 6px; }
.emergency-text p { font-size: 15px; color: rgba(255, 255, 255, 0.8); }

.btn-emergency {
  padding: 16px 32px;
  background: white;
  color: var(--red-700);
  border: none;
  border-radius: var(--radius-full);
  font-family: 'Cairo', sans-serif;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn-emergency:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* === FAQ === */
.faq-section { background: var(--dark-950); }

.faq-list {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all var(--transition);
}

.faq-item.open {
  border-color: rgba(220, 20, 60, 0.3);
  box-shadow: 0 8px 30px rgba(220, 20, 60, 0.1);
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  gap: 16px;
  user-select: none;
}

.faq-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(220, 20, 60, 0.1);
  border: 1px solid rgba(220, 20, 60, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--red-400);
  font-size: 16px;
  transition: all var(--transition);
  flex-shrink: 0;
}

.faq-item.open .faq-icon { transform: rotate(45deg); background: rgba(220, 20, 60, 0.2); }

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-item.open .faq-answer { max-height: 300px; }

.faq-answer p {
  padding: 0 24px 20px;
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.7;
  border-top: 1px solid var(--glass-border);
  padding-top: 16px;
}

/* === FOOTER === */
.footer {
  background: var(--dark-900);
  border-top: 1px solid var(--glass-border);
  padding: 60px 0 0;
}

.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 40px;
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 14px;
  margin-top: 14px;
  max-width: 300px;
  line-height: 1.7;
}

.footer-links h4,
.footer-contact h4 {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.footer-links ul { list-style: none; }
.footer-links ul li { margin-bottom: 10px; }
.footer-links ul li a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 14px;
  transition: color var(--transition);
}
.footer-links ul li a:hover { color: var(--red-400); }

.footer-contact p {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 8px;
}

.social-links {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.social-btn {
  width: 38px;
  height: 38px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 16px;
  font-weight: 700;
  transition: all var(--transition);
}

.social-btn:hover {
  background: rgba(220, 20, 60, 0.15);
  border-color: rgba(220, 20, 60, 0.4);
  color: var(--red-400);
  transform: translateY(-2px);
}

.footer-bottom {
  border-top: 1px solid var(--glass-border);
  padding: 20px 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}

/* === MODALS === */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal-box {
  background: var(--dark-800);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  padding: 36px;
  width: 100%;
  max-width: 580px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  transform: translateY(30px) scale(0.95);
  transition: all var(--transition);
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.6);
}

.modal-overlay.open .modal-box {
  transform: translateY(0) scale(1);
}

.modal-small { max-width: 420px; }

.modal-close {
  position: absolute;
  top: 16px;
  left: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-secondary);
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.modal-close:hover {
  background: rgba(220, 20, 60, 0.1);
  border-color: rgba(220, 20, 60, 0.3);
  color: var(--red-400);
}

.modal-header {
  text-align: center;
  margin-bottom: 28px;
}

.modal-icon { font-size: 48px; margin-bottom: 12px; }
.modal-header h2 { font-size: 26px; font-weight: 900; color: var(--text-primary); margin-bottom: 8px; }
.modal-header p { font-size: 15px; color: var(--text-secondary); }

/* === FORMS === */
.modal-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-secondary);
}

.form-group input,
.form-group select,
.form-group textarea {
  background: var(--dark-700);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  color: var(--text-primary);
  font-family: 'Cairo', sans-serif;
  font-size: 16px;
  outline: none;
  transition: all var(--transition);
  
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--red-600);
  box-shadow: 0 0 0 3px rgba(220, 20, 60, 0.1);
  background: var(--dark-600);
}

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

.form-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
}

.form-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--red-500);
  cursor: pointer;
  flex-shrink: 0;
}

.form-checkbox label {
  font-size: 14px;
  color: var(--text-secondary);
  cursor: pointer;
  line-height: 1.5;
}

.btn-submit {
  padding: 15px;
  background: linear-gradient(135deg, var(--red-600), var(--red-500));
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-family: 'Cairo', sans-serif;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: var(--shadow-red);
  margin-top: 8px;
}

.btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-red-lg);
  background: linear-gradient(135deg, var(--red-500), var(--red-400));
}

.btn-request-submit {
  background: linear-gradient(135deg, #7c3aed, #6d28d9);
  box-shadow: 0 8px 32px rgba(109, 40, 217, 0.3);
}

.btn-request-submit:hover {
  background: linear-gradient(135deg, #6d28d9, #5b21b6);
  box-shadow: 0 16px 48px rgba(109, 40, 217, 0.4);
}

/* === TOAST === */
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--dark-700);
  border: 1px solid rgba(34, 197, 94, 0.4);
  border-radius: var(--radius-full);
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  z-index: 3000;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  white-space: nowrap;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
}

.toast-icon { font-size: 20px; }

/* === RESPONSIVE === */
@media (max-width: 1024px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 120px 30px 80px;
  }
  .hero-visual { display: none; }
  .hero-stats { margin: 0 auto; }
  .hero-buttons { justify-content: center; }
  .blood-types-grid { grid-template-columns: repeat(4, 1fr); }
  .footer-content { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: var(--dark-800);
    border-bottom: 1px solid var(--glass-border);
    padding: 16px;
    gap: 4px;
    z-index: 999;
  }
  .hamburger { display: flex; }
  .btn-request { display: none; }
  .blood-types-grid { grid-template-columns: repeat(2, 1fr); }
  .form-row { grid-template-columns: 1fr; }
  .steps-grid { flex-direction: column; align-items: center; }
  .step-connector { width: 2px; height: 30px; background: linear-gradient(180deg, rgba(220, 20, 60, 0.4), rgba(220, 20, 60, 0.1)); }
  .footer-content { grid-template-columns: 1fr; }
  .emergency-content { text-align: center; flex-direction: column; }
  .filters-bar { flex-direction: column; }
  .hero-stats { flex-direction: column; gap: 16px; }
  .stat-divider { width: 60px; height: 1px; }
}

/* === SCROLL ANIMATIONS === */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered reveal for children */
.reveal-stagger > * {
  opacity: 0;
  transform: translateY(25px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal-stagger.visible > *:nth-child(1) { opacity: 1; transform: none; transition-delay: 0.1s; }
.reveal-stagger.visible > *:nth-child(2) { opacity: 1; transform: none; transition-delay: 0.2s; }
.reveal-stagger.visible > *:nth-child(3) { opacity: 1; transform: none; transition-delay: 0.3s; }
.reveal-stagger.visible > *:nth-child(4) { opacity: 1; transform: none; transition-delay: 0.4s; }
.reveal-stagger.visible > *:nth-child(5) { opacity: 1; transform: none; transition-delay: 0.5s; }
.reveal-stagger.visible > *:nth-child(6) { opacity: 1; transform: none; transition-delay: 0.6s; }

/* === DONOR DETAIL CONTENT === */
.donor-detail-wrap {
  text-align: center;
  padding: 10px 0;
}

.donor-detail-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--red-800), var(--red-600));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  margin: 0 auto 16px;
  border: 3px solid rgba(220, 20, 60, 0.5);
}

.donor-detail-blood {
  font-size: 48px;
  font-weight: 900;
  color: var(--red-400);
  line-height: 1;
  margin-bottom: 8px;
}

.donor-detail-name {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 4px;
}

.donor-detail-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 20px 0;
  text-align: start;
}

.donor-detail-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--dark-700);
  border-radius: var(--radius-sm);
  font-size: 14px;
}

.donor-detail-row span:first-child { color: var(--text-muted); }
.donor-detail-row span:last-child { color: var(--text-primary); font-weight: 700; }

.call-btn {
  width: 100%;
  padding: 14px;
  margin-top: 10px;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-family: 'Cairo', sans-serif;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  transition: all var(--transition);
}

.call-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(34, 197, 94, 0.4);
}

/* === REQUESTS BOARD === */
.requests-section {
  background: var(--dark-950);
}

.requests-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

.request-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  position: relative;
  overflow: hidden;
  transition: all var(--transition);
}

.request-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.4);
}

.request-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.request-blood-badge {
  background: rgba(220, 20, 60, 0.15);
  border: 1px solid rgba(220, 20, 60, 0.3);
  color: var(--red-400);
  font-size: 20px;
  font-weight: 900;
  padding: 6px 14px;
  border-radius: var(--radius-md);
  font-family: 'Cairo', sans-serif;
}

.request-urgency-badge {
  font-size: 13px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

/* Urgency Visuals */
.urgency-critical {
  border-color: rgba(220, 20, 60, 0.6);
  animation: pulseBorderRed 2s infinite;
}
.req-badge-urgency-critical {
  background: rgba(220, 20, 60, 0.15);
  color: #ef4444;
}
@keyframes pulseBorderRed {
  0% { box-shadow: 0 0 0 0 rgba(220, 20, 60, 0.4); }
  70% { box-shadow: 0 0 0 10px rgba(220, 20, 60, 0); }
  100% { box-shadow: 0 0 0 0 rgba(220, 20, 60, 0); }
}

.urgency-medium {
  border-color: rgba(234, 179, 8, 0.4);
}
.req-badge-urgency-medium {
  background: rgba(234, 179, 8, 0.15);
  color: #eab308;
}

.urgency-low {
  border-color: rgba(34, 197, 94, 0.4);
}
.req-badge-urgency-low {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
}

.request-body {
  margin-bottom: 20px;
}

.request-patient {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.request-meta {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px dashed var(--glass-border);
}
.request-meta:last-of-type {
  border-bottom: none;
}

.request-notes {
  background: var(--dark-700);
  padding: 10px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text-muted);
  font-style: italic;
  margin-top: 10px;
}

.request-call-btn {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, var(--red-600), var(--red-500));
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-family: 'Cairo', sans-serif;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  transition: all var(--transition);
}

.request-call-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-red);
}

/* === TOOLTIPS === */
.tooltip {
  position: relative;
}
.tooltip::after {
  content: attr(data-tip);
  position: absolute;
  bottom: 120%;
  left: 50%;
  transform: translateX(-50%) scale(0.8);
  background: var(--dark-700);
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.tooltip:hover::after {
  opacity: 1;
  transform: translateX(-50%) scale(1);
}

/* === COMPATIBILITY BADGE === */
.compat-badge {
  font-size: 11px;
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
  padding: 2px 8px;
  border-radius: 10px;
  margin-inline-start: 8px;
  vertical-align: middle;
}

@media (max-width: 480px) {
  .nav-container { padding: 12px 16px; gap: 8px; }
  .logo-text { font-size: 18px; }
  .logo-drop { font-size: 22px; }
  .btn-donate { padding: 6px 12px; font-size: 13px; }
  .hamburger { gap: 4px; }
  .hamburger span { width: 20px; }
  
  .hero { padding: 100px 16px 60px; }
  .hero-title { font-size: 32px; }
  .hero-buttons { flex-direction: column; width: 100%; gap: 10px; }
  .btn-primary, .btn-secondary { width: 100%; justify-content: center; }
  
  .hero-stats { width: 100%; padding: 16px; }
  .stat-number { font-size: 24px; }
  .stat-item { padding: 0 12px; }
  .blood-types-grid { grid-template-columns: 1fr; }
  .modal-box { padding: 20px 16px; margin: 10px; width: auto; }
}


/* Scroll Offset for Navbar */
section { scroll-margin-top: 90px; }
#home { scroll-margin-top: 0; }

/* Safety fallback for reveal */
.reveal { transition: opacity 0.7s ease, transform 0.7s ease; }
.blood-type-card.reveal, .donor-card.reveal { opacity: 1 !important; transform: none !important; }

/* Safety override: functional cards are always visible immediately */
.blood-type-card.reveal, .donor-card.reveal, .request-card.reveal, .faq-item.reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
