/* Estilos para la galería de fotos */
.galerias-section {
    padding: 100px 0;
    background-color: #f9f9f9;
}

.gallery-tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.gallery-tab {
    padding: 10px 20px;
    margin: 0 10px 10px;
    background: transparent;
    border: 2px solid #3f51b5;
    color: #3f51b5;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 30px;
}

.gallery-tab.active, .gallery-tab:hover {
    background: #3f51b5;
    color: white;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    height: 250px;
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: white;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    transform: translateY(0);
}

.gallery-overlay h3 {
    margin-bottom: 5px;
    font-size: 18px;
}

.gallery-overlay p {
    font-size: 14px;
    opacity: 0.9;
}

/* Estilos para la galería de videos */
.videos-section {
    padding: 100px 0;
    background-color: #fff;
}

.videos-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.video-item {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.video-item:hover {
    transform: translateY(-10px);
}

.video-container {
    position: relative;
    height: 200px;
}

.video-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(63, 81, 181, 0.8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.video-play-btn:hover {
    background: rgba(63, 81, 181, 1);
    transform: translate(-50%, -50%) scale(1.1);
}

.video-info {
    padding: 20px;
    background: white;
}

.video-info h3 {
    margin-bottom: 10px;
    font-size: 18px;
    color: #333;
}

.video-info p {
    color: #666;
    font-size: 14px;
    line-height: 1.5;
}

/* Responsive */
@media (max-width: 992px) {
    .gallery-grid,
    .videos-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .gallery-grid,
    .videos-grid {
        grid-template-columns: 1fr;
    }

    .gallery-tab {
        margin-bottom: 10px;
    }
}

/* Estilos para el modal de imágenes y videos */
.media-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-close {
    position: absolute;
    top: 30px;
    right: 50px;
    color: white;
    font-size: 50px;
    font-weight: 300;
    cursor: pointer;
    z-index: 10001;
    transition: all 0.3s ease;
    line-height: 1;
}

.modal-close:hover {
    color: #3f51b5;
    transform: rotate(90deg);
}

.modal-content-wrapper {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.modal-image {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.modal-video-container {
    width: 100%;
    max-width: 1200px;
    display: none;
}

.modal-video {
    width: 100%;
    max-height: 80vh;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    outline: none;
}

.modal-caption {
    color: white;
    text-align: center;
    padding: 20px;
    max-width: 800px;
}

.modal-caption h3 {
    font-size: 24px;
    margin-bottom: 10px;
    color: white;
}

.modal-caption p {
    font-size: 16px;
    opacity: 0.9;
    color: rgba(255, 255, 255, 0.9);
}

/* Responsive para el modal */
@media (max-width: 768px) {
    .modal-close {
        top: 15px;
        right: 20px;
        font-size: 40px;
    }

    .modal-content-wrapper {
        max-width: 95%;
        max-height: 95%;
    }

    .modal-image,
    .modal-video {
        max-height: 70vh;
    }

    .modal-caption h3 {
        font-size: 20px;
    }

    .modal-caption p {
        font-size: 14px;
    }
}