/* === Page Loader === */
#page-loader {
  transition: opacity 0.7s ease, visibility 0.7s ease;
}
#page-loader.fade-out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* === Hero Background === */
.hero-bg {
  background: linear-gradient(135deg, #0a1628 0%, #1e3a5f 30%, #0d1f3c 60%, #152d4f 100%);
  background-size: 400% 400%;
  animation: heroGradient 15s ease infinite;
}

@keyframes heroGradient {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* === CTA Glow === */
.cta-glow {
  box-shadow: 0 0 20px rgba(245, 183, 49, 0.3), 0 0 60px rgba(245, 183, 49, 0.1);
  animation: ctaPulse 3s ease-in-out infinite;
}

@keyframes ctaPulse {
  0%, 100% { box-shadow: 0 0 20px rgba(245, 183, 49, 0.3), 0 0 60px rgba(245, 183, 49, 0.1); }
  50% { box-shadow: 0 0 30px rgba(245, 183, 49, 0.5), 0 0 80px rgba(245, 183, 49, 0.2); }
}

/* === Scroll Indicator === */
.scroll-indicator {
  animation: scrollBounce 2s ease-in-out infinite;
}

@keyframes scrollBounce {
  0%, 100% { transform: translateY(0); opacity: 1; }
  50% { transform: translateY(8px); opacity: 0.3; }
}

/* === Marquee === */
.marquee-container {
  overflow: hidden;
  white-space: nowrap;
}

.marquee-track {
  display: inline-flex;
  animation: marqueeScroll 30s linear infinite;
}

@keyframes marqueeScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.marquee-item {
  display: inline-flex;
}

/* === Scroll Reveal === */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* === Service Card Hover === */
.service-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

/* === Lightbox === */
#lightbox {
  display: none;
}

#lightbox.active {
  display: flex;
}

.lightbox-content {
  animation: lightboxIn 0.3s ease;
}

@keyframes lightboxIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

/* === Mobile Menu === */
.mobile-menu {
  transform: translateX(100%);
  transition: transform 0.3s ease;
}

.mobile-menu.open {
  transform: translateX(0);
}

.mobile-overlay {
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.mobile-overlay.active {
  display: block;
  opacity: 1;
  pointer-events: auto;
}

/* === Navbar States === */
#navbar {
  background: transparent;
  transition: background-color 0.3s ease, padding 0.3s ease, box-shadow 0.3s ease;
}

#navbar.scrolled {
  background: rgba(10, 22, 40, 0.95);
  backdrop-filter: blur(10px);
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* === Carousel === */
#carousel-track {
  transition: transform 0.5s ease-in-out;
}

/* === Admin Sidebar (mobile) === */
#admin-overlay {
  transition: opacity 0.3s ease;
}

#admin-overlay:not(.hidden) {
  opacity: 1;
}

/* Admin form inputs touch-friendly sizing */
@media (max-width: 640px) {
  main input[type="text"],
  main input[type="email"],
  main input[type="password"],
  main input[type="number"],
  main textarea,
  main select {
    font-size: 16px; /* prevents iOS zoom on focus */
  }
}

/* === Reduced Motion === */
@media (prefers-reduced-motion: reduce) {
  .hero-bg {
    animation: none;
  }
  .cta-glow {
    animation: none;
  }
  .scroll-indicator {
    animation: none;
  }
  .marquee-track {
    animation: none;
  }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .service-card {
    transition: none;
  }
  #carousel-track {
    transition: none;
  }
  .lightbox-content {
    animation: none;
  }
}
