/* ========================================
   GALLERY SECTION BASE
======================================== */
.gallery-section {
  width: 100%;
  /* CHANGED: 100px is now 40px */
  padding: 5px 5vw 120px;
  background: radial-gradient(circle at center, #0a0f2a 0%, #020617 100%);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ========================================
   RIBBON HEADER (Inherited style)
======================================== */
.gallery-header-wrap {
  text-align: center;
  margin-bottom: 60px;
  width: 100%;
}

.gallery-ribbon-title {
  margin: 0;
  font-size: clamp(2.2rem, 3.4vw, 3rem);
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: white;
}

.gallery-ribbon-accent {
  position: relative;
  display: inline-block;
}

.gallery-ribbon-accent::before {
  content: "";
  position: absolute;
  top: -6px;
  left: 10%;
  right: 10%;
  height: 3px;
  background: linear-gradient(90deg, #f97316, #facc15);
  opacity: 0.9;
}

/* ========================================
   CAROUSEL CONTAINER
======================================== */
.gallery-carousel-wrapper {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

.gallery-carousel {
  width: 100%;
  /* Cinematic wide ratio that perfectly scales on mobile */
  aspect-ratio: 16 / 9; 
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: #020617; /* Prevents white flashes during crossfade */
}

/* ========================================
   CROSSFADE IMAGES
======================================== */
.carousel-track {
  width: 100%;
  height: 100%;
  position: relative;
}

.gallery-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  /* Starts slightly zoomed in */
  transform: scale(1.08); 
  /* Smooth opacity fade + slow continuous zoom */
  transition: opacity 1s ease-in-out, transform 5s linear;
}

/* The active image fades in and slowly zooms out to normal size */
.gallery-img.active {
  opacity: 1;
  transform: scale(1);
}

/* ========================================
   MOBILE TWEAKS
======================================== */
@media (max-width: 768px) {
  .gallery-carousel {
    /* Changes to a slightly taller ratio for phone screens */
    aspect-ratio: 4 / 3; 
    border-radius: 16px;
  }
}