/* ============================================================
   PROPH S.A.S — hero.css  (sección 1, fondo oscuro)
   ============================================================ */

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh; /* mejor soporte en móviles (barra de UI dinámica) */
  display: flex;
  flex-direction: column;
  /* El bloque de texto y la barra inferior se reparten dentro del alto
     exacto del viewport: nada de "Desliza para conocer más" queda fuera. */
  justify-content: space-between;
  padding: clamp(5rem, 8vw, 6.5rem) 0 0;
  color: var(--color-text-light);
  background: var(--color-dark-bg) url("../assets/img/desktop/hero-bg.webp") center / cover no-repeat;
  isolation: isolate;
  --hero-accent: #a9d8f0;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  z-index: -1;
  /* Mezcla gris-azul: arranca en un azul pizarra muy oscuro (texto) y se
     funde hacia el azul de marca del final de la página, cada vez más
     abierto para que el edificio conserve sus colores. Dos capas finas
     (arriba y abajo) ayudan al menú y a los contadores. */
  background:
    linear-gradient(180deg, rgba(9, 19, 32, 0.52) 0%, rgba(9, 19, 32, 0) 22%, rgba(9, 19, 32, 0) 70%, rgba(9, 19, 32, 0.57) 100%),
    linear-gradient(100deg, rgba(12, 27, 46, 0.97) 0%, rgba(14, 34, 60, 0.97) 36%, rgba(17, 46, 78, 0.71) 62%, rgba(22, 71, 124, 0.35) 100%);
}

/* ---------- Fondo rotativo (carrusel de edificios) ---------- */
.hero__bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  overflow: hidden;
}
.hero__slide {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  opacity: 0;
  transform: scale(1);
  transition: opacity 1.4s ease, transform 9s linear;
}
.hero__slide:first-child { background-image: url("../assets/img/desktop/1_edf.webp"); }
.hero__slide.is-active { opacity: 1; transform: scale(1.07); will-change: opacity, transform; }

.hero__inner {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding-inline: var(--gutter);
  padding-top: clamp(2rem, 5vw, 5rem); /* baja el bloque de texto un poco */
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero__eyebrow {
  font-size: clamp(0.68rem, 0.8vw, 0.8rem);
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--hero-accent);
  margin-bottom: clamp(0.6rem, 1.2vw, 1rem);
}
.hero__eyebrow span { opacity: 0.5; margin: 0 0.5rem; }

.hero__title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(1.7rem, 2.85vw, 2.7rem);
  line-height: 1.1;
  max-width: 22ch;
  margin-bottom: clamp(0.75rem, 1.4vw, 1.15rem);
}
.hero__title span,
.hero__title em { display: block; }
.hero__title em { font-style: normal; color: var(--hero-accent); }

.hero__lead {
  max-width: 40rem;
  font-size: clamp(1.08rem, 1.2vw, 1.26rem);
  line-height: 1.5;
  /* Justificado sin cortar palabras (nada de "admi-nistración") */
  text-align: justify;
  hyphens: none;
  -webkit-hyphens: none;
  text-wrap: pretty;
  color: rgba(245, 246, 242, 0.95);
  text-shadow: 0 1px 12px rgba(10, 20, 34, 0.45);
  margin-bottom: clamp(0.7rem, 1.2vw, 1rem);
}

.hero__tagline {
  font-family: var(--font-serif);
  font-size: clamp(0.95rem, 1.1vw, 1.15rem);
  color: var(--hero-accent);
  text-shadow: 0 1px 12px rgba(10, 20, 34, 0.45);
  margin-bottom: clamp(1rem, 1.8vw, 1.5rem);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: clamp(1.5rem, 2.8vw, 2.25rem);
}

/* ---------- Fila de KPIs ---------- */
.hero__stats {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: clamp(1.5rem, 3vw, 2.75rem);
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  padding-top: clamp(1rem, 1.6vw, 1.4rem);
}
.hero__stat { display: flex; align-items: center; gap: 0.85rem; }
.hero__stat svg { width: clamp(24px, 2.2vw, 30px); height: clamp(24px, 2.2vw, 30px); stroke: var(--color-accent-light); opacity: 0.85; flex-shrink: 0; }

.hero__stat strong {
  display: block;
  font-family: var(--font-sans);
  font-size: clamp(1.5rem, 2vw, 2rem);
  font-weight: 700;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  color: #fff;
}
.hero__stat span {
  display: block;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: clamp(0.7rem, 0.8vw, 0.8rem);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(245, 246, 242, 0.75);
  line-height: 1.3;
}
/* Stat destacada (+10 años): mismo tamaño que las demás, solo cambia el
   color (cambiar --lead-color para probar otro tono). */
.hero__stat--lead { --lead-color: #e3c283; }
.hero__stat--lead svg { stroke: var(--lead-color); opacity: 1; }
.hero__stat--lead strong { color: var(--lead-color); }

/* La 5ª stat no tiene número: se alinea al ritmo con solo el label */
.hero__stat--label { align-items: center; }

.hero__footbar {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: clamp(0.85rem, 1.4vw, 1.25rem) var(--gutter) clamp(1rem, 1.6vw, 1.35rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.hero__footbar-tag,
.hero__scroll span {
  font-size: clamp(0.62rem, 0.75vw, 0.7rem);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(245, 246, 242, 0.55);
}
.hero__scroll { display: flex; flex-direction: column; align-items: center; gap: 0.6rem; }
.hero__mouse {
  width: 22px; height: 34px;
  border: 1.5px solid rgba(245, 246, 242, 0.5);
  border-radius: 12px;
  position: relative;
}
.hero__mouse::after {
  content: "";
  position: absolute;
  top: 6px; left: 50%;
  width: 3px; height: 6px;
  background: rgba(245, 246, 242, 0.7);
  border-radius: 2px;
  transform: translateX(-50%);
  animation: hero-scroll 1.6s var(--ease) infinite;
}
@keyframes hero-scroll {
  0% { opacity: 0; transform: translate(-50%, 0); }
  40% { opacity: 1; }
  80%, 100% { opacity: 0; transform: translate(-50%, 10px); }
}

@media (max-width: 767px) {
  .hero {
    background-image: url("../assets/img/mobile/hero-bg-mobile.webp");
    padding-top: 6rem;
  }
  .hero__slide:first-child { background-image: url("../assets/img/mobile/1_edf.webp"); }
  .hero__overlay {
    background: linear-gradient(180deg, rgba(12, 27, 46, 0.97) 0%, rgba(15, 39, 66, 0.90) 45%, rgba(12, 27, 46, 0.97) 100%);
  }
  /* sube el bloque de texto en celular */
  .hero__inner { padding-top: 0; padding-bottom: 3rem; }
  .hero__lead { font-size: 0.86rem; line-height: 1.55; }
  .hero__stat { flex: 1 1 40%; }
  .hero__footbar { flex-direction: column; gap: 1.5rem; text-align: center; }
  .hero__eyebrow {
    font-size: 0.52rem;
    letter-spacing: 0.06em;
    line-height: 1.6;
  }
  .hero__eyebrow span { margin: 0 0.3rem; }
  .hero__footbar-tag { font-size: 0.52rem; letter-spacing: 0.1em; }
}

@media (prefers-reduced-motion: reduce) {
  .hero__mouse::after { animation: none; opacity: 1; }
  .hero__slide { transition: none; transform: none; }
  .hero__slide.is-active { transform: none; }
}
