/* Gallery Section Styles */
.gallery {
    padding: 100px 20px;
    background: white;
}

/* Gallery Filters */
.gallery-filters {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.filter-btn {
    background: #f8f9fa;
    color: #1B2A49;
    border: 2px solid #e9ecef;
    padding: 12px 30px;
    border-radius: 25px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.95rem;
}

.filter-btn:hover {
    background: #F5A623;
    color: white;
    border-color: #F5A623;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(245, 166, 35, 0.3);
}

.filter-btn.active {
    background: #F5A623;
    color: white;
    border-color: #F5A623;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto 3rem;
}

.gallery-item {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    position: relative;
    transform: scale(1);
}

.gallery-item:hover {
    transform: scale(1.05) !important;
    box-shadow: 0 8px 30px rgba(0,0,0,0.15) !important;
}

.gallery-item img,
.gallery-item video {
    width: 100%;
    height: 300px;
    object-fit: cover;
    object-position: center center;
    display: block;
}

.gallery-item.video::after,
.gallery-item.youtube::after {
    content: '▶';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.7);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    pointer-events: none;
}

.gallery-item.youtube::after {
    background: rgba(255,0,0,0.8);
}

.gallery-item.load-hidden,
.gallery-item.filter-hidden {
    display: none;
}

/* Lightbox Styles */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.lightbox.show {
    display: flex;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-media {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 100%;
    max-height: 90vh;
}

/* CRITICAL: Override gallery styles for lightbox images */
.lightbox img {
    max-width: 90vw;
    max-height: 90vh;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    object-position: center !important;
    border-radius: 10px;
    display: block;
}

.lightbox video {
    max-width: 90vw;
    max-height: 90vh;
    width: auto !important;
    height: auto !important;
    border-radius: 10px;
}

.lightbox iframe {
    width: 80vw;
    height: 45vw;
    max-width: 1200px;
    max-height: 675px;
    border-radius: 10px;
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: white;
    font-size: 30px;
    cursor: pointer;
    padding: 5px 10px;
    z-index: 2001;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    font-size: 24px;
    padding: 15px 20px;
    cursor: pointer;
    border-radius: 5px;
    transition: background 0.3s;
    z-index: 2001;
}

.lightbox-nav:hover {
    background: rgba(255,255,255,0.3);
}

.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }

/* Gallery responsive styles */
@media (max-width: 768px) {
    .gallery {
        padding: 60px 20px;
    }

    .gallery-filters {
        gap: 0.75rem;
        margin-bottom: 2rem;
    }

    .filter-btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .gallery-item img,
    .gallery-item video {
        height: 250px;
    }

    .lightbox img {
        max-width: 95vw;
        max-height: 80vh;
    }

    .lightbox iframe {
        width: 90vw;
        height: 50.625vw;
    }

    .lightbox-nav {
        font-size: 20px;
        padding: 10px 15px;
    }

    .lightbox-prev { left: 10px; }
    .lightbox-next { right: 10px; }
    
    .lightbox-close {
        top: 10px;
        right: 10px;
    }
}