/* ==========================================================================
   AVL Expo Image Scroll
   - Fixes DnD wrapper overflow making section "wider" than others
   - No 100vw / no bleed tricks inside module
   ========================================================================== */

/* Clip overflow ONLY for the section used by this module */
.avl-expo-imgscroll-section,
.avl-expo-imgscroll-section .dnd-section,
.avl-expo-imgscroll-section .dnd-row,
.avl-expo-imgscroll-section .dnd-column,
.avl-expo-imgscroll-section .row-fluid,
.avl-expo-imgscroll-section .content-wrapper {
  overflow-x: clip;
}

@supports not (overflow: clip) {
  .avl-expo-imgscroll-section,
  .avl-expo-imgscroll-section .dnd-section,
  .avl-expo-imgscroll-section .dnd-row,
  .avl-expo-imgscroll-section .dnd-column,
  .avl-expo-imgscroll-section .row-fluid,
  .avl-expo-imgscroll-section .content-wrapper {
    overflow-x: hidden;
  }
}

/* Ensure the full-width section is black edge-to-edge */
.avl-expo-imgscroll-section {
  background: #000;
}

/* Module root */
.avl-expo-imgscroll {
  position: relative;
  margin: 0;
  width: 100%;
  max-width: 100%;
}

/* Simple padding wrapper (no bleed) */
.avl-expo-imgscroll__bleed {
  padding: clamp(20px, 3vw, 42px) 0 clamp(18px, 2.6vw, 34px);
}

/* Inner content container */
.avl-expo-imgscroll__inner {
  width: 100%;
  max-width: var(--avl-container-max, 1240px);
  margin: 0 auto;
  padding: 0 var(--avl-header-pad-x, clamp(18px, 3vw, 36px));
}

/* Scroll container */
.avl-expo-imgscroll__viewport {
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  outline: none;

  scrollbar-width: none;
  -webkit-tap-highlight-color: transparent;
  max-width: 100%;
}
.avl-expo-imgscroll__viewport::-webkit-scrollbar {
  display: none;
}

.avl-expo-imgscroll__track {
  display: flex;
  gap: clamp(16px, 2vw, 28px);
  align-items: stretch;
}

/* Cards per view */
.avl-expo-imgscroll {
  --avl-isc-per-view: 1;
}
@media (min-width: 740px) {
  .avl-expo-imgscroll { --avl-isc-per-view: 2; }
}
@media (min-width: 1060px) {
  .avl-expo-imgscroll { --avl-isc-per-view: 3; }
}

/* Slide sizing */
.avl-expo-imgscroll__slide {
  flex: 0 0 calc((100% - (clamp(16px, 2vw, 28px) * (var(--avl-isc-per-view) - 1))) / var(--avl-isc-per-view));
  scroll-snap-align: start;
  margin: 0;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
  aspect-ratio: var(--avl-isc-ratio, 16 / 9);
}

.avl-expo-imgscroll__img,
.avl-expo-imgscroll__placeholder {
  width: 100%;
  height: 100%;
  display: block;
}

.avl-expo-imgscroll__img { object-fit: cover; }

.avl-expo-imgscroll__placeholder {
  background: linear-gradient(135deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
}

/* Controls row */
.avl-expo-imgscroll__controls {
  margin-top: clamp(14px, 2vw, 22px);
  position: relative;
  height: 44px;
  z-index: 10;
}

/* Dots centered */
.avl-expo-imgscroll__dots {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  gap: 10px;
  align-items: center;
}

/* Arrows pinned to edges */
.avl-expo-imgscroll__arrow {
  all: unset;
  -webkit-appearance: none;
  appearance: none;

  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  place-items: center;

  width: 56px;
  height: 44px;

  cursor: pointer;
  color: rgba(255, 255, 255, 0.95);

  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  -webkit-tap-highlight-color: transparent;
}

.avl-expo-imgscroll__arrow svg {
  width: 40px;
  height: 40px;
}

.avl-expo-imgscroll__arrow--prev { left: 0; }
.avl-expo-imgscroll__arrow--next { right: 0; }

/* Dot buttons */
.avl-expo-imgscroll__dot {
  all: unset;
  -webkit-appearance: none;
  appearance: none;

  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.25);
  cursor: pointer;
}

.avl-expo-imgscroll__dot.is-active {
  background: rgba(255, 255, 255, 0.92);
}

/* Mobile: hide dots, keep arrows */
@media (max-width: 740px) {
  .avl-expo-imgscroll__dots { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .avl-expo-imgscroll__viewport { scroll-behavior: auto; }
}
