.galeria {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: flex-start;
}

/* Tamaño tipo Steam Grid Vertical (2:3) */
.item {
    width: 180px;
    height: 270px;
    aspect-ratio: 2 / 3;

    overflow: hidden;
    border-radius: 8px;

    cursor: pointer;
    position: relative;

    /* Animaciones suaves */
    transition:
        transform 0.18s ease,
        margin 0.18s ease,
        box-shadow 0.18s ease,
        outline 0.18s ease;
}

.item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.25s ease;
}

/* Hover: crece el contenedor y empuja a los demás */
.item:hover {
    transform: scale(1.07); /* transform: scale(1.08); */
    margin: 0px; /* margin: 6px */
    box-shadow: 0 0 18px rgba(0,0,0,0.3);
}

/* Hover: la imagen también crece */
.item:hover img {
    transform: scale(1.06);
}

/* ESTILO STEAM: cuando se selecciona (clic) */
.item:active {
    transform: scale(0.94); /* se achica el contenedor */
    outline: 3px solid #66c0f4; /* borde azul tipo Steam */
    outline-offset: -3px;
}

/* IMPORTANTE: imagen vuelve a su tamaño normal en click */
.item:active img {
    transform: scale(1.0); /* tamaño original */
}

/* Responsive */
@media (max-width: 600px) {
    .item {
        width: 45vw;
        height: calc(45vw * 1.5);
    }
}

/* MODAL */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.65);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-content {
    width: auto;     /* se hace del tamaño necesario */
    max-width: 900vw;        /* no supera la pantalla */
    max-height: 85vh;
    overflow-y: auto;
    text-align: center;

    margin: auto;           /* centra perfecto */
    
    background: #1e1e1e;
    padding: 32px;
    border-radius: 18px;
    box-shadow: 0 0 18px rgba(0,0,0,0.5);
    
    animation: fadeIn 0.25s ease;
    color: white;
    
    margin: auto;            /* centrado */
}

.close {
    font-size: 28px;
    cursor: pointer;
    float: right;
}

.logo-modal {
  display: block;
  margin: 0 auto;
}

/* Mini-galería de versiones */
.mini-galeria {
    display: grid;
    grid-template-columns: repeat(3, 1fr);  /* SIEMPRE 3 columnas */
    gap: 22px;

    justify-items: center;    /* centra cada tarjeta */
    justify-content: center;  /* centra el grid completo */
    width: 100%;
    margin-top: 24px;
}

.mini-galeria a {
    width: 120px;
    height: 180px;
    aspect-ratio: 2/3;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
    transition: transform .2s;
}

.mini-galeria a:hover {
    transform: scale(1.07);
    box-shadow: 0 0 18px rgba(0,0,0,0.3);
}

.mini-galeria img {
    width: 120px;
    height: auto;
    border-radius: 10px;
    transition: transform 0.2s ease;
}

/* Hover */
.mini-galeria a:hover img {
    transform: scale(1.06);
}

/* Click mantenido */
.mini-galeria a:active img {
    transform: scale(0.94); /* se achica el contenedor */
    outline: 1px solid #66c0f4; /* borde azul tipo Steam */
    outline-offset: -1px;
}

/* Ocultamos las plantillas */
.modal-template {
    display: none;
}

/* Pequeña animación */
@keyframes fadeIn {
    from {opacity: 0; transform: scale(0.8);}
    to {opacity: 1; transform: scale(1);}
}

/* En pantallas más pequeñas (móviles) */
@media (max-width: 600px) {
    .modal-content {
        width: 95vw;
        max-width: none;
        padding: 20px;
    }
}
@media (max-width: 600px) {
    .mini-galeria {
        grid-template-columns: repeat(2, 1fr); /* 2 en móvil */
    }
}

@media (max-width: 380px) {
    .mini-galeria {
        grid-template-columns: 1fr; /* 1 columna en pantallas muy pequeñas */
    }
}

