/* ===== MODERN FRONTEND ENHANCEMENTS ===== */

/* ===== MODERN NAVBAR WITH SCROLL EFFECTS ===== */
.navbar-modern {
  background: linear-gradient(135deg, #2563eb, #1d4ed8) !important;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  transition: all 0.3s ease-in-out;
  padding: 1rem 0;
}

.navbar-modern.scrolled {
  background: rgba(255, 255, 255, 0.95) !important;
  backdrop-filter: blur(20px);
  box-shadow: 0 2px 20px rgba(0,0,0,0.1);
  padding: 0.5rem 0;
}

/* Navbar link colors - default (transparent/dark background) */
.navbar-link {
  color: white !important;
  font-weight: 500;
  transition: all 0.3s ease-in-out;
  position: relative;
}

.navbar-link:hover {
  color: #fbbf24 !important;
}

.navbar-link::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -5px;
  left: 50%;
  background: #fbbf24;
  transition: all 0.3s ease-in-out;
  transform: translateX(-50%);
}

.navbar-link:hover::after {
  width: 100%;
}

/* Navbar link colors when scrolled (light background) */
.navbar-modern.scrolled .navbar-link {
  color: #374151 !important;
}

.navbar-modern.scrolled .navbar-link:hover {
  color: #2563eb !important;
}

.navbar-modern.scrolled .navbar-link::after {
  background: #2563eb;
}

/* Navbar brand adjustments */
.navbar-brand {
  display: flex !important;
  align-items: center !important;
  opacity: 1 !important;
  visibility: visible !important;
}

.navbar-brand img {
  opacity: 1 !important;
  visibility: visible !important;
  display: block !important;
  max-height: 40px !important;
  width: auto !important;
  transition: all 0.3s ease-in-out;
}

.navbar-modern.scrolled .navbar-brand {
  transform: scale(0.95);
}

.navbar-modern.scrolled .navbar-brand img {
  opacity: 1 !important;
  visibility: visible !important;
}

/* Donate button stays consistent */
.donate-btn {
  transition: all 0.3s ease-in-out;
}

.donate-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
}

/* Mobile navbar toggle icon color fix */
.navbar-modern .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.8%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='m4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.navbar-modern.scrolled .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%2855, 65, 81, 0.8%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='m4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Custom Properties for Consistent Design */
:root {
  /* Enhanced Color Palette */
  --primary-color: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #3b82f6;
  --secondary-color: #06b6d4;
  --accent-color: #f59e0b;
  --success-color: #10b981;
  --warning-color: #f59e0b;
  --danger-color: #ef4444;
  
  /* Neutral Colors */
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --gray-900: #0f172a;
  
  /* Typography */
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-heading: 'Poppins', sans-serif;
  
  /* Spacing */
  --section-padding: 5rem 0;
  --container-padding: 1.5rem;
  
  /* Shadows */
  --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);
  
  /* Border Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
  
  /* Transitions */
  --transition-fast: 0.15s ease-in-out;
  --transition-normal: 0.3s ease-in-out;
  --transition-slow: 0.5s ease-in-out;
}

/* ===== MODERN NAVBAR ===== */
.navbar {
  transition: all var(--transition-normal);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.navbar.scrolled {
  background: rgba(37, 99, 235, 0.95) !important;
  backdrop-filter: blur(20px);
}

.navbar .nav-link {
  font-weight: 500;
  transition: all var(--transition-normal);
  position: relative;
  margin: 0 0.25rem;
  border-radius: var(--radius-md);
  padding: 0.5rem 1rem !important;
}

.navbar .nav-link:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
}

.navbar .nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--accent-color);
  transition: all var(--transition-normal);
  transform: translateX(-50%);
}

.navbar .nav-link:hover::after {
  width: 80%;
}

/* ===== MODERN TYPOGRAPHY ===== */
body {
  font-family: var(--font-primary);
  font-weight: 400;
  line-height: 1.7;
  color: var(--gray-700);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.4;
  color: var(--gray-900);
}

/* Text color utilities */
.text-accent-color { color: var(--accent-color) !important; }

/* Background color utilities */
.bg-accent-color { background-color: var(--accent-color) !important; }

/* ===== ENHANCED HERO SECTION ===== */
.hero-carousel .item {
  background-attachment: fixed;
  position: relative;
  overflow: hidden;
}

.hero-carousel .item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.8) 0%, rgba(6, 182, 212, 0.6) 100%);
  z-index: 1;
}

.hero-carousel .overlay {
  position: relative;
  z-index: 2;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-2xl);
  padding: 3rem 2rem;
  animation: fadeInUp 1s ease-out;
}

.hero-carousel h1 {
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 700;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  margin-bottom: 1.5rem;
}

.hero-carousel p {
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  opacity: 0.95;
  margin-bottom: 2rem;
}

/* ===== MODERN BUTTONS ===== */
.btn-modern {
  padding: 0.75rem 2rem;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 0.75rem;
  border: none;
  transition: all 0.3s ease-in-out;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

.btn-modern::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.btn-modern:hover::before {
  left: 100%;
}

.btn-primary-modern {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: white;
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.4);
}

.btn-primary-modern:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(37, 99, 235, 0.5);
  color: white;
}

.btn-secondary-modern {
  background: linear-gradient(135deg, #06b6d4, #0891b2);
  color: white;
  box-shadow: 0 4px 15px rgba(6, 182, 212, 0.4);
}

.btn-secondary-modern:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(6, 182, 212, 0.5);
  color: white;
}

.btn-accent-modern {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
}

.btn-accent-modern:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(245, 158, 11, 0.5);
  color: white;
}

/* ===== MODERN CARDS ===== */
.card-modern {
  background: white;
  border-radius: 1rem;
  border: none;
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  transition: all 0.3s ease-in-out;
  overflow: hidden;
  position: relative;
}

.card-modern::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #2563eb, #06b6d4);
  transform: scaleX(0);
  transition: transform 0.3s ease-in-out;
}

.card-modern:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

.card-modern:hover::before {
  transform: scaleX(1);
}

.card-modern .card-body {
  padding: 2rem;
}

/* ===== ENHANCED SECTIONS ===== */
.section-modern {
  padding: 5rem 0;
  position: relative;
}

.section-gradient {
  background: linear-gradient(135deg, #f8fafc 0%, white 100%);
}

.section-primary {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: white;
}

.section-secondary {
  background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
  color: white;
}

.text-accent-color {
  color: #f59e0b !important;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes zoomIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Animation Classes */
.animate-fade-in-up {
  animation: fadeInUp 0.8s ease-out;
}

.animate-slide-in-left {
  animation: slideInLeft 0.8s ease-out;
}

.animate-slide-in-right {
  animation: slideInRight 0.8s ease-out;
}

.animate-zoom-in {
  animation: zoomIn 0.6s ease-out;
}

/* Intersection Observer Animation Classes */
.js .reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease-out;
}

.js .reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* Show content by default (for no-js and initial load) */
.reveal {
  opacity: 1;
  transform: translateY(0);
}

/* ===== ENHANCED TESTIMONIALS ===== */
.testimonial-modern {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  margin: 1rem;
  position: relative;
}

.testimonial-modern::before {
  content: '"';
  position: absolute;
  top: -10px;
  left: 20px;
  font-size: 4rem;
  color: rgba(255, 255, 255, 0.3);
  font-family: serif;
}

.testimonial-avatar {
  width: 80px;
  height: 80px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  box-shadow: var(--shadow-lg);
}

/* ===== ENHANCED GALLERY ===== */
.gallery-item {
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  transition: all var(--transition-normal);
}

.gallery-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
  opacity: 0;
  transition: opacity var(--transition-normal);
  z-index: 1;
}

.gallery-item:hover::before {
  opacity: 0.8;
}

.gallery-item:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-xl);
}

.gallery-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

/* ===== ENHANCED GET INVOLVED SECTION ===== */
.get-involved-card-modern {
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.get-involved-card-modern::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(37, 99, 235, 0.1), transparent);
  transition: left 0.5s;
}

.get-involved-card-modern:hover::before {
  left: 100%;
}

.get-involved-card-modern:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-color);
}

.icon-wrapper-modern {
  width: 60px;
  height: 60px;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.icon-wrapper-modern::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, rgba(255, 255, 255, 0.2), transparent);
  transform: translateX(-100%);
  transition: transform 0.5s;
}

.get-involved-card-modern:hover .icon-wrapper-modern::before {
  transform: translateX(100%);
}

/* ===== FLOATING ELEMENTS ===== */
.floating-stats-modern {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

/* ===== RESPONSIVE ENHANCEMENTS ===== */
@media (max-width: 768px) {
  :root {
    --section-padding: 3rem 0;
    --container-padding: 1rem;
  }
  
  .hero-carousel .overlay {
    padding: 2rem 1.5rem;
  }
  
  .card-modern .card-body {
    padding: 1.5rem;
  }
  
  .testimonial-modern {
    padding: 2rem;
    margin: 0.5rem;
  }
}

/* ===== LOADING STATES ===== */
.loading-skeleton {
  background: linear-gradient(90deg, var(--gray-200) 25%, var(--gray-100) 50%, var(--gray-200) 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
  border-radius: var(--radius-md);
}

@keyframes loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ===== SCROLL INDICATORS ===== */
.scroll-indicator {
  position: fixed;
  top: 0;
  left: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  z-index: 9999;
  transition: width 0.3s ease;
}

/* ===== ENHANCED TESTIMONIALS ===== */
.testimonial-card-modern {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 2rem;
  position: relative;
  transition: all 0.3s ease-in-out;
}

.testimonial-card-modern:hover {
  transform: translateY(-5px);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(245, 158, 11, 0.3);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.quote-icon-wrapper {
  position: relative;
}

.quote-icon-wrapper::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  border-radius: 50%;
  opacity: 0.2;
  z-index: -1;
}

.author-avatar {
  position: relative;
}

.author-avatar::before {
  content: '';
  position: absolute;
  top: -5px;
  left: -5px;
  right: -5px;
  bottom: -5px;
  background: linear-gradient(135deg, #f59e0b, #06b6d4);
  border-radius: 50%;
  z-index: -1;
  opacity: 0.7;
}

.control-btn-modern {
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease-in-out;
  cursor: pointer;
}

.control-btn-modern:hover {
  background: rgba(245, 158, 11, 0.8);
  border-color: #f59e0b;
  transform: scale(1.1);
}

.indicator-modern {
  width: 12px;
  height: 12px;
  background: rgba(255, 255, 255, 0.3);
  border: 2px solid transparent;
  border-radius: 50%;
  transition: all 0.3s ease-in-out;
  cursor: pointer;
}

.indicator-modern.active,
.indicator-modern:hover {
  background: #f59e0b;
  border-color: #f59e0b;
  transform: scale(1.2);
}

.stat-item {
  transition: transform 0.3s ease-in-out;
}

.stat-item:hover {
  transform: translateY(-5px);
}

.no-testimonials-card {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  max-width: 500px;
  margin: 0 auto;
}

/* Animation for testimonial cards */
@keyframes slideInFromBottom {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.carousel-item.active .testimonial-card-modern {
  animation: slideInFromBottom 0.6s ease-out;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .testimonial-card-modern {
    padding: 2rem 1.5rem !important;
  }
  
  .control-btn-modern {
    width: 40px;
    height: 40px;
  }
  
  .author-avatar img {
    width: 60px !important;
    height: 60px !important;
  }
}

/* ===== GALLERY HOVER EFFECTS ===== */
.hover-overlay {
  transition: opacity 0.3s ease-in-out;
}

.position-relative:hover .hover-overlay {
  opacity: 1 !important;
}

.position-relative:hover img {
  transform: scale(1.05);
  transition: transform 0.3s ease-in-out;
}

/* ===== SCROLL TO TOP BUTTON ===== */
.scroll-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: white;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
  z-index: 1000;
  box-shadow: var(--shadow-lg);
}

.scroll-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.scroll-to-top:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-xl);
}

/* ===== ACCESSIBILITY ENHANCEMENTS ===== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Focus styles */
.btn-modern:focus,
.card-modern:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}