:root {
  --header-bg: #032A53;
  /* azul barra */
  --header-link: #ffffff;
  /* links */
  --submenu-bg: #ffffff;
  /* fondo dropdown */
  --submenu-hover: #e9e9e9;
  /*--wrap:1350px;*/

  /* 🔽 FALLBACKS GLOBALES (clave) */
  --wrap: 1200px;
  --gutter: 16px;
}

/* Compensa el header fijo para que no oculte contenido */
body {
  padding-top: 60px !important;
}


/* ========================================
   MAINTENANCE BANNER
   ======================================== */
.maintenance-banner {
  background: linear-gradient(135deg, #faf600 0%, #cfc20f 100%);
  color: #636359;
  padding: 8px 16px;
  text-align: center;
  position: relative;
  z-index: 10000;
  font-size: 13px;
  line-height: 1.4;
}

.maintenance-banner__content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.maintenance-banner__icon {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
}

.maintenance-banner__text {
  margin: 0;
  font-weight: 500;
}

@media (max-width: 768px) {
  .maintenance-banner {
    font-size: 12px;
    padding: 6px 12px;
  }

  .maintenance-banner__icon {
    width: 14px;
    height: 14px;
  }
}

/*html[style*="margin-top"] .site-header{ top:0 !important; }*/

.site-header {
  background: var(--header-bg);
  box-shadow: 0 2px 6px rgba(0, 0, 0, .2);
  margin-top: 0;
  z-index: 9999 !important;
}

/* Desplazar header cuando hay admin bar */
/*.admin-bar .site-header{ top:32px; }
@media (max-width:782px){ .admin-bar .site-header{ top:46px; } }*/

.header-bar {
  width: min(100%, var(--wrap, 1200px));
  /* fallback si no hay --wrap */
  margin-inline: auto;
  padding-inline: var(--gutter, 16px);
  /* fallback si no hay --gutter */
  height: 64px;
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Marca */
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  text-decoration: none;
}

.brand-logo {
  height: 32px;
  width: auto;
  display: block;
}

.brand-text {
  font-weight: 700;
  font-size: 18px;
  color: #fff;
}

/* ===== utilidades ===== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  clip: rect(0, 0, 0, 0);
  overflow: hidden
}

/* ===== header base rápido (ajusta colores si quieres) ===== */
.header-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 60px
}

.brand-logo {
  height: 28px;
  width: auto;
  display: block
}

/* ===== hamburguesa ===== */
@media (max-width:1024px) {
  .nav-toggle {
    margin-left: auto;
    /* empuja a la derecha */
    display: flex;
    flex-direction: column;
    gap: 5px;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 0;
    background: transparent;
    cursor: pointer
  }

  .nav-toggle .nav-toggle-bar {
    width: 24px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    display: block
  }
}

/* ===== menú escritorio (>=1025px) ===== */
@media (min-width:1025px) {

  /* Centramos el contenido del header: [logo] [nav centrado] [espacio] */
  .header-bar {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
  }

  /* El nav ya no se empuja a la derecha; lo centramos en la fila */
  .primary-nav {
    margin: 0;
    /* quita el margin-left:auto */
    justify-self: center;
    /* centra el bloque de navegación */
  }

  .primary-menu {
    display: flex;
    gap: 15px;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
  }

  /* NECESARIO para que el dropdown se ancle al item */
  .primary-menu>li {
    position: relative;
  }

  .primary-menu>li>a {
    color: #fff;
    text-decoration: none;
    padding: 14px 6px;
    display: inline-flex;
    align-items: center;
    line-height: 1;
  }

  /* chevrón pegado al texto */
  .primary-menu>li.menu-item-has-children>a::after {
    content: "▾";
    font-size: .8rem;
    margin-left: .1rem;
    opacity: .9;
    transform: translateY(-1px);
  }

  /* Dropdown: anclado al borde inferior del <li> */
  .primary-menu .sub-menu {
    position: absolute;
    left: 0;
    top: calc(100% + 10px);
    visibility: hidden;
    opacity: 0;
    transition: opacity .15s ease, top .15s ease;
    background: #fff;
    color: #111;
    border-radius: 8px;
    box-shadow: 0 2px 7px rgba(0, 0, 0, .06), 0 16px 38px rgba(18, 43, 70, .11);
    padding: 6px 0;
    /*min-width:220px;*/
    z-index: 1200;
    list-style: none;
    margin: 0;
  }

  .primary-menu>li:hover>.sub-menu {
    visibility: visible;
    opacity: 1;
    top: calc(100% + 2px);
  }

  .primary-menu .sub-menu li a {
    display: block;
    padding: 10px 14px;
    color: #0b2a4a;
    text-decoration: none;
    white-space: nowrap;
  }

  .primary-menu .sub-menu li a:hover {
    background: #f0f2f6;
  }

  .primary-menu .sub-menu li+li a {
    border-top: 1px solid #eef1f5;
  }

  /* Ensure level 2 items with submenus are positioned relatively */
  .primary-menu .sub-menu li.menu-item-has-children {
    position: relative !important;
  }

  /* Level 3 submenu styles (sub-sub-menu) */
  .primary-menu .sub-menu .sub-menu {
    position: absolute !important;
    left: 100% !important;
    top: 0 !important;
    margin-left: 2px;
    margin-top: 0;
    visibility: hidden;
    opacity: 0;
    transition: opacity .15s ease, visibility .15s ease;
  }

  .primary-menu .sub-menu li:hover>.sub-menu {
    visibility: visible !important;
    opacity: 1 !important;
  }

  /* Add indicator for items with nested submenus */
  .primary-menu .sub-menu li.menu-item-has-children>a::after {
    content: "›";
    margin-left: auto;
    padding-left: 12px;
    font-size: 16px;
    opacity: 0.7;
  }

  /* El botón hamburguesa no aplica en desktop */
  .nav-toggle {
    display: none !important;
  }
}


/* ===== menú móvil (off-canvas) ===== */
@media (max-width:1024px) {
  .primary-nav {
    position: fixed;
    inset: 0 auto 0 0;
    /* left:0 */
    width: min(86vw, 420px);
    height: 100vh;
    background: #082a4a;
    color: #fff;
    transform: translateX(-110%);
    transition: transform .28s ease;
    z-index: 1200;
    box-shadow: 2px 0 24px rgba(0, 0, 0, .35);
    padding-top: 70px
      /* despegar de top */
  }

  .primary-nav.is-open {
    transform: none
  }

  .primary-menu {
    display: block;
    margin: 0;
    padding: 12px 0;
    list-style: none
  }

  .primary-menu>li {
    border-bottom: 1px solid rgba(255, 255, 255, .12);
    position: relative;
  }

  /* Main menu items - allow link to work */
  .primary-menu>li>a {
    color: #fff;
    text-decoration: none;
    display: block;
    padding: 14px 18px;
    font-weight: 500;
    padding-right: 50px;
    /* space for toggle button */
  }

  /* Toggle button for items with children - positioned absolutely */
  .primary-menu>li.menu-item-has-children>a::after {
    content: "›";
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    line-height: 1;
    opacity: .95;
    border-left: 1px solid rgba(255, 255, 255, .12);
    pointer-events: none;
    /* Will handle click via JS */
  }

  /* submenús en tarjetas blancas */
  .primary-menu .sub-menu {
    display: none;
    margin: 8px 12px 12px;
    background: #fff;
    color: #111;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    list-style: none;
    /* Remove bullets from submenus */
  }

  .primary-menu .sub-menu a {
    display: block;
    padding: 12px 16px;
    padding-right: 50px;
    /* space for toggle if has children */
    color: #111;
    text-decoration: none;
    font-size: 15px;
    position: relative;
  }

  .primary-menu .sub-menu li {
    position: relative;
    list-style: none;
    /* Remove bullets */
  }

  .primary-menu .sub-menu li+li a {
    border-top: 1px solid #e9edf3;
  }

  /* Level 3 submenu in mobile - nested with better visual hierarchy */
  .primary-menu .sub-menu .sub-menu {
    display: none;
    margin: 4px 8px 8px;
    background: #f8f9fa;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.08);
    list-style: none;
    /* Remove bullets */
  }

  /* Level 3 submenu in mobile - nested with better visual hierarchy */
  .primary-menu .sub-menu .sub-menu {
    display: none;
    margin: 4px 8px 8px;
    background: #f8f9fa;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.08);
    list-style: none;
    /* Remove bullets */
  }

  .primary-menu .sub-menu .sub-menu a {
    padding: 10px 14px;
    padding-right: 16px;
    /* No toggle needed for level 3 */
    font-size: 14px;
    color: #374151;
  }

  .primary-menu .sub-menu .sub-menu li {
    list-style: none;
    /* Remove bullets */
  }

  .primary-menu .sub-menu .sub-menu li+li a {
    border-top: 1px solid #e0e4e8;
  }

  /* Indicator for items with nested submenus in mobile */
  .primary-menu .sub-menu li.menu-item-has-children>a::after {
    content: "›";
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    opacity: 0.6;
    transition: transform 0.2s ease;
    border-left: 1px solid #e9edf3;
    pointer-events: none;
  }

  /* Rotate indicator when submenu is open */
  .primary-menu .sub-menu li.menu-item-has-children.open>a::after {
    transform: rotate(90deg);
  }

  /* overlay */
  .nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .45);
    z-index: 1190
  }

  .nav-overlay[hidden] {
    display: none
  }

  /* bloquear scroll de la página cuando el drawer está abierto */
  body.nav-open {
    overflow: hidden
  }
}

.brand .custom-logo {
  height: 28px;
  width: auto;
  display: block;
}

/* Columna 1 FOOTER (bloque de texto) */
.footer-col-info .widget,
.footer-info-default {
  user-select: none;
  /* hace el bloque "no seleccionable" */
}

.footer-col-info .footer-title {
  font-weight: 700;
  margin: 0 0 12px;
}

.footer-col-info p {
  margin: 0 0 .5rem;
  color: var(--footer-text);
}

.footer-col-info p.strong {
  font-weight: 700;
}

.footer-col-info a {
  /*user-select: text;*/
  /* PERMITIR seleccionar/click en el email FOOTER */
  color: var(--footer-link);
  text-decoration: none;
}

.footer-col-info a:hover {
  color: var(--footer-link-hover);
  text-decoration: underline;
}

/* Alineación y ritmo visual para que cuadre con las otras columnas FOOTER */
.footer .footer-col {
  min-width: 240px;
}

.footer .footer-col-info .widget+.widget {
  margin-top: 10px;
}


@media (min-width:1025px) {

  /* Asegura anclaje y elimina gaps */
  .primary-menu>li {
    position: relative;
    font-size: smaller;
    font-weight: 500;
  }

  .primary-menu>li>.sub-menu {
    position: absolute;
    top: 100%;
    /* justo debajo del link */
    left: 0;
    margin-top: 0;
    /* sin separación extra */
    transform: translateY(0);
    /* sin desplazamiento que cree hueco */
    visibility: hidden;
    opacity: 0;
    transition: opacity .15s ease, visibility .15s ease;
  }

  .primary-menu>li:hover>.sub-menu {
    visibility: visible;
    opacity: 1;
  }

  /* “Puente” anti-gap: mantiene el hover mientras bajas al submenú */
  .primary-menu>li::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    height: 10px;
    /* puedes subir/bajar según te convenga */
  }
}

/* ===== línea blanca arriba, animación desde el centro (escritorio) ===== */
@media (min-width:1025px) {
  .primary-menu>li>a {
    position: relative;
  }

  /* borra/override cualquier regla previa de ::before que tuviera bottom */
  .primary-menu>li>a::before {
    content: "";
    position: absolute;
    left: 6px;
    /* pequeño margen lateral */
    right: 6px;
    top: 8px;
    /* línea arriba (ajusta a tu gusto) */
    height: 2px;
    background: #fff;
    opacity: .95;
    pointer-events: none;

    /* animación: del centro hacia afuera */
    transform: scaleX(0);
    transform-origin: 50% 50%;
    /* centro */
    transition: transform .22s ease;
  }

  .primary-menu>li:hover>a::before,
  .primary-menu>li:focus-within>a::before {
    transform: scaleX(1);
  }

  /* (opcional) marca activo/ancestro con la línea fija */
  .primary-menu>li.current-menu-item>a::before,
  .primary-menu>li.current-menu-ancestor>a::before {
    transform: scaleX(1);
  }
}


/* === CTA Header (desktop) === */
@media (min-width:1025px) {
  .header-cta {
    justify-self: end;
  }

  .header-cta .menu {
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .header-cta .menu li {
    list-style: none;
  }

  /* El botón (vía menú o fallback) */
  .header-cta .menu>li>a,
  .btn-login {
    display: inline-block;
    padding: 10px 10px;
    background: #fff;
    color: #082a4a;
    font-weight: 600;
    border-radius: 12px;
    text-decoration: none;
    line-height: 1;
    /* box-shadow: 0 1px 0 rgba(255, 255, 255, .2) inset; */
  }

  .header-cta .btn-login:hover {
    background: #111827;
    color: #fff;
    border-radius: 12px;
  }
}

/* Ocúltalo en móvil (si no quieres verlo arriba) */
@media (max-width:1024px) {
  .header-cta {
    display: none;
  }
}

/* ===== CTA "Iniciar sesión" SOLO en móvil, dentro del off-canvas ===== */
@media (max-width:1024px) {

  /* que exista y se vea como bloque, sin el borde del resto de items */
  .primary-nav .primary-menu>li.mobile-cta {
    display: block;
    border-bottom: 0;
    margin-top: 12px;
    /* separadito del resto */
  }

  /* botón blanco idéntico al de escritorio */
  .primary-nav .primary-menu>li.mobile-cta>a {
    display: block;
    margin: 0 16px 16px;
    padding: 12px 14px;
    border-radius: 12px;
    background: #fff !important;
    color: #082a4a !important;
    /* fuerza el texto azul */
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    line-height: 1;
    box-shadow: 0 1px 0 rgba(255, 255, 255, .15) inset;
  }

  .primary-nav .primary-menu>li.mobile-cta>a:hover {
    background: #e9eef6 !important;
  }

  /* si quieres que quede pegado al fondo del drawer: */
  .primary-nav .primary-menu {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 70px);
    /* 70px ≈ alto del header; ajusta si hace falta */
  }

  .primary-nav .primary-menu>li.mobile-cta {
    margin-top: 50%;
    /* empuja el CTA a la mitad del espacio debajo de las opciones del menu mobile */
  }
}

/* Ocúltalo en escritorio (ya tienes el botón blanco a la derecha) */
@media (min-width:1025px) {
  .primary-menu>li.mobile-cta {
    display: none;
  }
}

/*.admin-bar .site-header{ top:32px; }
@media (max-width:782px){
  .admin-bar .site-header{ top:46px; }
}/*

:root{ --header-top-offset: 0px; }

/* Mantén el header encima de todo, sin cambiar layouts internos */
.site-header {
  position: relative;
  z-index: 1030;
}


/* Sombra discreta al hacer scroll (clase la pone el JS) */
body.is-stuck .site-header .header-bar {
  box-shadow: 0 8px 20px rgba(0, 0, 0, .08);
}

/* Cuando uses anchors o paginación que hace scrollTo, evita que el header tape el inicio */
main.site-main,
[id] {
  scroll-margin-top: calc(var(--header-top-offset) + 12px);
}

/* Header sticky */
/* Header sticky (Reemplazo de plugin jQuery) */
/* CAMBIO A FIXED: Sticky fallaba por overflow en body. Fixed es más robusto aquí. */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 99999;
  /* Asegurar que flote sobre todo */
  background: var(--header-bg);
  box-shadow: 0 2px 6px rgba(0, 0, 0, .2);
  transition: transform 0.3s ease;
  /* #content ya tiene padding-top 60px, así que no solapa */
}

/* Fix para admin bar */
.admin-bar .site-header {
  top: 32px;
}

@media (max-width: 782px) {
  .admin-bar .site-header {
    top: 46px;
  }
}

/*ESTILOS PARA MENU RESPONSIVO DINAMICO*/
@media (min-width:1025px) {
  .primary-nav {
    min-width: 0;
  }

  /* deja encoger la columna 1fr del grid */
  .primary-menu>li.menu-item--more.is-hidden {
    display: none;
  }
}

@media (min-width:1025px) {

  /* deja que la columna central del grid pueda encogerse */
  .primary-nav {
    min-width: 0;
  }

  /* no permitir saltos de línea en el menú principal */
  .primary-menu {
    flex-wrap: nowrap;
  }

  .primary-menu>li>a {
    white-space: nowrap;
  }

  /* "Más" oculto cuando no tenga elementos */
  .primary-menu>li.menu-item--more.is-hidden {
    display: none;
  }
}

@media (min-width:1025px) {

  /* La columna central del grid debe poder encogerse/crecer sin forzar overflows falsos */
  .header-bar {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    /* logo | menú | cta */
    align-items: center;
    column-gap: clamp(8px, 1.5vw, 16px);
  }

  .primary-nav {
    min-width: 0;
  }

  /* permite encoger la columna central */
  .primary-menu {
    flex-wrap: nowrap;
  }

  /* una sola línea en desktop */
  .primary-menu>li>a {
    white-space: nowrap;
  }

  /* Oculta "Más" si no tiene elementos */
  .primary-menu>li.menu-item--more.is-hidden {
    display: none;
  }

  /* Compactar CTA cuando el script lo indique */
  .header-cta.cta-compact .btn-login {
    padding: 8px 12px;
    font-size: 14px;
  }
}

/* === Sticky plugin: asegurar ancho fluido del header === */
.sticky-wrapper,
.element-is-sticky {
  width: 100% !important;
  left: 0 !important;
  right: 0 !important;
}

/* Grid del header: columna central elástica (como producción) */
@media (min-width:1025px) {
  .header-bar {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    /* logo | menú | CTA */
    align-items: center;
    column-gap: clamp(8px, 1.5vw, 16px);
  }

  .primary-nav {
    min-width: 0;
  }

  /* deja encoger la columna del menú */
  .primary-menu {
    display: flex;
    flex-wrap: nowrap;
  }

  .primary-menu>li>a {
    white-space: nowrap;
  }

  /* “Más” oculto si está vacío */
  .primary-menu>li.menu-item--more.is-hidden {
    display: none;
  }

  /* Compactación suave del CTA cuando el greedy lo indique */
  .header-cta.cta-compact .btn-login {
    padding: 8px 12px;
    font-size: 14px;
  }
}

/* ===========================================================
   OVERRIDES VISUALES (al final del archivo) – MÁS AIRE EN HEADER
   Mantiene greedy funcional y no toca nav.js
   =========================================================== */

/* 1) Escritorio: más “aire” entre [logo] [menú] [CTA] y más ancho útil */
@media (min-width: 1025px) {

  /* Ensancha el contenedor y separa columnas del grid */
  .header-bar {
    /* Ancho mayor que el default (1200px). Ajusta a tu gusto: 1320, 1360, 1440… */
    width: min(100%, 1360px);

    /* Grid correcto para greedy (columna central elástica) */
    grid-template-columns: auto minmax(0, 1fr) auto;

    /* Más espacio entre: [logo]—[menú]—[CTA] */
    column-gap: clamp(24px, 4vw, 72px);

    /* Un poco más de respiración en los lados (sin exagerar) */
    padding-inline: clamp(16px, 3vw, 40px);
  }

  /* La columna central del grid debe poder encogerse (clave para greedy) */
  .primary-nav {
    min-width: 0;
  }

  /* ¡Importante para greedy!: una sola línea */
  .primary-menu {
    flex-wrap: nowrap;
  }
}

/* 3) Seguridad greedy: oculta el “Más” cuando no tiene ítems */
.primary-menu>li.menu-item--more.is-hidden {
  display: none !important;
}

/* 4) Opcional: si necesitas aún más separación visual, reduce ligeramente
        el tamaño del logo en escritorio para ganar espacio horizontal */
/* .brand-logo { height: 30px; } */

/* 5) CTA compacto cuando hay overflow (tu JS ya lo añade con .cta-compact) */
@media (min-width: 1025px) {
  .header-cta.cta-compact .btn-login {
    padding: 8px 14px;
  }
}

/* ========================================================================
   BOTÓN VER PERFIL EN HEADER
   ======================================================================== */

@media (min-width:1025px) {
  .header-cta {
    display: flex;
    align-items: center;
    gap: 12px;
  }

  .btn-profile {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: #f3f4f6;
    color: #111827;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05);
  }

  .btn-profile:hover {
    background: #e5e7eb;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(16, 24, 40, 0.1);
  }

  .btn-profile .profile-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
  }

  .btn-profile .profile-text {
    line-height: 1;
  }
}

/* Responsive */
@media (max-width:1024px) {

  /* En móvil se oculta junto con toda la cta */
  .btn-profile {
    display: none;
  }
}

/* ========================================================================
   BOTÓN VER PERFIL EN HEADER - SOLO ICONO
   ======================================================================== */

@media (min-width:1025px) {
  .header-cta {
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .btn-profile {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    background: transparent;
    border: 2px solid #fff;
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s ease;
  }

  .btn-profile:hover {
    background: #fff;
    border-color: #032A53;
  }

  .btn-profile .profile-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    stroke: #fff;
    transition: stroke 0.3s ease;
  }

  .btn-profile:hover .profile-icon {
    stroke: #032A53;
  }

  .btn-profile .profile-text {
    display: none;
  }
}

/* Responsive */
@media (max-width:1024px) {
  .btn-profile {
    display: none;
  }
}