/* ====== Layout base ====== */
:root{
  --ms-container: 1200px;
  --ms-x1: 8px; --ms-x2: 12px; --ms-x3: 16px; --ms-x4: 20px; --ms-x5: 24px;
  --ms-blue:#1279bf; --ms-blue-600:#1a78c2;
  --ms-dark:#333; --ms-gray-200:#e9e9e9; --ms-gray-150:#f5f5f5; --ms-white:#fff;
  --ms-sticky-gap: 8px;
}
*,*::before,*::after{box-sizing:border-box}
.ms-container{max-width:var(--ms-container);margin:0 auto;padding:0 var(--ms-x3);}
img{max-width:100%;height:auto;display:block}
ul[role="list"]{list-style:none;margin:0;padding:0}

/* ====== PROMO ====== */
/* [1] franja gris a 60px (logo partner algo mayor) */
.ms-promo{background:var(--ms-gray-150);border-bottom:1px solid var(--ms-gray-200);}
.ms-promo__inner{
  min-height:60px;
  display:flex;align-items:center;justify-content:center;
  gap:var(--ms-x2);padding:var(--ms-x1) 0;
}
.ms-promo__text{font-size:14px;line-height:1.2}
.ms-promo__partner img{max-height:32px;width:auto}
.ms-promo__sep{display:none}

/* ====== HEADER (móvil colapsado) ====== */
.ms-header{background:var(--ms-white);border-bottom:1px solid var(--ms-gray-200);}
.ms-header__container{
  display:grid;grid-template-columns:44px 1fr 44px;align-items:center;
  gap:32px; /* [3] más espacio entre logo/menú */
  min-height:80px; /* [2] banda blanca a 80px */
  padding:var(--ms-x2) 0;
}
.ms-header__burger{display:flex !important;align-items:center;justify-content:center;}
.ms-header__burger button,
.ms-header__burger a{all:unset;display:flex;align-items:center;justify-content:center;cursor:pointer;width:44px;height:44px}
.ms-header__brand img{height:36px;width:auto} /* [1] logo un poco mayor */
.ms-header__nav{display:none}
.ms-header__cta{display:none}
.ms-header__user{display:flex;align-items:center;justify-content:center}
.ms-header__user-link{display:flex;align-items:center;justify-content:center;width:44px;height:44px;color:#111}

/* ====== Menú ABIERTO en móvil (overlay refinado) ====== */
.ms-header.is-open{position:relative;z-index:1200}
.ms-header.is-open .ms-header__nav{
  display:block;position:fixed;inset:0;background:#fff;overflow:auto;
  -webkit-overflow-scrolling:touch;padding-bottom:112px; /* hueco enlace/CTA inferior */
}
.ms-header.is-open .ms-header__nav::before{
  content:"Menú";display:block;font-size:18px;font-weight:700;
  padding:14px var(--ms-x3);border-bottom:1px solid #e9e9e9;
}
.ms-header.is-open [data-ms-menu-close]{
  position:fixed;top:10px;right:10px;width:44px;height:44px;
  display:flex;align-items:center;justify-content:center;
  border:1px solid #cfcfcf;border-radius:6px;background:#fff;z-index:2;
}
.ms-header.is-open .ms-header__list{margin:0;padding:0;display:block;}
.ms-header.is-open .ms-header__item + .ms-header__item{border-top:1px solid #efefef}
.ms-header.is-open .ms-header__link{
  position:relative;display:flex;align-items:center;gap:12px;
  width:100%;min-height:64px;
  padding:18px var(--ms-x3);font-size:18px;color:#2b2b2b;text-decoration:none;
}
/* quita subrayado de desktop en overlay */
.ms-header.is-open .ms-header__link::after{display:none !important}
/* Chevron a la DERECHA */
.ms-header.is-open .ms-header__link::before{
  content:""; position:absolute; right:var(--ms-x3); top:50%;
  width:8px;height:8px;border-right:2px solid var(--ms-blue);border-top:2px solid var(--ms-blue);
  transform:translateY(-50%) rotate(45deg);
}
/* Enlace inferior fijo (si existe) */
.ms-header.is-open .main-menu__mobile-user-link{
  position:fixed;left:0;right:0;bottom:0;z-index:3;
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  padding:16px var(--ms-x3);background:#f7f7f7;border-top:1px solid var(--ms-gray-200);
  color:#2b2b2b;text-decoration:none;
}
.ms-header.is-open .main-menu__mobile-user-link .icon{display:inline-flex;width:24px;height:24px}
.ms-header.is-open .main-menu__mobile-user-link::after{
  content:""; width:8px;height:8px;border-right:2px solid var(--ms-blue);border-top:2px solid var(--ms-blue);
  transform:rotate(45deg);
}

/* ====== Navegación desktop ====== */
.ms-header__nav{width:100%}
.ms-header__list{list-style:none;margin:0;padding:0;display:flex;align-items:center;gap:36px}
.ms-header__link{position:relative;padding:6px 0;color:#2b2b2b;text-decoration:none}
.ms-header__link::after{
  content:"";position:absolute;left:0;right:0;bottom:-8px;height:3px;border-radius:2px;
  background:var(--ms-blue-600);transform:scaleX(0);transform-origin:left;transition:transform .18s ease;
}
.ms-header__link.is-active{ color:var(--ms-blue); }
.ms-header__link.is-active::after,
.ms-header__link:focus-visible::after,
.ms-header__link:hover::after{transform:scaleX(1)}

/* ====== BOTONES ====== */
/* [5] [10] sin esquinas redondeadas */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;border-radius:0;line-height:1;cursor:pointer;text-decoration:none}
.btn--primary{background:var(--ms-blue);border:2px solid var(--ms-blue);color:#fff}
.btn--border{background:transparent;border:2px solid var(--ms-blue);color:var(--ms-blue)}
.btn--small{padding:10px 16px;font-size:14px}

/* Fila de botones centrada + margen inferior */
.ms-btn-wrap{
  display:flex;justify-content:center;align-items:center;gap:var(--ms-x3);flex-wrap:wrap;
  margin-bottom:var(--ms-x4);
}
.ms-btn-wrap .btn{width:auto !important;min-width:160px;flex:0 0 auto}

/* Utilidades (otras filas de botones que uses) */
.ms-cta-row,.ms-btn-row,.ms-sticky-cta__inner{
  display:flex;justify-content:center;align-items:center;gap:var(--ms-x3);flex-wrap:wrap;
}
.ms-cta-row > .btn,.ms-btn-row > .btn,.ms-sticky-cta__inner .btn{
  width:auto !important;min-width:160px;flex:0 0 auto;
}

/* ====== TABS ====== */
.ms-tabs{margin:var(--ms-x4) 0}
.ms-tabs__list,.ms-tabs__panel{
  max-width:var(--ms-container);margin-left:auto;margin-right:auto;
  padding-left:var(--ms-x3);padding-right:var(--ms-x3);
}
.ms-tabs__list{
  display:flex;gap:32px;overflow-x:auto;white-space:nowrap;border-bottom:1px solid var(--ms-gray-200);
}
/* que no cambien de tamaño al activarse: usamos borde inferior */
.ms-tabs__tab{
  appearance:none;background:none;border:0;margin:0;
  padding:var(--ms-x3) 0;font-size:16px;cursor:pointer;
  border-bottom:3px solid transparent;
  line-height:1; box-sizing:border-box;
}
.ms-tabs__tab:focus-visible{outline:2px solid var(--ms-blue);outline-offset:2px;border-radius:2px}
.ms-tabs__tab.is-active{font-weight:700;border-bottom-color:var(--ms-blue);}
.ms-tabs__tab.is-active::after{display:none}
.ms-tabs__panel{padding:var(--ms-x4) var(--ms-x3);border-top:0;}
.ms-tabs__panel[hidden]{display:none}

/* ====== (9) Acordeón: reducir márgenes verticales */
.ms-accordion{margin:var(--ms-x3) 0;}
.ms-accordion__item{margin:0}

/* ====== FOOTER oscuro ====== */
.ms-footer{background:var(--ms-dark);color:#fff;padding:var(--ms-x4) 0}
.ms-footer__container{display:flex;flex-direction:column;gap:var(--ms-x3)}
.ms-footer__nav{order:2}
.ms-footer__list{list-style:none;margin:0;padding:0;display:flex;gap:var(--ms-x4);flex-wrap:wrap}
.ms-footer__copy{opacity:.9}
.ms-footer__link{color:#fff;opacity:.9;text-decoration:none}
.ms-footer__link:hover{opacity:1}
.ms-footer__lang{order:-1}

/* Selector de idioma visible */
.ms-footer__lang select,
.ms-footer__lang .form-select,
.ms-footer .post-footer-menu__language-selector select{
  width:100%;
  background:#fff;
  color:#111;
  border:0;
  padding:0 36px 0 14px;
  height:40px;
  line-height:normal;
  border-radius:2px;
  appearance:auto;
  text-indent:0 !important;
  display:block;
}
.ms-footer__lang select option{color:#111}

/* Sticky footer “sin espacio” cuando hay poco contenido */
html,body{height:100%}
body{min-height:100vh;display:flex;flex-direction:column}
main{flex:1}
.ms-footer{margin-top:auto}

/* ====== TABLA en modal ====== */
.modal__info__table{margin:var(--ms-x4) 0;overflow-x:auto}
.modal__info__table table{width:100%;border-collapse:separate;border-spacing:0}
.modal__info__table thead th{background:#f4f4f4;padding:14px;font-weight:700;text-align:left}
.modal__info__table tbody td{padding:16px;border-bottom:1px solid var(--ms-gray-200)}

/* ====== STICKY CTA ====== */
/* Fondo a ancho completo (full-bleed) y contenido acotado */
.ms-sticky-cta{
  background:#fff;
  position:relative;
  z-index:100;
  width:100vw;                                 /* ancho completo */
  margin-left:calc(50% - 50vw);
  margin-right:calc(50% - 50vw);
}
.ms-sticky-cta__inner{
  padding:12px 0;
  display:flex;
  align-items:center;
  justify-content:space-between;               /* texto izq, botón dcha */
  gap:var(--ms-x3);
}
.ms-sticky-cta__text{font-weight:700;margin-right:var(--ms-x3);}
.ms-sticky-cta__button{margin-left:auto;}
.ms-sticky-cta.is-sticky{
  position:fixed;left:0;right:0;top:0;z-index:1400;width:100vw;
}
.ms-sticky-cta.is-sticky .ms-sticky-cta__inner{
  max-width:var(--ms-container);margin-left:auto;margin-right:auto;
  padding-left:var(--ms-x3);padding-right:var(--ms-x3);padding-top:5px;
}
html.ms-sticky-cta-active .ms-promo,
html.ms-sticky-cta-active .ms-header{display:none !important}
html.ms-sticky-cta-active body{padding-top:var(--ms-sticky-offset,0px)}

/* ====== PREFOOTER (diseño final) ====== */
.ms-prefooter,
.ms-prefooter-wrap { padding: 28px 0 24px; }

.ms-prefooter__title{
  margin: 0 0 20px;
  font-weight: 700;
  line-height: 1.25;
  font-size: 24px;
}

.ms-prefooter__cols{
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px 64px;               /* vertical / horizontal */
  align-items: start;
}

.ms-prefooter__label{
  margin: 0 0 10px;
  color: #333;
  font-weight: 500;
}

.ms-prefooter__link{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ms-blue);
  font-weight: 700;
}
.ms-prefooter__link:hover{ text-decoration: underline; }

.ms-prefooter__icon{
  width: 24px; height: 24px;
  display: inline-flex;
  flex: 0 0 24px;
}
.ms-prefooter__icon svg{ width: 100%; height: 100%; display:block }

.ms-prefooter__chev{
  display:inline-block;
  margin-left: 6px;
  transform: translateY(1px);
}

/* ====== MQ ≥ 768 ====== */
@media (min-width:768px){
  .ms-container{padding:0 var(--ms-x4)}
  .ms-promo__inner{justify-content:center;gap:var(--ms-x3)}
  .ms-promo__sep{display:inline-block;width:1px;height:22px;background:#cfcfcf;margin:0 var(--ms-x2)}

  .ms-header__container{grid-template-columns:auto 1fr auto;min-height:80px}
  .ms-header__nav{display:block}
  .ms-header__cta{display:block}
  .ms-header__burger,.ms-header__user{display:none !important}
  .ms-header.is-open .ms-header__nav{position:static;inset:auto;overflow:visible;padding-bottom:0}
  .ms-header.is-open .ms-header__cta{position:static;background:transparent;border:0;padding:0}
  .ms-header [data-ms-menu-close]{display:none !important}

  /* Footer: idioma a la DERECHA */
  .ms-footer__container{flex-direction:row;align-items:center;justify-content:space-between}
  .ms-footer__nav{order:1}
  .ms-footer__lang{
    order:2;
    min-width:260px;
    margin-left:auto;
    margin-right:0;
  }

  /* Prefooter desktop en dos columnas */
  .ms-prefooter__title{ font-size:18px; margin-bottom:25px; }
  .ms-prefooter__cols{ grid-template-columns: 1fr 4fr; }
}

@media (max-width: 767px){
  /* Fijo abajo mientras se hace scroll (ya lo tienes en tu JS) */
  .ms-sticky-cta.is-sticky:not(.is-below-footer){
    bottom: 0;
    top: auto;
  }

  /* Layout vertical, paddings y alineaciones */
  .ms-sticky-cta__inner{
    flex-direction: column;
    align-items: stretch;          /* que el botón pueda ocupar 100% */
    gap: var(--ms-x3);
    padding: var(--ms-x3);         /* margen interior como en la captura */
    text-align: left;              /* texto alineado a la izquierda */
  }

  /* Título/Texto en negrita (como en la imagen) */
  .ms-sticky-cta__text{
    font-weight: 700;
    line-height: 1.35;
    margin: 0;
  }

  .ms-sticky-cta__button {
  margin-left: unset !important;
  }

  /* El contenedor del botón no empuja nada hacia los lados */
  .ms-sticky-cta__button .btn{
    width: 100% !important;
    min-width: 0;
    display: inline-flex;        /* recuperar flex */
    justify-content: center;     /* centrar horizontal */
    align-items: center;         /* centrar vertical */
    text-align: center;
  }
  /* Si tu template usa .btn__text, garantizamos el centrado también ahí */
  .ms-sticky-cta__button .btn .btn__text{
    display: block;
    width: 100%;
    text-align: center;
  }

  /* Cuando el sticky está colocado debajo del footer, mantenemos el mismo padding */
  .ms-sticky-cta.is-below-footer .ms-sticky-cta__inner{
    padding: var(--ms-x3);
  }
}
/* ====== MQ ≥ 1024 ====== */
@media (min-width:1024px){
  .ms-container{padding:0 var(--ms-x5)}
  .ms-header__brand img{height:40px}
  .ms-tabs__tab{font-size:16px}
}
