/* ============================================================
   Hi Languages — Sección inline
   Prefijo: hi-section__*  (no colisiona con el tema)
   ============================================================ */

/* ── Variables locales ─────────────────────────────────────── */
:root {
  --hi-navy:          #0a1a3a;
  --hi-navy-700:      #142852;
  --hi-amber:         #f59e0b;
  --hi-amber-600:     #d97706;
  --hi-amber-light:   #fef3c7;
  --hi-white:         #ffffff;
  --hi-gray-50:       #f9fafb;
  --hi-gray-500:      #6b7280;
  --hi-radius-card:   24px;
  --hi-radius-btn:    12px;
  --hi-shadow-card:   0 24px 60px -12px rgba(10, 26, 58, .22);
  --hi-shadow-btn:    0 12px 28px -12px rgba(245, 158, 11, .55);
  --hi-ease:          cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Sección wrapper ───────────────────────────────────────── */
.hi-section {
  background: linear-gradient(180deg, #f0f4ff 0%, #fff 100%);
  border-top: 1px solid rgba(10, 26, 58, .06);
  border-bottom: 1px solid rgba(10, 26, 58, .06);
  padding: 80px 24px;
}

/* ── Grid 50/50 ────────────────────────────────────────────── */
.hi-section__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}

/* ── Lado visual ───────────────────────────────────────────── */
.hi-section__visual {
  position: relative;
}

.hi-section__float-tag {
  position: absolute;
  top: -14px;
  right: 0;
  z-index: 2;
  background: var(--hi-amber);
  color: var(--hi-navy);
  font-family: 'Poppins', sans-serif;
  font-size: 11px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 99px;
  box-shadow: 0 4px 16px -4px rgba(245, 158, 11, .5);
  white-space: nowrap;
}

.hi-section__img-wrap {
  width: 100%;
  aspect-ratio: 3 / 2;
  border-radius: var(--hi-radius-card);
  overflow: hidden;
  box-shadow: var(--hi-shadow-card);
  position: relative;
}

.hi-section__img-badge {
  position: absolute;
  bottom: 20px;
  left: 20px;
  z-index: 2;
  background: rgba(255, 255, 255, .95);
  backdrop-filter: blur(8px);
  border-radius: 14px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 8px 24px -6px rgba(10, 26, 58, .18);
}

.hi-section__img-badge-icon {
  font-size: 22px;
}

.hi-section__img-badge-text {
  font-family: 'Poppins', sans-serif;
}

.hi-section__img-badge-value {
  font-size: 15px;
  font-weight: 800;
  color: var(--hi-navy);
  line-height: 1;
}

.hi-section__img-badge-label {
  font-size: 10px;
  font-weight: 500;
  color: var(--hi-gray-500);
  margin-top: 2px;
}

/* ── Lado contenido ────────────────────────────────────────── */
.hi-section__content {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.hi-section__kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Poppins', sans-serif;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--hi-amber-600);
}

.hi-section__kicker::before {
  content: '';
  display: block;
  width: 20px;
  height: 2px;
  background: var(--hi-amber);
  border-radius: 1px;
  flex-shrink: 0;
}

.hi-section__headline {
  font-family: 'Poppins', sans-serif;
  font-size: clamp(26px, 3.5vw, 40px);
  font-weight: 800;
  color: var(--hi-navy);
  line-height: 1.15;
  letter-spacing: -.02em;
}

.hi-section__sub {
  font-family: 'Poppins', sans-serif;
  font-size: 15px;
  font-weight: 400;
  color: var(--hi-gray-500);
  line-height: 1.7;
}

/* ── Bullets ───────────────────────────────────────────────── */
.hi-section__bullets {
  display: flex;
  flex-direction: column;
  gap: 10px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.hi-section__bullet {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Poppins', sans-serif;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--hi-navy-700);
}

.hi-section__bullet-check {
  width: 22px;
  height: 22px;
  min-width: 22px;
  background: linear-gradient(135deg, var(--hi-amber), var(--hi-amber-600));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: var(--hi-navy);
  font-weight: 800;
  box-shadow: 0 3px 8px -2px rgba(245, 158, 11, .4);
}

/* ── CTA area ──────────────────────────────────────────────── */
.hi-section__cta-area {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hi-section__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  font-weight: 600;
  padding: 15px 28px;
  background: linear-gradient(135deg, var(--hi-amber) 0%, var(--hi-amber-600) 100%);
  color: var(--hi-navy);
  border: none;
  border-radius: var(--hi-radius-btn);
  cursor: pointer;
  box-shadow: var(--hi-shadow-btn);
  transition: transform .25s var(--hi-ease), box-shadow .25s var(--hi-ease);
  width: fit-content;
  text-decoration: none;
}

.hi-section__btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 36px -12px rgba(245, 158, 11, .65);
}

.hi-section__btn:focus-visible {
  outline: 3px solid var(--hi-amber);
  outline-offset: 3px;
}

.hi-section__btn svg {
  transition: transform .2s;
  flex-shrink: 0;
}

.hi-section__btn:hover svg {
  transform: translateX(3px);
}

.hi-section__microcopy {
  font-family: 'Poppins', sans-serif;
  font-size: 11.5px;
  font-weight: 400;
  color: var(--hi-gray-500);
}

/* ── Prueba social ─────────────────────────────────────────── */
.hi-section__social-proof {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hi-section__stars {
  color: var(--hi-amber);
  font-size: 13px;
  letter-spacing: 1px;
}

.hi-section__social-text {
  font-family: 'Poppins', sans-serif;
  font-size: 12px;
  font-weight: 500;
  color: var(--hi-gray-500);
}

/* ============================================================
   Hi Languages — Pop-up Exit-Intent (Split 50/50)
   Prefijo: hi-popup__*
   ============================================================ */

/* ── Variables (reutiliza las del bloque :root de arriba) ─── */

/* ── <dialog> base ─────────────────────────────────────────── */
#hi-popup {
  border: none;
  background: transparent;
  padding: 0;
  margin: auto;
  max-width: 95vw;
  max-height: 95dvh;
  overflow: visible;
}

#hi-popup::backdrop {
  background: rgba(5, 10, 25, 0.75);
  backdrop-filter: blur(6px);
}

/* ── Animación de entrada ──────────────────────────────────── */
@media (prefers-reduced-motion: no-preference) {
  #hi-popup[open] {
    animation: hiPopupIn .35s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
  }

  @keyframes hiPopupIn {
    from { opacity: 0; transform: scale(.92) translateY(14px); }
    to   { opacity: 1; transform: scale(1)   translateY(0);    }
  }
}

/* Animación de salida (clase añadida por JS) */
@media (prefers-reduced-motion: no-preference) {
  #hi-popup.hi-popup--closing {
    animation: hiPopupOut .2s cubic-bezier(0.4, 0, 1, 1) both;
  }

  @keyframes hiPopupOut {
    from { opacity: 1; transform: scale(1)    translateY(0);   }
    to   { opacity: 0; transform: scale(.95)  translateY(6px); }
  }
}

/* ── Layout split ──────────────────────────────────────────── */
.hi-popup__split {
  width: min(720px, 92vw);
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 400px;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 32px 80px -16px rgba(0, 0, 0, .45);
  position: relative;
  background: #fff;
}

/* ── Botón cerrar ──────────────────────────────────────────── */
.hi-popup__close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 10;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: rgba(10, 26, 58, .08);
  color: var(--hi-navy);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s, color .2s;
}

.hi-popup__close:hover {
  background: rgba(10, 26, 58, .16);
}

.hi-popup__close:focus-visible {
  outline: 3px solid var(--hi-amber);
  outline-offset: 2px;
}

/* ── Lado imagen ───────────────────────────────────────────── */
.hi-popup__visual {
  position: relative;
  overflow: hidden;
}

.hi-popup__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

/* Logo flotante sobre imagen */
.hi-popup__logo {
  position: absolute;
  top: 20px;
  left: 20px;
  z-index: 2;
  font-family: 'Poppins', sans-serif;
  font-weight: 800;
  font-size: 18px;
  line-height: 1;
  letter-spacing: -.01em;
  text-shadow: 0 1px 8px rgba(0, 0, 0, .3);
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
}

.hi-popup__logo-hi   { color: var(--hi-amber); }
.hi-popup__logo-lang { color: #fff; }

/* ── Lado contenido ────────────────────────────────────────── */
.hi-popup__content {
  padding: 40px 36px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
  background: #fff;
}

/* Kicker */
.hi-popup__kicker {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hi-popup__kicker-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--hi-amber);
  flex-shrink: 0;
}

.hi-popup__kicker-text {
  font-family: 'Poppins', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--hi-amber-600);
}

/* Título */
.hi-popup__headline {
  font-family: 'Poppins', sans-serif;
  font-size: clamp(20px, 2.5vw, 26px);
  font-weight: 800;
  color: var(--hi-navy);
  line-height: 1.2;
  letter-spacing: -.02em;
  margin: 0;
}

/* Subtexto */
.hi-popup__sub {
  font-family: 'Poppins', sans-serif;
  font-size: 13px;
  font-weight: 400;
  color: var(--hi-gray-500);
  line-height: 1.65;
  margin: 0;
}

/* ── Botón CTA ─────────────────────────────────────────────── */
.hi-popup__cta {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  font-weight: 600;
  padding: 14px 20px;
  background: linear-gradient(135deg, var(--hi-amber) 0%, var(--hi-amber-600) 100%);
  color: var(--hi-navy);
  border-radius: 12px;
  text-decoration: none;
  box-shadow: 0 12px 28px -12px rgba(245, 158, 11, .55);
  transition: transform .25s var(--hi-ease), box-shadow .25s var(--hi-ease);
  width: 100%;
  text-align: center;
  margin-top: 4px;
}

.hi-popup__cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 36px -12px rgba(245, 158, 11, .65);
}

.hi-popup__cta:focus-visible {
  outline: 3px solid var(--hi-amber);
  outline-offset: 3px;
}

/* Microcopy */
.hi-popup__microcopy {
  font-family: 'Poppins', sans-serif;
  font-size: 10.5px;
  color: var(--hi-gray-500);
  text-align: center;
  margin: 0;
}

/* ── Responsive pop-up ─────────────────────────────────────── */
@media (max-width: 768px) {
  .hi-popup__split {
    grid-template-columns: 1fr;
    width: 92vw;
    min-height: auto;
  }

  .hi-popup__visual {
    height: 180px;
  }

  .hi-popup__img {
    object-position: center 30%;
  }

  .hi-popup__content {
    padding: 28px 24px 32px;
    gap: 12px;
    justify-content: flex-start;
  }

  .hi-popup__headline {
    font-size: 20px;
  }
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 768px) {
  .hi-section {
    padding: 56px 20px;
  }

  .hi-section__inner {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .hi-section__img-wrap {
    aspect-ratio: 16 / 9;
  }

  .hi-section__visual {
    order: 0;
  }

  .hi-section__content {
    order: 1;
  }

  .hi-section__float-tag {
    right: 0;
    font-size: 10px;
  }

  .hi-section__btn {
    width: 100%;
  }
}
