/* Reglas de presentación. Los paneles y formularios conservan su comportamiento nativo. */
#ig-country-gateway .igr-pais {display:none}
#ig-country-title {scroll-margin-block-start:5rem}
.igx-host .igx :is(.igx-workspace,.igx-input-panel,.igx-guide,.igx-reader,.igx-chart) {min-inline-size:0}
.igx-host .igx :is(input:not([type="checkbox"],[type="radio"]),select,textarea) {max-inline-size:100%}
.igx-host .igx :is(.igx-input-panel,.igx-guide,[id^="igx-"]) {scroll-margin-block:5.5rem}
#ig-nu-mx form > * {min-inline-size:0}
#ig-nu-mx .answer {overflow-wrap:break-word}

/* Evitar que la bienvenida desplace el propósito de la portada fuera de la primera pantalla. */
@media (max-width:68.75em), (max-height:44em) {
  body #ig-country-gateway .ig-hero {padding-block:clamp(1.25rem,4vh,2.4rem) 1.25rem}
  body #ig-country-gateway .ig-hero h1 {font-size:clamp(2rem,5.4vw,3.4rem);line-height:1.07;margin-block-start:.75rem}
  body #ig-country-gateway .ig-hero-copy {margin-block-start:.75rem;line-height:1.5;max-inline-size:64ch}
  body #ig-country-gateway .igr-pais {display:inline-flex;align-items:center;justify-content:center;min-block-size:44px;margin-block-start:.65rem;padding-inline:1.25rem;border-radius:.55rem;background:#401635;color:white;text-decoration:none;font-weight:700}
  body #ig-country-gateway .igr-pais:focus-visible {outline:3px solid currentColor;outline-offset:3px;outline-color:#48193d}
  body #ig-country-gateway .ig-route {margin-block-start:1rem}
  body #ig-country-gateway .ig-route-item {padding:.65rem .75rem}
  body #ig-country-gateway .ig-countries {padding-block-start:1.5rem}
  /* Elementor desplaza al borde del título; este espacio compensa su cabecera fija. */
  #ig-country-gateway #ig-country-title {padding-block-start:3.5rem;margin-block-start:-3.5rem}
  body .elementor-10 .elementor-element.elementor-element-6370e05 {padding-block:1rem 2rem}
  body .elementor-10 .elementor-element.elementor-element-6370e05 > .elementor-container {min-height:0}
  body .elementor-10 .elementor-element.elementor-element-5e0458c > .elementor-element-populated {padding:clamp(.75rem,2.1vw,1.5rem)}
  body .elementor-10 .elementor-element.elementor-element-3a88750 > .elementor-element-populated {padding:.5rem}
  body .elementor-10 .elementor-element.elementor-element-46a9993 .elementor-heading-title {font-size:clamp(1.1rem,2.3vw,1.6rem);line-height:1.25}
  body .elementor-10 .mexico-title h1 {font-size:clamp(1.8rem,4.3vw,2.85rem);padding:.25rem;line-height:1.12}
  body.single-herramientas:has(#ig-nu-mx) .elementor-widget-heading h1 {font-size:clamp(1.65rem,3.9vw,2.4rem);line-height:1.15}
  body.ig-public-design .entry-hero .entry-header {min-height:0;padding-block:clamp(1rem,3vh,2rem)}
  body.ig-public-design .entry-hero .entry-title {font-size:clamp(1.65rem,3.6vw,2.35rem);line-height:1.22}
  body #iguru-app.mvp15 .mvp-destination > h1 {font-size:clamp(1.75rem,4vw,2.6rem);line-height:1.16}
}

/* En móviles el espacio recuperado vuelve al texto y a los controles de entrada. */
@media (max-width:42em) {
  body.ig-public-design section.igx-host.igx-host {padding-inline:clamp(0px,1.3vw,8px)!important}
  body .igx-host .igx .igx-hero {padding:12px clamp(12px,3.4vw,18px)!important}
  body .igx-host .igx .igx-hero :is(h1,h2) {font-size:clamp(1.45rem,4.4vw,1.85rem)!important;line-height:1.18!important}
  body .igx-host .igx .igx-input-panel {padding-inline:clamp(12px,3.2vw,18px)!important}
  body .igx-host .igx .igx-guide {padding-inline:clamp(12px,3.5vw,20px)!important}
  body .igx-host .igx .igx-input-panel :is(input,select,textarea):not([type="range"],[type="checkbox"],[type="radio"]) {font-size:max(1rem,16px)!important}
  body .igx-host .igx .igx-facts dd {max-inline-size:65%;white-space:normal;overflow-wrap:anywhere}
  body #ig-country-gateway .ig-route {grid-template-columns:repeat(2,minmax(0,1fr))}
  body #iguru-app.mvp15.ig155-enabled[data-view="home"] .ig155-home .ig155-stage {height:clamp(110px,21vh,150px);min-height:0}
  body #iguru-app.mvp15.ig155-enabled[data-view="home"] .ig155-home .ig155-portrait {width:auto;height:clamp(145px,28vh,190px)}
  body #iguru-app.mvp15.ig155-enabled[data-view="home"] .ig155-home .ig155-primary {min-height:44px}
  body #iguru-app.mvp15.ig155-enabled[data-view="home"] .ig155-home .ig155-arrow {width:36px;height:36px}
  body #iguru-app.mvp15[data-view="tarjetas"] .ig156 .catalog-hero {padding:12px;min-height:0}
  body #iguru-app.mvp15[data-view="tarjetas"] .ig156 .catalog-hero h1 {font-size:clamp(1.5rem,5.4vw,1.9rem);line-height:1.14}
}

/* Una pantalla apaisada con poca altura necesita controles accesibles y espacio central. */
@media (max-height:42em) and (max-width:86em) {
  body #iguru-app.mvp15 .mvp-header .mvp-header-inner,
  body.ig-public-design:has(.igx) .mvp-header .mvp-header-inner,
  body.ig-public-design .mvp-header .mvp-header-inner {min-height:52px!important;padding-block:4px!important}
  body #iguru-app.mvp15 .mvp-header .ig155-mobile-menu:not([hidden]),
  body .mvp-header.ig-visual-shell .ig155-mobile-menu:not([hidden]),
  body .mvp-header .mvp-nav.is-open {max-block-size:calc(100vh - 4.25rem);max-block-size:calc(100dvh - var(--ig155-header-height,54px) - 12px);overflow-y:auto;overscroll-behavior:contain;scroll-padding-block:.5rem}
  body #iguru-app.mvp15.ig155-enabled .mvp-header .ig155-mobile-menu:not([hidden]),
  body .mvp-header.ig-visual-shell .ig155-mobile-menu:not([hidden]) {padding:12px}
  body #iguru-app.mvp15.ig155-enabled .mvp-header .ig155-mobile-menu .ig155-nav-category,
  body .mvp-header.ig-visual-shell .ig155-mobile-menu .ig155-nav-category {min-height:44px;padding:6px 8px;gap:6px}
  body #iguru-app.mvp15.ig155-enabled .mvp-header .ig155-nav-utilities .ig155-nav-link,
  body .mvp-header.ig-visual-shell .ig155-nav-utilities .ig155-nav-link {min-height:44px;padding-block:6px}
  body #iguru-app.mvp15.ig155-enabled .mvp-header .ig155-nav-utilities {margin-top:8px}
  body #iguru-app.mvp15 .mvp-header .ig155-mobile-menu h2 {margin-bottom:6px}
  body #iguru-app.mvp15 :is(.ig156,.ig167,.ig157,.ig160) :is(.mobile-dock,.eco-mobile-dock,.savings-mobile-dock) {min-height:0!important;padding-block:4px calc(4px + env(safe-area-inset-bottom))!important}
  body #iguru-app.mvp15 :is(.ig156,.ig167,.ig157,.ig160) :is(.mobile-dock,.eco-mobile-dock,.savings-mobile-dock) > button {min-height:44px!important;gap:3px!important;padding-block:3px!important}
  body .igx-host .igx .igx-hero {margin-block-end:10px!important}
  body .igx-host .igx .igx-breadcrumb {margin-block-end:6px!important}
  body #iguru-app.mvp15 .eco-filter-dialog[open] {max-height:calc(100dvh - 12px);display:flex;flex-direction:column}
  body #iguru-app.mvp15 .eco-filter-dialog[open] .eco-sheet-body {min-height:0;max-height:none;overflow-y:auto}
}
@media (min-width:36em) and (max-width:68.75em) and (max-height:42em) {
  body #iguru-app.mvp15.ig155-enabled .mvp-header .ig155-mobile-menu:not([hidden]) {width:min(530px,calc(100% - 24px))}
  body #iguru-app.mvp15.ig155-enabled .mvp-header .ig155-mobile-menu .ig155-nav-grid {grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media (min-width:100em) {
  body.ig-public-design .entry-hero .entry-title {max-inline-size:32ch;margin-inline:auto;font-size:clamp(2.4rem,2.6vw,3rem);line-height:1.2}
  body #iguru-app.mvp15.ig155-enabled .ig155-home .ig155-copy h1 {font-size:clamp(3.25rem,3.5vw,4.125rem)}
  body .elementor-10 .elementor-element.elementor-element-5e0458c > .elementor-element-populated {padding-block-start:clamp(2rem,4vh,4rem)}
  body .elementor-10 .mexico-title h1 {font-size:clamp(2.5rem,2.8vw,3.25rem);line-height:1.12}
}

/* El enlace de salto comparte el área de la cabecera solo cuando recibe foco. */
body #iguru-app.mvp15 > a.skip:focus {
  position:fixed;
  z-index:101;
  top:max(8px,env(safe-area-inset-top));
  left:max(8px,env(safe-area-inset-left));
  max-inline-size:calc(100% - 16px);
}
/* Si solo quedan unas líneas entre ambas barras, dejar que la cabecera suba con la página. */
@media (max-height:16em) and (max-width:70em) {
  body.ig-public-design:has(.igx-journey) > header.mvp-header.ig-visual-shell,
  body #iguru-app.mvp15:has(.mobile-dock,.savings-mobile-dock,.eco-mobile-dock) > header.mvp-header {
    position:relative!important;
    top:auto;
  }
}
/* Reservar el espacio de las barras al navegar por foco, anclas o resultados. */
@media (max-width:70em) {
  html:has(#iguru-app .mvp-header,body.ig-public-design .igx-host) {
    scroll-padding-block-start:calc(var(--ig155-header-height, 72px) + 8px);
  }
  html:has(#iguru-app :is(.mobile-dock,.savings-mobile-dock,.eco-mobile-dock),body.ig-public-design .igx-journey) {
    scroll-padding-block-end:calc(88px + env(safe-area-inset-bottom));
  }
}

