.gallery-page-section {
    padding-top: 1.5rem;
    padding-bottom: 3rem;
}

.gallery-page-meta {
    margin: 0 0 1.15rem;
    color: var(--muted, #5b6b7c);
    font-size: 0.92rem;
}

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

.gallery-page-item {
    position: relative;
    display: block;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    background: #d9e4ee;
    cursor: zoom-in;
    box-shadow: 0 8px 18px rgba(12, 35, 64, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.gallery-page-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(12, 35, 64, 0.16);
}

.gallery-page-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gallery-page-caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 1.1rem 0.55rem 0.45rem;
    font-size: 0.74rem;
    font-weight: 600;
    color: #fff;
    text-align: left;
    background: linear-gradient(180deg, transparent, rgba(8, 22, 40, 0.8));
}

.gallery-page-pager {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.85rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.gallery-page-pager-btn.is-disabled {
    opacity: 0.45;
    pointer-events: none;
}

.gallery-page-pager-info {
    font-size: 0.9rem;
    color: var(--navy, #0c2340);
    font-weight: 600;
}

.gallery-page-empty {
    margin: 0;
    color: var(--muted, #5b6b7c);
}

.home-gallery-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: grid;
    place-items: center;
    padding: 1.25rem;
    background: rgba(6, 16, 30, 0.88);
    cursor: zoom-out;
}

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

body.home-gallery-lightbox-open {
    overflow: hidden;
}

.home-gallery-lightbox-figure {
    margin: 0;
    max-width: min(1100px, 100%);
    max-height: calc(100vh - 2.5rem);
    display: grid;
    gap: 0.65rem;
    justify-items: center;
}

.home-gallery-lightbox-figure img {
    max-width: 100%;
    max-height: calc(100vh - 5.5rem);
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
    cursor: zoom-out;
    background: #0a1624;
}

.home-gallery-lightbox-figure figcaption {
    color: rgba(255, 255, 255, 0.92);
    font-size: 0.92rem;
    text-align: center;
    max-width: 40rem;
}

.home-gallery-lightbox-close {
    position: absolute;
    top: 0.85rem;
    right: 0.95rem;
    width: 2.5rem;
    height: 2.5rem;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    color: #0c2340;
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.25);
}

@media (max-width: 640px) {
    .gallery-page-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
}
