/* ==================== GLOBAL STYLES & TYPOGRAPHY ==================== */
body {
  font-family: 'Inter', sans-serif;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Outfit', sans-serif;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* ==================== SPA TRANSITIONS ==================== */
.route-section {
  transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: opacity, transform;
}

.route-section.hidden {
  display: none;
  opacity: 0;
  transform: translateY(12px);
}

.route-section.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

/* ==================== HEADER GLASSMORPHISM ==================== */
#main-header.scrolled {
  background-color: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  border-color: rgba(226, 232, 240, 0.8);
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.05);
  height: 4.5rem; /* 72px */
}
#main-header.scrolled > div > .flex {
  height: 4.5rem;
}

/* ==================== CAROUSELS INFINITE LOOP ==================== */
@keyframes infiniteScroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(calc(-50% - 2rem)); /* Offset half + gap */
  }
}

@keyframes infiniteScrollReverse {
  0% {
    transform: translateX(calc(-50% - 2rem));
  }
  100% {
    transform: translateX(0);
  }
}

.animate-infinite-scroll {
  animation: infiniteScroll 30s linear infinite;
}

.animate-infinite-scroll:hover {
  animation-play-state: paused;
}

.animate-infinite-scroll-reverse {
  animation: infiniteScrollReverse 35s linear infinite;
}

.animate-infinite-scroll-reverse:hover {
  animation-play-state: paused;
}

/* Grid Pattern overlay */
.pattern-grid {
  background-image: radial-gradient(#44b09a 0.8px, transparent 0.8px), radial-gradient(#44b09a 0.8px, #f8fafc 0.8px);
  background-size: 16px 16px;
  background-position: 0 0, 8px 8px;
  opacity: 0.15;
}

/* Active Navigation link */
.nav-link.active-route {
  color: #44b09a !important;
  font-weight: 700;
  position: relative;
}

.nav-link.active-route::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0.75rem;
  right: 0.75rem;
  height: 2px;
  background-color: #44b09a;
  border-radius: 9999px;
  animation: slideIn 0.3s ease-out forwards;
}

@keyframes slideIn {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

/* ==================== NEWS CARD PREMIUM SHADOW ==================== */
.news-card {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.news-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 10px 10px -5px rgba(0, 0, 0, 0.03);
}

/* Active filter button */
.active-filter {
  background-color: #44b09a !important;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(68, 176, 154, 0.3);
}

/* Onload Hero Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-animate-1, .hero-animate-2, .hero-animate-3 {
  opacity: 0;
}

.route-section.active .hero-animate-1 {
  animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.route-section.active .hero-animate-2 {
  animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 120ms forwards;
}

.route-section.active .hero-animate-3 {
  animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 240ms forwards;
}

/* Mobile Nav Panel Smooth Slide Toggle */
#mobile-nav-panel {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease-in-out;
}

#mobile-nav-panel.open {
  max-height: 500px;
  opacity: 1;
}
