/* ============================================================
   KATARAS EXCAVACIONES — hero.css
   Hero con foto de fondo completa + overlays dramáticos
   ============================================================ */

/* ============================================================
   SECCIÓN HERO
   ============================================================ */
.hero-section {
  position: relative;
  min-height: 100svh;   /* fallback: 100vh */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  isolation: isolate;   /* crea nuevo stacking context */
}

/* ============================================================
   CAPAS DE FONDO
   ============================================================ */

/* Contenedor de fondo */
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

/* Fotografía de fondo */
.hero-bg__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  /* Ken Burns sutil */
  animation: kenBurns 18s ease-in-out infinite alternate;
  transform-origin: center center;
}

/* Gradiente oscuro principal — da legibilidad */
.hero-bg__overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      to right,
      rgba(5, 15, 40, 0.88) 0%,
      rgba(5, 15, 40, 0.70) 50%,
      rgba(5, 15, 40, 0.30) 100%
    ),
    linear-gradient(
      to top,
      rgba(5, 15, 40, 0.75) 0%,
      transparent 50%
    );
}

/* Tinte de color azul en el borde izquierdo */
.hero-bg__tint {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    rgba(27, 62, 150, 0.45) 0%,
    transparent 55%
  );
}

/* Patrón de puntos (textura sutil sobre el overlay) */
.hero-bg__dots {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(
    rgba(255, 255, 255, 0.055) 1px,
    transparent 1px
  );
  background-size: 28px 28px;
  pointer-events: none;
}

/* ============================================================
   BREADCRUMB SEO — visualmente oculto, legible por bots
   ============================================================ */
.hero-breadcrumb {
  position: absolute;
  width: 1px; height: 1px;
  clip: rect(0,0,0,0);
  overflow: hidden;
  white-space: nowrap;
}

/* ============================================================
   CONTENEDOR PRINCIPAL
   ============================================================ */
.hero-container {
  position: relative;
  z-index: 1;
  flex: 1;
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
  padding: 80px 48px 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
  /* La imagen ya está de fondo; la columna derecha son las stats */
}

/* ============================================================
   COLUMNA IZQUIERDA — CONTENIDO
   ============================================================ */
.hero-content {
  flex: 1 1 0;
  max-width: 640px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* ── Eyebrow ── */
.hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  animation: fadeSlideUp .6s ease both;
}

.hero-eyebrow__line {
  display: block;
  width: 36px;
  height: 2px;
  background: var(--color-yellow);
  flex-shrink: 0;
}

.hero-eyebrow__text {
  font-family: var(--font-body);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--color-yellow);
}

/* ── Título H1 ── */
.hero-title {
  display: flex;
  flex-direction: column;
  gap: 8px;
  animation: fadeSlideUp .6s .1s ease both;
}

.hero-title__name {
  font-family: var(--font-display);
  font-size: clamp(3rem, 7vw, 5.5rem);
  line-height: .95;
  letter-spacing: -.01em;
  color: #fff;
  /* Sombra de texto para legibilidad extra */
  text-shadow: 0 2px 32px rgba(0,0,0,.5);
}

.hero-title__tagline {
  font-family: var(--font-body);
  font-size: clamp(1rem, 2vw, 1.35rem);
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  /* Gradiente en el texto */
  background: linear-gradient(90deg, var(--color-yellow) 0%, #fff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Descripción ── */
.hero-description {
  font-size: clamp(.95rem, 1.3vw, 1.07rem);
  line-height: 1.78;
  color: rgba(255, 255, 255, .78);
  max-width: 520px;
  animation: fadeSlideUp .6s .2s ease both;
}

.hero-description strong {
  color: #fff;
  font-weight: 700;
}

/* ── Pills de beneficios ── */
.hero-pills {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  animation: fadeSlideUp .6s .3s ease both;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 100px;
  font-size: .82rem;
  font-weight: 600;
  color: rgba(255, 255, 255, .92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: background .2s ease, border-color .2s ease;
  cursor: default;
}

.hero-pill:hover {
  background: rgba(245, 168, 0, .18);
  border-color: rgba(245, 168, 0, .45);
}

.hero-pill i {
  color: var(--color-yellow);
  font-size: .8rem;
}

/* ── Botones CTA ── */
.hero-buttons {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  animation: fadeSlideUp .6s .4s ease both;
}

/* Botón primario (WhatsApp) */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0;
  text-decoration: none;
  background: var(--color-yellow);
  color: var(--color-dark);
  border-radius: 6px;
  overflow: hidden;
  border: 2px solid var(--color-yellow);
  transition: transform .2s ease, box-shadow .2s ease;
  box-shadow: 0 4px 24px rgba(245, 168, 0, .35);
}

.btn-primary__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 100%;
  font-size: 1.4rem;
  flex-shrink: 0;
  padding: 14px 0;
  transition: background .2s ease;
}

.btn-primary__body {
  display: flex;
  flex-direction: column;
  padding: 10px 18px;
  line-height: 1.25;
}

.btn-primary__body strong {
  font-family: var(--font-body);
  font-size: .9rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.btn-primary__body small {
  font-size: .72rem;
  font-weight: 500;
  opacity: .8;
  letter-spacing: .02em;
}

.btn-primary__arrow {
  padding: 0 16px 0 8px;
  font-size: 1.1rem;
  font-weight: 700;
  transition: transform .25s ease;
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 36px rgba(245, 168, 0, .45);
}

.btn-primary:hover .btn-primary__arrow {
  transform: translateX(4px);
}

.btn-primary:hover .btn-primary__icon {
  background: rgba(0,0,0,.2);
}

/* Botón fantasma (secundario) */
.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 14px 24px;
  text-decoration: none;
  font-family: var(--font-body);
  font-size: .88rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #fff;
  border: 2px solid rgba(255,255,255,.38);
  border-radius: 6px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: background .2s ease, border-color .2s ease, transform .2s ease;
}

.btn-ghost i {
  transition: transform .3s ease;
}

.btn-ghost:hover,
.btn-ghost:focus {
  background: rgba(255,255,255,.12);
  border-color: rgba(255,255,255,.7);
  transform: translateY(-2px);
  outline: none;
}

.btn-ghost:hover i,
.btn-ghost:focus i {
  transform: translateY(4px);
}

/* ── Trust signal ── */
.hero-trust {
  display: flex;
  align-items: center;
  gap: 10px;
  animation: fadeSlideUp .6s .5s ease both;
}

.trust-stars {
  display: flex;
  gap: 3px;
}

.trust-stars i {
  color: var(--color-yellow);
  font-size: .85rem;
  filter: drop-shadow(0 0 4px rgba(245,168,0,.5));
}

.trust-text {
  font-size: .8rem;
  font-weight: 600;
  color: rgba(255,255,255,.65);
  letter-spacing: .02em;
}

/* ============================================================
   ESTADÍSTICAS FLOTANTES (columna derecha)
   ============================================================ */
.hero-stats {
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex-shrink: 0;
  animation: fadeSlideUp .6s .35s ease both;
}

.stat-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 20px 28px;
  min-width: 180px;
  /* Glass card */
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .14);
  border-left: 3px solid var(--color-yellow);
  border-radius: 8px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: background .25s ease, transform .25s ease, border-color .25s ease;
}

.stat-card:hover {
  background: rgba(255, 255, 255, .12);
  border-left-color: var(--color-blue);
  transform: translateX(-4px);
}

.stat-card__number {
  font-family: var(--font-display);
  font-size: 2.6rem;
  line-height: 1;
  font-weight: 900;
  color: #fff;
  letter-spacing: -.02em;
}

.stat-card__plus {
  color: var(--color-yellow);
  font-size: 1.8rem;
}

.stat-card__label {
  font-size: .78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: rgba(255,255,255,.55);
}

/* ============================================================
   FLECHA SCROLL
   ============================================================ */
.hero-scroll {
  position: relative;
  z-index: 1;
  align-self: center;
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.3);
  color: rgba(255,255,255,.65);
  font-size: .9rem;
  text-decoration: none;
  transition: border-color .2s ease, color .2s ease, transform .2s ease;
  animation: bounce 2.2s ease infinite, fadeSlideUp .6s .7s ease both;
}

.hero-scroll:hover {
  border-color: var(--color-yellow);
  color: var(--color-yellow);
  transform: scale(1.1);
  animation-play-state: paused;
}

/* ============================================================
   FRANJA INFERIOR DECORATIVA
   ============================================================ */
.hero-section::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(
    90deg,
    var(--color-blue) 0%,
    var(--color-yellow) 50%,
    var(--color-blue) 100%
  );
  z-index: 2;
}

/* ============================================================
   ANIMACIONES
   ============================================================ */
@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0);    }
}

@keyframes kenBurns {
  from { transform: scale(1);    }
  to   { transform: scale(1.06); }
}

@keyframes bounce {
  0%, 100% { transform: translateY(0);   }
  50%       { transform: translateY(6px); }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* ── Tablet ── */
@media (max-width: 1024px) {
  .hero-container {
    padding: 64px 36px 56px;
    gap: 36px;
  }

  .stat-card {
    padding: 16px 22px;
    min-width: 160px;
  }

  .stat-card__number { font-size: 2.2rem; }
}

/* ── Mobile (≤ 768px) ── */
@media (max-width: 768px) {
  .hero-section {
    min-height: 100svh;
    min-height: 100vh;
  }

  /* En móvil la imagen se centra más arriba (cara de excavadora) */
  .hero-bg__img {
    object-position: 65% center;
  }

  /* Overlay más oscuro en móvil para legibilidad total */
  .hero-bg__overlay {
    background:
      linear-gradient(
        to bottom,
        rgba(5, 15, 40, 0.80) 0%,
        rgba(5, 15, 40, 0.88) 100%
      );
  }

  .hero-container {
    flex-direction: column;
    align-items: flex-start;
    padding: 56px 24px 48px;
    gap: 36px;
    justify-content: flex-start;
  }

  .hero-content {
    max-width: 100%;
    gap: 22px;
  }

  .hero-title__name {
    font-size: clamp(2.4rem, 11vw, 3.5rem);
  }

  /* Stats en fila horizontal en móvil */
  .hero-stats {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 12px;
    width: 100%;
  }

  .stat-card {
    flex: 1 1 calc(50% - 6px);
    min-width: 0;
    padding: 14px 18px;
  }

  .stat-card:last-child {
    flex-basis: 100%;
  }

  .stat-card__number { font-size: 1.9rem; }

  .hero-buttons {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .btn-primary,
  .btn-ghost {
    justify-content: center;
    text-align: center;
  }

  .btn-primary__arrow { display: none; }

  .hero-pills { gap: 8px; }

  .hero-scroll { margin-bottom: 20px; }
}

/* ── Small mobile (≤ 480px) ── */
@media (max-width: 480px) {
  .hero-container {
    padding: 44px 18px 40px;
  }

  .hero-title__name {
    font-size: clamp(2.2rem, 13vw, 3rem);
  }

  .stat-card {
    flex-basis: 100%;
  }

  .hero-pill {
    font-size: .77rem;
    padding: 6px 12px;
  }
}