/* ============================================================
   HERO CAROUSEL
   Fondo del hero (z-index: 1). .hero-composition queda encima.
   ============================================================ */

.hero-carousel {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 4;
  overflow: hidden;
}

.hero-carousel__track {
  position: relative;
  width: 100%;
  height: 100%;
}

/* Slides: fade in/out */
.hero-carousel__slide {
  position: absolute;
  inset: 0;
  display: block;
  opacity: 0;
  transition: opacity 0.7s ease;
  pointer-events: none;
  text-decoration: none;
}

.hero-carousel__slide--active {
  opacity: 1;
  pointer-events: auto;
}

.hero-carousel__slide .bg-hero {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  object-position: center top;
  background-color: var(--qp-bg, #000);
}

/* ── Botones prev / next ── */
.hero-carousel__btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.hero-carousel__btn:hover,
.hero-carousel__btn:focus-visible {
  background: rgba(0, 0, 0, 0.65);
  outline: none;
}
.hero-carousel__btn--prev { left: 16px; }
.hero-carousel__btn--next { right: 16px; }

/* ── Dots: centro inferior ── */
.hero-carousel__dots {
  position: absolute;
  bottom: 180px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 4;
  display: flex;
  gap: 8px;
  align-items: center;
}

.hero-carousel__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: background 0.2s, width 0.25s, border-radius 0.25s;
  -webkit-tap-highlight-color: transparent;
}
.hero-carousel__dot--active {
  background: #fff;
  width: 22px;
  border-radius: 4px;
}

/* ── CTA wrapper: derecha inferior ── */
.hero-carousel__cta {
  position: absolute;
  bottom: 130px;
  right: 24px;
  z-index: 4;
}

/* ── Responsive ── */
@media (max-width: 1200px) {
  .hero-carousel__slide .bg-hero {
  object-fit: cover;}
}
@media (max-width: 480px) {
  .hero-carousel__btn {
    width: 36px;
    height: 36px;
    font-size: 22px;
  }
  .hero-carousel__btn--prev { left: 8px; }
  .hero-carousel__btn--next { right: 8px; }
  .hero-carousel__cta       { right: 12px; bottom: 12px; }
  .hero-carousel__dots      { bottom: 20px; }
}

/* ============================================================
   RESPONSIVE: picture element ocupa el mismo espacio que bg-hero
   El browser elige src automáticamente según el media query del <source>
   ============================================================ */

/* <picture> hereda posición y dimensiones para que el <img> hijo
   pueda usar position:absolute inset:0 correctamente */
.hero-carousel__slide .bg-hero-picture {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: block;
}

/* Mobile (≤ 767px): imagen vertical — cover centrado */
@media (max-width: 767px) {
  .hero-carousel__slide .bg-hero {
    object-fit: cover;
    object-position: center center;
  }
}
