/* Gallery Page Specific CSS */


/* Gallery Categories */
.gallery-categories {
    background-color: var(--white);
    padding: 40px 0;
}

.categories-filter {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
}

.category-btn {
    padding: 10px 20px;
    background-color: var(--secondary-color);
    color: var(--text-color);
    border: 2px solid var(--secondary-color);
    border-radius: 20px;
    cursor: pointer;
    transition: var(--transition);
}

.category-btn:hover,
.category-btn.active {
    background-color: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
}

/* Gallery Grid */
.gallery-grid {
    background-color: var(--secondary-color);
    padding: 60px 0;
}

.gallery-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: var(--transition);
}

.gallery-item:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.gallery-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: var(--transition);
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: var(--white);
    padding: 20px;
    transform: translateY(100%);
    transition: var(--transition);
}

.gallery-item:hover .gallery-overlay {
    transform: translateY(100%);
}

.gallery-overlay h3 {
    font-size: 16px;
    margin-bottom: 5px;
}

/* Lightbox */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-content {
    position: relative;
    max-width: 95%;
    max-height: 95%;
}

.lightbox-img {
    max-width: 200vw;
    max-height: 200vh;
    width: auto;
    height: auto;
    display: block;
    border-radius: var(--border-radius);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    object-fit: contain;
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: -40px;
    width: 40px;
    height: 40px;
    background-color: var(--white);
    color: var(--text-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 20px;
    transition: var(--transition);
}

.lightbox-close:hover {
    background-color: var(--primary-color);
    color: var(--white);
    transform: rotate(90deg);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 60px;
    height: 60px;
    background-color: rgba(255, 255, 255, 0.9);
    color: var(--text-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 24px;
    transition: var(--transition);
    backdrop-filter: blur(5px);
}

.lightbox-nav:hover {
    background-color: var(--primary-color);
    color: var(--white);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-nav.prev {
    left: -70px;
}

.lightbox-nav.next {
    right: -70px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .gallery-container {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }

    .lightbox-content {
        max-width: 98%;
        max-height: 98%;
    }

    .lightbox-img {
        max-width: 98vw;
        max-height: 85vh;
    }

    .lightbox-nav {
        width: 50px;
        height: 50px;
        font-size: 20px;
        left: -60px !important;
        right: -60px !important;
    }

    .lightbox-nav.prev {
        left: -60px;
    }

    .lightbox-nav.next {
        right: -60px;
    }

    .lightbox-close {
        top: -30px;
        right: -30px;
        width: 35px;
        height: 35px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .lightbox-content {
        max-width: 100%;
        max-height: 100%;
    }

    .lightbox-img {
        max-width: 100vw;
        max-height: 95vh;
        width: 100%;
        height: auto;
    }

    .lightbox-nav {
        width: 45px;
        height: 45px;
        font-size: 18px;
        left: -50px !important;
        right: -50px !important;
    }

    .lightbox-nav.prev {
        left: -50px;
    }

    .lightbox-nav.next {
        right: -50px;
    }

    .lightbox-close {
        top: -25px;
        right: -25px;
        width: 30px;
        height: 30px;
        font-size: 14px;
    }
}

@media (max-width: 360px) {
    .lightbox-img {
        max-width: 100vw;
        max-height: 98vh;
        width: 100%;
        height: auto;
    }

    .lightbox-nav {
        width: 40px;
        height: 40px;
        font-size: 16px;
        left: -45px !important;
        right: -45px !important;
    }

    .lightbox-nav.prev {
        left: -45px;
    }

    .lightbox-nav.next {
        right: -45px;
    }

    .lightbox-close {
        top: -20px;
        right: -20px;
        width: 25px;
        height: 25px;
        font-size: 12px;
    }
}
