/* Gallery Page */

.gallery_hero {
    width: 100%;
    padding: 120px 100px 60px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.gallaryAllContainer {
    width: 100vw;
    min-height: 100vh;
    height: auto;
    padding: 0;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
    &::after {
        content: "";
        width: 100%;
        height: 100%;
        position: absolute;
        background-image: url(../media/Bg/Hero_bg.png);
        background-repeat: no-repeat;
        background-position: center;
        background-size: cover;
        top: 0;
        left: 0;
        z-index: -1;
    }
}

    @media (max-width: 700px) {
        .gallery_hero {
            padding: 100px var(--padding) 40px;
        }
    }

.gallery_grid {
    padding: 0 100px 80px;
    box-sizing: border-box;
    columns: 4;
    column-gap: var(--gap);
}

    @media (max-width: 1100px) {
        .gallery_grid {
            columns: 3;
        }
    }

    @media (max-width: 700px) {
        .gallery_grid {
            columns: 2;
            padding: 0 var(--padding) 60px;
        }
    }

    @media (max-width: 400px) {
        .gallery_grid {
            columns: 1;
        }
    }

.gallery_item {
    break-inside: avoid;
    margin-bottom: var(--gap);
    border-radius: var(--border_radius);
    overflow: hidden;
    cursor: pointer;
    position: relative;
    transition: scale var(--transition_duration);
}

    .gallery_item:hover {
        scale: var(--hover_scale);
    }

    .gallery_item img {
        width: 100%;
        height: auto;
        display: block;
        border-radius: var(--border_radius);
    }

/* Lightbox */

.lightbox {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.92);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(8px);
}

    .lightbox.open {
        opacity: 1;
        pointer-events: all;
    }

.lightbox_img {
    max-width: 90vw;
    max-height: 90vh;
    border-radius: var(--border_radius);
    object-fit: contain;
    transition: scale 0.3s ease;
    scale: 0.9;
    pointer-events: none !important;
}

    .lightbox.open .lightbox_img {
        scale: 1;
    }

.lightbox_close {
    position: absolute;
    top: var(--padding);
    right: var(--padding);
    font-size: 2rem;
    color: white;
    opacity: 0.6;
    cursor: pointer;
    background: none;
    border: none;
    line-height: 1;
    transition: opacity 0.2s ease;
    user-select: none;
}

    .lightbox_close:hover {
        opacity: 1;
        scale: 1;
    }

.lightbox_nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 2rem;
    color: white;
    opacity: 0.5;
    cursor: pointer;
    background: none;
    border: none;
    padding: 20px;
    line-height: 1;
    transition: opacity 0.2s ease;
    user-select: none;
}

    .lightbox_nav:hover {
        opacity: 1;
        scale: 1;
    }

.lightbox_prev { left: var(--padding); }
.lightbox_next { right: var(--padding); }