/* Asistencia de Visas HN — banderas, banderines y precalificador a pantalla completa */

/* =========================================================
   Banderas
   ========================================================= */
.flag { display: block; width: 100%; height: 100%; }
.flag-inline {
  display: inline-block; width: 21px; height: 14px; border-radius: 2px; vertical-align: -2px; margin-right: 6px;
  box-shadow: 0 0 0 1px rgba(11,22,40,.12); overflow: hidden;
}
.mini-flags { display: inline-flex; gap: 5px; }
.mini-flags .flag { width: 22px; height: 14px; border-radius: 2px; box-shadow: 0 1px 3px rgba(0,0,0,.35); }
.hero-eyebrow { flex-wrap: wrap; }

/* Banderín: asta dorada + tela que ondea */
.pennants { display: inline-flex; align-items: flex-start; gap: 12px; }
.pennant, .country-banner { position: relative; display: inline-block; padding-left: 3px; }
.pennant::before, .country-banner::before {
  content: ""; position: absolute; left: 0; top: -4px; bottom: -8px; width: 2px; border-radius: 2px;
  background: linear-gradient(180deg, #f0d48f, #a57b2e 60%, #6f5019);
}
.pennant::after, .country-banner::after {
  content: ""; position: absolute; left: -2px; top: -8px; width: 6px; height: 6px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff3cf, #c29a4b 60%, #8a6420);
}
.pennant-cloth {
  position: relative; display: block; width: 34px; height: 21px; overflow: hidden;
  border-radius: 0 2px 2px 0; transform-origin: left center;
  box-shadow: 0 3px 6px -2px rgba(11,22,40,.35);
  animation: flag-wave 3.4s ease-in-out infinite;
}
.pennant-cloth::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(100deg,
    rgba(255,255,255,0) 0%, rgba(255,255,255,.32) 18%, rgba(0,0,0,.16) 36%,
    rgba(255,255,255,.26) 54%, rgba(0,0,0,.12) 72%, rgba(255,255,255,0) 90%);
  background-size: 260% 100%;
  animation: flag-ripple 2.8s linear infinite;
}
.pennant:nth-child(2) .pennant-cloth { animation-delay: -1.3s; }
.pennant:nth-child(2) .pennant-cloth::after { animation-delay: -1s; }
@keyframes flag-wave {
  0%, 100% { transform: perspective(140px) rotateY(0deg) skewY(0deg); }
  50% { transform: perspective(140px) rotateY(-20deg) skewY(-3deg); }
}
@keyframes flag-ripple { from { background-position: 100% 0; } to { background-position: -160% 0; } }

/* Header */
.header-pennants { margin: 6px auto 0 20px; padding-left: 20px; border-left: 1px solid var(--line); height: 36px; align-items: center; }
@media (max-width: 900px) {
  .header-pennants { margin: 6px 6px 0 auto; padding-left: 0; border: 0; gap: 10px; }
  .header-pennants .pennant-cloth { width: 28px; height: 18px; }
}
@media (max-width: 520px) {
  .brand { gap: 9px; }
  .brand img { width: 40px; height: 40px; }
  .brand-name { font-size: .88rem; max-width: 128px; }
  .brand-name small { display: none; }
}

/* Tarjetas de países */
.country-banner { position: absolute; top: 34px; right: 30px; }
.country-banner .pennant-cloth { width: 72px; height: 45px; border-radius: 0 4px 4px 0; }
.country:nth-child(2) .country-banner .pennant-cloth { animation-delay: -1.5s; }
.country h3, .country > p { padding-right: 96px; }
@media (max-width: 480px) {
  .country-banner .pennant-cloth { width: 54px; height: 34px; }
  .country h3, .country > p { padding-right: 70px; }
}

.cta-pennants { margin-bottom: 18px; gap: 18px; }
.cta-pennants .pennant-cloth { width: 48px; height: 30px; }
.footer-pennants { margin-top: 8px; }

/* =========================================================
   Precalificador: ocupa exactamente la pantalla, sin scroll
   ========================================================= */
.page-quiz { --header-h: 72px; }
.page-quiz .site-header { position: sticky; }
.page-quiz .site-header.is-scrolled .header-inner { min-height: 72px; }
.quiz-shell {
  height: calc(100vh - var(--header-h)); height: calc(100dvh - var(--header-h));
  display: flex; align-items: center; justify-content: center; padding: 18px 16px;
}
.quiz {
  width: 100%; max-width: 780px; max-height: 100%;
  display: flex; flex-direction: column;
  background: #fff; border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow);
  animation: rise .6s cubic-bezier(.2,.7,.2,1) both;
}
.quiz-top { padding: 22px 30px 4px; }
.quiz-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.quiz-kicker { font-size: .76rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-700); }
.quiz-flags { display: inline-flex; gap: 6px; }
.quiz-flags .flag { width: 26px; height: 17px; border-radius: 3px; box-shadow: 0 0 0 1px rgba(11,22,40,.1); }
.quiz .quiz-bar { margin-bottom: 6px; }
.quiz .quiz-meta { margin-bottom: 0; }
.quiz-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 14px 30px 8px; overscroll-behavior: contain; }
.quiz-body .alert { margin-bottom: 12px; padding: 10px 14px; }
.quiz .q-step h2 { font-family: var(--font); font-size: 1.28rem; font-weight: 700; margin-bottom: 14px; }
.quiz .q-step h2.q-sub { margin: 20px 0 10px; font-size: 1.05rem; }
.quiz .options { gap: 9px; }
.quiz .option { padding: 13px 16px; }
@media (min-width: 720px) {
  .quiz .options.many { grid-template-columns: 1fr 1fr; }
}
.quiz-nav {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0;
  padding: 14px 30px 20px; border-top: 1px solid var(--line);
}
.quiz-lock { display: inline-flex; align-items: center; gap: 6px; font-size: .82rem; color: var(--muted); }
.quiz-nav .btn { padding: .8em 1.25em; }

/* Selector de país con banderas */
.country-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.country-option {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 16px 14px 14px; border: 2px solid var(--line); border-radius: 16px; background: #fff;
  cursor: pointer; transition: border-color .2s, box-shadow .2s, transform .2s, background .2s;
}
.country-option:hover { border-color: #d9c49a; transform: translateY(-2px); }
.country-option input { position: absolute; opacity: 0; pointer-events: none; }
.country-flag-wrap {
  display: block; width: 100%; max-width: 150px; aspect-ratio: 1.9; border-radius: 6px; overflow: hidden;
  box-shadow: 0 6px 14px -8px rgba(11,22,40,.5), 0 0 0 1px rgba(11,22,40,.08);
  transform-origin: left center; transition: transform .4s cubic-bezier(.2,.7,.2,1);
}
.country-name { font-weight: 700; color: var(--navy-800); }
.country-check {
  position: absolute; top: 10px; right: 10px; width: 24px; height: 24px; border-radius: 50%;
  display: grid; place-items: center; background: var(--gold-600); color: #fff;
  transform: scale(0); transition: transform .25s cubic-bezier(.3,1.6,.5,1);
}
.country-check .icon { width: 14px; height: 14px; stroke-width: 3; }
.country-option:has(input:checked) { border-color: var(--gold-600); background: var(--gold-50); box-shadow: 0 10px 24px -14px rgba(165,123,46,.7); }
.country-option:has(input:checked) .country-check { transform: scale(1); }
.country-option:has(input:checked) .country-flag-wrap { animation: flag-wave 3.4s ease-in-out infinite; }
.country-option input:focus-visible ~ .country-flag-wrap { outline: 3px solid var(--gold-500); outline-offset: 3px; }

.chip-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.chip-grid .option.chip { padding: 11px 12px; font-size: .92rem; font-weight: 600; gap: 10px; }
.chip-grid .option.chip .radio { width: 17px; height: 17px; }

.form-grid.compact { gap: 12px 14px; }
.form-grid.compact .field input { padding: 11px 13px; }
.quiz .consent { margin-top: 14px; }

/* Móvil: la tarjeta ocupa toda la pantalla y la navegación queda abajo */
@media (max-width: 640px) {
  .quiz-shell { padding: 0; align-items: stretch; }
  .quiz { max-height: none; height: 100%; border: 0; border-radius: 0; box-shadow: none; }
  .quiz-top { padding: 14px 16px 2px; }
  .quiz-title { margin-bottom: 9px; }
  .quiz-body { padding: 12px 16px 6px; }
  .quiz .q-step h2 { font-size: 1.12rem; margin-bottom: 12px; }
  .quiz .q-step h2.q-sub { margin: 16px 0 9px; font-size: 1rem; }
  .quiz .options { gap: 7px; }
  .quiz .option { padding: 11px 13px; font-size: .94rem; line-height: 1.35; gap: 12px; }
  .quiz .option .radio { width: 18px; height: 18px; }
  .country-option { padding: 12px 10px 10px; gap: 8px; }
  .country-flag-wrap { max-width: 120px; }
  .chip-grid { grid-template-columns: 1fr 1fr; gap: 7px; }
  .chip-grid .option.chip { padding: 10px 11px; font-size: .88rem; }
  .form-grid.compact { grid-template-columns: 1fr; gap: 9px; }
  .form-grid.compact .field label { margin-bottom: 4px; font-size: .86rem; }
  .form-grid.compact .field input { padding: 10px 12px; }
  .quiz-nav { padding: 10px 16px calc(12px + env(safe-area-inset-bottom)); box-shadow: 0 -8px 20px -16px rgba(11,22,40,.4); }
  .quiz-lock { display: none; }
  .quiz-nav .btn { padding: .78em 1.1em; font-size: .95rem; }
  .quiz-nav [data-next], .quiz-nav [data-submit] { flex: 1; }
  .hide-xs { display: none; }
}
/* Pantallas bajas (teléfonos pequeños, laptops con barra del navegador) */
@media (max-height: 720px) {
  .quiz-shell { padding-top: 10px; padding-bottom: 10px; }
  .quiz-top { padding-top: 12px; }
  .quiz .q-step h2 { font-size: 1.05rem; margin-bottom: 10px; }
  .quiz .options { gap: 6px; }
  .quiz .option { padding: 9px 12px; font-size: .9rem; }
  .country-option { padding: 10px 8px 8px; }
  .country-flag-wrap { max-width: 96px; }
  .quiz .q-step h2.q-sub { margin: 12px 0 8px; }
  .chip-grid .option.chip { padding: 8px 10px; }
  .quiz-nav { padding-top: 8px; padding-bottom: 10px; }
}
@media (max-width: 640px) and (max-height: 720px) {
  .quiz-shell { padding: 0; }
  .form-grid.compact { gap: 6px; }
  .form-grid.compact .field input { padding: 8px 11px; }
}

@media (prefers-reduced-motion: reduce) {
  .pennant-cloth, .pennant-cloth::after, .country-flag-wrap { animation: none !important; }
}

/* Ajustes del cuestionario */
.quiz fieldset.q-step { border: 0; padding: 0; margin: 0; min-width: 0; }
.quiz .q-step h2:focus { outline: none; }
.country-option:has(input:checked) .country-flag-wrap { animation: flag-wave-soft 3.4s ease-in-out infinite; }
@keyframes flag-wave-soft {
  0%, 100% { transform: perspective(300px) rotateY(0deg); }
  50% { transform: perspective(300px) rotateY(-9deg) skewY(-1deg); }
}

/* Las columnas del grid no deben crecer con su contenido (la fila de días desplazable estiraba la página en celular) */
.booking > *, .pay-grid > *, .split > *, .footer-grid > *, .grid > * { min-width: 0; }
.days { max-width: 100%; }

/* Header entre 901 y 1200 px: menos espacio entre enlaces para que el botón no se apriete */
.site-nav .btn { flex: none; }
@media (min-width: 901px) and (max-width: 1200px) {
  .site-nav { gap: 16px; }
  .site-nav a:not(.btn) { font-size: .9rem; }
  .header-pennants { margin-left: 14px; padding-left: 14px; }
  .brand-name { font-size: .92rem; }
}
@media (min-width: 901px) and (max-width: 1060px) {
  .brand-name small { display: none; }
  .site-nav a[href$="#preguntas"] { display: none; }
}

/* Las animaciones de entrada (desplazamientos laterales) no deben generar scroll horizontal */
body { overflow-x: clip; }
.section, .hero, .trust, .site-footer { overflow-x: clip; }
