/* Variables globales */
:root {
  --main-bg: #f5f5f5;
  --primary-color: #333;
  --accent-color: #0066cc;
  --font-family: 'Roboto', sans-serif;
  --header-height: 60px;
  --spacing: 1rem;
	 --map-bg: #2E42FF; /* color editable del fondo del SVG */




/* === Top-down mobile menu (header always visible, toggle always on top) === */

  --header-height: 64px;
  --menu-height: 72vh;            /* % de la pantalla */
  --menu-z: 10000;
  --backdrop-z: 9000;
  --header-z: 11000;
  --toggle-z: 12000;
}



/* Reset */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html, body {
  height: 100%;
}
body {
  display: flex;
  flex-direction: column;
  font-family: var(--font-family);
  color: var(--primary-color);
  background: var(--main-bg);
}

/* Header y NavegaciÃ³n */
header {
  position: fixed;
  top: 0;
  width: 100%;
  height: var(--header-height);
  background: #fff;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--spacing);
  z-index: 1000;
}
header h1 {
  font-size: 1.25rem;
}

#mainNav ul.nav-buttons {
  list-style: none;
  display: flex;
  gap: var(--spacing);
}
#mainNav li {
  list-style: none;
}
#mainNav button {
  background: var(--accent-color);
  color: #fff;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 0.25rem;
  cursor: pointer;
}

/* Layout principal */
main {
  margin-top: var(--header-height);
  flex: 1;
  position: relative;
}
#mapSection {
  position: relative;
  z-index: 1;
}
.logo-splash{
	position: absolute;
	top: 2rem;
	height: 40px;
  width: auto;
  display: block;
}
.logo-mnba {
	
  height: 40px;

  width: auto;
  display: block;
}



#mapSection.active {
  display: block;
}
#inicioSection.active {
  display: flex;
}

.cursiva {
	font-size: 1.3em;
	 font-family: "Cormorant", serif;
  font-optical-sizing: auto;
  font-weight:800;
  font-style: italic;
	line-height: 0.6!important; 
	padding-top:  2em!important;
	margin-top: 0.5em;
	margin-bottom: 0.5em;
	margin-left: 0.5em;
	margin-right: 0em;
}


/* Selector de piso al final de la columna, más separado */
#floorSelectForm {
  position: fixed !important;
  right: var(--ui-column-right) !important;
  top: calc(var(--ui-column-center-v) - 280px) !important;
  left: auto !important;
  bottom: auto !important;
  margin: 0 !important;
  z-index: 1000 !important;
	background:rgba(255,255,255,.1)!important;
	 border: 0px solid #ddd;
	border-radius: 20px;
	padding: 5px;
	color: #fff;
	 display: inline;
	align-content: center !important; 
	backdrop-filter: blur(22px) saturate(155%) !important;

	
}


	

#floorSelectForm fieldset {
  border: none;
	
	
}

.fieldset{
	
display: inline;	
}
#floorSelectForm legend {
  font-weight:normal;
  margin-bottom: 0.9rem;
	color: #fff;
	text-align: center;
}
#floorSelectForm select {
  width: 100%;
  padding: 0.5rem;
  font-size: 1.5rem; border: none; display: inline;
}
#floorSelect {
	background: #2E42FF !important; color: #fff; 
}

/* Leyenda */
/*#leyenda-box {
  position: absolute;
  top: var(--header-height);
  left: var(--spacing);
  background:  #2E42FF;
  border: 1px solid #ddd;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  padding: var(--spacing);
  z-index: 1001;
}*/
#leyenda-box[hidden] {
  display: none;
}
#cerrar-leyenda {
  position: relative;
  top: 0.5rem;
  margin-bottom: 10px!important;
  /*right: 0.1rem;*/
  left: 0.5rem !important;
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
}

/* Mapa y Leaflet */
#map {
	position: fixed; 
	top: 67px;
	display: block;
  width: 100%;
  height: calc(100vh - var(--header-height));
  background-color: var(--map-bg) !important;
}
.leaflet-container {
  width: 100%;
  height: 100%;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  justify-content: center;
  align-items: center;
  z-index: 2147483646;
}
.modal[aria-hidden="false"] {
  display: flex;
}
.modal-content {
  position: relative;
  background: #fff;
  max-width: 90%;
  max-height: 90%;
  overflow-y: auto;
  position: relative;
  padding: var(--spacing);
	top:0;

  z-index: 2147483647;
}
.modal-content .close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
}
.modal-content .modal-image,
.modal-content .modal-text,
.modal-extended {
  margin-top: var(--spacing);
}

/* Exposiciones */
#inicioSection .grid-container {
  display: flex;
 top: -20px;	
  gap: var(--spacing);
  padding: var(--spacing);
  overflow-x: auto;
}
.expo-card {
  flex: 0 0 auto;
  width: 80%;
  max-width: 300px;
}

/* Footer */
footer {
  display: flex;
	color: #60a0e0;
  z-index: 3;
 text-align: center;
  background: #2E42FF;
  padding: 0.5rem;
  border-top: 1px solid #004a99;
  font-size: 0.865rem;
}

/* Responsive */
@media (min-width: 768px) {
  #inicioSection .grid-container {
    justify-content: center;
  }
}




@media (max-width: 768px) {
  svg {
    max-width: 100%;
    height: auto;
    transform: scale(0.6);
   /* transform-origin: center top;*/
    /*margin-top: 20px;*/
  }
}

.leaflet-bar {
  /*  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.65);*/
    border-radius: 20px;
	background:rgba(255,255,255,.1)!important;
	backdrop-filter: blur(22px) saturate(155%) !important;
	border: 0 solid #ffffff !important; 
	padding: 5px;
}

.leaflet-right .leaflet-control {
    margin-right: 0px !important;
}


/* SIMBOLOGÃA general escritorio */



/* Imagen del detalle dinÃ¡mico (desde Google Sheets) */
.poi-media {
  width: 100%;
  height: auto;
  max-height: 25vh;
  object-fit: contain;
  border-radius: 12px;
  border: 1px solid #ccc;
  background: #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  display: block;
  margin: 0 auto 12px;
}


/* ð Asegura contenedor modal adaptable sin scroll innecesario */
.modal-content, #modal .content {
  max-width: 96vw;
  max-height: 25vh;
  width: auto;
  height: auto;
  margin: auto;
  padding: 20px;
  overflow-y: auto!important;
  box-sizing: border-box;
  border-radius: 16px;
  background: #ffffff;
  display: grid;
  flex-direction: column;
  align-items: start;
  justify-content: center;
}

/* ð· ImÃ¡genes desde Google Sheets contenidas dentro del modal */
.modal-content img,
#modal .content img {
	
 margin-top: 5rem!important;
  width: 100%;
  height: auto;
  max-height: 25vh;
  /*object-fit: contain;*/
  display: block;
  margin: 12px 0;
  border-radius: 12px;
  border: 1px solid #ccc;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);

  object-fit: cover; /* Escala la imagen para cubrir el div */
}

/* ð§¼ Ajuste general para evitar desbordes inesperados */
body, html {
  overflow-x: hidden;
}


/* SIMBOLOGÃA reforzado */
#simbologia {
  position: absolute;
  top: 96px;
  right: 40px;
  background: #ffffff;
  border-radius: 0;
  padding: 20px 24px 24px;
  box-shadow: 0 10px 32px rgba(0,0,0,0.2);
  max-width: 360px;
  width: auto;
  z-index: 80;
}

/* BotÃ³n de cerrar dentro de simbologÃ­a */
#simbologia .close-btn {
  display: block;
  margin-top: 16px;
  margin-bottom: 8px;
  background: #ccc;
  border: none;
  padding: 6px 12px;
  font-size: 14px;
  cursor: pointer;
}

/* En mÃ³viles: centrado y separado del borde */
@media (max-width: 768px) {
  #simbologia {
    left: 6%;
    right: 6%;
    top: auto;
    bottom: 100px;
    max-width: 88%;
    padding: 20px;
    font-size: 16px;
    line-height: 1.5;
    z-index: 80;
  }
}


.leyenda-box {
  position: absolute;
  top: 80px;
  right: 32px;
  background-color: #ffffff;
  padding: 20px 24px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
  border-radius: 0;
  max-width: 360px;
  width: auto;
  z-index: 150; /* por sobre SVG y otros elementos */
}

/* Responsive: se adapta y centra mejor en mÃ³viles */
@media (max-width: 768px) {
  .leyenda-box {
    left: 6%;
    right: 6%;
    top: auto;
    bottom: 100px;
    max-width: 88%;
    padding: 20px;
    font-size: 16px;
    line-height: 1.5;
    z-index: 150;
  }
}




/* Pantalla de bienvenida */
/*#welcome-screen {
  position: fixed;
  inset: 0;
  background: #0b0f14;
  color: #fff;
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.welcome-inner {
  text-align: center;
  max-width: 480px;
}

#welcome-screen h1 {
  font-size: 48px;
  animation: fadeInOut 4s infinite;
  margin-bottom: 16px;
}

.welcome-msg {
  font-size: 16px;
  line-height: 1.2;
  margin-bottom: 24px;
	font-family: "Roboto", sans-serif;
  font-optical-sizing: auto;
  font-weight: 400;
  font-style: normal;
  font-variation-settings: 100;
}

#start-btn {
  background: #ffffff;
  color: #000;
  border: none;
  border-radius: 8px;
  padding: 12px 24px;
  font-size: 16px;
  cursor: pointer;
}

@keyframes fadeInOut {
  0% { opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { opacity: 0; }
}*/


/* Splash azul tipo Apple */
#welcome-screen {
  position: fixed;
  inset: 0;
  background: #2E42FF;
  color: #ffffff;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
  padding: 24px;
  transition: opacity 0.6s ease;
}

#welcome-screen.fade-out {
  opacity: 0;
  pointer-events: none;
}

.welcome-inner h1 {
  font-size: 46px;
  font-weight: bold;
  margin-bottom: 16px;
  animation: fadeInOut 4s infinite;
}

.welcome-inner p {
  font-size: 18px;
  max-width: 400px;
  margin: 0 auto 24px;
  line-height: 1.6;
}

/*#start-btn {
  background: #ffffff;
  color: #2E42FF;
  border: none;
  padding: 14px 28px;
  font-size: 16px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
}
*/
@keyframes fadeInOut {
  0%, 100% { opacity: 0; }
  10%, 90% { opacity: 1; }
}


#welcome-screen {
  position: fixed;
  inset: 0;
  background: #2E42FF;
  color: #ffffff;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
  padding: 24px;
  transition: opacity 0.6s ease;
}

#welcome-screen.fade-out {
  opacity: 0;
  pointer-events: none;
}

.welcome-inner h1 {
  font-size: 56px;
  font-weight: bold;
  margin-bottom: 16px;
  animation: fadeInOut 4s infinite;
	
}

.welcome-inner p {
  font-size: 18px;
  max-width: 400px;
  margin: 0 auto 24px;
  line-height: 1.6;
}

/*#start-btn {
  background: #ffffff;
  color: #2E42FF;
  border: none;
  padding: 14px 28px;
  font-size: 16px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
}
*/

#welcome-screen {
  background: #2E42FF !important;
 
}


#welcome-screen {
  position: fixed;
  inset: 0;
  background-color: #2E42FF;
  color: #ffffff;
  z-index: 999999;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 24px;
  font-family: system-ui, sans-serif;
  transition: opacity 0.6s ease;
}

#welcome-screen.fade-out {
  opacity: 0;
  pointer-events: none;
}

.welcome-inner h1 {
  font-size: 48px;
  font-weight: bold;
  margin-bottom: 16px;
  animation: fadeInOut 4s infinite;
}

.welcome-msg {
  font-size: 18px;
  max-width: 480px;
  margin: 0 auto 24px;
  line-height: 0.8;
}


#start-btn {
  background: #2E42FF;
  color: #ffffff;
  border: 1px solid #ffffff!important;
  padding: 14px 28px;
  font-size: 16px;
  border-radius:0px;
  cursor: pointer;
  font-weight: 600;
}

@keyframes fadeInOut {
  0%, 100% { opacity: 0; }
  10%, 90% { opacity: 1; }
}


/* AnimaciÃ³n combinada de salida splash */
#welcome-screen.fade-out {
  animation: splashExit 0.6s ease forwards;
}

@keyframes splashExit {
  0% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(0.9); }
}


.leyenda-box,
#simbologia {
  position: fixed;
  top: 80px;
  right: 24px;
  z-index: 10;
  background: #ffffff;
  padding: 16px 20px;
  max-width: 320px;
  border-radius: 0;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}


@media (max-width: 768px) {
  .leyenda-box,
  #simbologia {
    left: 5%;
    right: 5%;
    top: auto;
    bottom: 90px;
    max-width: 90%;
    padding: 14px 16px;
    z-index: 10;
    font-size: 16px;
    line-height: 1.4;
  }

  .leyenda-box.collapsed,
  #simbologia.collapsed {
    max-height: 48px;
    overflow: hidden;
    padding: 10px 16px;
    cursor: pointer;
  }

  .leyenda-box.collapsed::after,
  #simbologia.collapsed::after {
    content: "â¼";
    display: block;
    text-align: center;
    font-size: 14px;
    margin-top: 4px;
    color: #555;
  }
}


/* Contenedor responsivo para todos los planos */
.mapa-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  overflow: hidden;
  display: flex;
  justify-content: center;
}

/* SVGs incrustados */
#plano-piso1,
#plano-piso2,
#plano-piso-ss {
  max-width: 100%;
  height: auto !important;
  display: block;
  margin: 0 auto;
}

/* Para pantallas pequeÃ±as */
@media (max-width: 768px) {
  #plano-piso1,
  #plano-piso2,
  #plano-piso-ss {
    max-width: 95vw;
    height: auto;
  }
}


/* ImÃ¡genes dentro de las tarjetas de exposiciÃ³n */
.expo-card .expo-image {
  width: 100%;
  aspect-ratio: 3 / 2;
  overflow: hidden;
}

.expo-card .expo-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Responsividad general de tarjetas en mÃ³viles */
@media (max-width: 768px) {
  .expo-card {
    width: 85vw;
    max-width: 90vw;
  }
}


@media (min-width: 1024px) {
  .grid-container {
    padding-left: 0;
    padding-right: 0;
    gap: 0;
  }

  .expo-card {
    width: 100%;
    max-width: none;
  }

  .expo-card .expo-image {
    aspect-ratio: 3 / 1.8;
  }
}


@media (min-width: 1024px) {
  .grid-container {
    padding-left: 32px;
    padding-right: 32px;
    gap: 24px;
    justify-content: flex-start;
  }

  .expo-card {
    width: 300px;
    max-width: 300px;
  }
}


/* Hacer que el carrusel use todo el ancho de pantalla sin afectar tamaÃ±o de tarjetas */
.grid-container {
  width: 100vw;
  box-sizing: border-box;
  overflow-x: auto;
  display: flex;
  padding: 16px;
  gap: 24px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  justify-content: flex-start;
}

.expo-card {
  flex: 0 0 auto;
  width: 280px;
  scroll-snap-align: start;
}


.grid-container {
  margin: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}


/* === Leyenda: comportamiento colapsado por defecto (solo estilos) === */
/* (removido) #leyenda-box.collapsed #leyenda-content { display: none !important; } */
#leyenda-box.collapsed #cerrar-leyenda { display: none !important; }


/* === Leyenda (solo estilos, conservando toggle) â mÃ³viles === */
@media (max-width: 768px) {
  #leyenda-box {
    position: absolute;
    right: 0.75rem;
    bottom: 0.75rem;
    left: auto;
    top: auto;
    width: min(88vw, 360px);
    max-height: 25vh;
    padding: 0.55rem 0.65rem;
    border-radius: 12px;
    box-shadow: 0 10px 24px rgba(0,0,0,0.18);
    background: #fff;
    z-index: 1200;
    overflow: hidden;
  }
  #leyenda-box:not(.collapsed) #leyenda-content {
    max-height: calc(25vh - 2.3rem);
    opacity: 1;
    transform: translateY(0);
  }
  #leyenda-box.collapsed {
    background: rgba(255,255,255,0.95);
    box-shadow: 0 6px 16px rgba(0,0,0,0.14);
    overflow: visible;
  }
  #leyenda-box.collapsed #leyenda-content,
  #leyenda-box.collapsed #cerrar-leyenda {
    display: none !important;
  }
  #leyenda-title {
    font-size: 1rem;
    line-height: 1.1;
    margin: 0 0 0.25rem 0;
  }
  #cerrar-leyenda {
    font-size: 1.2rem;
    line-height: 1;
    padding: 0.2rem 0.4rem;
    margin-bottom: 0.25rem;
  }
  #leyenda-content img,
  #leyenda-content svg {
    width: 35px !important;
    height: 35px !important;
    max-width: none !important;
    max-height: none !important;
    object-fit: contain;
    vertical-align: middle;
  }
  #leyenda-content,
  #leyenda-content * {
    font-size: 0.98rem;
  }
  #leyenda-content li,
  #leyenda-content .legend-item {
    padding-block: 0.35rem;
    gap: 0.5rem;
    list-style: none;
  }
}



/* === icono btn filtrosa === */


#filters-header-btn  {

}


#filters-header-btn img,
#filters-header-btn svg {
  width: 35px;
  height: 35px;
  display: block;
}




/* === Transiciones suaves (solo mÃ³viles) para abrir/cerrar leyenda === */
@media (max-width: 768px) {
  /* TransiciÃ³n del contenedor (sutil) */
  #leyenda-box {
    transition: transform 520ms cubic-bezier(0.22, 1, 0.36, 1), opacity 520ms ease, box-shadow 520ms ease;
  }
  #leyenda-box.collapsed {
    transform: translateY(22px) scale(0.985);

    opacity: 0.98;
  }

  /* TransiciÃ³n del contenido (aparece/desaparece) */
  #leyenda-box #leyenda-content { 
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transform: translateY(8px);
    transition: max-height 560ms cubic-bezier(0.22, 1, 0.36, 1), opacity 520ms ease, transform 520ms ease;
  }
  }
  /* Al expandir, usar la altura que ya definimos (25vh - 2.3rem) */
  #leyenda-box:not(.collapsed) #leyenda-content {
    max-height: calc(25vh - 2.3rem);
    opacity: 1;
    transform: translateY(0);
  }
.leaflet-touch .leaflet-control-layers, .leaflet-touch .leaflet-bar {
    border: 1px solid rgba(255, 255, 255, 0.8);
    background-clip: padding-box;

}

/* === Volver al inicio sticky styles === */
.mobile-menu .menu-root > li:first-child > #menuVolverInicio,
.mobile-menu .menu-root > li:first-child > #menuVolverMapa {
  font-weight: 600;
}







/* === Legend Toggle Leaflet Control (aligned with zoom) === */
.leaflet-control.legend-toggle-control.leaflet-bar { margin: 0 0 8px 0; }
.leaflet-control.legend-toggle-control.leaflet-bar a.legend-toggle-btn {
  width: 40px; 
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.35) !important;
  background: #0A5BD7;
  border-radius: 30px;
  display: grid; place-items: center;
  line-height: 0;
	padding: 0px;
  cursor: pointer;
}

/* Tamaño del ícono dentro del botón (sirve para <img> o <svg>) */
.leaflet-control.legend-toggle-control.leaflet-bar a.legend-toggle-btn img,
.leaflet-control.legend-toggle-control.leaflet-bar a.legend-toggle-btn svg {
  width: 33px;
  height: 33px;
	padding: 3px;
  display: block;
}
/* mover un poco hacia la izquierda para no superponer con zoom */
.leaflet-bottom.leaflet-right .legend-toggle-control { margin-right: 24px; }

#leyenda-box header, #leyenda-box .legend-header, #leyenda-box .legend-title, #leyenda-box h2 { display: none; }
#leyenda-box .legend-topbar{ display:flex; align-items:center; gap:8px; padding:8px; }


/* --- Social footer (inline sprite, mobile-safe) --- */
.site-footer{
  background: var(--map-bg, #2E42FF);
  color:#fff;
  padding: 8px 10px; /* compact height */
}
.site-footer .footer-inner{
  max-width: 1100px;
  margin: 0 auto;
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 12px;
  white-space: nowrap; /* one line */
  flex-wrap: nowrap;
}
.site-footer .footer-copy{ margin: 0; font-size: 0.9rem; line-height: 1; white-space: nowrap; }
.site-footer .socials{ display:flex; gap: 10px; align-items:center; }
.site-footer .social{ display:inline-flex; width:32px; height:32px; border-radius: 8px; align-items:center; justify-content:center; }
.site-footer .social svg{ width:20px; height:20px; display:block; }
.site-footer .social svg, .site-footer .social svg *, .site-footer .social use{ fill:#fff !important; stroke:none !important; }
@media (max-width: 480px){
  .site-footer{ padding: 6px 8px; }
  .site-footer .footer-inner{ gap: 10px; }
  .site-footer .social{ width:30px; height:30px; }
  .site-footer .social svg{ width:19px; height:19px; }
}
@media (max-width: 360px){
  .site-footer .footer-copy{ display:none; } /* oculta texto en pantallas muy pequeÃ±as */
}

/* === Footer RRSS (SVG inline) + BotÃ³n Instalar (PWA) === */
.footer{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:8px 12px;/*background:#0a2a66*/;color:#fff;min-height:44px;}
.footer__brand{font-size:14px;white-space:nowrap;opacity:.95;}
.footer__social{display:flex;align-items:center;gap:10px;flex-wrap:nowrap;}
.social-link{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;line-height:0;color:#fff;opacity:.95;-webkit-tap-highlight-color:transparent;}
.social-link:active{transform:scale(.95);}
.icon{width:22px;height:22px;display:block;}
@media (max-width:420px){.icon{width:24px;height:24px;}.footer{gap:.5rem;padding:8px 10px;}.footer__brand{font-size:13px;}.footer__social{gap:8px;}}
.install-btn{margin-left:auto;margin-right:0;display:inline-flex;align-items:center;gap:6px;padding:6px 10px;border-radius:999px;border:1px solid rgba(255,255,255,.25);background:rgba(255,255,255,.08);color:#fff;font-size:13px;backdrop-filter:saturate(120%) blur(4px);}
.install-btn .install-icon{width:18px;height:18px;}
@supports (-webkit-touch-callout:none){.footer,.social-link,.install-btn{color:#fff !important;}}
.ios-install-tip{position:fixed;left:12px;right:12px;bottom:12px;z-index:9999;background:rgba(10,42,102,.96);color:#fff;border:1px solid rgba(255,255,255,.15);border-radius:12px;padding:10px 12px;box-shadow:0 8px 22px rgba(0,0,0,.25);}
.ios-install-tip .tip-content{font-size:14px;line-height:1.35;position:relative;}
.ios-install-tip .tip-share{display:inline-block;border:1px solid rgba(255,255,255,.25);padding:2px 6px;border-radius:8px;margin:0 4px;font-size:12px;}
.ios-install-tip .tip-close{position:absolute;right:0;top:0;border:none;background:transparent;color:#fff;font-size:16px;cursor:pointer;padding:2px 4px;}
@media (max-width:420px){.ios-install-tip{left:8px;right:8px;bottom:8px;}}


/* === Mobile menu polish === */
.mobile-menu .menu-item,
.mobile-menu .submenu-item{
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
}
/* Auto height with safe viewport and scrolling when needed */
.mobile-menu{
  max-height: calc(100vh - 64px) !important; /* leave room for header */
  height: auto !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch;
}
/* Ensure submenu also scrolls if it exceeds viewport */
.mobile-menu .submenu{
  max-height: 60vh;
  overflow-y: auto;
}
/* Avoid white separators if any list uses borders */
.mobile-menu .menu-root > li,
.mobile-menu .submenu > li{
  border: none !important;
}
/* Make tap areas comfy without increasing borders */
.mobile-menu .menu-item,
.mobile-menu .submenu-item{
  padding: 12px 14px;
}

/* === Mobile menu polish (v2) === */
.mobile-menu .menu-item,
.mobile-menu .submenu-item{
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  padding: 8px 12px !important; /* reduced vertical padding */
}
.mobile-menu{
  max-height: calc(100vh - 64px) !important;
  height: auto !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch;
}
.mobile-menu .menu-root > li,
.mobile-menu .submenu > li{
  border: none !important;
}
.mobile-menu .submenu{
  max-height: 60vh;
  overflow-y: auto;
}


/* === Menu UX polish (focus/underline/scroll stability) === */
.mobile-menu .menu-item,
.mobile-menu .submenu-item,
.mobile-menu .menu-item:focus,
.mobile-menu .submenu-item:focus,
.mobile-menu .menu-item:active,
.mobile-menu .submenu-item:active,
.mobile-menu .menu-item:focus-visible,
.mobile-menu .submenu-item:focus-visible{
  outline: none !important;
  box-shadow: none !important;
}
/* Remove underline for 'Sitio web' link styled as menu-item */
.mobile-menu a.menu-item,
.mobile-menu a.menu-item:hover,
.mobile-menu a.menu-item:focus{
  text-decoration: none !important;
}

/* Reduce vertical padding a bit mÃ¡s */
.mobile-menu .menu-item,
.mobile-menu .submenu-item{
  padding: 8px 12px !important;
}

/* Sticky header/footer + no layout jump on scroll */
html{ overflow-y: scroll; } /* evita salto por apariciÃ³n/desapariciÃ³n del scroll */
body{ overscroll-behavior-y: none; }
header{ position: sticky; top: 0; z-index: 1000; }
.footer{ position: sticky; bottom: 0; z-index: 999; }

/* Si el contenido tapiza toda la pantalla, permitimos scroll suave sin mover header/footer */
main{ padding-bottom: 56px; } /* reserva espacio para el footer sticky */


/* === Cross-device reinforcement: menu size, sticky fallback, safe areas === */

/* Consistent vertical rhythm for menu items */
:root{
  --menu-item-vpad: 10px;     /* vertical padding */
  --menu-item-hpad: 14px;     /* horizontal padding */
  --menu-item-minh: 48px;     /* recommended tap target */
  --menu-font-size: 16px;
}

/* Normalize menu items (buttons & links) */
.mobile-menu .menu-item,
.mobile-menu .submenu-item{
  display: flex;
  align-items: center;
  gap: 8px;
  padding: var(--menu-item-vpad) var(--menu-item-hpad) !important;
  min-height: var(--menu-item-minh);
  line-height: 1.25;
  font-size: var(--menu-font-size);
  text-decoration: none !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  -webkit-tap-highlight-color: transparent;
}

/* Submenu inherits same rhythm */
.mobile-menu .submenu .submenu-item{
  padding: var(--menu-item-vpad) var(--menu-item-hpad) !important;
  min-height: var(--menu-item-minh);
}

/* Equal spacing for LI wrappers if they had borders */
.mobile-menu .menu-root > li,
.mobile-menu .submenu > li{
  border: none !important;
  margin: 0;
  padding: 0;
}

/* Scroll behavior + viewport safety */
html{ overflow-y: scroll; scroll-padding-top: 64px; } /* room for sticky header when jumping via anchors */
body{ overscroll-behavior-y: none; }

/* Sticky header/footer with safe-area support (modern) */
@supports (position: sticky){
  header{ position: sticky; top: 0; z-index: 1000; padding-top: env(safe-area-inset-top); }
  .footer{ position: sticky; bottom: 0; z-index: 999; padding-bottom: env(safe-area-inset-bottom); }
}

/* Fallback for old browsers: fixed header/footer */
@supports not (position: sticky){
  header{ position: fixed; top: 0; left: 0; right: 0; z-index: 1000; }
  .footer{ position: fixed; bottom: 0; left: 0; right: 0; z-index: 999; }
  main{ padding-top: 56px; padding-bottom: 56px; }
}

/* Prevent layout jumps when mobile browser UI shows/hides */
@media (max-width: 820px){
  .modal-image-frame{
    margin-top: 10px !important; height: 92svh !important; }

  .modal-left{ min-height: 92svh !important; }

  .modal-image-frame{
    margin-top: 20px !important; height: 80svh !important; }

  .modal-left{ min-height: 80svh !important; }

  .mobile-menu{
    max-height: calc(100dvh - 64px) !important; /* dVH handles dynamic viewport on mobile */
    height: auto !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
  }
}

/* Slightly smaller type on very small phones, keeping min tap size */
@media (max-width: 360px){
  :root{ --menu-font-size: 15px; }
}

/* Focus states accessible but subtle (no visual "marco") */
.mobile-menu .menu-item:focus-visible,
.mobile-menu .submenu-item:focus-visible{
  outline: none !important;
  box-shadow: 0 0 0 0 rgba(0,0,0,0) !important;
}


/* Force modal to be above any fixed header/footer */
body.modal-open header,
body.modal-open footer,
body.modal-open .site-footer {
  z-index: 10 !important;
}
