.page-gallery {
    background: var(--cream);
}

.page-gallery .nav-center a.is-active {
    color: var(--forest);
    font-weight: 700;
}

.page-gallery .nav-center a.is-active::after {
    width: 100%;
}

.page-gallery .mobile-menu a[aria-current="page"] {
    color: var(--forest);
    font-weight: 700;
}

.page-gallery .gallery-page {
    padding: 140px 2rem 90px;
    background: linear-gradient(180deg, var(--cream) 0%, var(--warm-white, #ffffff) 100%);
    min-height: calc(100vh - 320px);
}

.page-gallery .gallery-page-container {
    max-width: 1200px;
    margin: 0 auto;
}

.page-gallery .gallery-lead {
    margin: 0 auto 1.5rem;
    max-width: 760px;
    text-align: center;
    color: var(--text-muted);
    font-size: 1.05rem;
    line-height: 1.7;
}

.page-gallery .gallery-status {
    margin: 1rem 0 1.5rem;
    text-align: center;
    color: var(--forest);
    font-weight: 600;
}

.page-gallery .gallery-status.is-error {
    color: #b3261e;
}

.page-gallery .gallery-retry {
    display: block;
    margin: 0 auto 1.5rem;
}

.page-gallery .gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 18px;
}

.page-gallery .g-item {
    border: 1px solid rgba(26, 71, 42, 0.12);
    border-radius: 16px;
    background: #fff;
    padding: 0;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(26, 71, 42, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.page-gallery .g-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(26, 71, 42, 0.14);
}

.page-gallery .g-item:focus-visible,
.page-gallery .g-lightbox-btn:focus-visible,
.page-gallery .g-lightbox-close:focus-visible {
    outline: 3px solid var(--gold);
    outline-offset: 2px;
}

.page-gallery .g-item img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.page-gallery .g-lightbox {
    position: fixed;
    inset: 0;
    z-index: 2500;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(14, 20, 16, 0.84);
}

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

.page-gallery .g-lightbox-panel {
    position: relative;
    width: min(1100px, 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.page-gallery .g-lightbox-image-wrap {
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 14px;
    width: 100%;
    max-height: calc(100vh - 6rem);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.page-gallery .g-lightbox-image {
    display: block;
    max-width: 100%;
    max-height: calc(100vh - 6rem);
    width: auto;
    height: auto;
    object-fit: contain;
}

.page-gallery .g-lightbox-close {
    position: absolute;
    top: -0.25rem;
    right: 0;
    transform: translateY(-100%);
    border: 1px solid rgba(255, 255, 255, 0.32);
    background: rgba(0, 0, 0, 0.56);
    color: #fff;
    width: 42px;
    height: 42px;
    border-radius: 999px;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
}

.page-gallery .g-lightbox-btn {
    border: 1px solid rgba(255, 255, 255, 0.32);
    background: rgba(0, 0, 0, 0.56);
    color: #fff;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    flex-shrink: 0;
}

.page-gallery .g-lightbox-btn:disabled {
    opacity: 0.45;
    cursor: default;
}

body.g-lightbox-open {
    overflow: hidden;
}

@media (max-width: 900px) {
    .page-gallery .gallery-page {
        padding: 120px 1.5rem 70px;
    }

    .page-gallery .g-lightbox-panel {
        width: 100%;
    }

    .page-gallery .g-lightbox-btn {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        z-index: 2;
    }

    .page-gallery .g-lightbox-prev {
        left: 0.5rem;
    }

    .page-gallery .g-lightbox-next {
        right: 0.5rem;
    }
}
