body {
  font-family: 'Montserrat', sans-serif;
  background-image: url('../img/fondo.jpg'); 
  background-size: cover;                    
  background-position: center;               
  background-attachment: fixed;              
  background-repeat: no-repeat;              
  background-color: #e5e5e5;                
}

.texture-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(243, 243, 243, 0.88);
  z-index: -1;
}

h1 {
  font-family: 'Funnel Display', sans-serif;
}
   
   .texture-overlay {
     position: fixed;
     top: 0;
     left: 0;
     width: 100%;
     height: 100%;
     background: rgba(243, 243, 243, 0.88);
     z-index: -1;
   }

/* --- Efecto Elegante: Zoom hacia afuera + Blanco y Negro --- */

/* 1. Preparamos el contenedor */
.mosaic-item {
  position: relative;
  overflow: hidden; /* Mantiene el crecimiento de la imagen dentro de su recuadro */
  cursor: pointer;
}

/* 2. Estado inicial de la imagen (Color normal y tamaño base) */
.mosaic-item img {
  filter: grayscale(0%);
  transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1), 
              filter 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
  will-change: transform, filter; /* Optimiza el rendimiento de la animación */
}

/* 3. El EFECTO al pasar el ratón (Hover) */
.mosaic-item:hover img {
  transform: scale(1.04);     /* La imagen crece un 4% de forma muy suave */
  filter: grayscale(100%);    /* Se convierte por completo a blanco y negro */
}

/* --- Estilos para el Popup/Lightbox --- */
#lightbox-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9); /* Fondo negro casi opaco */
  display: flex;
  align-items: center;      /* Corregido */
  justify-content: center;
  z-index: 9999;            /* Forzamos que esté por encima de TODO */
  opacity: 0;
  pointer-events: none;     /* Evita que bloquee clicks cuando está invisible */
  transition: opacity 0.3s ease;
  cursor: zoom-out;
}

/* Cuando se activa, se vuelve visible y clickeable */
#lightbox-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

#lightbox-image {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
  border-radius: 4px;
  transform: scale(0.95);
  transition: transform 0.3s ease;
}

#lightbox-overlay.active #lightbox-image {
  transform: scale(1);
}

.contenedorprj{
  position:relative;
  width:100%;
  height:100%;
  overflow:hidden;
}

/* Deja el fondo en flujo normal */
.fondo{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

/* Solo el escudo absoluto */
.escudo{
  position:absolute;
  top:0;
  left:0;

  width:100%;
  height:100%;

  object-fit:contain;
  z-index:999;

  transition:transform .3s ease;
}

.contenedorprj:hover .escudo{
  transform:scale(1.08);
}