/* Inverti 1.2.1 - encabezado global con separación dinámica, sin tocar CSS editorial */
/* Reserva la altura REAL del encabezado fijo y un respiro visual de 20 px.
   JS sincroniza la variable ante cambios responsive, fuentes y orientación.
   Si JS se demora, el valor de respaldo evita que el contenido arranque bajo el menú. */
body.inverti-global-navigation-active {
  padding-top: calc(var(--ih-global-header-height, 100px) + 20px) !important;
}
body.inverti-global-navigation-active.ih-overlay-open { overflow: hidden !important; }
body.inverti-global-navigation-active.ih-overlay-open #inverti-floating-social,
body.inverti-global-navigation-active.ih-overlay-open button[aria-label="Inverti AI"] { visibility: hidden !important; pointer-events: none !important; }
/* Mercury, Elementor header y cabeceras clásicas. Nunca oculta el menú nuevo. */
body.inverti-global-navigation-active .space-header,
body.inverti-global-navigation-active .space-header-height,
body.inverti-global-navigation-active .space-header-wrap,
body.inverti-global-navigation-active .space-mobile-menu,
body.inverti-global-navigation-active .space-mobile-menu-block,
body.inverti-global-navigation-active .space-header-mobile,
body.inverti-global-navigation-active .elementor-location-header,
body.inverti-global-navigation-active .hfe-site-header,
body.inverti-global-navigation-active #masthead:not(.ih-header),
body.inverti-global-navigation-active header.site-header:not(.ih-header) { display: none !important; }
body.inverti-global-navigation-active .ih-global-skip-link {
  position:fixed; top:10px; left:14px; z-index:11050;
  transform:translateY(-180%); padding:12px 15px; border-radius:10px;
  font:700 14px/1.3 Poppins, sans-serif; background:#fff; color:#091a35;
}
body.inverti-global-navigation-active .ih-global-skip-link:focus { transform:translateY(0); }
.inverti-home.ih-global-shell {
  --navy-950:#030f24; --navy-900:#061733; --navy-800:#0a2148; --navy-700:#102c5c;
  --blue:#1f6bff; --sky:#38b6ff; --ink:#0b1c36; --white:#fff;
  --pad:clamp(20px,6vw,28px); --dur-micro:.18s; --ease-out:cubic-bezier(.22,1,.36,1);
  font:500 16px/1.5 Poppins,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  color:var(--white); -webkit-font-smoothing:antialiased;
}
.inverti-home.ih-global-shell *, .inverti-home.ih-global-shell *::before, .inverti-home.ih-global-shell *::after { box-sizing:border-box; }
.inverti-home.ih-global-shell img { display:block; max-width:100%; height:auto; }
.inverti-home.ih-global-shell a { text-decoration:none; color:inherit; -webkit-tap-highlight-color:transparent; }
.inverti-home.ih-global-shell button { font:inherit; color:inherit; background:none; border:0; cursor:pointer; -webkit-tap-highlight-color:transparent; }
.inverti-home.ih-global-shell ul { list-style:none; margin:0; padding:0; }
.inverti-home.ih-global-shell :focus-visible { outline:3px solid var(--sky); outline-offset:3px; }
.inverti-home.ih-global-shell .screen-reader-text { position:absolute!important; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
/* ---------- Header ---------- */
.inverti-home .ih-header {
  position: fixed; inset: 0 0 auto 0; z-index: 60;
  padding-top: env(safe-area-inset-top);
  transition: background .35s ease, box-shadow .35s ease, backdrop-filter .35s ease;
}
.inverti-home .ih-header.is-scrolled {
  background: rgba(4, 15, 36, .82);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 8px 30px -12px rgba(0,0,0,.5);
}
.inverti-home .ih-header__bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px var(--pad);
  max-width: 1240px; margin-inline: auto;
}
.inverti-home .ih-logo { display: inline-flex; align-items: center; }
.inverti-home .ih-logo__img { width: 128px; height: auto; }
.inverti-home .ih-logo__img--footer { width: 210px; }
.inverti-home .ih-menu__head .ih-logo__img { width: 150px; }
.inverti-home .ih-header__actions { display: flex; align-items: center; gap: 6px; }
.inverti-home .ih-iconbtn {
  display: grid; place-items: center;
  width: 46px; height: 46px; border-radius: 14px; color: var(--white);
  transition: background var(--dur-micro) ease, transform var(--dur-micro) ease;
}
.inverti-home .ih-iconbtn:active { transform: scale(.92); background: rgba(255,255,255,.1); }
.inverti-home .ih-iconbtn svg { width: 26px; height: 26px; }
.inverti-home .ih-nav-desktop { display: none; }

/* ---------- Selector Polylang: nativo, accesible, sin banderas de países ---------- */
.inverti-home .ih-lang { display: none; position: relative; z-index: 4; flex: 0 0 auto; }
.inverti-home .ih-lang__details { position: relative; }
.inverti-home .ih-lang__trigger {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 42px; padding: 8px 11px;
  border: 1px solid rgba(255,255,255,.22); border-radius: 13px;
  background: rgba(255,255,255,.08); color: #fff;
  font-size: 13px; font-weight: 800; line-height: 1;
  cursor: pointer; list-style: none; user-select: none;
  transition: background var(--dur-micro) ease, border-color var(--dur-micro) ease;
}
.inverti-home .ih-lang__trigger::-webkit-details-marker { display: none; }
.inverti-home .ih-lang__trigger::marker { content: ''; }
.inverti-home .ih-lang__trigger:hover,
.inverti-home .ih-lang__details[open] .ih-lang__trigger {
  background: rgba(255,255,255,.16); border-color: rgba(255,255,255,.48);
}
.inverti-home .ih-lang__globe { width: 19px; height: 19px; flex-shrink: 0; }
.inverti-home .ih-lang__chevron { width: 12px; height: 12px; transition: transform .2s ease; }
.inverti-home .ih-lang__details[open] .ih-lang__chevron { transform: rotate(180deg); }
.inverti-home .ih-lang__list {
  position: absolute; top: calc(100% + 9px); right: 0;
  z-index: 10; width: max-content; min-width: 188px; max-width: min(85vw, 260px);
  display: flex; flex-direction: column; gap: 3px;
  padding: 7px; border: 1px solid rgba(255,255,255,.16); border-radius: 16px;
  background: #0c2247; box-shadow: 0 18px 48px rgba(0,0,0,.4);
}
.inverti-home .ih-lang__option,
.inverti-home .ih-lang__list .ih-lang__option {
  display: flex; flex-direction: row; align-items: center; gap: 12px;
  min-height: 40px; padding: 9px 11px; border-radius: 10px;
  font-size: 13px; font-weight: 600; color: #e6f1ff; line-height: 1.3;
  white-space: nowrap; opacity: 1; transform: none; transition: background .16s ease;
}
.inverti-home .ih-lang__option:hover { background: rgba(255,255,255,.12); }
.inverti-home .ih-lang__option.is-current { color: #fff; background: rgba(56,182,255,.18); }
.inverti-home .ih-lang__option-code { min-width: 25px; font-size: 11px; font-weight: 800; color: #8fd6ff; letter-spacing: .04em; }
.inverti-home .ih-lang__option svg { width: 15px; height: 15px; margin-left: auto; color: #8fd6ff; }
.inverti-home .ih-menu__tools { display: flex; align-items: center; gap: 8px; }
.inverti-home .ih-lang--mobile { display: block; }

/* ---------- Menú fullscreen ---------- */
.inverti-home .ih-menu {
  position: fixed; inset: 0; z-index: 80;
  background: linear-gradient(180deg, var(--navy-950), var(--navy-800));
  padding: calc(14px + env(safe-area-inset-top)) var(--pad) calc(28px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column;
  overflow-y: auto; -webkit-overflow-scrolling: touch;
  opacity: 0; visibility: hidden; transform: translateY(-12px);
  transition: opacity .35s var(--ease-out), transform .35s var(--ease-out), visibility 0s .35s;
}
.inverti-home .ih-menu.is-open {
  opacity: 1; visibility: visible; transform: none;
  transition: opacity .35s var(--ease-out), transform .35s var(--ease-out);
}
.inverti-home .ih-menu__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }

.inverti-home .ih-menu__nav { display: flex; flex-direction: column; justify-content: center; flex: 1; }
.inverti-home .ih-menu__nav a {
  display: flex; flex-direction: column; gap: 2px;
  padding: clamp(11px, 2.2vh, 18px) 4px; border-bottom: 1px solid rgba(255,255,255,.09);
  opacity: 0; transform: translateY(14px);
  transition: opacity .4s var(--ease-out), transform .4s var(--ease-out), background var(--dur-micro) ease;
  border-radius: 12px;
}
.inverti-home .ih-menu.is-open .ih-menu__nav a { opacity: 1; transform: none; }
.inverti-home .ih-menu.is-open .ih-menu__nav a:nth-child(1) { transition-delay: .08s; }
.inverti-home .ih-menu.is-open .ih-menu__nav a:nth-child(2) { transition-delay: .14s; }
.inverti-home .ih-menu.is-open .ih-menu__nav a:nth-child(3) { transition-delay: .2s; }
.inverti-home .ih-menu.is-open .ih-menu__nav a:nth-child(4) { transition-delay: .26s; }
.inverti-home .ih-menu.is-open .ih-menu__nav a:nth-child(5) { transition-delay: .32s; }
.inverti-home .ih-menu.is-open .ih-menu__nav a:nth-child(6) { transition-delay: .38s; }
.inverti-home .ih-menu.is-open .ih-menu__nav a:nth-child(7) { transition-delay: .44s; }
.inverti-home .ih-menu__nav a span { font-size: clamp(24px, 3.6vh, 30px); font-weight: 800; letter-spacing: -.02em; color: var(--white); }
.inverti-home .ih-menu__nav a em { font-style: normal; font-size: 14px; color: var(--sky); }

/* ---------- Buscador fullscreen ---------- */
.inverti-home .ih-search {
  position: fixed; inset: 0; z-index: 90;
  display: grid; place-items: start center;
  padding: calc(94px + env(safe-area-inset-top)) var(--pad) 32px;
  background: rgba(3,15,36,.9);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  opacity: 0; visibility: hidden;
  transition: opacity .28s ease, visibility 0s .28s;
}
.inverti-home .ih-search.is-open {
  opacity: 1; visibility: visible;
  transition: opacity .28s ease;
}
.inverti-home .ih-search__panel {
  width: min(100%, 720px); padding: clamp(20px, 5vw, 34px);
  border: 1px solid rgba(255,255,255,.12); border-radius: 26px;
  background: linear-gradient(180deg, var(--navy-800), var(--navy-900));
  box-shadow: 0 28px 80px -24px rgba(0,0,0,.75);
  transform: translateY(-12px);
  transition: transform .35s var(--ease-out);
}
.inverti-home .ih-search.is-open .ih-search__panel { transform: none; }
.inverti-home .ih-search__head { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 22px; }
.inverti-home .ih-search__head h2 { margin: 0; color: var(--white); font-size: clamp(24px, 6vw, 34px); line-height: 1.1; }
.inverti-home .ih-search__form { display: flex; gap: 10px; }
.inverti-home .ih-search__form input {
  min-width: 0; flex: 1; height: 58px; padding: 0 18px;
  border: 1px solid rgba(255,255,255,.18); border-radius: 16px;
  background: var(--white); color: var(--ink); font: inherit; font-size: 16px;
}
.inverti-home .ih-search__form button {
  min-height: 58px; padding: 0 22px; border-radius: 16px;
  background: linear-gradient(135deg, #2b78ff, #1a5ef2); color: var(--white); font-weight: 700;
}


/* Overrides globales; portada conserva sus propios CSS y comportamiento. */
body.inverti-global-navigation-active .inverti-home.ih-global-shell .ih-header {
  top:0; z-index:11000; background:rgba(4,15,36,.97);
  box-shadow:0 8px 30px -16px rgba(0,0,0,.55);
}
body.inverti-global-navigation-active .inverti-home.ih-global-shell .ih-menu { z-index:11030; }
body.inverti-global-navigation-active .inverti-home.ih-global-shell .ih-search { z-index:11035; }
@media(min-width:1024px) {
  .inverti-home.ih-global-shell .ih-iconbtn--burger { display:none; }
  .inverti-home.ih-global-shell .ih-lang--header { display:block; }
  .inverti-home.ih-global-shell .ih-nav-desktop { display:flex; gap:24px; }
  .inverti-home.ih-global-shell .ih-nav-desktop a { color:rgba(255,255,255,.9); font-weight:600; font-size:15.5px; transition:color .18s ease; }
  .inverti-home.ih-global-shell .ih-nav-desktop a:hover { color:var(--sky); }
}
@media(max-width:520px) { .inverti-home.ih-global-shell .ih-search__form { flex-direction:column; } }
@media(max-width:375px) {
  .inverti-home.ih-global-shell .ih-menu__head .ih-logo__img { width:118px; }
  .inverti-home.ih-global-shell .ih-menu__tools { gap:4px; }
  .inverti-home.ih-global-shell .ih-lang__trigger { gap:5px; padding-inline:8px; }
}
body.admin-bar.inverti-global-navigation-active .inverti-home.ih-global-shell .ih-header { top:32px; }
body.admin-bar.inverti-global-navigation-active .inverti-home.ih-global-shell .ih-menu,
body.admin-bar.inverti-global-navigation-active .inverti-home.ih-global-shell .ih-search { top:32px; }
@media(max-width:782px) {
  body.admin-bar.inverti-global-navigation-active .inverti-home.ih-global-shell .ih-header,
  body.admin-bar.inverti-global-navigation-active .inverti-home.ih-global-shell .ih-menu,
  body.admin-bar.inverti-global-navigation-active .inverti-home.ih-global-shell .ih-search { top:46px; }
}

.inverti-home.ih-global-shell .ih-logo__img { width:128px; }
.inverti-home.ih-global-shell .ih-menu__head .ih-logo__img { width:150px; }
.inverti-home.ih-global-shell .ih-nav-desktop a { text-transform:none; letter-spacing:normal; }
.inverti-home.ih-global-shell .ih-search__head h2 { font-weight:800; }
.inverti-home.ih-global-shell .ih-menu__nav a em { font-style:normal; }
