/**
 * Vasu Tours — global polish + AOS / motion helpers
 */

/* Hero overlay: consistent rich depth across pages */
.hero-overlay {
  background: linear-gradient(
    180deg,
    rgba(15, 23, 42, 0.55) 0%,
    rgba(15, 23, 42, 0.25) 45%,
    rgba(15, 23, 42, 0.5) 100%
  );
}

/* Card lift subtlety while animating (AOS sets transform; keep shadow smooth) */
.js-drop-card,
.js-gallery-tile {
  will-change: transform, opacity;
}

/* Gallery grid: aligned tiles, hover zoom inside frame */
.js-gallery-tile {
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.js-gallery-tile:hover {
  transform: translateY(-4px);
  box-shadow:
    0 20px 40px -12px rgba(15, 23, 42, 0.18),
    0 0 0 1px rgba(148, 163, 184, 0.12);
}

.js-gallery-tile:focus-visible {
  outline: 2px solid #0ea5e9;
  outline-offset: 3px;
}

.site-lightbox {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  box-sizing: border-box;
}

.site-lightbox[hidden] {
  display: none !important;
}

.site-lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.85);
  cursor: pointer;
}

.site-lightbox__inner {
  position: relative;
  z-index: 1;
  max-width: min(96vw, 1200px);
  max-height: 92vh;
  margin: auto;
}

.site-lightbox__img {
  display: block;
  max-width: min(96vw, 1200px);
  max-height: 85vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 0.5rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.45);
}

.site-lightbox__close {
  position: absolute;
  top: -0.25rem;
  right: -0.25rem;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border: none;
  border-radius: 9999px;
  background: white;
  color: #0f172a;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
  transition: background 0.2s ease, transform 0.2s ease;
}

.site-lightbox__close:hover {
  background: #f1f5f9;
  transform: scale(1.05);
}

.site-lightbox.is-open .site-lightbox__backdrop {
  animation: siteLightboxFadeIn 0.25s ease forwards;
}

.site-lightbox.is-open .site-lightbox__img {
  animation: siteLightboxPop 0.35s ease-out forwards;
}

@keyframes siteLightboxFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes siteLightboxPop {
  from {
    opacity: 0;
    transform: scale(0.96);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

body.site-lightbox-open {
  overflow: hidden;
}

/* Elegant section rhythm */
.section-ambient {
  background-image: radial-gradient(
    ellipse 120% 80% at 50% 0%,
    rgba(14, 165, 233, 0.06) 0%,
    transparent 55%
  );
}

@media (prefers-reduced-motion: reduce) {
  .js-drop-card,
  .js-gallery-tile {
    will-change: auto;
  }

  .js-gallery-tile {
    transition: box-shadow 0.2s ease;
  }

  .js-gallery-tile:hover {
    transform: none;
  }

  .site-lightbox.is-open .site-lightbox__backdrop,
  .site-lightbox.is-open .site-lightbox__img {
    animation: none;
  }

  .js-gallery-tile img {
    transition-duration: 0.2s !important;
  }
}

/* Vehicles page: dual hero photos with smooth crossfade (travel / fleet style) */
.vehicles-hero-crossfade {
  background: #0f172a;
}

.vehicles-hero-crossfade__layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.vehicles-hero-crossfade__layer {
  opacity: 1;
  animation: vehiclesHeroCrossfadeA 14s ease-in-out infinite;
}

.vehicles-hero-crossfade__layer--alt {
  animation: vehiclesHeroCrossfadeB 14s ease-in-out infinite;
}

@keyframes vehiclesHeroCrossfadeA {
  0%,
  38% {
    opacity: 1;
    transform: scale(1);
  }
  45%,
  88% {
    opacity: 0;
    transform: scale(1.04);
  }
  95%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes vehiclesHeroCrossfadeB {
  0%,
  38% {
    opacity: 0;
    transform: scale(1.04);
  }
  45%,
  88% {
    opacity: 1;
    transform: scale(1);
  }
  95%,
  100% {
    opacity: 0;
    transform: scale(1.04);
  }
}

@media (prefers-reduced-motion: reduce) {
  .vehicles-hero-crossfade__layer,
  .vehicles-hero-crossfade__layer--alt {
    animation: none;
    transform: none;
    opacity: 1;
  }

  .vehicles-hero-crossfade__layer--alt {
    display: none;
  }
}
