/* Estilos para la galería */
.gallery {
    display: grid;
    grid-template-columns: repeat(5, 1fr); /* 5 columnas en escritorio */
    gap: 15px; /* Espacio entre imágenes */
    padding: 20px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    aspect-ratio: 1 / 1; /* Relación de aspecto cuadrada */
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Escala y recorta la imagen para llenar el contenedor */
    cursor: pointer;
    transition: transform 0.3s ease;
}

.gallery-item img:hover {
    transform: scale(1.05); /* Efecto de escala al pasar el cursor */
}

/* Estilos para la descripción de la imagen */
.image-description {
    position: absolute;
    bottom: -100%; /* Inicialmente oculta */
    left: 0;
    width: 100%;
    padding: 10px;
    background-color: rgba(0, 0, 0, 0.7); /* Fondo negro semitransparente */
    color: white;
    text-align: center;
    font-size: 14px;
    transition: bottom 0.3s ease;
}

.gallery-item:hover .image-description {
    bottom: 0; /* Muestra la descripción al pasar el mouse */
}

/* Estilos para la ventana modal */
.modal {
    display: none; /* Oculto por defecto */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9); /* Fondo oscuro semitransparente */
    justify-content: center;
    align-items: center;
}

.modal-content {
    max-width: 90%;
    max-height: 80%;
    border-radius: 10px;
}

.modal-description {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 16px;
    text-align: center;
    background-color: rgba(0, 0, 0, 0.7);
    padding: 10px 20px;
    border-radius: 5px;
}

.close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: #ffcc00;
}

.modal-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 10px;
    font-size: 24px;
    cursor: pointer;
    border-radius: 50%;
}

.prev-btn {
    left: 20px;
}

.next-btn {
    right: 20px;
}

.modal-btn:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

/* Estilos responsivos */
@media (max-width: 768px) {
    .gallery {
        grid-template-columns: repeat(2, 1fr); /* 2 columnas en móvil */
    }
}