/* CSS Document */


/* GALLERY GRID */

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

.gallery-item {
    overflow: hidden;
    border-radius: 12px;
    border: 4px solid #FFFFFF;
    background: #FFFFFF;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    cursor: pointer;
}

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

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

/* LIGHTBOX OVERLAY */

.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    background: rgba(5, 25, 38, 0.96);
    z-index: 9999;

    align-items: center;
    justify-content: center;
}

.lightbox.show {
    display: flex;
}

.lightbox-content {
    max-width: 85%;
    max-height: 85%;
    text-align: center;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 78vh;
    object-fit: contain;
    border: 4px solid #FFF3DC;
    border-radius: 8px;
    box-shadow: 0 5px 30px rgba(0,0,0,0.5);
}

#lightbox-caption {
    color: #FFF3DC;
    font-family: 'Tinos', serif;
    font-size: 22px;
    margin-top: 12px;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: absolute;
    background: #E84424;
    color: #FFFFFF;
    border: none;
    cursor: pointer;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    font-size: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
    background: #FFD23F;
    color: #075477;
}

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

.lightbox-prev {
    left: 25px;
}

.lightbox-next {
    right: 25px;
}

.lightbox-counter {
    position: absolute;
    bottom: 20px;
    color: #FFFFFF;
    font-size: 16px;
}



.gallery-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 25px;
    margin-top: 45px;
    font-family: Georgia, serif;
    color: #102e46;
}

.gallery-pagination a {
    color: #fff3dc;
    background: #e87516;
    padding: 10px 18px;
    text-decoration: none;
    border-radius: 3px;
    transition: background 0.3s;
}

.gallery-pagination a:hover {
    background: #e84424;
}

.gallery-pagination span {
    font-size: 16px;
}

/* FORCE THREE COLUMNS */

.gallery-page .painting-grid {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 38px 28px;
    width: 100%;
    max-width: 100%;
}

/* PREVENT CARDS FROM TAKING FULL WIDTH */

.gallery-page .painting-card {
    display: block;
    width: 100%;
    min-width: 0;
    max-width: none;
}

/* IMAGE */

.gallery-page .painting-image {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
}

.gallery-page .painting-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* TABLET */

@media (max-width: 900px) {
    .gallery-page .painting-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

/* MOBILE */

@media (max-width: 600px) {
    .gallery-page .painting-grid {
        grid-template-columns: 1fr !important;
    }
}

/* RESPONSIVE */

@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

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

    .lightbox-prev {
        left: 8px;
    }

    .lightbox-next {
        right: 8px;
    }

    .lightbox-content {
        max-width: 90%;
    }
}

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

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