/* ============================================================
   CONSTRUFACH � HERO-STATS
   Secci�n de stats inmediatamente bajo el hero
   Fondo: continuaci�n visual con hero_bg_stats.webp + overlay neutro
   ============================================================ */

.hero-stats {
  position: relative;
  padding: 3rem 1.5rem 3.5rem;
  background-image:
    linear-gradient(180deg, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0.70) 100%),
    url('../../images/hero/hero_bg_stats.webp');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  overflow: hidden;
  isolation: isolate;
}

/* Acento rojo superior � marca el inicio de la secci�n */
.hero-stats::after {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 64px;
  height: 3px;
  background: var(--red);
  border-radius: 0 0 2px 2px;
  z-index: 1;
}

/* -- Grid ----------------------------------------------------- */
.hero-stats-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem 1.5rem;
  max-width: 480px;
  margin: 0 auto;
}

/* -- Stat individual ------------------------------------------ */
.hero-stat {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

.hero-stat-value {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: clamp(2.2rem, 11vw, 3.2rem);
  font-weight: 700;
  color: var(--white);
  line-height: 0.95;
  letter-spacing: -0.025em;
  margin: 0;
  display: inline-flex;
  align-items: flex-start;
}

.hero-stat-mark {
  font-size: 0.45em;
  font-weight: 700;
  color: var(--red);
  margin-left: 0.08em;
  padding-top: 0.35em;
  line-height: 1;
}

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

/* ============================================================
   TESTIMONIO — cita simple sobre tarjeta blanca
   Se usa en mobile (sección stats) y dentro de la card del hero
   en desktop (.hero-proof .tq).
   ============================================================ */
.tq {
  position: relative;
  z-index: 1;
  max-width: 480px;
  margin: 0 auto;
  background: #ffffff;
  border-radius: 16px;
  padding: 2.4rem 1.6rem 1.5rem;
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.06),
    0 12px 32px rgba(0, 0, 0, 0.22);
  text-align: left;
  overflow: hidden;
}

/* Comilla gigante, translúcida, detrás del texto (arriba a la izquierda) */
.tq-mark {
  position: absolute;
  top: -0.05em;
  left: 0.5rem;
  z-index: 0;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 9rem;
  font-weight: 700;
  line-height: 1;
  color: var(--red);
  opacity: 0.12;
  pointer-events: none;
  user-select: none;
}

.tq-text {
  position: relative;
  z-index: 1;
  margin: 0;
  font-family: 'Poppins', 'Barlow', sans-serif;
  font-size: 1.08rem;
  font-weight: 500;
  line-height: 1.6;
  color: var(--navy);
  text-wrap: pretty;
}

.tq-footer {
  position: relative;
  z-index: 1;
  margin-top: 1.2rem;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.2rem 0.6rem;
}

.tq-name {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--red);
  line-height: 1.2;
}

.tq-place {
  font-family: 'Poppins', 'Barlow', sans-serif;
  font-size: 0.8rem;
  color: #8a97a3;
  line-height: 1.3;
}

/* ── Slider de testimonios (mobile) ────────────────────────── */
.tq-slider {
  position: relative;
  z-index: 1;
  max-width: 520px;
  margin: 0 auto;
}

/* El swiper se desborda hacia la derecha para que la siguiente
   tarjeta asome; el padding evita recortar la sombra */
/* Selector anidado: el CSS de Swiper (cargado después) define
   .swiper { padding: 0; margin: auto } y pisaría esta regla */
.tq-slider .tq-swiper {
  overflow: hidden;
  /* Padding para que la sombra de la card no se recorte, compensado
     con márgenes negativos iguales: no agrega espacio. A la derecha
     llega al borde de la pantalla para que asome la siguiente card. */
  padding: 16px 1.5rem 52px 28px;
  margin: -16px -1.5rem -52px -28px;
}

.tq-swiper .swiper-slide {
  height: auto;
  display: flex;
}

.tq-swiper .tq {
  width: 100%;
  max-width: none;
  margin: 0;
  border-radius: 20px;
  border: 1px solid rgba(11, 53, 87, 0.06);
  /* Sombra en capas, teñida de navy, para despegar la card del fondo blanco */
  box-shadow:
    0 1px 2px rgba(11, 53, 87, 0.06),
    0 6px 14px -4px rgba(11, 53, 87, 0.10),
    0 24px 48px -18px rgba(11, 53, 87, 0.28);
  transition: transform 0.45s ease, opacity 0.45s ease;
}

/* La tarjeta que asoma va un poco apagada */
.tq-swiper .swiper-slide:not(.swiper-slide-active) .tq {
  opacity: 0.6;
  transform: scale(0.97);
}

/* Dentro de la card del hero (desktop) ya hay fondo blanco:
   sin sombra ni radio; solo aire arriba para la comilla */
.hero-proof .tq {
  max-width: none;
  border-radius: 0;
  box-shadow: none;
  padding: 1.2rem 0 0;
  overflow: visible;
}

.hero-proof .tq-mark {
  left: -0.4rem;
}

/* ============================================================
   CARD ESTILO RESE�A DE GOOGLE (legado: la usan otras páginas)
   ============================================================ */
.g-review {
  position: relative;
  z-index: 1;
  max-width: 480px;
  margin: 2.5rem auto 0;
  background: #ffffff;
  border-radius: 12px;
  padding: 1.25rem 1.25rem 1.1rem;
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.08),
    0 8px 24px rgba(0, 0, 0, 0.28);
  font-family: 'Roboto', 'Barlow', sans-serif;
  color: #202124;
  text-align: left;
}

.g-review-header {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.75rem;
  align-items: center;
}

.g-review-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-family: 'Roboto', 'Barlow', sans-serif;
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: 0;
  flex-shrink: 0;
}

.g-review-meta {
  min-width: 0;
}

.g-review-name {
  font-size: 0.92rem;
  font-weight: 500;
  color: #202124;
  line-height: 1.2;
  margin: 0;
}

.g-review-stars {
  display: inline-flex;
  gap: 1px;
  line-height: 0;
  margin-top: 0.25rem;
}

.g-review-stars svg {
  display: block;
}

.g-review-text {
  margin: 0.85rem 0 0;
  font-size: 0.9rem;
  line-height: 1.5;
  color: #3c4043;
  font-weight: 400;
}

.g-review-footer {
  margin-top: 0.85rem;
  padding-top: 0.7rem;
  border-top: 1px solid #e8eaed;
}

.g-review-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  font-weight: 500;
  color: #1e8e3e;
  letter-spacing: 0.01em;
}

.g-review-tag svg {
  flex-shrink: 0;
}

/* ============================================================
   MOBILE � transici�n navy desde el hero
   El top de la secci�n arranca con navy s�lido que matchea
   el bottom del overlay del hero ? costura invisible.
   ============================================================ */
@media (max-width: 900px) {
  /* Fondo blanco limpio; las tarjetas se destacan por la sombra */
  .hero-stats {
    background-color: var(--white);
    background-image: none;
    padding: 3rem 1.5rem 3.25rem;
    /* La tarjeta que asoma se recorta en el borde de la pantalla */
    overflow: hidden;
  }

  /* Sin acento rojo arriba � la transici�n es continua */
  .hero-stats::after {
    display: none;
  }

  /* En mobile se ocultan los stats: solo queda la tarjeta de testimonio */
  .hero-stats-grid {
    display: none;
  }

  .g-review {
    margin-top: 0;
  }

  /* Textos m�s grandes para lectura c�moda (p�blico mayor) */
  .hero-stat-label {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.85);
  }

  .g-review-name {
    font-size: 1.1rem;
  }

  .g-review-stars svg {
    width: 17px;
    height: 17px;
  }

  .g-review-text {
    font-size: 1.08rem;
    line-height: 1.55;
  }

  .g-review-tag {
    font-size: 0.95rem;
  }
}

/* ============================================================
   DESKTOP — la secci�n se oculta: los stats y la rese�a viven
   dentro del hero (card .hero-proof)
   ============================================================ */
@media (min-width: 901px) {
  .hero-stats {
    display: none;
  }
}

/* ============================================================
   DESKTOP � 4 columnas en una sola fila
   ============================================================ */
@media (min-width: 768px) {
  .hero-stats {
    padding: 5rem 2rem;
  }

  .hero-stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
    max-width: 560px;
  }

  .hero-stat-label {
    font-size: 0.85rem;
  }

  .g-review {
    margin-top: 3rem;
    padding: 1.4rem 1.5rem 1.25rem;
  }

  .g-review-text {
    font-size: 0.95rem;
  }
}
