@font-face {
      font-family: 'AllRoundGothicW01-Bold';
      src: url('./fuentes/AllRoundGothicW01-Bold.ttf') format('truetype');
      font-weight: normal;
      font-style: normal;
    }

    @font-face {
      font-family: 'AllRoundGothicW01-Book';
      src: url('./fuentes/AllRoundGothicW01-Book.ttf') format('truetype');
      font-weight: normal;
      font-style: normal;
    }

    @font-face {
      font-family: 'AllRoundGothicW01-Medium';
      src: url('./fuentes/AllRoundGothicW01-Medium.ttf') format('truetype');
      font-weight: normal;
      font-style: normal;
    }


* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; font-family: "AllRoundGothicW01-Book", sans-serif; }
/* header { background: #0b6e4f; color: #fff; padding: 10px 14px; text-align: center; } */
h1 { margin: 0; font-size: 18px; }
main { height: calc(100% - 92px); } /* espacio para header + footer */
#map { width: 100%; height: 100vh; }

.leaflet-layerstree-header-name {
font-family: "AllRoundGothicW01-Book", sans-serif !important;
font-size: 0.9rem;
}



/* Popups: diseño con imagen / contenido */
.popup-card {
display: flex;
gap: 10px;
min-width: 180px;
max-width: 320px;
align-items: flex-start;
}


/* Imagen del popup: evitar desbordes y mantener proporción */
.popup-card img,
.popup-img {
width: 110px; /* tamaño preferido */
height: 110px;
min-width: 64px;
flex-shrink: 0; /* evitar que la imagen se reduzca demasiado */
object-fit: cover; /* recortar centrado si es necesario */
border-radius: 6px;
border: 1px solid #ddd;
max-width: 100%; /* seguridad para no desbordar en móviles */
}


.popup-content { line-height: 1.3; overflow-wrap: break-word; text-align: justify; }
.popup-title { font-size: 1.1rem; margin-bottom: 4px; color: #3413ac; font-family: "AllRoundGothicW01-Bold", sans-serif;  }
.popup-desc { margin: 4px 0; color: #181717; font-family: "AllRoundGothicW01-Book", sans-serif; }
.popup-link { margin-top: 6px; display: inline-block; font-size: 20px; font-family: "AllRoundGothicW01-Bold", sans-serif; color: #7817e6; text-decoration: none! important; }
.popup-text { font-size: 1rem; margin-bottom: 4px; color: #2b1285; font-family: "AllRoundGothicW01-Book", sans-serif; text-decoration: none! important; }
.popup-phone { font-size: 1rem; margin-bottom: 4px; color: #06aa76; font-family: "AllRoundGothicW01-Book", sans-serif; }


/* Asegurar que la caja del popup no exceda el ancho permitido */
.leaflet-popup-content-wrapper {
max-width: 440px; /* evita que el contenido se haga muy ancho */
}


/* Ajuste del control de árbol */
.leaflet-control-layers-tree {
  
  max-height: 55vh;
  overflow: auto;
}


/* Mobile adjustments */
@media (max-width: 600px) {
.popup-card { min-width: 150px; }
.popup-card img { width: 110px; height: 110px; }
}

.popup-gallery {
  position: relative;
  text-align: center;
}

.popup-gallery img {
  width: 70%;
  border-radius: 6px;
}

.popup-gallery-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 4px;
}

.popup-gallery-controls button {
  background: #440dc4;
  color: white;
  border: none;
  padding: 4px 10px;
  cursor: pointer;
  border-radius: 4px;
}
/* Aumenta el ancho general del popup */
.leaflet-popup-content {
  width: 320px !important;
}

/* Imagen ocupa todo el ancho disponible */
.popup-gallery img,
.popup-img {
  width: 14vh;
  max-width: 20vh;
  height: 30vh;
  display: block;
  border-radius: 8px;
}

#loader {
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.95);
  z-index: 9999;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  font-family: Arial, sans-serif;
}

#loader img {
  width: 120px;
  height: auto;
  animation: pulse 1.2s infinite ease-in-out;
}

#loader p {
  margin-top: 15px;
  color: #444;
  font-size: 14px;
}

/* Logo fijo clickeable y adaptable */
    #logo {
      position: fixed;
      bottom: 20px;
      left: 20px;
      z-index: 1000;
      width: 100px;      
      opacity: 1;
    }

    #logo img {
      width: 400px;
      height: auto;
      border-radius: 8px;
      background-color: #ffffff98;
      box-shadow: 0 2px 6px rgba(0,0,0,0.4);
      transition: transform 0.2s ease, opacity 0.2s ease;
    }

    #logo img:hover {
      transform: scale(1.05);
      opacity: 1;
    }


/* animación suave */
@keyframes pulse {
  0%   { transform: scale(1); opacity: 1; }
  50%  { transform: scale(0.95); opacity: 0.7; }
  100% { transform: scale(1); opacity: 1; }
}

