/* ===================================
   Gallery Hero Section
   =================================== */
.gallery-hero {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    padding: 6rem 2rem 4rem;
    text-align: center;
    margin-top: 100px;
}

.gallery-subtitle {
    font-size: 1.2rem;
    color: var(--text-light);
    margin-top: 1rem;
}

/* ===================================
   Gallery Filter Section
   =================================== */
.gallery-filter-section {
    padding: 2rem;
    background: var(--white);
    border-bottom: 2px solid var(--bg-light);
}

.filter-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.filter-btn {
    padding: 0.8rem 2rem;
    background: var(--bg-light);
    color: var(--text-dark);
    border: 2px solid transparent;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: translateY(-2px);
}

.filter-btn.active {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

/* ===================================
   Gallery Grid
   =================================== */
.gallery-section {
    padding: 4rem 2rem;
    background: var(--bg-light);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--white);
}

.gallery-item img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: var(--white);
    padding: 2rem 1.5rem 1rem;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    transform: translateY(0);
}

.gallery-overlay h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.gallery-overlay p {
    font-size: 0.9rem;
    opacity: 0.9;
}

.gallery-item.hidden {
    display: none;
}

/* ===================================
   Lightbox Modal
   =================================== */
.lightbox {
    display: none;
    position: fixed;
    z-index: 10000;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
}

.lightbox-content {
    display: block;
    max-width: 90%;
    max-height: 80%;
    margin: auto;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 40px;
    color: var(--white);
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10001;
    transition: all 0.3s ease;
}

.lightbox-close:hover {
    color: var(--secondary-color);
    transform: rotate(90deg);
}

.lightbox-caption {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--white);
    font-size: 1.2rem;
    text-align: center;
    padding: 1rem 2rem;
    background: rgba(0,0,0,0.7);
    border-radius: 50px;
    backdrop-filter: blur(10px);
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.2);
    color: var(--white);
    border: none;
    padding: 1rem 1.5rem;
    font-size: 2rem;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: var(--primary-color);
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

/* ===================================
   Loading Animation
   =================================== */
.gallery-item img {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ===================================
   Responsive Design
   =================================== */
@media (max-width: 768px) {
    .gallery-hero {
        padding: 4rem 2rem 3rem;
        margin-top: 80px;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1.5rem;
    }

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

    .filter-buttons {
        gap: 0.5rem;
    }

    .filter-btn {
        padding: 0.6rem 1.5rem;
        font-size: 0.9rem;
    }

    .lightbox-content {
        max-width: 95%;
        max-height: 70%;
    }

    .lightbox-prev,
    .lightbox-next {
        padding: 0.5rem 1rem;
        font-size: 1.5rem;
    }

    .lightbox-close {
        top: 10px;
        right: 20px;
        font-size: 30px;
    }

    .lightbox-caption {
        font-size: 1rem;
        padding: 0.8rem 1.5rem;
        bottom: 20px;
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .gallery-item img {
        height: 200px;
    }

    .filter-buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-btn {
        width: 100%;
    }

    .lightbox-prev {
        left: 10px;
    }

    .lightbox-next {
        right: 10px;
    }
}