.gallery-lightbox-trigger {
    display: block;
    width: 100%;
    padding: 0;
    overflow: hidden;
    border: 0;
    color: inherit;
    background: #edf1f6;
    cursor: zoom-in;
}
.gallery-lightbox-trigger:focus-visible {
    outline: 4px solid #efb400;
    outline-offset: 3px;
}
.gallery-lightbox-trigger img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform .2s ease;
}
.gallery-lightbox-trigger:hover img { transform: scale(1.025); }
.gallery-lightbox[hidden] { display: none !important; }
.gallery-lightbox {
    position: fixed;
    z-index: 12000;
    inset: 0;
    display: grid;
    padding: clamp(.5rem, 2vw, 1.5rem);
    place-items: center;
    color: #fff;
}
.gallery-lightbox-backdrop {
    position: absolute;
    inset: 0;
    border: 0;
    background: rgba(0, 12, 31, .94);
}
.gallery-lightbox-panel {
    position: relative;
    z-index: 1;
    display: grid;
    width: min(100%, 1400px);
    height: min(94vh, 900px);
    height: min(94dvh, 900px);
    grid-template-columns: 56px minmax(0, 1fr) 56px;
    grid-template-rows: minmax(0, 1fr) auto;
    gap: .5rem;
    align-items: center;
}
.gallery-lightbox-figure {
    display: grid;
    min-width: 0;
    height: 100%;
    margin: 0;
    grid-column: 2;
    grid-row: 1;
    grid-template-rows: minmax(0, 1fr) auto;
    place-items: center;
}
.gallery-lightbox-image {
    display: block;
    max-width: 100%;
    max-height: calc(94vh - 6.5rem);
    max-height: calc(94dvh - 6.5rem);
    object-fit: contain;
    box-shadow: 0 12px 42px rgba(0, 0, 0, .45);
}
.gallery-lightbox-caption {
    width: 100%;
    min-height: 2.4rem;
    margin: .65rem 0 0;
    color: #fff;
    font-size: .95rem;
    font-weight: 700;
    text-align: center;
}
.gallery-lightbox-close,
.gallery-lightbox-nav {
    display: inline-grid;
    min-width: 48px;
    min-height: 48px;
    place-items: center;
    border: 2px solid rgba(255, 255, 255, .85);
    border-radius: 50%;
    color: #fff;
    background: rgba(0, 0, 0, .55);
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
}
.gallery-lightbox-close:hover,
.gallery-lightbox-close:focus-visible,
.gallery-lightbox-nav:hover,
.gallery-lightbox-nav:focus-visible {
    border-color: #efb400;
    color: #071a45;
    background: #efb400;
    outline: 3px solid #fff;
    outline-offset: 2px;
}
.gallery-lightbox-close {
    position: absolute;
    z-index: 2;
    top: 0;
    right: 0;
}
.gallery-lightbox-previous { grid-column: 1; grid-row: 1; }
.gallery-lightbox-next { grid-column: 3; grid-row: 1; }
.gallery-lightbox-nav:disabled { visibility: hidden; }
.gallery-lightbox-count {
    grid-column: 1 / -1;
    grid-row: 2;
    margin: 0;
    color: #fff;
    font-size: .85rem;
    font-weight: 700;
    text-align: center;
}
html.gallery-lightbox-open { overflow: hidden; }
@media (max-width: 575.98px) {
    .gallery-lightbox { padding: .5rem; }
    .gallery-lightbox-panel {
        width: 100%;
        height: calc(100vh - 1rem);
        height: calc(100dvh - 1rem);
        grid-template-columns: 1fr 1fr;
        grid-template-rows: minmax(0, 1fr) 52px auto;
    }
    .gallery-lightbox-figure { grid-column: 1 / -1; grid-row: 1; }
    .gallery-lightbox-image {
        max-height: calc(100vh - 8.5rem);
        max-height: calc(100dvh - 8.5rem);
    }
    .gallery-lightbox-previous { grid-column: 1; grid-row: 2; justify-self: end; }
    .gallery-lightbox-next { grid-column: 2; grid-row: 2; justify-self: start; }
    .gallery-lightbox-count { grid-row: 3; }
    .gallery-lightbox-close { top: .25rem; right: .25rem; }
}
@media (prefers-reduced-motion: reduce) {
    .gallery-lightbox-trigger img { transition: none; }
}
@media print {
    .gallery-lightbox { display: none !important; }
}
.tpo-gallery-page { background: #f5f7fb; }
.tpo-gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
}
.tpo-gallery-item {
    aspect-ratio: 4 / 3;
    border: 1px solid #d5deea;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 8px 22px rgba(12, 45, 107, .1);
}
.tpo-gallery-item img { object-fit: cover; }
@media (max-width: 991.98px) {
    .tpo-gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 575.98px) {
    .tpo-gallery-grid { grid-template-columns: 1fr; gap: 1rem; }
}
