/* =========================
   GALLERY PAGE
========================= */

body {
    background: #000;
    color: white;
}

/* =========================
   GRID
========================= */

.gallery-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 120px 40px 40px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

/* =========================
   THUMBNAILS
========================= */

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    cursor: pointer;
    background: #111;
}

.gallery-item img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease, opacity 0.4s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
    opacity: 0.9;
}

/* =========================
   LIGHTBOX
========================= */

.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.94);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 999999;
}

.lightbox.active {
    display: flex;
}

.lightbox-image {
    max-width: 85%;
    max-height: 85%;
    border-radius: 14px;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.6);
}

/* =========================
   CLOSE BUTTON
========================= */

.lightbox-close {
    position: absolute;
    top: 25px;
    right: 40px;
    color: white;
    font-size: 50px;
    cursor: pointer;
    transition: 0.2s;
}

.lightbox-close:hover {
    opacity: 0.7;
}

/* =========================
   ARROWS
========================= */

.lightbox-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 70px;
    color: white;
    cursor: pointer;
    user-select: none;
    padding: 20px;
    transition: 0.2s;
}

.lightbox-arrow:hover {
    opacity: 0.7;
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

/* =========================
   MOBILE
========================= */

@media (max-width: 992px) {

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {

    .gallery-container {
        padding: 100px 15px 20px;
    }

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

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

    .lightbox-arrow {
        font-size: 50px;
    }

    .lightbox-close {
        font-size: 40px;
        right: 20px;
    }
}