/*--------------------------------------------------------------
# Hero Carousel (home page) — Proposta A
# Carosello fotografico a tutto schermo con schede di avanzamento.
# Richiede Swiper (assets/vendor/swiper) e assets/js/hero-carousel.js
--------------------------------------------------------------*/
.hero-carousel {
  --hero-yellow: #FEC30C;
  --hero-ink: #2b2f24;
  position: relative;
  padding: 0; /* annulla il padding-bottom generico delle <section> del tema */
  margin-top: 70px; /* altezza dell'header fisso */
  height: clamp(520px, calc(100vh - 70px), 720px);
  background: #1b1d17;
  color: #fff;
  overflow: hidden;
  z-index: 1;
}

.hero-carousel .hero-swiper,
.hero-carousel .swiper-wrapper,
.hero-carousel .hero-slide {
  height: 100%;
}

.hero-slide {
  position: relative;
  overflow: hidden;
  background: #1b1d17;
}

.hero-slide__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform-origin: center;
}

.hero-slide__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(20, 22, 16, .80) 0%, rgba(20, 22, 16, .58) 45%, rgba(20, 22, 16, .14) 78%);
}

.hero-slide__content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-bottom: 110px; /* spazio per le schede in basso */
}

.hero-slide__inner {
  max-width: 640px;
}

.hero-slide__eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 18px;
  font-family: "Raleway", sans-serif;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--hero-yellow);
}

.hero-slide__eyebrow::before {
  content: "";
  width: 36px;
  height: 3px;
  background: var(--hero-yellow);
  flex-shrink: 0;
}

.hero-slide__title {
  margin: 0 0 18px;
  font-family: "Raleway", sans-serif;
  font-weight: 700;
  font-size: 52px;
  line-height: 1.12;
  color: #fff;
}

.hero-slide__text {
  margin: 0 0 30px;
  max-width: 560px;
  font-size: 19px;
  line-height: 1.6;
  color: #eceee7;
}

.hero-slide__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.hero-btn {
  display: inline-block;
  font-family: "Raleway", sans-serif;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: .5px;
  padding: 14px 30px;
  border-radius: 50px;
  border: 2px solid transparent;
  text-align: center;
  transition: background .3s, color .3s, border-color .3s;
}

.hero-btn--primary {
  background: var(--hero-yellow);
  border-color: var(--hero-yellow);
  color: var(--hero-ink);
}

.hero-btn--primary:hover {
  background: #ffd23f;
  border-color: #ffd23f;
  color: var(--hero-ink);
}

.hero-btn--ghost {
  border-color: #fff;
  color: #fff;
}

.hero-btn--ghost:hover {
  background: rgba(255, 255, 255, .14);
  color: #fff;
}

/* Animazioni: zoom lento della foto e ingresso del testo sulla slide attiva */
.hero-carousel .swiper-slide-active .hero-slide__img {
  animation: heroKenBurns 9s ease-out forwards;
}

.hero-carousel .swiper-slide-active .hero-slide__inner {
  animation: heroTextIn .8s ease .15s both;
}

@keyframes heroKenBurns {
  from { transform: scale(1); }
  to   { transform: scale(1.08); }
}

@keyframes heroTextIn {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: none; }
}

/* Controlli: precedente / pausa / successiva */
.hero-controls {
  position: absolute;
  z-index: 5;
  top: 36px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  pointer-events: none;
}

.hero-ctl {
  pointer-events: auto;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .6);
  background: rgba(255, 255, 255, .08);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-size: 22px;
  line-height: 1;
  transition: background .3s;
}

.hero-ctl:hover {
  background: rgba(255, 255, 255, .22);
}

.hero-pause .bi-play-fill,
.hero-carousel.is-paused .hero-pause .bi-pause-fill {
  display: none;
}

.hero-carousel.is-paused .hero-pause .bi-play-fill {
  display: inline;
}

/* Schede in basso con barra di avanzamento */
.hero-tabs {
  position: absolute;
  z-index: 5;
  left: 0;
  right: 0;
  bottom: 40px;
}

.hero-tabs__list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}

.hero-tab {
  background: none;
  border: 0;
  padding: 0;
  text-align: left;
  color: rgba(255, 255, 255, .65);
  display: flex;
  flex-direction: column;
  gap: 10px;
  cursor: pointer;
}

.hero-tab__track {
  position: relative;
  height: 3px;
  width: 100%;
  background: rgba(255, 255, 255, .3);
  overflow: hidden;
}

.hero-tab__fill {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 0;
  background: var(--hero-yellow);
}

.hero-tab__label {
  font-family: "Raleway", sans-serif;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: .3px;
  transition: color .3s;
}

.hero-tab:hover,
.hero-tab.is-active {
  color: #fff;
}

/* Focus visibile per chi naviga da tastiera */
.hero-carousel a:focus-visible,
.hero-carousel button:focus-visible {
  outline: 3px solid var(--hero-yellow);
  outline-offset: 3px;
}

/* Tablet e smartphone: testo in basso, schede ridotte a pallini */
@media (max-width: 991.98px) {
  .hero-carousel {
    height: calc(100vh - 70px);
    height: calc(100svh - 70px);
    min-height: 560px;
    max-height: 820px;
  }

  .hero-slide__scrim {
    background: linear-gradient(0deg, rgba(20, 22, 16, .92) 0%, rgba(20, 22, 16, .72) 48%, rgba(20, 22, 16, .12) 82%);
  }

  .hero-slide__content {
    justify-content: flex-end;
    padding-bottom: 92px;
  }

  .hero-slide__eyebrow {
    font-size: 12px;
    letter-spacing: 1.6px;
    margin-bottom: 12px;
  }

  .hero-slide__title {
    font-size: 30px;
    line-height: 1.18;
    margin-bottom: 12px;
  }

  .hero-slide__text {
    font-size: 16px;
    margin-bottom: 20px;
  }

  .hero-slide__actions {
    flex-direction: column;
    gap: 10px;
  }

  .hero-controls .hero-prev,
  .hero-controls .hero-next {
    display: none;
  }

  .hero-controls {
    top: auto;
    bottom: 26px;
  }

  .hero-tabs {
    bottom: 26px;
    right: auto;
  }

  .hero-tabs__list {
    display: flex;
    gap: 0;
  }

  .hero-tab {
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
  }

  .hero-tab__track {
    width: 8px;
    height: 8px;
    border-radius: 4px;
    background: rgba(255, 255, 255, .55);
    transition: width .3s, background .3s;
  }

  .hero-tab.is-active .hero-tab__track {
    width: 26px;
    background: var(--hero-yellow);
  }

  .hero-tab__fill,
  .hero-tab__label {
    display: none;
  }
}

/* Rispetta l'impostazione "riduci movimento" del dispositivo */
@media (prefers-reduced-motion: reduce) {
  .hero-carousel .swiper-slide-active .hero-slide__img,
  .hero-carousel .swiper-slide-active .hero-slide__inner {
    animation: none;
  }
}
