/* Cabecera, menú y popups: comportamiento que en la original añadían scripts inline y plugins. */

/* Apilado de Divi: la cabecera (absoluta) por encima del contenido */
.et-l--header > .et-builder-inner-content { position: relative; z-index: 3; }
.et-l--post > .et-builder-inner-content { position: relative; z-index: 1; }
.et-l--footer > .et-builder-inner-content { position: relative; z-index: 2; }

/* Cabecera negra en todas las páginas salvo la home y Estadi Olímpic (script inline de la original). */
#MenuEscritorio.is-solid { background-color: var(--color-black) !important; }

/* Submenús accesibles con teclado (Divi solo los abre con :hover) */
.nav li:focus-within > ul { visibility: visible; opacity: 1; z-index: 9999; }

/* Menú móvil: en Divi lo despliega su JS; aquí js/site.js alterna .opened / .closed */
.mobile_nav.opened .et-mobile-menu { display: block; }
.mobile_menu_bar { cursor: pointer; }

/* Evita barra horizontal por efectos de escala (hover) pegados al borde */
html, body { overflow-x: clip; }

/* ---- Popups de clubs (Popups for Divi) ---- */
.popup-overlay {
  position: fixed; inset: 0; z-index: 99998;
  background: rgba(0, 0, 0, .6);
}
.dv-section.popup.is-open {
  display: block !important;
  position: fixed !important; z-index: 99999;
  top: 50% !important; left: 50% !important; transform: translate(-50%, -50%) !important;
  width: min(900px, 92vw) !important; max-height: 90vh; overflow: auto;
  margin: 0 !important;
  box-shadow: 0 0 30px rgba(0, 0, 0, .3);
}
.popup-close {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  width: 32px; height: 32px; border-radius: 50%;
  border: 0; background: var(--color-white); color: var(--color-black);
  font: 600 22px/32px var(--font-heading); text-align: center; cursor: pointer;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .3);
}
body.has-popup { overflow: hidden; }
