/* ===== HOME PAGE STYLES ===== */

/* ===== HERO ===== */
.hero-section {
  min-height: 100vh;
  background: var(--gradient-hero);
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding-top: 70px;
}

.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.18;
}

.glow-1 {
  width: 500px;
  height: 500px;
  background: var(--red-primary);
  top: -100px;
  right: -100px;
}

.glow-2 {
  width: 300px;
  height: 300px;
  background: #FF6B35;
  bottom: 50px;
  left: -80px;
}

.glow-3 {
  width: 200px;
  height: 200px;
  background: var(--red-light);
  top: 40%;
  left: 40%;
}

.hero-container {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 60px;
  align-items: center;
  padding: 80px 20px;
}

.hero-content {
  animation: fadeInUp 0.8s ease forwards;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(232,32,58,0.15);
  border: 1px solid rgba(232,32,58,0.3);
  border-radius: var(--radius-full);
  padding: 6px 16px;
  color: var(--red-light);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 24px;
}

.live-dot {
  width: 8px;
  height: 8px;
  background: var(--red-light);
  border-radius: 50%;
  animation: blink 1.5s infinite;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(40px, 6vw, 72px);
  font-weight: 900;
  color: white;
  line-height: 1.08;
  margin-bottom: 24px;
  letter-spacing: -1px;
}

.hero-title-highlight {
  background: var(--gradient-red);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-desc {
  font-size: 18px;
  color: rgba(255,255,255,0.65);
  max-width: 520px;
  line-height: 1.75;
  margin-bottom: 36px;
}

.hero-cta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}

.hero-trust {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: rgba(255,255,255,0.55);
}

.trust-icon {
  width: 18px;
  height: 18px;
  background: rgba(232,32,58,0.25);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: var(--red-light);
  flex-shrink: 0;
}

/* Hero Visual */
.hero-visual {
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: fadeInUp 0.8s 0.2s ease both;
}

.hero-card-float {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-xl);
  padding: 24px;
  backdrop-filter: blur(12px);
}

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

.hcf-info {
  flex: 1;
}

.hcf-info strong {
  display: block;
  color: white;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 2px;
}

.hcf-info span {
  color: rgba(255,255,255,0.5);
  font-size: 13px;
}

.hcf-meta {
  display: flex;
  gap: 16px;
  font-size: 13px;
  color: rgba(255,255,255,0.5);
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.hero-stats-float {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 24px;
  backdrop-filter: blur(12px);
}

.hsf-item {
  flex: 1;
  text-align: center;
}

.hsf-item strong {
  display: block;
  font-size: 28px;
  font-weight: 800;
  background: var(--gradient-red);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-family: var(--font-heading);
}

.hsf-item span {
  font-size: 12px;
  color: rgba(255,255,255,0.5);
  font-weight: 500;
}

.hsf-divider {
  width: 1px;
  height: 40px;
  background: rgba(255,255,255,0.1);
}

/* Scroll Hint */
.scroll-hint {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
}

.scroll-arrow {
  width: 24px;
  height: 24px;
  border-right: 2px solid rgba(255,255,255,0.3);
  border-bottom: 2px solid rgba(255,255,255,0.3);
  transform: rotate(45deg);
  animation: bounce 2s infinite;
}

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

/* ===== SEARCH SECTION ===== */
.search-section {
  padding: 0;
  margin-top: -40px;
  position: relative;
  z-index: 10;
}

.search-card {
  background: white;
  border-radius: var(--radius-xl);
  padding: 40px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.12);
}

.search-header {
  margin-bottom: 28px;
}

.search-title {
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 4px;
}

.search-title span {
  background: var(--gradient-red);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.search-header p {
  color: var(--gray-600);
  font-size: 14px;
}

.search-form {
  margin-bottom: 20px;
}

.search-fields {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr auto;
  gap: 16px;
  align-items: end;
}

.search-select {
  height: 50px;
}

.search-field-check {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-bottom: 4px;
}

.custom-check {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 14px;
  color: var(--gray-700);
  user-select: none;
}

.custom-check input {
  display: none;
}

.checkmark {
  width: 18px;
  height: 18px;
  border: 2px solid var(--gray-300);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  flex-shrink: 0;
}

.custom-check input:checked + .checkmark {
  background: var(--red-primary);
  border-color: var(--red-primary);
}

.custom-check input:checked + .checkmark::after {
  content: '✓';
  color: white;
  font-size: 11px;
  font-weight: 700;
}

.search-btn {
  height: 50px;
  padding: 0 28px;
  white-space: nowrap;
  border-radius: var(--radius-md);
}

/* Quick Blood Groups */
.quick-groups {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 16px;
  border-top: 1px solid var(--gray-100);
}

.quick-label {
  font-size: 13px;
  color: var(--gray-500);
  font-weight: 500;
  flex-shrink: 0;
}

.group-bubbles {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.group-bubble {
  padding: 6px 14px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 700;
  color: var(--gray-700);
  cursor: pointer;
  transition: var(--transition);
  background: white;
}

.group-bubble:hover,
.group-bubble.active {
  background: var(--red-primary);
  color: white;
  border-color: var(--red-primary);
}

/* ===== EMERGENCY SECTION ===== */
.emergency-section {
  padding: 24px 0;
  background: white;
}

.emergency-banner {
  background: linear-gradient(135deg, #1a0008 0%, #3d0010 100%);
  border-radius: var(--radius-xl);
  padding: 28px 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border: 1px solid rgba(232,32,58,0.3);
}

.emergency-left {
  display: flex;
  align-items: center;
  gap: 20px;
}

.emergency-pulse {
  width: 56px;
  height: 56px;
  background: rgba(232,32,58,0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--red-light);
  flex-shrink: 0;
  animation: pulse-red 2s infinite;
}

.emergency-title {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 800;
  color: white;
  margin-bottom: 4px;
}

.emergency-text {
  font-size: 14px;
  color: rgba(255,255,255,0.6);
}

.emergency-text strong {
  color: var(--red-light);
}

.emergency-right {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-shrink: 0;
}

/* ===== FEED SECTION ===== */
.feed-section {
  background: var(--gray-100);
}

.feed-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 36px;
}

.feed-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 36px;
}

.feed-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  border: 1px solid var(--gray-200);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.feed-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.feed-card.urgent {
  border-left: 3px solid var(--red-primary);
}

.feed-card.completed-card {
  opacity: 0.7;
}

.feed-card-top {
  display: flex;
  align-items: center;
  gap: 12px;
}

.feed-card-info {
  flex: 1;
  min-width: 0;
}

.feed-card-info h4 {
  font-size: 15px;
  font-weight: 700;
  color: var(--dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.feed-hospital {
  font-size: 12px;
  color: var(--gray-500);
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.feed-card-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.feed-detail {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--gray-600);
}

.feed-detail strong {
  color: var(--dark);
  font-weight: 600;
}

.expiry-timer {
  color: var(--red-primary) !important;
  font-size: 12px !important;
}

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

.feed-time {
  font-size: 12px;
  color: var(--gray-400);
}

.feed-respond-btn {
  border-radius: var(--radius-md);
  width: 100%;
}

.feed-more {
  text-align: center;
}

/* ===== STATS SECTION ===== */
.stats-section {
  background: var(--gradient-dark);
  padding: 80px 0;
}

.stats-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.stat-card {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  text-align: center;
  transition: var(--transition);
}

.stat-card:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(232,32,58,0.3);
  transform: translateY(-4px);
}

.stat-icon {
  font-size: 28px;
  margin-bottom: 12px;
}

.stat-number {
  display: block;
  font-family: var(--font-heading);
  font-size: 38px;
  font-weight: 900;
  background: var(--gradient-red);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 6px;
}

.stat-label {
  display: block;
  font-size: 14px;
  color: rgba(255,255,255,0.6);
  font-weight: 500;
  margin-bottom: 6px;
}

.stat-change {
  display: block;
  font-size: 12px;
  color: rgba(255,255,255,0.35);
}

/* ===== CTA SECTION ===== */
.cta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

.cta-card {
  border-radius: var(--radius-xl);
  padding: 48px 40px;
  border: 1px solid var(--gray-200);
  background: white;
  transition: var(--transition);
}

.cta-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.cta-icon {
  width: 72px;
  height: 72px;
  background: var(--red-soft);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--red-primary);
  margin-bottom: 24px;
}

.cta-card h3 {
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 12px;
}

.cta-card p {
  color: var(--gray-600);
  font-size: 15px;
  line-height: 1.7;
  margin-bottom: 20px;
}

.cta-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cta-list li {
  font-size: 14px;
  color: var(--gray-700);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ===== HOW IT WORKS ===== */
.steps-grid {
  display: flex;
  align-items: center;
  gap: 0;
}

.step-card {
  flex: 1;
  background: white;
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
  transition: var(--transition);
}

.step-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--red-primary);
  transform: translateY(-4px);
}

.step-num {
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 800;
  color: var(--red-primary);
  letter-spacing: 2px;
  margin-bottom: 12px;
  opacity: 0.7;
}

.step-icon {
  font-size: 36px;
  margin-bottom: 16px;
}

.step-card h4 {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 8px;
}

.step-card p {
  font-size: 13px;
  color: var(--gray-600);
  line-height: 1.6;
}

.step-arrow {
  font-size: 24px;
  color: var(--gray-300);
  padding: 0 8px;
  flex-shrink: 0;
}

/* ===== FOOTER ===== */
.footer {
  background: #0A0A0A;
  color: rgba(255,255,255,0.7);
  padding-top: 64px;
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 48px;
  padding-bottom: 48px;
}

.footer-tagline {
  font-size: 14px;
  line-height: 1.7;
  color: rgba(255,255,255,0.5);
  max-width: 280px;
  margin-bottom: 20px;
}

.footer-socials {
  display: flex;
  gap: 10px;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.07);
  color: rgba(255,255,255,0.6);
  transition: var(--transition);
}

.social-link:hover {
  background: var(--red-primary);
  color: white;
  transform: translateY(-2px);
}

.footer-col-title {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 700;
  color: white;
  letter-spacing: 0.5px;
  margin-bottom: 16px;
  text-transform: uppercase;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  font-size: 14px;
  color: rgba(255,255,255,0.5);
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--red-light);
  padding-left: 4px;
}

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

.footer-blood-tag {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px 4px;
  background: rgba(232,32,58,0.1);
  border: 1px solid rgba(232,32,58,0.2);
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 700;
  color: var(--red-light);
  transition: var(--transition);
}

.footer-blood-tag:hover {
  background: var(--red-primary);
  color: white;
  border-color: var(--red-primary);
}

.footer-contact {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.footer-contact li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.contact-icon {
  font-size: 18px;
  flex-shrink: 0;
  margin-top: 2px;
}

.footer-contact small {
  display: block;
  font-size: 11px;
  color: rgba(255,255,255,0.4);
  margin-bottom: 2px;
}

.footer-contact strong {
  font-size: 13px;
  color: rgba(255,255,255,0.8);
  font-weight: 600;
}

.footer-divider {
  height: 1px;
  background: rgba(255,255,255,0.07);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
  flex-wrap: wrap;
  gap: 8px;
}

.footer-copy {
  font-size: 13px;
  color: rgba(255,255,255,0.4);
}

.footer-copy strong {
  color: rgba(255,255,255,0.7);
}

.footer-dev {
  font-size: 13px;
  color: rgba(255,255,255,0.4);
}

.footer-dev strong {
  background: var(--gradient-red);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1100px) {
  .hero-container {
    grid-template-columns: 1fr 360px;
    gap: 40px;
  }

  .feed-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .stats-inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .footer-top {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
}

@media (max-width: 900px) {
  .hero-container {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 60px 20px;
  }

  .hero-visual {
    display: none;
  }

  .hero-cta {
    justify-content: center;
  }

  .hero-trust {
    justify-content: center;
  }

  .hero-desc {
    margin: 0 auto 36px;
  }

  .search-fields {
    grid-template-columns: 1fr 1fr;
  }

  .search-btn {
    grid-column: span 2;
  }

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

  .steps-grid {
    flex-wrap: wrap;
    gap: 20px;
  }

  .step-arrow {
    display: none;
  }

  .step-card {
    flex: 0 0 calc(50% - 10px);
  }

  .emergency-banner {
    flex-direction: column;
    text-align: center;
  }

  .emergency-left {
    flex-direction: column;
    text-align: center;
  }

  .feed-header {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 600px) {
  .search-fields {
    grid-template-columns: 1fr;
  }

  .search-btn {
    grid-column: 1;
  }

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

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

  .step-card {
    flex: 0 0 100%;
  }

  .footer-top {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  .emergency-right {
    flex-direction: column;
    width: 100%;
  }

  .emergency-right .btn {
    width: 100%;
    justify-content: center;
  }
}

/* ===== ADDITIONS FOR LIVE/DYNAMIC VERSION ===== */

/* Hero card empty state */
.hcf-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 28px 20px;
  gap: 8px;
}

.hcf-empty p {
  color: rgba(255,255,255,0.5);
  font-size: 14px;
}

/* Feed loading / empty */
.feed-loading {
  grid-column: span 4;
  text-align: center;
  padding: 48px 20px;
  color: var(--gray-400);
  font-size: 15px;
}

.feed-empty {
  grid-column: span 4;
  text-align: center;
  padding: 60px 20px;
  color: var(--gray-500);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.feed-empty h4 {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  color: var(--dark);
}

/* CTA icon variant */
.cta-icon-red {
  background: var(--red-soft);
  color: var(--red-primary);
}

/* Toast */
.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  animation: fadeInUp 0.3s ease;
  min-width: 280px;
}

.toast-success { background: #065F46; color: white; }
.toast-error   { background: #991B1B; color: white; }
.toast-info    { background: #1E40AF; color: white; }
