/* ============================================================
   CONSTRUFACH — YESO · HERO SECTION
   (rediseño traído del hero de la página de inicio)
   ============================================================ */

/* ── Sección principal ─────────────────────────────────────── */
.hero-bg {
  min-height: 100vh;
  background-color: var(--navy);
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
}

/* ── Contenedor ────────────────────────────────────────────── */
.hero-container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 6rem 3rem 4rem;
  display: grid;
  /* Texto a la izquierda, card de prueba social a la derecha */
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 4rem;
  align-items: center;
  position: relative;
  z-index: 1;
  /* Permite que .hero-img se estire a la altura del grid row */
  align-items: stretch;
}

/* La columna de texto se centra verticalmente dentro del row */
.hero-text {
  align-self: center;
  /* Limita el ancho para que el título quede en 2 líneas */
  max-width: 720px;
}

/* ── Desktop: contenido más grande para llenar el espacio ──── */
@media (min-width: 901px) {
  .hero-info {
    font-size: 1.2rem;
  }

  .hero-services li {
    font-size: 0.9rem;
    padding: 0.4rem 1rem;
  }

  .hero-link {
    font-size: 1rem;
    padding: 0.9rem 2.1rem;
  }
}

/* ── Columna texto ─────────────────────────────────────────── */
.hero-text {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.hero-title {
  font-family: 'Barlow Condensed', sans-serif;
  /* Tamaño calibrado para que el título entre en 2 líneas en desktop */
  font-size: clamp(2.1rem, 3.9vw, 3.5rem);
  font-weight: 700;
  line-height: 1.08;
  color: var(--white);
  letter-spacing: -0.01em;
  text-transform: uppercase;
  padding-left: 1.25rem;
  /* Fuerza el corte "Construcción y Reformas / en Montevideo y Canelones"
     a cualquier tamaño (em escala con la propia fuente) */
  max-width: 11.2em;
}

.hero-info {
  font-family: 'Poppins', 'Barlow', sans-serif;
  font-size: 1.05rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.6;
  padding-left: 1.25rem;
  /* Evita que quede una palabra suelta en la última línea */
  text-wrap: pretty;
}

/* ── Lista de servicios ────────────────────────────────────── */
.hero-services {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  padding-left: 1.25rem;
}

.hero-services li {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--navy);
  background: var(--white);
  padding: 0.3rem 0.85rem;
  border: 1px solid rgba(255,255,255,0.15);
  position: relative;
  clip-path: polygon(6px 0%, 100% 0%, calc(100% - 6px) 100%, 0% 100%);
  transition: background 0.25s ease, color 0.25s ease;
}

.hero-services li:hover {
  background: var(--red);
  color: var(--white);
}

/* ── Botones de acción ─────────────────────────────────────── */
.hero-links {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-left: 1.25rem;
  flex-wrap: wrap;
}

.hero-link {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.65rem 1.5rem;
  position: relative;
  overflow: hidden;
  transition: color 0.3s ease;
}

/* Primer link — relleno rojo */
.hero-link:first-child {
  background: var(--red);
  color: var(--white);
  border: 2px solid var(--red);
}

.hero-link:first-child::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--white);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease-out-expo);
}

.hero-link:first-child:hover {
  color: var(--red);
}

.hero-link:first-child:hover::before {
  transform: scaleX(1);
}

/* Contenido de los botones por encima del relleno animado (::before) */
.hero-link svg,
.hero-link span {
  position: relative;
}

/* Segundo link — contorno blanco */
.hero-link:last-child {
  color: rgba(255, 255, 255, 0.8);
  border: 2px solid rgba(255, 255, 255, 0.3);
  background: transparent;
}

.hero-link:last-child::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.08);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease-out-expo);
}

.hero-link:last-child:hover {
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.6);
}

.hero-link:last-child:hover::before {
  transform: scaleX(1);
}

.hero-link .material-symbols-outlined {
  font-size: 1rem;
  transition: transform 0.25s ease;
}

.hero-link:hover .material-symbols-outlined {
  transform: translate(3px, -3px);
}

/* ── Video fondo (solo mobile) ─────────────────────────────── */
.hero-video-bg {
  display: none;
}
.hero-video-overlay {
  display: none;
}

/* ── Card de prueba social (stats + reseña) — solo desktop ─── */
.hero-side {
  align-self: center;
  justify-self: end;
  width: 100%;
  max-width: 420px;
}

.hero-proof {
  background: var(--white);
  border-radius: 16px;
  overflow: hidden;
}

/* Cabezal con la misma foto de obra que usa mobile + costura diagonal */
.hero-proof-stats {
  display: flex;
  gap: 2.75rem;
  background-image:
    linear-gradient(180deg, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0.68) 100%),
    url('../../yeso/yeso-cielorraso-techo.webp');
  background-size: cover;
  background-position: center;
  padding: 1.6rem 1.75rem 2.1rem;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 18px), 0 100%);
}

.hero-proof-value {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 2.7rem;
  font-weight: 700;
  color: var(--white);
  line-height: 0.95;
  margin: 0;
  display: inline-flex;
  align-items: flex-start;
}

.hero-proof-value span {
  font-size: 0.5em;
  color: var(--red);
  margin-left: 0.08em;
  padding-top: 0.3em;
  line-height: 1;
}

.hero-proof-label {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.35;
  margin: 0.5rem 0 0;
}

/* Cuerpo blanco con la reseña */
.hero-proof-body {
  position: relative;
  padding: 1.3rem 1.75rem 1.5rem;
}

.hero-proof .g-review-header,
.hero-proof .g-review-text,
.hero-proof .g-review-footer {
  position: relative;
  z-index: 1;
}

/* Gradiente sobre el video para que los números sean legibles */
.hero-img::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(10, 12, 16, 0.88) 0%,
    rgba(10, 12, 16, 0.15) 55%,
    transparent 100%
  );
  z-index: 1;
  pointer-events: none;
  border-radius: inherit;
}

/* Video llena todo el panel */
.hero-video-el {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  z-index: 0;
}

.hero-img-fallback {
  display: none;
}

/* ── Números / stats: superpuestos al pie del video ─────────── */
.hero-numbers {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  gap: 0;
  z-index: 2;
  border-top: 1px solid rgba(255,255,255,0.12);
  background: rgba(10, 12, 16, 0.35);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.hero-number {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1.25rem 0.75rem;
  position: relative;
  transition: background 0.3s ease;
}

.hero-number:not(:last-child)::after {
  content: '';
  position: absolute;
  right: 0;
  top: 20%;
  bottom: 20%;
  width: 1px;
  background: rgba(255,255,255,0.12);
}

.hero-number:hover {
  background: rgba(218, 33, 65, 0.08);
}

.hero-number h2 {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 700;
  color: var(--white);
  line-height: 1;
  letter-spacing: -0.02em;
}

.hero-number span {
  font-family: 'Poppins', 'Barlow', sans-serif;
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: rgba(255,255,255,0.45);
  text-transform: uppercase;
  margin-top: 0.35rem;
  line-height: 1.4;
}

/* ── Accesibilidad ─────────────────────────────────────────── */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  /* Quitar foto de fondo — el video la reemplaza */
  .hero-bg {
    background-image: none !important;
    /* Alto natural según contenido, sin forzar viewport completo */
    min-height: 0;
  }

  /* Video fondo: cubre toda la sección */
  .hero-video-bg {
    display: block;
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    z-index: 0;
  }

  /* Overlay plano sin gradiente */
  .hero-video-overlay {
    display: block;
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
  }

  /* Todo el contenido encima del overlay */
  .hero-container {
    grid-template-columns: 1fr;
    /* 20px extra arriba y abajo respecto al 5rem/3rem original */
    padding: 6.25rem 1.5rem 4.25rem;
    gap: 3rem;
    position: relative;
    z-index: 2;
  }

  /* Ocultar la card de prueba social en mobile — los stats viven en su propia sección */
  .hero-side {
    display: none;
  }

  .hero-title {
    letter-spacing: -0.03em;
    max-width: none;
    /* Tamaño derivado del ancho útil (100vw menos padding) */
    font-size: clamp(2rem, calc((100vw - 3rem) / 7.2), 3.2rem);
  }

  /* Sin la línea roja, el padding-left extra desbalancea el contenido */
  .hero-title,
  .hero-info,
  .hero-links {
    padding-left: 0;
  }

  /* Texto de apoyo: más grande y con más aire para que se lea fácil */
  .hero-info {
    font-size: 1.2rem;
    line-height: 1.7;
    color: var(--white);
  }

  /* En mobile no va la lista de servicios: solo título, descripción y CTAs */
  .hero-services {
    display: none;
  }

}

@media (max-width: 480px) {
  .hero-links {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-link {
    width: 100%;
    justify-content: center;
    padding-top: 1.1rem;
    padding-bottom: 1.1rem;
    font-size: 1.15rem;
    border-radius: 999px;
  }

  /* "Ver trabajos": texto blanco pleno sobre fondo blanco translúcido */
  .hero-link:last-child {
    color: var(--white);
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.35);
  }

}
/* ── Fondos rotativos (solo mobile) ────────────────────────── */
.hero-slides {
  display: none;
}

@media (max-width: 900px) {
  .hero-video-bg,
  .hero-video-overlay {
    display: none;
  }

  .hero-bg {
    background-color: var(--navy);
  }

  .hero-slides {
    display: block;
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
  }

  .hero-slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    opacity: 0;
    transition: opacity 1.4s ease-in-out;
  }

  .hero-slide.is-active {
    opacity: 1;
  }

  /* Velo oscuro sobre las fotos para que el texto blanco se lea */
  .hero-slides::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(10, 12, 16, 0.5);
    z-index: 1;
  }
}
