/* Emprendeclic — comportamientos estáticos (migración desde Bubble) */
html { scroll-behavior: auto; }

/* Overlay de popups (replica GroupFocus de Bubble) */
.kpm-overlay {
  position: fixed !important;
  inset: 0 !important;
  z-index: 9999 !important;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.55);
}
.kpm-overlay.abierto { display: flex; }
.kpm-overlay > .kpm-popup {
  position: relative !important;
  left: auto !important;
  top: auto !important;
  transform: none !important;
  max-width: min(560px, 92vw);
  max-height: 88vh;
  overflow-y: auto;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.35);
  border-radius: 8px;
  background: #fff;
}
.kpm-overlay .kpm-close {
  position: absolute;
  top: 8px; right: 10px;
  width: 34px; height: 34px;
  border: 0; border-radius: 50%;
  background: rgba(0,0,0,0.08);
  color: #333; font-size: 20px; line-height: 34px;
  text-align: center; cursor: pointer;
  z-index: 10;
  transition: background .15s;
}
.kpm-overlay .kpm-close:hover { background: rgba(0,0,0,0.18); }

/* Formularios cableados */
.kpm-btn-estado { pointer-events: none; opacity: .7; }
.kpm-msg-ok { color: #0a7d38; font-weight: 600; margin-top: 8px; }
.kpm-msg-err { color: #b3261e; font-weight: 600; margin-top: 8px; }

/* Cursor en elementos con comportamiento */
.clickable-element { cursor: pointer; }


/* ====== Árbol desktop oculto en móvil (Bubble elimina estos nodos a <=768px) ====== */
@media (max-width: 768px) {
  .baTaHoaV, .baTaHop, .baTaHou, .baTaIaCa, .baTaIaCaT, .baTaIaCg, .baTaIaCm, .baTaIaCs, .baTaIaDaK, .baTaIaDo, .baTaIaEaA, .baTaIaEaY, .baTaIaYt, .baTaIaZaB, .baTaIaZaN, .baTaIaZe, .baTaIaZp, .baTaIre, .baTaJaFt, .baTaJaFz, .baTaJaGaH, .baTaJaGaN, .baTaJaGaY, .baTaJaGe, .baTaJaGp, .baTaJaGv, .baTaJaHa, .baTaJaHaD, .baTaJaHaJ, .baTaJaHaU, .baTaJaHl, .baTaJaHr, .baTaJaHz, .baTaJaIaF, .baTaJaIaW { display: none !important; }
}

/* ====== Móvil: cabecera con hamburguesa (solo pantallas pequeñas) ====== */
.baTaJaIh { display: none !important; }
@media (max-width: 768px) {
  .baTaJaIh { display: flex !important; }
  .kpm-overlay > .kpm-popup { max-width: 94vw; }
}

/* ====== Hover de menú: submenús desplegables ====== */
.kpm-submenu { display: none; }
.kpm-submenu.abierto { display: contents; }
.kpm-submenu > .bubble-element {
  cursor: pointer;
  transition: background 200ms;
}
.kpm-submenu > .bubble-element:hover {
  background: rgba(0, 0, 0, 0.07) !important;
}
/* resaltado de los ítems del menú principal al pasar el mouse */
.baTaHoaV .clickable-element,
.baTaJaJaF .clickable-element { transition: background 200ms; }
.baTaHoaV .clickable-element:hover,
.baTaJaJaF .clickable-element:hover { background: rgba(0, 0, 0, 0.06); }

/* ====== Menú lateral móvil ====== */
.kpm-menu-backdrop {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s;
  z-index: 9998;
}
.kpm-menu-backdrop.abierto { opacity: 1; pointer-events: auto; }
.kpm-mobile-menu {
  position: fixed;
  top: 0; left: 0;
  height: 100vh; height: 100dvh;
  width: min(340px, 90vw);
  transform: translateX(-105%);
  transition: transform 0.3s ease;
  z-index: 10000;
  overflow-y: auto;
  background: #fff;
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.25);
}
.kpm-mobile-menu.abierto { transform: translateX(0); }
.kpm-mobile-menu > .kpm-close {
  position: absolute;
  top: 8px; right: 8px;
  width: 40px; height: 40px;
  border: 0; border-radius: 50%;
  background: rgba(0,0,0,0.08);
  color: #333; font-size: 22px; line-height: 40px;
  text-align: center; cursor: pointer;
  z-index: 10;
}
@media (min-width: 769px) {
  .kpm-mobile-menu, .kpm-menu-backdrop { display: none !important; }
}

/* ====== Popup equipo: ancho del original (VT 380px) + salvaguardas ====== */
#kpm-popup-team-rafael > .kpm-popup,
#kpm-popup-team-oscar > .kpm-popup,
#kpm-popup-team-juan > .kpm-popup,
#kpm-popup-team-lorena > .kpm-popup { width: min(380px, 92vw); }
.kpm-overlay svg { max-width: 100%; }
.kpm-overlay .kpm-popup > .kpm-close { position: absolute; top: 6px; right: 6px; }
.kpm-overlay .kpm-popup { overflow-y: auto; }

/* ====== Popup equipo v2: foto dentro de la tarjeta + altura original ====== */
#kpm-popup-team-rafael > .kpm-popup,
#kpm-popup-team-oscar > .kpm-popup,
#kpm-popup-team-juan > .kpm-popup,
#kpm-popup-team-lorena > .kpm-popup {
  height: auto;
  max-height: min(549px, 88vh);
  overflow-y: auto;
}
#kpm-popup-team-rafael img, #kpm-popup-team-oscar img,
#kpm-popup-team-juan img, #kpm-popup-team-lorena img {
  max-width: 100% !important;
  height: auto !important;
}
#kpm-popup-team-rafael .bubble-element.Image,
#kpm-popup-team-oscar .bubble-element.Image,
#kpm-popup-team-juan .bubble-element.Image,
#kpm-popup-team-lorena .bubble-element.Image { width: 100% !important; max-width: 100% !important; }

/* ====== Popup equipo v3: texto sin recorte (vertical-center con altura fija) ====== */
#kpm-popup-team-rafael > .kpm-popup .bubble-element,
#kpm-popup-team-oscar > .kpm-popup .bubble-element,
#kpm-popup-team-juan > .kpm-popup .bubble-element,
#kpm-popup-team-lorena > .kpm-popup .bubble-element {
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
}
#kpm-popup-team-rafael > .kpm-popup,
#kpm-popup-team-oscar > .kpm-popup,
#kpm-popup-team-juan > .kpm-popup,
#kpm-popup-team-lorena > .kpm-popup { max-height: min(640px, 86vh); }
