/* General */
body {
    font-family: Arial, sans-serif;
}

button {
    padding: 10px 20px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
}

button:hover {
    background-color: #45a049;
}

/* Estilos para la ventana emergente */
.modal {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.4);
    padding: 20px;
    box-sizing: border-box;
}

.modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 1000px;
    box-sizing: border-box;
    text-align: center;
}

.close {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    top: 10px;
    right: 25px;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

h2 {
    font-size: 1.8em;
    margin-bottom: 20px;
}

/* Estilos para la galería */
.gallery {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-evenly;
    gap: 20px;
    margin-top: 20px;
}

.photo {
    flex: 1 1 calc(33.333% - 20px);
    /* 3 imágenes por fila */
    max-width: 300px;
    box-sizing: border-box;
    text-align: center;
}

.photo img {
    width: 100%;
    height: auto;
    max-height: 250px;
    /* Máximo de altura para las imágenes */
    object-fit: cover;
    border-radius: 5px;
}

.photo p {
    margin-top: 10px;
    font-size: 1.1em;
}

/* Media Query para dispositivos móviles */
@media (max-width: 768px) {
    .modal-content {
        width: 90%;
        /* Aumenta el ancho en dispositivos pequeños */
    }

    .photo {
        flex: 1 1 calc(50% - 20px);
        /* 2 imágenes por fila en pantallas más pequeñas */
    }

    .photo img {
        max-height: 200px;
    }

    h2 {
        font-size: 1.5em;
    }
}

/* Media Query para pantallas más pequeñas (móviles) */
@media (max-width: 480px) {
    .photo {
        flex: 1 1 100%;
        /* Una imagen por fila */
    }

    .photo img {
        max-height: 150px;
    }

    h2 {
        font-size: 1.2em;
    }
}