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

.gallery-breadcrumb {
    margin-top: 14px;
    font-size: 15px;
    color: #555;
}

.gallery-breadcrumb a {
    color: #a00079;
    text-decoration: none;
}

.gallery-breadcrumb a:hover {
    text-decoration: underline;
}

.gallery-breadcrumb span[aria-hidden] {
    margin: 0 6px;
}

.gallery-section {
    width: 100%;
    padding: 50px 0 90px;
}

.gallery-grid {
    width: calc(100% - 15%);
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 20px;
}

.gallery-item {
    display: block;
    aspect-ratio: 1 / 1;
    padding: 12px;
    border-radius: 12px;
    background: #f2e4c2;
    overflow: hidden;
}

.gallery-item img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.35s ease;
}

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

/* ---------- Lightbox ---------- */

.gallery-lightbox {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px;
    background: rgba(18, 21, 25, 0.94);
}

.gallery-lightbox[hidden] {
    display: none;
}

.gallery-lightbox-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    background: #fff;
    border-radius: 8px;
}

.gallery-lightbox-close,
.gallery-lightbox-nav {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    cursor: pointer;
    line-height: 1;
}

.gallery-lightbox-close {
    top: 16px;
    right: 16px;
    width: 42px;
    height: 42px;
    font-size: 30px;
}

.gallery-lightbox-nav {
    top: 50%;
    width: 46px;
    height: 46px;
    font-size: 34px;
    transform: translateY(-50%);
}

.gallery-lightbox-nav.prev {
    left: 12px;
}

.gallery-lightbox-nav.next {
    right: 12px;
}

.gallery-lightbox-close:hover,
.gallery-lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* ---------- Responsive ---------- */

@media (max-width: 1000px) {
    .gallery-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

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

    /* Use the full phone width instead of the page's 70px side padding */
    .gallery-section {
        width: auto;
        margin: 0 -54px;
        padding: 30px 0 60px;
    }

    .gallery-lightbox {
        padding: 60px 12px;
    }
}
