/* Portada: cabecera con diapositivas (modules/hero.php). */
.hero {
  position: relative;
  height: 100%;
  min-height: 560px;
  overflow: hidden;
  background: var(--color-primario);
}

.hero__slides,
.hero__slide {
  position: absolute;
  inset: 0;
}

.hero__slide {
  opacity: 0;
  visibility: hidden;
  transition: opacity 900ms ease, visibility 0s linear 900ms;
}

.hero__slide.is-active {
  opacity: 1;
  visibility: visible;
  transition: opacity 900ms ease;
}

.hero__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Velo para que el texto se lea sobre cualquier foto. */
.hero__slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(10, 26, 46, 0.72) 0%, rgba(10, 26, 46, 0.38) 45%, rgba(10, 26, 46, 0) 75%);
}

.hero__content {
  position: relative;
  z-index: 1;
  height: 100%;
  display: flex;
  align-items: center;
  box-sizing: border-box;
  padding-top: 150px;
  padding-bottom: 130px;
}

.hero__text {
  max-width: 34rem;
  color: var(--color-blanco);
}

.hero__kicker {
  display: inline-block;
  margin: 0 0 1rem;
  padding-bottom: 0.4rem;
  border-bottom: 3px solid var(--color-secundario);
  font-family: var(--font-secondary);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-blanco);
}

.hero__title {
  margin: 0 0 1rem;
  font-family: var(--font-primary);
  font-size: clamp(2.4rem, 5.2vw, 4.4rem);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  text-wrap: balance;
  color: var(--color-blanco);
}

.hero__lead {
  margin: 0 0 1.75rem;
  font-size: 1.1rem;
  line-height: 1.55;
  color: var(--color-blanco);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 0;
}

.hero__slide.is-active .hero__text > * {
  animation: hero-in 700ms var(--e) both;
}

.hero__slide.is-active .hero__text > :nth-child(2) { animation-delay: 80ms; }
.hero__slide.is-active .hero__text > :nth-child(3) { animation-delay: 160ms; }
.hero__slide.is-active .hero__text > :nth-child(4) { animation-delay: 240ms; }

@keyframes hero-in {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}

.hero__badge {
  position: absolute;
  z-index: 3;
  right: max(24px, calc((100vw - 1210px) / 2));
  bottom: 150px;
  width: 140px;
  height: 140px;
}

.hero__controls {
  position: absolute;
  z-index: 3;
  left: 0;
  right: 0;
  bottom: 110px;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.hero__arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 2px solid rgba(255, 255, 255, 0.85);
  border-radius: 50%;
  background: rgba(10, 26, 46, 0.35);
  color: var(--color-blanco);
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}

.hero__arrow:hover,
.hero__arrow:focus-visible {
  background: var(--color-secundario);
  border-color: var(--color-secundario);
  color: var(--color-primario);
}

.hero__dots {
  display: flex;
  gap: 2px;
}

/* Área táctil de 24 px con un punto visible más pequeño. */
.hero__dot {
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

.hero__dot::before {
  content: "";
  display: block;
  width: 10px;
  height: 10px;
  margin: auto;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
  transition: width 0.25s, background-color 0.25s;
}

.hero__dot.is-active::before {
  width: 22px;
  border-radius: 5px;
  background: var(--color-secundario);
}

.hero__arrow:focus-visible,
.hero__dot:focus-visible {
  outline: 3px solid var(--color-blanco);
  outline-offset: 2px;
}

@media (max-width: 1000px) {
  .hero__content {
    padding-top: 110px;
  }

  .hero__slide::after {
    background: linear-gradient(180deg, rgba(10, 26, 46, 0.25) 0%, rgba(10, 26, 46, 0.7) 100%);
  }

  .hero__badge {
    width: 96px;
    height: 96px;
    bottom: auto;
    top: 110px;
  }
}

@media (max-width: 600px) {
  .hero__content {
    align-items: flex-end;
    padding-bottom: 150px;
  }

  .hero__lead {
    font-size: 1rem;
  }

  .hero__controls {
    bottom: 90px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero__slide,
  .hero__slide.is-active {
    transition: none;
  }

  .hero__slide.is-active .hero__text > * {
    animation: none;
  }
}

/* El theme centra los párrafos por defecto: aquí el texto va a la izquierda. */
.hero__text,
.hero__text p {
  text-align: left;
}

@media (max-width: 600px) {
  .hero__actions .btn {
    min-height: 44px;
    padding: 10px 20px;
  }

  /* Deja libre la esquina del botón flotante de WhatsApp. */
  .hero__controls {
    box-sizing: border-box;
    padding-right: 84px;
  }
}

/* =====================================================================
   Hero del plugin Heroes (WebGL) en portada: macmax_front_hero().
   Reutiliza .hero__text/.hero__kicker/.hero__title/.hero__lead/.hero__actions/.hero__badge de arriba.
   ===================================================================== */
.hero--webgl {
  min-height: 0;
  height: 100%;
  background: #000;
}

.hero--webgl .hm-hero {
  min-height: 560px;
  /* Los bordes (nubes y trazo blanco) los pone .bannerInicio::before/::after encima. */
}

/* Velo para que el texto se lea: mismo degradado que el banner nativo (la opacidad la fija el ajuste del hero). */
.hero--webgl .hm-overlay {
  background: linear-gradient(90deg, rgba(10, 26, 46, 0.72) 0%, rgba(10, 26, 46, 0.38) 45%, rgba(10, 26, 46, 0) 75%);
}

/* Texto: a la izquierda, centrado en vertical, ancho regular-width. */
.hero--webgl .hm-slide {
  justify-content: center;
  align-items: center;
  padding: 150px 0 130px;
  text-align: left;
  box-sizing: border-box;
}

.hero--webgl .hm-content {
  width: 84vw;
  max-width: none;
  margin: 0 auto;
  text-align: left;
}

.hero--webgl .hm-content > .hero__text {
  max-width: 34rem;
  color: var(--color-blanco);
}

.hero--webgl .hm-slide.is-active .hm-content {
  pointer-events: auto;
}

/* Flechas y puntos: [‹] ●●● [›] alineados a la izquierda bajo los botones. */
.hero--webgl .hm-arrows {
  --dots-w: calc(22px + (var(--hero-n, 3) - 1) * 20px);
  top: auto;
  left: 8vw;
  bottom: 110px;
  width: calc(88px + 24px + var(--dots-w));
  height: 44px;
  z-index: 3;
  justify-content: space-between;
}

.hero--webgl .hm-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin: 0;
  border: 2px solid rgba(255, 255, 255, 0.85);
  border-radius: 50%;
  background: rgba(10, 26, 46, 0.35);
  transition: background-color 0.2s, border-color 0.2s;
}

.hero--webgl .hm-arrow svg {
  width: auto;
  height: 16px;
  margin: 0;
}

.hero--webgl .hm-arrow .arrow_path {
  fill: #fff;
  transition: fill 0.2s;
}

.hero--webgl .hm-arrow:hover,
.hero--webgl .hm-arrow:focus-visible {
  opacity: 1;
  background: var(--color-secundario);
  border-color: var(--color-secundario);
}

.hero--webgl .hm-arrow:hover .arrow_path,
.hero--webgl .hm-arrow:focus-visible .arrow_path {
  fill: var(--color-primario);
}

.hero--webgl .hm-arrow:focus-visible,
.hero--webgl .hm-dot:focus-visible {
  outline: 3px solid var(--color-blanco);
  outline-offset: 2px;
}

.hero--webgl .hm-pagination {
  top: auto;
  left: calc(8vw + 56px);
  bottom: 110px;
  width: var(--dots-w, 62px);
  height: 44px;
  z-index: 3;
}

.hero--webgl .hm-pagination ul {
  height: 100%;
  align-items: center;
  gap: 10px;
}

.hero--webgl .hm-dot {
  width: 10px;
  height: 24px;
  margin: 0;
  padding: 0;
  opacity: 1;
  transition: width 0.25s;
}

.hero--webgl .hm-dot::after {
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
  transition: background-color 0.25s;
}

.hero--webgl .hm-dot.active {
  width: 22px;
}

.hero--webgl .hm-dot.active::after {
  border-radius: 5px;
  background: var(--color-secundario);
}

@media (max-width: 1000px) {
  .hero--webgl .hm-slide {
    padding-top: 110px;
  }

  .hero--webgl .hm-overlay {
    background: linear-gradient(180deg, rgba(10, 26, 46, 0.25) 0%, rgba(10, 26, 46, 0.7) 100%);
  }

  /* El sello queda bajo la cabecera móvil (alta ~118 px): bajarlo para que se vea entero. */
  .hero--webgl .hero__badge {
    top: 134px;
  }
}

@media (max-width: 600px) {
  .hero--webgl .hm-slide {
    align-items: flex-end;
    padding-bottom: 150px;
  }

  .hero--webgl .hm-arrows,
  .hero--webgl .hm-pagination {
    bottom: 90px;
  }
}

@media (max-width: 480px) {
  .hero--webgl .hm-content {
    width: 95vw;
  }

  .hero--webgl .hm-arrows {
    left: 2.5vw;
  }

  .hero--webgl .hm-pagination {
    left: calc(2.5vw + 56px);
  }
}

/* Las nubes y el trazo blanco (.bannerInicio::before/::after, z-index 2) quedan sobre el hero: que no tapen los clics. */
.bannerInicio:has(.hero--webgl)::before,
.bannerInicio:has(.hero--webgl)::after {
  pointer-events: none;
}
