.gallery-page {
    min-height: 100%;
    padding: 0;
}

.gallery-heading {
    text-align: center;
    margin-bottom: 35px;
}

.gallery-heading h1 {
    font-size: 42px;
    margin-bottom: 10px;
}

.gallery-heading p {
    color: #aaa;
    font-size: 16px;
}

/* =========================
   MASONRY GALLERY
========================= */

.gallery {
    max-width: 100%;
    margin: auto;
    column-count: 4;
    column-gap: 18px;
}

.gallery-card {
    position: relative;

    display: inline-block;
    width: 100%;

    margin-bottom: 18px;

    border-radius: 14px;
    overflow: hidden;

    cursor: pointer;

    background: #222;

    break-inside: avoid;

    transition: transform 0.3s ease;
}

.gallery-card:hover {
    transform: translateY(-5px);
}

.gallery-card img {
    width: 100%;
    height: auto;
    display: block;
}

/* Overlay */
.gallery-overlay {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 25px 18px 18px;
    background: linear-gradient(
        transparent,
        rgba(0,0,0,0.9)
    );

    opacity: 0;

    transition: opacity 0.3s ease;
}

.gallery-card:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay h3 {
    font-size: 18px;
    margin-bottom: 5px;
}

.gallery-overlay p {
    font-size: 13px;
    color: #ccc;
}

/* =========================
   LIGHTBOX
========================= */

.lightbox {
    position: fixed !important;

    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;

    width: 100vw !important;
    height: 100vh !important;

    margin: 0 !important;
    padding: 30px !important;

    background: rgba(0, 0, 0, 0.96);

    display: none;

    align-items: center;
    justify-content: center;

    z-index: 2147483647 !important;

    overflow: hidden;
}

.lightbox.active {
    display: flex !important;
}

/* Image */

.lightbox-content {
    width: 100%;
    max-width: 1000px;
    max-height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#lightboxImage {
    max-width: 90vw;
    max-height: 65vh;

    object-fit: contain;

    border-radius: 10px;

    box-shadow: 0 10px 50px rgba(0,0,0,0.5);
}

/* Text */

.lightbox-info {
    text-align: center;

    max-width: 700px;

    margin-top: 20px;
}

#lightboxTitle {
    font-size: 25px;
    margin-bottom: 15px;
}

#lightboxDescription {
    color: #bbb;
    font-size: 15px;
    line-height: 1.6;
}

/* Counter */

#counter {
    margin-top: 12px;

    color: #888;

    font-size: 14px;
}

/* =========================
   BUTTONS
========================= */

.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: absolute;

    width: 48px;
    height: 48px;

    border: none;
    border-radius: 50%;

    background: rgba(255,255,255,0.12);

    color: white;

    font-size: 28px;

    cursor: pointer;

    display: flex;
    align-items: center;
    justify-content: center;

    transition: background 0.2s ease;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(255,255,255,0.25);
}

.lightbox-close {
    top: 25px;
    right: 25px;
}

.lightbox-prev {
    left: 25px;
    top: 50%;

    transform: translateY(-50%);
}

.lightbox-next {
    right: 25px;
    top: 50%;

    transform: translateY(-50%);
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 1000px) {

    .gallery {
        column-count: 3;
    }

}

@media (max-width: 700px) {

    .gallery {
        column-count: 2;
    }

    .gallery-heading h1 {
        font-size: 32px;
    }

    .lightbox {
        padding: 15px;
    }

    #lightboxImage {
        max-width: 95vw;
        max-height: 60vh;
    }

    #lightboxTitle {
        font-size: 22px;
    }

    .lightbox-prev {
        left: 10px;
    }

    .lightbox-next {
        right: 10px;
    }

}

@media (max-width: 450px) {

    .gallery {
        column-count: 1;
    }

}
