/* =======================================
   BCCCT & LTNS — Global Styles
   ======================================= */

/* ===== 1. BASE & RESET ===== */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 10px; /* Desktop */
}

@media (max-width: 767px) {
  html {
    scroll-padding-top: 260px; /* Mobile */
  }
}

body {
  overflow-x: hidden;
}

/* ===== 2. CUSTOM SCROLLBAR ===== */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
  background: #517ec9;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #1f54ad;
}

/* ===== 3. HEADER — ANTI-JERK ===== */
/* Prevents transition flash on initial page load */
header {
  transition: none !important;
}

/* Enables smooth transitions only after page is fully loaded */
body.page-loaded header {
  transition: all 0.3s ease !important;
}

/* ===== 4. LUCIDE ICON PLACEHOLDER ===== */
/* Reserves space for Lucide icons before JS replaces them */
[data-lucide] {
  display: inline-block;
  width: 1em;
  height: 1em;
  vertical-align: middle;
}

/* Header star icons — specific sizing */
header [data-lucide="star"] {
  display: inline-block !important;
  width: 14px !important;
  height: 14px !important;
  flex-shrink: 0 !important;
  vertical-align: middle !important;
}

@media (min-width: 640px) {
  header [data-lucide="star"] {
    width: 20px !important;
    height: 20px !important;
  }
}

/* ===== 5. ANIMATIONS — NGO PORTAL PULSE ===== */

/* Desktop Pulse */
@keyframes portalPulseGreen {
  0% {
    box-shadow:
      0 0 0 0 rgba(98, 162, 55, 0.6),
      0 10px 25px -5px rgba(98, 162, 55, 0.4);
  }
  70% {
    box-shadow:
      0 0 0 16px rgba(98, 162, 55, 0),
      0 10px 25px -5px rgba(98, 162, 55, 0.4);
  }
  100% {
    box-shadow:
      0 0 0 0 rgba(98, 162, 55, 0),
      0 10px 25px -5px rgba(98, 162, 55, 0.4);
  }
}

.ngo-portal-pulse-green {
  animation: portalPulseGreen 2.5s infinite;
}

/* Mobile Pulse (symmetric, pill-shape friendly) */
@keyframes portalPulseGreenMobile {
  0% {
    box-shadow: 0 0 0 0 rgba(98, 162, 55, 0.65);
  }
  70% {
    box-shadow: 0 0 0 12px rgba(98, 162, 55, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(98, 162, 55, 0);
  }
}

.ngo-portal-pulse-green-mobile {
  animation: portalPulseGreenMobile 2.5s infinite;
}

/* ===== 6. ANIMATIONS — PAGE ENTRANCE ===== */
@keyframes fadeSlideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Note: Page entrance animation disabled to prevent header jerk.
   If you want to re-enable it, uncomment the rule below and
   ensure it doesn't conflict with the header anti-jerk setup.
*/
/*
body > main {
  animation: fadeSlideUp 0.5s ease-out;
}
*/

/* ===== 7. SCROLL REVEAL — BASE ===== */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.5s ease-out;
}

.revealed,
.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* ===== 8. SCROLL REVEAL — VARIANTS ===== */

/* Reveal Up (slide from below) */
.reveal-up {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease-out;
}
.reveal-up.active,
.reveal-up.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Reveal Left (slide from left) */
.reveal-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: all 0.6s ease-out;
}
.reveal-left.active,
.reveal-left.revealed {
  opacity: 1;
  transform: translateX(0);
}

/* Reveal Right (slide from right) */
.reveal-right {
  opacity: 0;
  transform: translateX(40px);
  transition: all 0.6s ease-out;
}
.reveal-right.active,
.reveal-right.revealed {
  opacity: 1;
  transform: translateX(0);
}

/* Reveal Fade (no movement, just fade) */
.reveal-fade {
  opacity: 0;
  transition: opacity 0.8s ease-out;
}
.reveal-fade.active,
.reveal-fade.revealed {
  opacity: 1;
}

/* ===== 9. STAGGER DELAYS ===== */
.delay-100 {
  transition-delay: 100ms;
}
.delay-200 {
  transition-delay: 200ms;
}
.delay-300 {
  transition-delay: 300ms;
}
.delay-400 {
  transition-delay: 400ms;
}
.delay-500 {
  transition-delay: 500ms;
}

/* ===== 10. UTILITY CLASSES ===== */

/* Light Glassmorphism */
.glass-card {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Dark Glassmorphism */
.glass-card-dark {
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* =======================================
   END OF STYLES
   ======================================= */
