/* ============================================
   GALERÍA (TABS & MODAL)
============================================ */
.gallery-container {
    padding: 60px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.gallery-tabs {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 40px;
}

.tab-btn {
    padding: 12px 30px;
    font-size: 1.2rem;
    font-weight: bold;
    border: none;
    background: #f0f0f0;
    cursor: pointer;
    border-radius: 30px;
    transition: all 0.3s ease;
    color: #555;
    outline: none;
}

.tab-btn.active {
    background: #1b386c;
    /* Color del tema */
    color: #fff;
    box-shadow: 0 4px 12px rgba(27, 56, 108, 0.4);
}

.tab-btn:hover {
    background: #e0e0e0;
}

.tab-btn.active:hover {
    background: #142a50;
}

.tab-content {
    display: none;
    animation: fadeIn 0.5s ease;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* GRIDS */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.gallery-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    position: relative;
}

.gallery-card:hover {
    transform: translateY(-5px);
}

.card-thumb {
    height: 220px;
    overflow: hidden;
    position: relative;
    background: #eee;
}

.card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-card:hover .card-thumb img {
    transform: scale(1.08);
    /* Zoom effect */
}

.card-body {
    padding: 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex-grow: 1;
}

.card-title {
    margin: 0;
    font-size: 1.2rem;
    font-weight: bold;
    color: #333;
    line-height: 1.4;
}

.card-subtitle {
    font-size: 0.9rem;
    color: #777;
    margin-top: 8px;
}

.play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 4rem;
    color: rgba(255, 255, 255, 0.9);
    filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.5));
    pointer-events: none;
    transition: transform 0.3s;
}

.gallery-card:hover .play-icon {
    transform: translate(-50%, -50%) scale(1.1);
    color: #fff;
}

/* MODAL */
.gallery-modal {
    display: none;
    /* Hidden by default */
    position: fixed;
    /* Stay in place */
    z-index: 9999;
    /* Sit on top */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    /* Black w/ opacity */
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-modal.open {
    display: flex;
    opacity: 1;
}

.modal-close {
    position: absolute;
    top: 25px;
    right: 35px;
    color: #fff;
    font-size: 50px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10000;
    transition: color 0.3s;
    line-height: 1;
}

.modal-close:hover {
    color: #d55136;
}

.modal-content-wrapper {
    width: 90%;
    max-width: 1200px;
    height: 80vh;
    position: relative;
    border-radius: 8px;
    overflow: hidden;
}

/* Swiper in Modal */
.gallery-swiper {
    width: 100%;
    height: 100%;
}

.gallery-swiper .swiper-slide {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
}

.gallery-swiper img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.gallery-swiper .swiper-button-white {
    color: #fff !important;
}

.gallery-swiper .swiper-button-prev,
.gallery-swiper .swiper-button-next {
    color: #fff;
}

/* Button to open gallery (optional styled) */
.btn-ver-fotos {
    margin-top: 15px;
    display: inline-block;
    padding: 8px 20px;
    background: #1b386c;
    color: white;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: bold;
    transition: background 0.3s;
}

.btn-ver-fotos:hover {
    background: #01b3d1;
}


/* Responsive */
@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: 1fr;
        /* Una columna en móvil */
        gap: 20px;
    }

    .card-thumb {
        height: 200px;
    }

    .tab-btn {
        padding: 10px 20px;
        font-size: 1rem;
    }

    .modal-close {
        top: 15px;
        right: 20px;
        font-size: 40px;
    }
}