@charset "utf-8";

/* ============================
   CONTENEDOR PRINCIPAL
============================ */
.contenedor {
    width: 70%;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    grid-auto-rows: auto;
    grid-gap: 10px;
    margin: auto;
    justify-content: center;
}

/* ============================
   MARCO DE IMÁGENES
============================ */
.marco {
    overflow: hidden;
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.marco img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 10px;
    border: 6px ridge #666;
    box-shadow: 2px 2px 5px #006;
    object-fit: cover;
    transition: transform 0.6s ease;
}

/* ============================
   LAZY LOADING
============================ */
.lazy {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.lazy.loaded {
    opacity: 1;
    transform: translateY(0);
}

/* Hover escritorio */
.marco:hover {
    transform: translateY(-6px);
    box-shadow: 6px 10px 22px rgba(0,0,0,0.25);
}

.marco:hover img {
    transform: scale(1.05);
}

.grid-container {
    transition: opacity 0.4s ease;
}

/*.contenedor > div {
  transition: transform 0.6s ease, opacity 0.6s ease;
}*/

/* Efecto sutil de flotación para primera fila 
.contenedor > .marco:nth-child(-n+5) {
  transition: transform 1s ease-in-out;
}*/

/* Opcional: hover sigue activo 
.contenedor > .marco:nth-child(-n+5):hover {
  transform: scale(1.08);
}*/

/* Transición elegante para cada marco */
.contenedor > .marco {
  transition: transform 0.6s ease, opacity 0.6s ease;
}

/* Zoom suave al pasar el ratón (desktop) */
.marco img {
  transition: transform 0.6s ease;
}

.marco:hover {
  transform: translateY(-6px);
  box-shadow: 6px 10px 22px rgba(0,0,0,0.25);
}

.marco:hover img {
  transform: scale(1.05);
}

/* Móvil: sin hover */
@media (max-width:768px){
    .marco:hover {
        transform: none;
        box-shadow: 2px 2px 5px #006;
    }
}


/* ============================
   RESPONSIVE
============================ */

@media screen and (max-width:1600px) {
    .contenedor { width: 75%; }
}

@media screen and (max-width:1366px) {
    .contenedor { width: 88%; }
}

@media screen and (max-width:1280px) {
    .contenedor { width: 90%; }
}

@media screen and (max-width:700px) {

    .novisible { display:none; }

    .contenedor {
        width: 95%;
        grid-template-columns: 1fr 1fr;
        grid-gap:5px;
    }

    /* En móvil quitamos efecto hover */
    .marco:hover {
        transform: none;
        box-shadow: 2px 2px 5px #006;
    }
}
