/* Reset básico */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Arial, sans-serif;
  line-height: 1.6;
   padding-top: 70px;    /* espacio igual a la altura del header */
}

/* Navbar */
.navbar {
 position: fixed;      /* fija la barra */
  top: 0;               /* siempre arriba */
  left: 0;
  width: 100%;          /* ocupa todo el ancho */
  display: flex;
  align-items: center;
  background: #ffffff;  /* fondo blanco */
  padding: 10px 20px;
  border-bottom: 1px solid #ccc;
  z-index: 1000;        /* asegura que quede encima del contenido */
}

.logo img {
  height: 50px;
}

.menu {
  list-style: none;
  display: flex;
  gap: 20px;
  margin-left: auto;   /* empuja el menú hacia la derecha */
}

.menu li a {
  color: #b4afaf;
  text-decoration: none;
  font-weight: bold;
}

.menu li a:hover {
  color: #ffcc00;
}
/* Botón hamburguesa oculto en escritorio */
.menu-toggle {
  display: none;
  font-size: 28px;
  cursor: pointer;
  margin-left: auto;
}

/* Responsive: en pantallas pequeñas */
@media (max-width: 768px) {
  .menu {
    display: none;              /* ocultar menú por defecto */
    flex-direction: column;     /* menú vertical */
    background: #ffffff;
    position: absolute;
    top: 60px;                  /* debajo del header */
    right: 0;
    width: 200px;
    border: 1px solid #ccc;
    padding: 10px;
  }

  .menu li {
    margin: 10px 0;
  }

  .menu-toggle {
    display: block;
    font-size: 28px;
    cursor: pointer;
    margin-left: auto;
  }

  .menu.active {
    display: flex;              /* mostrar menú al activar */
  }
}

/* ===============================
   GALERÍA ESTILO PINTEREST
   =============================== */
.galeria {
  padding: 60px 5%;
  background: #f5f5f5;
}

.galeria-titulo {
  text-align: center;
  font-size: 32px;
  margin-bottom: 40px;
  color: #003366;
  font-weight: bold;
}

/* Contenedor tipo masonry */
.masonry {
  column-count: 3;
  column-gap: 20px;
}

/* Cada tarjeta */
.item {
  break-inside: avoid;
  margin-bottom: 20px;
  border-radius: 12px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(0,0,0,0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.item img {
  width: 100%;
  display: block;
}

/* Hover elegante */
.item:hover {
  transform: scale(1.03);
  box-shadow: 0 12px 30px rgba(0,0,0,0.15);
}

/* ===== Responsive ===== */
@media (max-width: 1200px) {
  .masonry {
    column-count: 3;
  }
}

@media (max-width: 768px) {
  .masonry {
    column-count: 2;
  }
}

@media (max-width: 480px) {
  .masonry {
    column-count: 1;
  }
}

/* Popup encima del mapa */
#lightbox {
  display: none;              /* oculto por defecto */
  position: fixed;
  inset: 0;                   /* ocupa toda la pantalla */
  background: rgba(0,0,0,0.8);/* fondo oscuro */
  z-index: 9999;              /* encima de todo */
  justify-content: center;
  align-items: center;
}

/* Imagen dentro del popup */
#lightbox img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}

/* Botón cerrar */
#lightbox span {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 2rem;
  color: #fff;
  cursor: pointer;
}

.popup-buttons {
  margin-top: 15px;
  text-align: center;
}

.popup-buttons button {
  margin: 0 10px;
  padding: 10px;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  background: #ffcc00;
  color: #333;
  font-size: 20px; /* tamaño del ícono */
  transition: background 0.3s;
}

.popup-buttons button:hover {
  background: #e6b800;
  color: #000;
}

#lightbox-text {
  margin-top: 10px;
  color: #fff;
  font-size: 1rem;
  text-align: center;
  max-width: 80%;
}
/* Popup general */
#lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.8);
  z-index: 9999;
  justify-content: center;
  align-items: center;
  flex-direction: column; /* apila imagen, texto y botones */
  padding: 20px;
}

/* Imagen dentro del popup */
#lightbox img {
  max-width: 90%;
  max-height: 70vh; /* limita altura en pantallas pequeñas */
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
  object-fit: contain;
}

/* Texto debajo de la imagen */
#lightbox-text {
  margin-top: 10px;
  color: #fff;
  font-size: 1rem;
  text-align: center;
  max-width: 90%;
  word-wrap: break-word;
}

/* Botones */
.popup-buttons {
  margin-top: 15px;
  text-align: center;
}

.popup-buttons button {
  margin: 0 10px;
  padding: 10px;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  background: #ffcc00;
  color: #333;
  font-size: 20px;
  transition: background 0.3s;
}

.popup-buttons button:hover {
  background: #e6b800;
  color: #000;
}

/* Botón cerrar */
#close {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 2rem;
  color: #fff;
  cursor: pointer;
}

/* ===========================
   RESPONSIVE BREAKPOINTS
   =========================== */

/* Tablets */
@media (max-width: 768px) {
  #lightbox img {
    max-width: 95%;
    max-height: 60vh;
  }
  #lightbox-text {
    font-size: 0.9rem;
  }
  .popup-buttons button {
    font-size: 18px;
    padding: 8px;
  }
}

/* Móviles */
@media (max-width: 480px) {
  #lightbox {
    padding: 10px;
  }
  #lightbox img {
    max-width: 100%;
    max-height: 50vh;
  }
  #lightbox-text {
    font-size: 0.85rem;
  }
  .popup-buttons button {
    font-size: 16px;
    padding: 6px;
  }
}

/* Footer */
.footer {
  background: #003366;
  color: #fff;
  text-align: center;
  padding: 15px;
  margin-top: 40px;
}


/* Animación suave */
@keyframes fade {
  from {opacity: 0.4;}
  to {opacity: 1;}
}

/* Contacto */
.contacto {
  background: #003366;
  color: #fff;
  padding: 40px 20px;
  text-align: center;
}

.contacto a {
  color: #ffcc00;
  text-decoration: none;
}

.contacto a:hover {
  text-decoration: underline;
}

.social-contact {
  margin-top: 20px;
}

.social-contact .icon {
  color: #ffcc00;       /* color de los íconos */
  margin: 0 10px;
  font-size: 28px;      /* tamaño más grande */
  text-decoration: none;
}

.social-contact .icon:hover {
  color: #ffffff;       /* cambia al pasar el mouse */
}

/* ===============================
   LAZY LOADING - Skeleton + Fade-in
   =============================== */

/* Placeholder animado mientras la imagen no cargó */
.item {
  min-height: 120px; /* evita colapso antes de cargar */
}

.item img.lazy {
  opacity: 0;
  transition: opacity 0.5s ease;
  background: linear-gradient(90deg, #e8e8e8 25%, #f5f5f5 50%, #e8e8e8 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  min-height: 120px;
  width: 100%;
  display: block;
}

/* Una vez cargada: se vuelve visible */
.item img.lazy.loaded {
  opacity: 1;
  animation: none;
  background: none;
  min-height: unset;
}

/* Efecto shimmer tipo skeleton */
@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
