/* ================================================================== */
/* sticky-nav.css — Header principal del sitio (siempre visible)       */
/* Estructura: 2 FILAS                                                  */
/*  - Top: Logo+texto izq | Teléfono + redes sociales + CTA der        */
/*  - Bottom: Navegación con dropdowns                                  */
/* Tipografía: Lato (títulos) + Open Sans (cuerpo)                      */
/* ================================================================== */

/* Ocultar el header viejo de Muse en ambas páginas */
#pppu3668-7 { display: none !important; }

/* Compensar el header fijo (mide ~155px de alto en 2 filas con logo grande) */
body {
  padding-top: 155px;
}

/* Evitar overflow horizontal causado por el CSS legacy de Muse */
html, body {
  overflow-x: hidden;
  max-width: 100%;
}

/* ================================================================== */
/* BOTÓN FLOTANTE DE WHATSAPP — siempre visible bottom-right            */
/* ================================================================== */
.wa-float {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none !important;
  box-shadow: 0 8px 28px rgba(37, 211, 102, 0.45);
  z-index: 9998;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  animation: waPulse 2.4s ease-in-out infinite;
}
.wa-float::before {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid rgba(37, 211, 102, 0.5);
  animation: waRing 2.4s ease-out infinite;
  pointer-events: none;
}
.wa-float svg {
  width: 32px;
  height: 32px;
  position: relative;
  z-index: 2;
}
.wa-float:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 14px 36px rgba(37, 211, 102, 0.6);
  animation-play-state: paused;
}
.wa-float-tooltip {
  position: absolute;
  right: 72px;
  top: 50%;
  transform: translateY(-50%);
  background-color: #1A2A36;
  color: #FFFFFF;
  padding: 10px 16px;
  border-radius: 8px;
  font-family: '__Open Sans_5', 'Open Sans', sans-serif;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}
.wa-float-tooltip::after {
  content: "";
  position: absolute;
  right: -6px;
  top: 50%;
  transform: translateY(-50%);
  border: 6px solid transparent;
  border-left-color: #1A2A36;
}
.wa-float:hover .wa-float-tooltip {
  opacity: 1;
  transform: translateY(-50%) translateX(-4px);
}
@keyframes waPulse {
  0%, 100% { box-shadow: 0 8px 28px rgba(37, 211, 102, 0.45); }
  50% { box-shadow: 0 8px 28px rgba(37, 211, 102, 0.7), 0 0 0 8px rgba(37, 211, 102, 0.15); }
}
@keyframes waRing {
  0% { transform: scale(1); opacity: 0.7; }
  100% { transform: scale(1.4); opacity: 0; }
}
@media (max-width: 700px) {
  .wa-float {
    width: 52px;
    height: 52px;
    bottom: 18px;
    right: 18px;
  }
  .wa-float svg {
    width: 28px;
    height: 28px;
  }
  .wa-float-tooltip {
    display: none;
  }
}

/* Header principal — siempre visible, fijo arriba */
.sticky-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: #FFFFFF;
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.08);
  border-bottom: 1px solid #EEF2F4;
  z-index: 10000;
  font-family: '__Open Sans_5', 'Open Sans', sans-serif;
}

/* ================================================================== */
/* FILA 1 (TOP): Logo + texto institucional | Teléfono + Social + CTA */
/* ================================================================== */
.sticky-nav-top {
  border-bottom: 1px solid #F0F4F6;
  background-color: #FFFFFF;
}
.sticky-nav-top-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 14px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

/* --- Brand: logo + texto del instituto (izquierda) --- */
.sticky-nav-brand,
.sticky-nav-brand:hover,
.sticky-nav-brand:visited,
.sticky-nav-brand *,
.sticky-nav-brand *:hover {
  text-decoration: none !important;
  border-bottom: none !important;
}
.sticky-nav-brand {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}
.sticky-nav-brand-logo {
  height: 68px;
  width: auto;
  display: block;
  flex-shrink: 0;
}
.sticky-nav-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.sticky-nav-brand-name {
  font-family: '__Lato_5', 'Lato', sans-serif;
  font-size: 24px;
  font-weight: 900;
  color: #00698C;
  letter-spacing: -0.3px;
}
.sticky-nav-brand-sub {
  font-family: '__Open Sans_5', 'Open Sans', sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: #6B7A85;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 4px;
  max-width: 280px;
  line-height: 1.35;
}

/* --- Utility: teléfono + redes sociales + CTA (derecha) --- */
.sticky-nav-utility {
  display: flex;
  align-items: center;
  gap: 28px;
  flex-shrink: 0;
}

/* Teléfono / WhatsApp */
.sticky-nav-phone {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: '__Open Sans_5', 'Open Sans', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: #00698C;
  text-decoration: none;
  transition: color 0.2s ease;
}
.sticky-nav-phone:hover {
  color: #004E68;
}
.sticky-nav-phone svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

/* Redes sociales — más grandes y prominentes */
.sticky-nav-social {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 22px;
  border-left: 1px solid #E5EBF0;
  border-right: 1px solid #E5EBF0;
}
.sticky-nav-social a {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: #6B7A85;
  background-color: #F4F8FA;
  transition: background-color 0.25s ease, color 0.25s ease, transform 0.25s ease;
}
.sticky-nav-social a:hover {
  background-color: #00698C;
  color: #FFFFFF;
  transform: translateY(-3px);
}
.sticky-nav-social svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

/* CTA INSCRÍBETE — botón grande y llamativo (UX/UI) */
.sticky-nav-top .sticky-nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background-color: #FF0000;
  color: #FFFFFF !important;
  text-decoration: none !important;
  padding: 16px 32px;
  border-radius: 10px;
  font-family: '__Lato_5', 'Lato', sans-serif;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  border: 2px solid #FF0000;
  box-shadow: 0 6px 20px rgba(255, 0, 0, 0.35);
  transition: background-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
  white-space: nowrap;
}
.sticky-nav-top .sticky-nav-cta::after {
  content: "→";
  font-size: 18px;
  transition: transform 0.3s ease;
}
.sticky-nav-top .sticky-nav-cta:hover {
  background-color: #CC0000;
  border-color: #CC0000;
  transform: translateY(-3px);
  box-shadow: 0 12px 26px rgba(255, 0, 0, 0.45);
}
.sticky-nav-top .sticky-nav-cta:hover::after {
  transform: translateX(4px);
}

/* ================================================================== */
/* FILA 2 (BOTTOM): Menú de navegación con dropdowns (ALINEADO DERECHA)*/
/* ================================================================== */
.sticky-nav-menu {
  background-color: #FFFFFF;
}
.sticky-nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 24px;
}

/* --- Lista de links a la derecha --- */
.sticky-nav-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.sticky-nav-links > li {
  margin: 0;
  padding: 0;
  position: relative; /* anclaje para el dropdown absoluto */
}
.sticky-nav-links > li > a {
  display: inline-block;
  font-family: '__Lato_5', 'Lato', sans-serif;
  font-size: 15px;
  font-weight: 900;
  color: #00698C;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 20px 2px;
  border-bottom: 3px solid transparent;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.sticky-nav-links > li > a:hover,
.sticky-nav-links > li > a.active {
  color: #004E68;
  border-bottom-color: #00698C;
}

/* --- Chevron ▼ junto a los links que tienen dropdown --- */
/* Sirve como indicador visual: "este link despliega más opciones".  */
/* Usa :has() para detectar automáticamente los <li> que contienen   */
/* un submenu (sin necesidad de marcar nada en el HTML).             */
.sticky-nav-links > li:has(> .sticky-nav-submenu) > a::after {
  content: "";
  display: inline-block;
  width: 0;
  height: 0;
  margin-left: 7px;
  vertical-align: 2px;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  transition: transform 0.25s ease;
}
/* Al hacer hover sobre el link padre, el chevron rota 180° (mira    */
/* hacia arriba) — feedback visual de "menú abierto".                 */
.sticky-nav-links > li:has(> .sticky-nav-submenu):hover > a::after {
  transform: rotate(180deg);
}

/* ================================================================== */
/* DROPDOWNS DEL STICKY NAV — cards estilo Muse                       */
/* Replican el lenguaje visual de los dropdowns del header original   */
/* (cards con borde azul petróleo, ícono arriba, barra blanca abajo). */
/* ================================================================== */
.sticky-nav-submenu {
  list-style: none;
  margin: 0;
  padding: 12px;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-6px);
  background-color: #FFFFFF;
  border-radius: 8px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18);
  border-top: 3px solid #00698C;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
  z-index: 10001;
  display: flex;
  flex-direction: row;
  gap: 8px;
  width: max-content;
}
.sticky-nav-links > li:hover .sticky-nav-submenu,
.sticky-nav-links > li:focus-within .sticky-nav-submenu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
.sticky-nav-submenu li {
  margin: 0;
  padding: 0;
  list-style: none;
}
.sticky-nav-submenu a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  width: 95px;
  height: 110px;
  padding: 0;
  border: 1px solid #006A8C;
  border-radius: 5px;
  background-color: #FFFFFF;
  overflow: hidden;
  text-decoration: none;
  box-sizing: border-box;
  transition: background-color 0.25s ease;
}
.sticky-nav-submenu a > svg {
  width: 38px;
  height: 38px;
  margin-top: 18px;
  fill: #006A8C;
  transition: fill 0.25s ease;
  flex-shrink: 0;
}
.sticky-nav-submenu .card-label {
  display: block;
  width: 100%;
  margin-top: auto;
  background-color: rgba(255, 255, 255, 0.7);
  padding: 8px 4px;
  font-family: '__Open Sans_5', 'Open Sans', sans-serif;
  font-size: 11px;
  font-weight: 700;
  line-height: 13px;
  color: #00698C;
  text-align: center;
  text-transform: none;
  letter-spacing: 0;
  border-radius: 0 0 4px 4px;
  transition: background-color 0.25s ease, color 0.25s ease;
}
.sticky-nav-submenu a:hover .card-label {
  background-color: rgba(0, 106, 140, 0.85);
  color: #FFFFFF;
}

/* --- Botón rojo "INSCRÍBETE AQUÍ" a la derecha --- */
.sticky-nav-cta {
  flex-shrink: 0;
  display: inline-block;
  background-color: #FF0000;
  color: #FFFFFF !important;
  text-decoration: none !important;
  padding: 10px 22px;
  border: 2px solid #FFFFFF;
  border-radius: 18px;
  font-family: '__Lato_5', 'Lato', sans-serif;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.5px;
  box-shadow: 0 3px 10px rgba(255, 0, 0, 0.35);
  transition: background-color 0.25s ease, transform 0.25s ease;
  white-space: nowrap;
}
.sticky-nav-cta:hover {
  background-color: #CC0000;
  transform: translateY(-2px);
}

/* --- Responsive: tablets y móviles --- */
@media (max-width: 1100px) {
  body { padding-top: 130px; }
  .sticky-nav-top-inner,
  .sticky-nav-inner {
    padding-left: 22px;
    padding-right: 22px;
  }
  .sticky-nav-brand-logo { height: 50px; }
  .sticky-nav-brand-name { font-size: 17px; }
  .sticky-nav-brand-sub { font-size: 10px; }
  .sticky-nav-utility { gap: 18px; }
  .sticky-nav-links { gap: 18px; }
}
@media (max-width: 900px) {
  body { padding-top: 120px; }
  .sticky-nav-brand-sub { display: none; }
  .sticky-nav-phone { display: none; }
  .sticky-nav-social { padding: 0 12px; }
  .sticky-nav-social a { width: 28px; height: 28px; }
  .sticky-nav-links > li > a {
    font-size: 13px;
    padding: 18px 4px;
  }
  .sticky-nav-top .sticky-nav-cta {
    padding: 9px 16px;
    font-size: 12px;
  }
}
@media (max-width: 700px) {
  body { padding-top: 80px; }
  .sticky-nav-social { display: none; }
  .sticky-nav-top .sticky-nav-cta { display: none; }
  .sticky-nav-utility { gap: 12px; }
  .sticky-nav-top-inner { padding: 10px 16px; }
  .sticky-nav-brand-logo { height: 42px; }
  .sticky-nav-brand-name { font-size: 16px; }
  .sticky-nav-menu { display: none; }
  .sticky-nav-inner {
    padding-top: 6px;
    padding-bottom: 6px;
  }
}

/* ================================================================== */
/* BOTÓN HAMBURGUESA — solo visible en móvil                            */
/* ================================================================== */
.sticky-nav-burger {
  display: none;
  width: 44px;
  height: 44px;
  background: transparent;
  border: 1px solid #E1EBF0;
  border-radius: 10px;
  padding: 0;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  flex-shrink: 0;
  transition: background-color 0.25s ease, border-color 0.25s ease;
}
.sticky-nav-burger:hover {
  background-color: #F4F8FB;
  border-color: #00698C;
}
.sticky-nav-burger span {
  display: block;
  width: 22px;
  height: 2.5px;
  background-color: #00698C;
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.sticky-nav-burger.is-active span:nth-child(1) {
  transform: translateY(7.5px) rotate(45deg);
}
.sticky-nav-burger.is-active span:nth-child(2) {
  opacity: 0;
}
.sticky-nav-burger.is-active span:nth-child(3) {
  transform: translateY(-7.5px) rotate(-45deg);
}
@media (max-width: 700px) {
  .sticky-nav-burger {
    display: flex;
  }
}

/* ================================================================== */
/* MENÚ MÓVIL — slide desde la derecha al activar hamburguesa           */
/* ================================================================== */
@media (max-width: 700px) {
  .sticky-nav.mobile-menu-open .sticky-nav-menu {
    display: block;
    position: fixed;
    top: 80px;
    left: 0;
    right: 0;
    bottom: 0;
    background: #FFFFFF;
    overflow-y: auto;
    padding: 24px 20px 80px 20px;
    border-top: 1px solid #EEF2F4;
    animation: mobileMenuSlide 0.3s ease-out;
    z-index: 9999;
  }
  @keyframes mobileMenuSlide {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
  }
  .sticky-nav.mobile-menu-open .sticky-nav-inner {
    max-width: 100%;
    padding: 0;
  }
  .sticky-nav.mobile-menu-open .sticky-nav-links {
    display: flex !important;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    width: 100%;
  }
  .sticky-nav.mobile-menu-open .sticky-nav-links > li {
    width: 100%;
    border-bottom: 1px solid #EEF2F4;
  }
  .sticky-nav.mobile-menu-open .sticky-nav-links > li > a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 4px;
    font-size: 15px;
    font-weight: 900;
    color: #1A2A36;
    width: 100%;
    border-bottom: none;
  }
  .sticky-nav.mobile-menu-open .sticky-nav-links > li > a::after {
    content: "";
    display: inline-block;
    width: 8px;
    height: 8px;
    border-right: 2px solid #00698C;
    border-bottom: 2px solid #00698C;
    transform: rotate(45deg);
    margin-left: auto;
    transition: transform 0.3s ease;
  }
  .sticky-nav.mobile-menu-open .sticky-nav-links > li:not(:has(.sticky-nav-submenu)) > a::after,
  .sticky-nav.mobile-menu-open .sticky-nav-links > li:first-child > a::after {
    display: none;
  }
  .sticky-nav.mobile-menu-open .sticky-nav-links > li.mobile-submenu-open > a::after {
    transform: rotate(-135deg);
  }
  .sticky-nav.mobile-menu-open .sticky-nav-submenu {
    position: static !important;
    display: none !important;
    background: #F4F8FB;
    box-shadow: none;
    border: none;
    padding: 8px 0 16px 0;
    margin: 0 -4px 8px -4px;
    border-radius: 12px;
    grid-template-columns: 1fr !important;
    gap: 0 !important;
    transform: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    width: auto !important;
    min-width: 0 !important;
  }
  .sticky-nav.mobile-menu-open .sticky-nav-links > li.mobile-submenu-open .sticky-nav-submenu {
    display: block !important;
  }
  .sticky-nav.mobile-menu-open .sticky-nav-submenu li {
    width: 100%;
    margin: 0;
  }
  .sticky-nav.mobile-menu-open .sticky-nav-submenu a {
    display: flex !important;
    align-items: center;
    gap: 14px;
    padding: 14px 18px !important;
    background: transparent !important;
    border: none !important;
    border-radius: 0;
    box-shadow: none !important;
    font-size: 14px;
    color: #1A2A36;
    flex-direction: row !important;
    text-align: left !important;
    height: auto !important;
    width: auto !important;
  }
  .sticky-nav.mobile-menu-open .sticky-nav-submenu a:hover {
    background: rgba(0, 106, 140, 0.08) !important;
  }
  .sticky-nav.mobile-menu-open .sticky-nav-submenu a svg {
    width: 22px !important;
    height: 22px !important;
    fill: #00698C;
    flex-shrink: 0;
    margin: 0 !important;
  }
  .sticky-nav.mobile-menu-open .sticky-nav-submenu a .card-label {
    font-size: 14px !important;
    font-weight: 700 !important;
    color: #1A2A36 !important;
    margin: 0 !important;
    text-align: left !important;
  }
  /* CTA destacado al final del menú móvil */
  .sticky-nav.mobile-menu-open .sticky-nav-links::after {
    content: "INSCRÍBETE AQUÍ";
    display: block;
    margin-top: 24px;
    padding: 16px 24px;
    background-color: #FF0000;
    color: #FFFFFF;
    font-family: '__Lato_5', 'Lato', sans-serif;
    font-size: 14px;
    font-weight: 900;
    text-align: center;
    border-radius: 12px;
    letter-spacing: 0.5px;
    box-shadow: 0 8px 20px rgba(255, 0, 0, 0.3);
  }
  /* Lock scroll del body cuando el menú está abierto */
  body.mobile-menu-lock {
    overflow: hidden;
  }
}
