/* Galleria — stile 1: slide singola, frecce laterali (Figma 520:4713) */

.wh-carousel--gallery:not(.wh-carousel--gallery-style-2):not(.wh-carousel--gallery-style-3) {
  width: 100%;
}

.wh-carousel--gallery:not(.wh-carousel--gallery-style-2):not(.wh-carousel--gallery-style-3) .wh-carousel__stage {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2.875rem;
  width: 100%;
  max-width: 75rem;
  margin-inline: auto;
  padding-block: 2rem;
}

.wh-carousel--gallery:not(.wh-carousel--gallery-style-2):not(.wh-carousel--gallery-style-3) .wh-carousel__swiper {
  flex: 1 1 auto;
  max-width: 62.125rem;
  min-width: 0;
}

/* Stile 1 — bottoni sempre visibili anche su sfondo chiaro (non dipendere solo da wh-carousel.css) */
.wh-carousel--gallery:not(.wh-carousel--gallery-style-2):not(.wh-carousel--gallery-style-3) .wh-carousel__nav {
  border-radius: 50%;
  background-color: var(--color-primary, #0b1f41);
  color: var(--color-secondary, #fdb71c);
  transition: background-color 0.2s ease, opacity 0.2s ease;
}

.wh-carousel--gallery:not(.wh-carousel--gallery-style-2):not(.wh-carousel--gallery-style-3) .wh-carousel__nav:hover {
  background-color: var(--color-primary-900, #114797);
  opacity: 1;
}

.wh-carousel--gallery:not(.wh-carousel--gallery-style-2):not(.wh-carousel--gallery-style-3) .wh-carousel__nav:focus-visible {
  outline: 2px solid var(--color-secondary, #fdb71c);
  outline-offset: 2px;
}

.wh-gallery-slide {
  margin: 0;
  overflow: hidden;
  border-radius: 1rem;
  box-shadow:
    0 2px 4px 2px rgb(0 0 0 / 5%),
    0 4px 6px 1px rgb(0 0 0 / 10%);
}

.wh-gallery-slide__image {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 994 / 560;
  object-fit: cover;
}

@media (max-width: 767px) {
  .wh-carousel--gallery:not(.wh-carousel--gallery-style-2):not(.wh-carousel--gallery-style-3) .wh-carousel__stage {
    position: relative;
    display: block;
    gap: 0;
    max-width: none;
    padding-block: 1.5rem;
    padding-inline: 0;
  }

  .wh-carousel--gallery:not(.wh-carousel--gallery-style-2):not(.wh-carousel--gallery-style-3) .wh-carousel__swiper {
    max-width: none;
    width: 100%;
  }

  .wh-carousel--gallery:not(.wh-carousel--gallery-style-2):not(.wh-carousel--gallery-style-3) .wh-gallery-slide {
    border-radius: 0.75rem;
  }

  /* Frecce in overlay sull'immagine (pattern Swiper) */
  .wh-carousel--gallery:not(.wh-carousel--gallery-style-2):not(.wh-carousel--gallery-style-3) .wh-carousel__nav {
    position: absolute;
    top: 50%;
    z-index: 2;
    width: 2.25rem;
    height: 2.25rem;
    margin-top: 0;
    transform: translateY(-50%);
    box-shadow: 0 2px 10px rgb(0 0 0 / 18%);
  }

  .wh-carousel--gallery:not(.wh-carousel--gallery-style-2):not(.wh-carousel--gallery-style-3) .wh-carousel__icon {
    width: 0.875rem;
    height: 0.875rem;
  }

  .wh-carousel--gallery:not(.wh-carousel--gallery-style-2):not(.wh-carousel--gallery-style-3) .wh-carousel__prev {
    inset-inline-start: 0.75rem;
  }

  .wh-carousel--gallery:not(.wh-carousel--gallery-style-2):not(.wh-carousel--gallery-style-3) .wh-carousel__next {
    inset-inline-end: 0.75rem;
  }

  .wh-carousel--gallery:not(.wh-carousel--gallery-style-2):not(.wh-carousel--gallery-style-3) .wh-carousel__nav.swiper-button-disabled {
    transform: translateY(-50%);
  }
}

/* Galleria — stile 2: coverflow + paginazione sotto (Figma 675:11196) */

.wh-carousel--gallery-style-2 {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  max-width: 80rem;
  margin-inline: auto;
  padding-block: 2.5rem;
}

.wh-carousel--gallery-style-2 .wh-carousel__stage {
  width: 100%;
  overflow: visible;
}

.wh-carousel--gallery-style-2 .wh-carousel__swiper {
  overflow: visible;
}

.wh-carousel--gallery-style-2 .swiper-slide {
  width: clamp(14rem, 66vw, 33.75rem);
}

.wh-carousel--gallery-style-2 .wh-gallery-slide__image {
  aspect-ratio: 860 / 480;
}

.wh-carousel--gallery-style-2 .wh-carousel__footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem;
}

.wh-carousel--gallery-style-2 .wh-carousel__nav--text {
  width: 2.5rem;
  height: 2.5rem;
  background: transparent;
  color: #6b7280;
}

.wh-carousel--gallery-style-2 .wh-carousel__nav--text:hover {
  background: transparent;
  color: var(--color-primary-700, #0664ef);
  opacity: 1;
}

.wh-carousel--gallery-style-2 .wh-carousel__nav--text .wh-carousel__icon {
  width: 0.875rem;
  height: 0.875rem;
}

.wh-carousel--gallery-style-2 .wh-carousel__pagination {
  position: static;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  width: auto;
  padding: 0.5rem;
}

.wh-carousel--gallery-style-2 .swiper-pagination-bullet {
  width: 0.75rem;
  height: 0.75rem;
  margin: 0;
  background: #d1d5db;
  opacity: 0.5;
  transition: width 0.2s ease, height 0.2s ease, opacity 0.2s ease, background-color 0.2s ease;
}

.wh-carousel--gallery-style-2 .swiper-pagination-bullet-active {
  width: 1rem;
  height: 1rem;
  background: var(--color-primary-700, #0664ef);
  opacity: 1;
}

@media (max-width: 767px) {
  .wh-carousel--gallery-style-2 {
    gap: 1.25rem;
    padding-block: 1.5rem;
  }

  .wh-carousel--gallery-style-2 .swiper-slide {
    width: clamp(12rem, 78vw, 20rem);
  }
}

/* Galleria — stile 3: logo strip marquee continuo (college slider) */

.wh-carousel--gallery-style-3 {
  width: 100%;
  max-width: none;
  margin-inline: auto;
  padding-block: 1.5rem;
}

.wh-gallery-marquee {
  overflow: hidden;
  width: 100%;
  mask-image: linear-gradient(
    to right,
    transparent,
    #000 6%,
    #000 94%,
    transparent
  );
}

.wh-gallery-marquee__track {
  display: flex;
  flex-wrap: nowrap;
  width: max-content;
  animation: wh-gallery-marquee-scroll var(--wh-marquee-duration, 35s) linear infinite;
  will-change: transform;
}

.wh-gallery-marquee__group {
  display: flex;
  flex: 0 0 auto;
  flex-shrink: 0;
  align-items: center;
  margin: 0;
  padding: 0;
  list-style: none;
}

.wh-gallery-marquee__item {
  display: flex;
  flex: 0 0 auto;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: auto;
  height: 5.625rem;
  margin: 0;
  padding: 0 2rem;
}

.wh-carousel--gallery-style-3 .wh-gallery-slide {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: auto;
  margin: 0;
  overflow: visible;
  border-radius: 0;
  box-shadow: none;
}

.wh-carousel--gallery-style-3 .wh-gallery-slide__image {
  display: block;
  width: auto;
  max-width: 11rem;
  height: auto;
  max-height: 5.625rem;
  aspect-ratio: auto;
  object-fit: contain;
}

@media (max-width: 767px) {
  .wh-carousel--gallery-style-3 {
    padding-block: 1rem;
  }

  .wh-gallery-marquee__item {
    height: 4.5rem;
    padding-inline: 1.25rem;
  }

  .wh-carousel--gallery-style-3 .wh-gallery-slide__image {
    max-width: 8rem;
    max-height: 4.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .wh-gallery-marquee__track {
    animation: none;
  }

  .wh-gallery-marquee {
    overflow-x: auto;
    mask-image: none;
    -webkit-overflow-scrolling: touch;
  }

  .wh-gallery-marquee__group[aria-hidden="true"] {
    display: none;
  }
}

.wh-carousel--gallery-style-3[data-wh-marquee-static="true"] .wh-gallery-marquee__track {
  animation: none;
}

.wh-carousel--gallery-style-3[data-wh-marquee-static="true"] .wh-gallery-marquee {
  overflow-x: auto;
  mask-image: none;
  -webkit-overflow-scrolling: touch;
}

@keyframes wh-gallery-marquee-scroll {
  from {
    transform: translate3d(0, 0, 0);
  }

  to {
    transform: translate3d(-50%, 0, 0);
  }
}
