/**
 * Sección Hero — pantalla completa
 * Referencia: docs/referencia-visual.png
 */

:root {
  --esac-hero-min-height: 100vh;
  --esac-hero-min-height-safe: 100dvh;
}

.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  height: var(--esac-hero-min-height);
  height: var(--esac-hero-min-height-safe);
  max-height: var(--esac-hero-min-height-safe);
  overflow: hidden;
  color: var(--esac-color-text);
  background-color: var(--esac-color-bg);
}

/* Capa de imagen de fondo */
.hero__background {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-color: var(--esac-color-bg);
  background-image: url("../images/background_header.webp");
  background-repeat: no-repeat;
  background-position: center right;
  background-size: cover;
}

/* Overlay: oscurece y refuerza atmósfera roja según paleta ESAC */
.hero__background::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      90deg,
      rgba(1, 2, 2, 0.92) 0%,
      rgba(1, 2, 2, 0.75) 45%,
      rgba(1, 2, 2, 0.35) 70%,
      rgba(1, 2, 2, 0.15) 100%
    ),
    linear-gradient(
      180deg,
      rgba(1, 2, 2, 0.4) 0%,
      rgba(1, 2, 2, 0.1) 40%,
      rgba(1, 2, 2, 0.55) 100%
    );
}

/* Glow rojo sutil — acento de marca */
.hero__background::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      ellipse 60% 50% at 75% 45%,
      rgba(152, 10, 8, 0.25) 0%,
      transparent 70%
    ),
    radial-gradient(
      ellipse 40% 30% at 20% 80%,
      rgba(152, 10, 8, 0.12) 0%,
      transparent 60%
    );
  pointer-events: none;
}

.hero__inner {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
}

/* Contenedor del contenido hero */
.hero__content {
  flex: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
}

/* Tablet & Mobile (<= 991.98px) */
@media (max-width: 991.98px) {
  .hero {
    height: auto;
    min-height: 100dvh;
    max-height: none;
    overflow: visible;
  }

  .hero__background {
    background-position: 70% center;
  }

  .hero__background::before {
    background:
      linear-gradient(
        180deg,
        rgba(1, 2, 2, 0.88) 0%,
        rgba(1, 2, 2, 0.65) 50%,
        rgba(1, 2, 2, 0.85) 100%
      );
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero__background {
    background-attachment: scroll;
  }
}
