/* ==========================================================
   CENFIC — HERO DE INICIO
   Desktop principal: 417 px
   ========================================================== */

.hero-inicio {
  position: relative;
  width: 100%;
  height: 417px;
  overflow: hidden;
  isolation: isolate;
  color: #ffffff;

  background:
    linear-gradient(
      90deg,
      rgba(3, 28, 55, 0.96) 0%,
      rgba(3, 32, 62, 0.90) 34%,
      rgba(3, 40, 72, 0.60) 55%,
      rgba(3, 29, 55, 0.24) 100%
    ),
    url("../../../shared/img/IMAGEN-HERO-1.png")
    center center / cover no-repeat;
}

/* Contenedor interno */
.hero-inicio__inner {
  position: relative;
  z-index: 2;

  width: min(1180px, calc(100% - 48px));
  height: 100%;
  margin-inline: auto;

  display: grid;
  grid-template-columns:
    minmax(0, 1.18fr)
    minmax(330px, 0.82fr);

  align-items: center;
  gap: 28px;
}

/* ==========================================================
   BLOQUE DE TEXTO
   ========================================================== */

.hero-inicio__content {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;

  /* Sube todo el bloque de contenido del Hero */
  transform: translateY(-16px);
}

.hero-inicio__eyebrow {
  margin: 0 0 8px;

  color: #f2c94c;

  font-size: 10px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: 0.24em;
}

.hero-inicio__title {
  width: min(100%, 650px);
  margin: 0;

  color: #ffffff;

  font-size: clamp(30px, 3vw, 42px);
  line-height: 1.02;
  font-weight: 800;
  letter-spacing: -0.035em;
}

.hero-inicio__title span {
  display: block;
  color: #f2c94c;
}

.hero-inicio__lead {
  width: min(100%, 520px);
  margin: 12px 0 0;

  color: rgba(255,255,255,.93);

  font-size: 15px;
  line-height: 1.35;
  font-weight: 400;
}

/* ==========================================================
   CTA
   ========================================================== */

.hero-inicio__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;

  margin-top: 16px;
}

.hero-inicio__cta {
  min-height: 40px;
  padding-inline: 20px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  border-radius: 6px;

  font-size: 13px;
  line-height: 1;
  font-weight: 700;
  text-decoration: none;

  transition:
    transform .18s ease,
    background-color .18s ease,
    border-color .18s ease;
}

.hero-inicio__cta:hover {
  transform: translateY(-1px);
}

.hero-inicio__cta--primary {
  color: #092d53;
  background: #f2c94c;
  border: 1px solid #f2c94c;
}

.hero-inicio__cta--secondary {
  color: #ffffff;
  background: rgba(3, 30, 57, .34);
  border: 1px solid rgba(255,255,255,.82);
}

/* ==========================================================
   MÉTRICAS
   ========================================================== */

.hero-inicio__metrics {
  width: min(100%, 610px);

  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;

  margin-top: 18px;
}

.hero-metric {
  min-width: 0;
  min-height: 48px;
  padding: 7px 9px;

  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 9px;

  border: 1px solid rgba(255,255,255,.16);
  border-radius: 7px;

  background: rgba(5, 35, 65, .34);
  backdrop-filter: blur(3px);
}

.hero-metric__icon {
  flex: 0 0 auto;
  width: 25px;
  height: 25px;

  display: grid;
  place-items: center;

  color: #ffffff;
}

.hero-metric__icon svg {
  width: 22px;
  height: 22px;
}

.hero-metric__text {
  min-width: 0;
  display: block;
}

.hero-metric__text strong {
  display: block;

  color: #ffffff;

  font-size: 11px;
  line-height: 1.08;
  font-weight: 800;
}

.hero-metric__text > span {
  display: block;
  margin-top: 3px;

  color: rgba(255,255,255,.80);

  font-size: 8px;
  line-height: 1.08;
}

/* ==========================================================
   MINI SIMULADOR ORIGINAL
   Se mantienen su HTML, CSS y JS originales.
   Solo ajustamos su posición dentro del Hero nuevo.
   ========================================================== */

.hero-inicio__demo {
  min-width: 0;

  display: flex;
  align-items: flex-start;
  justify-content: flex-end;

  height: 100%;
  padding-top: 16px;
  box-sizing: border-box;
  overflow: visible;
}

.hero-inicio .app-mock {
  position: relative !important;

  top: auto !important;
  right: auto !important;
  bottom: auto !important;
  left: auto !important;

  margin: 0 !important;

  width: 410px;
  max-width: 100%;

  transform: scale(.80) !important;
  transform-origin: top right !important;
}

/* Evita que estilos antiguos del Hero reposicionen el demo */
.hero-inicio .app-window {
  width: 100%;
}

/* ==========================================================
   RESPONSIVE
   ========================================================== */

/*
 * Laptop / escritorio intermedio:
 * sube el bloque izquierdo completo para que la fila de métricas
 * quede íntegramente dentro del Hero, por encima de Accesos rápidos.
 * PC grande conserva su ajuste específico en desktop-grande.css.
 */
@media (min-width: 1001px) and (max-width: 1599px) {
  .hero-inicio__content {
    transform: translateY(-44px);
  }
}

@media (max-width: 1000px) {

  .hero-inicio__inner {
    grid-template-columns:
      minmax(0, 1.1fr)
      minmax(300px, .9fr);

    gap: 16px;
  }

  .hero-inicio__title {
    font-size: 32px;
  }

  .hero-inicio .app-mock {
    width: 380px;
    transform: scale(.78) !important;
  }
}

@media (max-width: 820px) {

  .hero-inicio {
    height: auto;
    min-height: 417px;

    /* Encuadre específico para móvil */
    background-position: 70% center;
  }

  .hero-inicio__inner {
    width: min(100% - 32px, 680px);

    grid-template-columns: 1fr;
    gap: 28px;

    padding-block: 44px;
  }

  .hero-inicio__metrics {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-inicio__demo {
    justify-content: center;
  }

  .hero-inicio .app-mock {
    transform: none !important;
  }
}

@media (max-width: 520px) {

  .hero-inicio__title {
    font-size: 29px;
  }

  .hero-inicio__actions {
    width: 100%;
  }

  .hero-inicio__cta {
    flex: 1 1 100%;
  }
}

/* ==========================================================
   ESTANDARIZACION TIPOGRAFICA DE LOS HERO
   Hero 1 es la unica referencia visual.
   ========================================================== */

.hero-inicio__eyebrow,
.featured-simulator__eyebrow,
.certificate-showcase__eyebrow {
  margin: 0 0 8px;
  color: #f2c94c;
  font-family: var(--font-body);
  font-size: 10px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.hero-inicio__title,
.featured-simulator__title,
.certificate-showcase__title {
  color: #ffffff;
  font-family: var(--font-heading);
  font-size: clamp(30px, 3vw, 42px);
  line-height: 1.02;
  font-weight: 800;
  letter-spacing: -0.035em;
  text-transform: uppercase;
}

.hero-inicio__lead,
.featured-simulator__lead,
.certificate-showcase__lead {
  color: rgba(255,255,255,.93);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.35;
  font-weight: 400;
}

.hero-inicio__cta--primary,
.featured-simulator__cta,
.certificate-showcase__submit {
  width: fit-content;
  height: auto;
  min-height: 40px;
  padding: 0 20px;
  gap: 0;
  border: 1px solid #f2c94c;
  border-radius: 6px;
  box-shadow: none;
  background: #f2c94c;
  color: #092d53;
  font-family: var(--font-body);
  font-size: 13px;
  line-height: 1;
  font-weight: 700;
  text-decoration: none;
  transition:
    transform .18s ease,
    background-color .18s ease,
    border-color .18s ease;
}

.hero-inicio__cta--primary:hover,
.featured-simulator__cta:hover,
.certificate-showcase__submit:hover {
  transform: translateY(-1px);
  border-color: #f2c94c;
  box-shadow: none;
  background: #f2c94c;
  color: #092d53;
}

.hero-inicio__cta--primary:focus-visible,
.featured-simulator__cta:focus-visible,
.certificate-showcase__submit:focus-visible {
  outline: 2px solid var(--cenfic-gold);
  outline-offset: 3px;
  border-radius: 6px;
}

.featured-simulator__cta-icon,
.certificate-showcase__submit > span[aria-hidden="true"] {
  display: none;
}

@media (max-width: 1000px) {
  .hero-inicio__title,
  .featured-simulator__title,
  .certificate-showcase__title {
    font-size: 32px;
  }
}

@media (max-width: 520px) {
  .hero-inicio__title,
  .featured-simulator__title,
  .certificate-showcase__title {
    font-size: 29px;
  }

  .featured-simulator__cta,
  .certificate-showcase__submit {
    width: 100%;
  }
}
