:root {
  --primary-red: #dc2626;
  --light-red: #fef2f2;
  --dark-red: #991b1b;
  --secondary-gray: #6b7280;
  --light-gray: #f9fafb;
  --border-gray: #e5e7eb;
  --success-green: #059669;
  --warning-yellow: #d97706;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

* {
  box-sizing: border-box;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
  color: #374151;
  background-color: #f9fafb;
}

/* Typography Scale */
.text-xs {
  font-size: 0.75rem;
}
.text-sm {
  font-size: 0.875rem;
}
.text-base {
  font-size: 1rem;
}
.text-lg {
  font-size: 1.125rem;
}
.text-xl {
  font-size: 1.25rem;
}
.text-2xl {
  font-size: 1.5rem;
}
.text-3xl {
  font-size: 1.875rem;
}
.text-4xl {
  font-size: 2.25rem;
}
.text-5xl {
  font-size: 3rem;
}

/* Enhanced Navigation */
/* --- Enhanced Navbar (2024 update) --- */
.navbar-enhanced {
  background: linear-gradient(90deg, rgba(255,255,255,0.95) 60%, rgba(220,38,38,0.10) 100%);
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 24px 0 rgba(220,38,38,0.07), 0 1.5px 0 0 var(--border-gray);
  border-bottom: 1.5px solid var(--border-gray);
  padding: 1.25rem 0;
  transition: background 0.3s;
}

.navbar-brand-enhanced {
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--primary-red) !important;
  letter-spacing: -1px;
  text-shadow: 0 2px 16px rgba(220,38,38,0.10), 0 1px 0 #fff;
  filter: drop-shadow(0 2px 8px rgba(220,38,38,0.10));
  transition: color 0.2s, text-shadow 0.2s;
}

.navbar-brand-enhanced:hover {
  color: var(--dark-red) !important;
  text-shadow: 0 4px 24px rgba(220,38,38,0.18);
}

.nav-link-enhanced {
  color: var(--secondary-gray) !important;
  font-weight: 600;
  padding: 0.6rem 1.2rem !important;
  border-radius: 0.7rem;
  margin: 0 0.2rem;
  font-size: 1.08rem;
  transition: all 0.22s cubic-bezier(.4,2,.6,1);
  position: relative;
  z-index: 1;
}

.nav-link-enhanced:hover,
.nav-link-enhanced.active {
  color: var(--primary-red) !important;
  background: linear-gradient(90deg, var(--light-red) 60%, #fff 100%);
  box-shadow: 0 2px 8px 0 rgba(220,38,38,0.07);
  transform: scale(1.07);
}

/* Enhanced Cards */
.card-enhanced {
  background: white;
  border: none;
  border-radius: 1rem;
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
  overflow: hidden;
}

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

.card-enhanced-xl {
  border-radius: 1.5rem;
  box-shadow: var(--shadow-xl);
}

/* Hero Section */
.hero-enhanced {
  background: linear-gradient(135deg, var(--primary-red) 0%, var(--dark-red) 100%);
  color: white;
  padding: 5rem 0;
  position: relative;
  overflow: hidden;
}

.hero-enhanced::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><defs><radialGradient id="a" cx="50%" cy="50%"><stop offset="0%" stop-color="%23ffffff" stop-opacity="0.1"/><stop offset="100%" stop-color="%23ffffff" stop-opacity="0"/></radialGradient></defs><circle cx="50%" cy="50%" r="50%" fill="url(%23a)"/></svg>');
  opacity: 0.1;
}

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

/* Buttons */
.btn-enhanced {
  font-weight: 600;
  padding: 0.75rem 2rem;
  border-radius: 0.75rem;
  border: none;
  transition: all 0.2s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-primary-enhanced {
  background: linear-gradient(90deg, var(--primary-red) 60%, var(--dark-red) 100%);
  color: #fff;
  font-weight: 700;
  border-radius: 0.7rem;
  box-shadow: 0 2px 8px 0 rgba(220,38,38,0.10);
  border: none;
  transition: background 0.2s, box-shadow 0.2s, transform 0.2s;
}

.btn-primary-enhanced:hover {
  background: linear-gradient(90deg, var(--dark-red) 60%, var(--primary-red) 100%);
  box-shadow: 0 4px 16px 0 rgba(220,38,38,0.18);
  transform: translateY(-2px) scale(1.04);
}

.btn-secondary-enhanced {
  background: white;
  color: var(--primary-red);
  border: 2px solid var(--primary-red);
}

.btn-secondary-enhanced:hover {
  background: var(--primary-red);
  color: white;
}

/* Stats Cards */
.stats-card-enhanced {
  background: white;
  border-radius: 1rem;
  padding: 2rem;
  text-align: center;
  box-shadow: var(--shadow-md);
  border-left: 4px solid var(--primary-red);
  transition: all 0.3s ease;
}

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

.stats-number {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--primary-red);
  line-height: 1;
}

.stats-label {
  color: var(--secondary-gray);
  font-weight: 500;
  margin-top: 0.5rem;
}

/* Donor/Hospital Cards */
.profile-card {
  background: white;
  border-radius: 0.5rem;
  padding: 1.25rem;
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
  height: 100%;
  border: 1px solid var(--border-gray);
  position: relative;
  overflow: hidden;
}

.profile-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-1px);
  border-color: var(--primary-red);
}

.profile-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--primary-red);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.profile-card:hover::before {
  opacity: 1;
}

.profile-avatar {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 0.375rem;
  object-fit: cover;
  border: 2px solid var(--light-red);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--light-red);
  color: var(--primary-red);
  font-weight: 600;
  font-size: 1rem;
  text-transform: uppercase;
}

.avatar-icon {
  font-size: 1.5rem;
  color: var(--primary-red);
}

.blood-type-badge {
  background: var(--primary-red);
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-weight: 600;
  font-size: 0.875rem;
}

.availability-badge {
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-weight: 500;
  font-size: 0.75rem;
}

.available {
  background: #dcfce7;
  color: var(--success-green);
}

.unavailable {
  background: #fef3c7;
  color: var(--warning-yellow);
}

/* Forms */
.form-enhanced {
  background: white;
  border-radius: 1rem;
  padding: 2rem;
  box-shadow: var(--shadow-md);
}

.form-control-enhanced {
  border: 2px solid var(--border-gray);
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  transition: all 0.2s ease;
}

.form-control-enhanced:focus {
  border-color: var(--primary-red);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
  outline: none;
}

.form-label-enhanced {
  font-weight: 600;
  color: #374151;
  margin-bottom: 0.5rem;
}

/* Dashboard Sidebar */
.sidebar-enhanced {
  background: white;
  border-right: 1px solid var(--border-gray);
  min-height: 100vh;
  padding: 2rem 0;
}

.sidebar-nav {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-nav-item {
  margin: 0.25rem 1rem;
}

.sidebar-nav-link {
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  color: var(--secondary-gray);
  text-decoration: none;
  border-radius: 0.5rem;
  transition: all 0.2s ease;
  font-weight: 500;
}

.sidebar-nav-link:hover,
.sidebar-nav-link.active {
  background: var(--light-red);
  color: var(--primary-red);
}

.sidebar-nav-icon {
  width: 1.25rem;
  height: 1.25rem;
  margin-right: 0.75rem;
}

/* Dashboard Header */
.dashboard-header-enhanced {
  background: linear-gradient(135deg, var(--primary-red) 0%, var(--dark-red) 100%);
  color: white;
  padding: 2rem 0;
  margin-bottom: 2rem;
  border-radius: 0 0 1rem 1rem;
}

/* Tabs */
.nav-tabs-enhanced {
  border: none;
  margin-bottom: 2rem;
}

.nav-tabs-enhanced .nav-link {
  border: none;
  color: var(--secondary-gray);
  font-weight: 500;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  margin-right: 0.5rem;
}

.nav-tabs-enhanced .nav-link.active {
  background: var(--primary-red);
  color: white;
}

/* Alerts */
.alert-enhanced {
  border: none;
  border-radius: 0.75rem;
  padding: 1rem 1.5rem;
  margin-bottom: 1.5rem;
}

.alert-success-enhanced {
  background: #dcfce7;
  color: var(--success-green);
  border-left: 4px solid var(--success-green);
}

.alert-warning-enhanced {
  background: #fef3c7;
  color: var(--warning-yellow);
  border-left: 4px solid var(--warning-yellow);
}

.alert-danger-enhanced {
  background: var(--light-red);
  color: var(--dark-red);
  border-left: 4px solid var(--primary-red);
}

/* Pagination */
.pagination-enhanced {
  justify-content: center;
  margin-top: 2rem;
}

.pagination-enhanced .page-link {
  border: none;
  color: var(--secondary-gray);
  padding: 0.75rem 1rem;
  margin: 0 0.25rem;
  border-radius: 0.5rem;
}

.pagination-enhanced .page-link:hover,
.pagination-enhanced .page-item.active .page-link {
  background: var(--primary-red);
  color: white;
}

/* Responsive Design */
@media (max-width: 768px) {
  .hero-enhanced {
    padding: 3rem 0;
  }

  .text-5xl {
    font-size: 2.25rem;
  }

  .text-4xl {
    font-size: 1.875rem;
  }

  .stats-card-enhanced {
    padding: 1.5rem;
  }

  .stats-number {
    font-size: 2rem;
  }
}

/* Animation Classes */
.fade-in-up {
  animation: fadeInUp 0.6s ease-out;
}

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

.stagger-1 {
  animation-delay: 0.1s;
}
.stagger-2 {
  animation-delay: 0.2s;
}
.stagger-3 {
  animation-delay: 0.3s;
}
.stagger-4 {
  animation-delay: 0.4s;
}

/* Loading States */
.loading-skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* Hamburger animation */
.navbar-toggler {
  border: none;
  outline: none;
  box-shadow: none;
  transition: transform 0.2s;
}

.navbar-toggler:active {
  transform: scale(1.15) rotate(8deg);
}

/* Divider for navbar */
.navbar-divider {
  width: 1.5px;
  height: 28px;
  background: var(--border-gray);
  margin: 0 1rem;
  border-radius: 2px;
  display: inline-block;
  vertical-align: middle;
}

.nav-link-enhanced, .nav-link-enhanced:hover, .nav-link-enhanced.active, .btn-primary-enhanced, .btn-primary-enhanced:hover {
  text-decoration: none !important;
}
/* Reduce spacing in the navbar to prevent wrapping */
.navbar-enhanced .navbar-nav .nav-link-enhanced {
    padding-right: 0.7rem;
    padding-left: 0.7rem;
}

/* Partnership Cards */
.partnership-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(220, 38, 38, 0.1);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    max-width: 320px;
    margin: 0 auto;
}

.partnership-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(220, 38, 38, 0.15);
    border-color: rgba(220, 38, 38, 0.2);
}

.partnership-image-container {
    background: #ffffff;
    padding: 2rem 0;
    text-align: center;
    position: relative;
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.partnership-image-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.05) 0%, rgba(59, 130, 246, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.partnership-card:hover .partnership-image-container::before {
    opacity: 1;
}

.partnership-image-placeholder {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: 3px solid #ffffff;
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
}

.partnership-card:hover .partnership-image-placeholder {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.2);
    border-color: rgba(220, 38, 38, 0.3);
}

.placeholder-text {
    font-size: 0.75rem;
    color: #9ca3af;
    font-weight: 500;
    text-align: center;
    line-height: 1.2;
}

.partnership-image {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: 3px solid #ffffff;
    background: #ffffff;
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
}

.partnership-card:hover .partnership-image {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.2);
    border-color: rgba(220, 38, 38, 0.3);
}

.partnership-content {
    padding: 1.5rem;
    text-align: center;
}

.partnership-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.partnership-description {
    color: #6b7280;
    line-height: 1.5;
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.partnership-badge {
    margin-top: auto;
}

.partnership-badge .badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.4rem 0.8rem;
    border-radius: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Partnership section background */
.bg-light {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%) !important;
}

/* Responsive adjustments for partnership cards */
@media (max-width: 768px) {
    .partnership-card {
        margin-bottom: 1.5rem;
        max-width: 280px;
    }
    
    .partnership-image-placeholder {
        width: 80px;
        height: 80px;
    }
    
    .partnership-image {
        width: 80px;
        height: 80px;
    }
    
    .partnership-content {
        padding: 1.25rem;
    }
    
    .partnership-title {
        font-size: 1.1rem;
    }
    
    .partnership-description {
        font-size: 0.8rem;
    }
}

/* Custom CSS for the new Country Selection Modal */
.country-list-selection {
    max-height: 250px; /* Limits the list height on mobile */
    overflow-y: auto;
}

.country-item {
    padding: 12px 20px !important;
    transition: background-color 0.2s, box-shadow 0.2s;
    /* Clean look similar to the image's selection boxes */
}

/* Hover/Focus effect for the selection items */
.country-item:hover,
.country-item:focus {
    background-color: var(--bs-primary-rgb, 0.05) !important; /* Light primary color background */
    box-shadow: inset 3px 0 0 var(--bs-danger); /* A small red line on the left side */
    color: var(--bs-dark); /* Keep text dark */
}

/* Ensure the submit button acts like a link visually */
.country-item .fw-bold {
    color: inherit;
}
