/* Estilos para la Galería de Imágenes */

.galeria-section {
    background-color: #f8f9fa;
    padding: 60px 0;
}

.galeria-container {
    max-width: 1200px;
    margin: 0 auto;
}

.galeria-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.galeria-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 15px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: all 0.3s ease;
    height: 200px;
}

.galeria-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
}

.galeria-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.galeria-item:hover img {
    transform: scale(1.05);
}

.galeria-pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
}

.page-btn {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background-color: #fff;
    color: #031851;
    font-weight: 600;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: all 0.3s ease;
}

.page-btn:hover, .page-btn.active {
    background-color: #770AE8;
    color: white;
}

/* Estilos para el modal */
.galeria-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9);
    padding: 20px;
    overflow: auto;
}

.modal-content {
    position: relative;
    margin: auto;
    max-width: 90%;
    height: 90%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.modal-navigation {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 90%;
}

.modal-img-container {
    height: 100%;
    width: 80%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.modal-img {
    max-width: 100%;
    max-height: 85%;
    object-fit: contain;
    border-radius: 4px;
}

.modal-caption {
    color: white;
    font-size: 18px;
    margin-top: 15px;
    text-align: center;
}

.modal-close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 40px;
    color: white;
    cursor: pointer;
    z-index: 1010;
    transition: all 0.3s ease;
}

.modal-close:hover {
    color: #770AE8;
}

.modal-prev, .modal-next {
    background-color: #770AE8;
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    margin: 0 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.modal-prev:hover, .modal-next:hover {
    background-color: #6209c0;
    transform: scale(1.1);
}

.modal-counter {
    color: white;
    font-size: 16px;
    margin-top: 10px;
    text-align: center;
}

/* Media queries para responsividad */
@media (max-width: 992px) {
    .galeria-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}

@media (max-width: 768px) {
    .galeria-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }
    
    .galeria-item {
        height: 180px;
    }
    
    .modal-img-container {
        width: 90%;
    }
    
    .modal-prev, .modal-next {
        width: 40px;
        height: 40px;
        font-size: 20px;
        margin: 0 10px;
    }
}

@media (max-width: 576px) {
    .galeria-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 10px;
    }
    
    .galeria-item {
        height: 140px;
    }
    
    .modal-navigation {
        flex-direction: column;
    }
    
    .modal-img-container {
        width: 100%;
        order: 1;
    }
    
    .modal-prev, .modal-next {
        margin: 10px;
    }
    
    .modal-prev {
        order: 2;
    }
    
    .modal-next {
        order: 3;
    }
}
