/* =========================================================
   EMM – Stickybar (Gutenberg: Columns + Paragraphs)
   Scope: page-id-9595
   Estructura real:
     .emm-stickybar (Group)
       .wp-block-columns
         .wp-block-column > p.emm-stickybar__nav  (links)
         .wp-block-column > p.emm-stickybar__cta1 (CTA1)
         .wp-block-column > p.emm-stickybar__cta2 (CTA2)
   ========================================================= */

body.page-id-9595 .emm-stickybar{
  position: sticky;
  top: 0;
  z-index: 999;
  background: rgba(255,255,255,.88);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0,0,0,.08);
  box-shadow: 0 10px 24px rgba(0,0,0,.10);
  padding: 10px 0;
}

/* Contenedor centrado tipo BIG */
body.page-id-9595 .emm-stickybar > .wp-block-group__inner-container{
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 clamp(14px, 3vw, 26px);
}

/* ====== FIX CLAVE: neutralizar Columns solo aquí ====== */
body.page-id-9595 .emm-stickybar .wp-block-columns{
  margin: 0 !important;
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  flex-wrap: nowrap !important;        /* una fila, estilo “menu” */
  justify-content: flex-start !important;
}

/* Las columnas deben comportarse como “items auto”, NO como columnas 33/66 */
body.page-id-9595 .emm-stickybar .wp-block-columns > .wp-block-column{
  margin: 0 !important;
  padding: 0 !important;
  min-width: 0 !important;

  /* mata los anchos/basis que mete WP */
  flex: 0 0 auto !important;
  flex-basis: auto !important;
  width: auto !important;
  max-width: none !important;
}

/* Empuja CTAs a la derecha sin tocar Gutenberg:
   - buscamos la column que CONTIENE el p.cta1 y le ponemos margin-left:auto */
body.page-id-9595 .emm-stickybar .wp-block-columns > .wp-block-column:has(> p.emm-stickybar__cta1){
  margin-left: auto !important;
}

/* ====== Estilos base de items (párrafos) ====== */
body.page-id-9595 .emm-stickybar p{
  margin: 0 !important;
  font-size: 14px;
  line-height: 1;
  font-weight: 600;
  color: rgba(0,0,0,.72);

  white-space: nowrap;
  word-break: keep-all;
  hyphens: none;

  padding: 8px 8px;
  border-radius: 8px;
}

/* Si hay <a> dentro */
body.page-id-9595 .emm-stickybar p a{
  color: inherit;
  text-decoration: none;
  display: inline-block;
}

/* Links: SOLO los que tengan clase nav */
body.page-id-9595 .emm-stickybar p.emm-stickybar__nav:hover{
  background: rgba(0,0,0,.06);
  color: rgba(0,0,0,.92);
}

/* ====== CTAs: conviértelos en “botón” aunque sean <p> ====== */
body.page-id-9595 .emm-stickybar p.emm-stickybar__cta1,
body.page-id-9595 .emm-stickybar p.emm-stickybar__cta2{
  display: inline-flex;               /* evita que se estiren */
  align-items: center;
  justify-content: center;

  padding: 10px 14px;
  border-radius: 12px;
  font-weight: 800;
  letter-spacing: .2px;
  border: 1px solid rgba(0,0,0,.12);
  box-shadow: 0 10px 22px rgba(0,0,0,.12);
  cursor: pointer;

  /* importantísimo: que NUNCA ocupen 800px */
  width: auto !important;
  max-width: 100%;
}

/* CTA1 amarillo */
body.page-id-9595 .emm-stickybar p.emm-stickybar__cta1{
  background: #f6b800;
  color: #1b1b1b;
  border-color: rgba(0,0,0,.16);
}
body.page-id-9595 .emm-stickybar p.emm-stickybar__cta1:hover{
  filter: brightness(.97);
}

/* CTA2 secundario */
body.page-id-9595 .emm-stickybar p.emm-stickybar__cta2{
  background: rgba(34, 98, 234, .10);
  color: rgba(0,0,0,.88);
}
body.page-id-9595 .emm-stickybar p.emm-stickybar__cta2:hover{
  background: rgba(34, 98, 234, .16);
}

/* ====== Responsive ====== */
@media (max-width: 920px){
  /* en pantallas más pequeñas: permite wrap para no romper */
  body.page-id-9595 .emm-stickybar .wp-block-columns{
    flex-wrap: wrap !important;
    row-gap: 10px !important;
  }

  /* si envuelve, quitamos el “push” del CTA para que no haga cosas raras */
  body.page-id-9595 .emm-stickybar .wp-block-columns > .wp-block-column:has(> p.emm-stickybar__cta1){
    margin-left: 0 !important;
  }
}
/* =========================================================
   EMM – Stickybar MOBILE layout
   ========================================================= */

@media (max-width: 820px){

  /* La stickybar ahora es vertical */
  body.page-id-9595 .emm-stickybar{
    padding: 8px 0 10px;
  }

  body.page-id-9595 .emm-stickybar .wp-block-columns{
    flex-wrap: wrap !important;
    row-gap: 8px !important;
  }

  /* =========================
     FILA 1 · NAV (scrollable)
     ========================= */

  /* Todos los nav arriba */
  body.page-id-9595
  .emm-stickybar
  .wp-block-column:has(> p.emm-stickybar__nav){
    order: 1;
  }

  body.page-id-9595
  .emm-stickybar
  .wp-block-columns{
    overflow: visible;
  }

  /* Contenedor scroll horizontal */
  body.page-id-9595
  .emm-stickybar
  .wp-block-columns{
    justify-content: flex-start !important;
  }

  body.page-id-9595
  .emm-stickybar
  p.emm-stickybar__nav{
    font-size: 13px;
    padding: 6px 8px;
    background: transparent;
  }

  /* Hacemos el “carrusel” */
  body.page-id-9595
  .emm-stickybar
  .wp-block-columns{
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  body.page-id-9595
  .emm-stickybar
  .wp-block-columns::-webkit-scrollbar{
    display: none;
  }

  /* =========================
     FILA 2 · CTAs centrados
     ========================= */

  body.page-id-9595
  .emm-stickybar
  .wp-block-column:has(> p.emm-stickybar__cta1),
  body.page-id-9595
  .emm-stickybar
  .wp-block-column:has(> p.emm-stickybar__cta2){
    order: 2;
  }

  /* Quitamos empujes raros */
  body.page-id-9595
  .emm-stickybar
  .wp-block-column:has(> p.emm-stickybar__cta1){
    margin-left: 0 !important;
  }

  /* Agrupamos visualmente los CTAs */
  body.page-id-9595
  .emm-stickybar
  p.emm-stickybar__cta1,
  body.page-id-9595
  .emm-stickybar
  p.emm-stickybar__cta2{
    min-width: 0;
    width: auto;
    padding: 10px 14px;
    font-size: 14px;
  }

  /* Centrarlos como bloque */
  body.page-id-9595
  .emm-stickybar
  .wp-block-columns{
    justify-content: center !important;
  }
}