.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.card-grid article,
.listing-stack article,
.link-list li {
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid var(--utef-border);
    padding: 1rem;
}

.listing-stack {
    display: grid;
    gap: 0.8rem;
}

.link-list {
    list-style: none;
    padding: 0;
    display: grid;
    gap: 0.8rem;
}

.gallery-index-page,
.gallery-detail-page {
    --gallery-ink: #003553;
    --gallery-line: #a9c8da;
    --gallery-soft: #eaf2f7;
    --gallery-muted: #6d98ad;
    background: var(--gallery-soft);
    box-shadow: 0 0 0 100vmax var(--gallery-soft);
    clip-path: inset(0 -100vmax);
    color: var(--gallery-ink);
    padding: 2.44rem 0 4rem;
}

.gallery-index-header,
.gallery-detail-header {
    margin-bottom: 2.55rem;
}

.gallery-index-header h1,
.gallery-detail-header h1 {
    margin: 0;
    color: var(--gallery-ink);
    font-size: clamp(2.25rem, 4vw, 3.25rem);
    font-weight: 600;
    line-height: 1.1;
}

.gallery-index-header__intro,
.gallery-detail-header__description {
    max-width: 52rem;
    margin-top: 1.2rem;
    color: #315f77;
    line-height: 1.6;
}

.gallery-index-header__intro > :last-child,
.gallery-detail-header__description > :last-child {
    margin-bottom: 0;
}

.gallery-index-section {
    margin-bottom: 2.4rem;
}

.gallery-index-section h2 {
    margin: 0 0 1rem;
    color: #0e4b6e;
    font-size: 1.28rem;
    font-weight: 600;
}

.gallery-index-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.1rem;
}

.gallery-index-card {
    min-height: 100%;
    background: #fff;
}

.gallery-index-card__link {
    display: grid;
    min-height: 100%;
    color: var(--gallery-ink);
    text-decoration: none;
}

.gallery-index-card__link:hover,
.gallery-index-card__link:focus {
    color: var(--gallery-ink);
    text-decoration: none;
}

.gallery-index-card__media {
    aspect-ratio: 16 / 9;
    margin: 0;
    background: rgba(169, 200, 218, 0.25);
    overflow: hidden;
}

.gallery-index-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-index-card__body {
    padding: 1rem;
}

.gallery-index-card h3 {
    margin: 0;
    color: #0e4b6e;
    font-size: 1.15rem;
    font-weight: 600;
    line-height: 1.25;
}

.gallery-index-card__link:hover h3,
.gallery-index-card__link:focus h3 {
    text-decoration: underline;
    text-underline-offset: 0.18em;
}

.gallery-index-card__meta {
    margin-top: 0.55rem;
    color: var(--gallery-muted);
    font-size: 0.86rem;
}

.gallery-index-card p {
    margin: 0.75rem 0 0;
    color: #315f77;
    line-height: 1.5;
}

.gallery-media-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.1rem;
}

.gallery-media-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    margin: 0;
    background: #fff;
}

.gallery-media-card__media {
    position: relative;
    aspect-ratio: 4 / 3;
    background: rgba(169, 200, 218, 0.25);
    overflow: hidden;
}

.gallery-media-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-media-card__embed,
.gallery-media-card__video {
    display: grid;
    min-height: 100%;
    place-items: center;
    padding: 1rem;
}

.gallery-media-card__embed iframe,
.gallery-media-card__embed video {
    width: 100%;
    max-width: 100%;
    aspect-ratio: 16 / 9;
}

.gallery-media-card__video {
    gap: 0.5rem;
    color: #315f77;
    overflow-wrap: anywhere;
}

.gallery-media-card__video span {
    color: #0e4b6e;
    font-weight: 600;
}

.gallery-media-card__lightbox-link {
    position: absolute;
    inset: 0;
    z-index: 2;
}

.gallery-media-card__lightbox-link:focus-visible {
    outline: 3px solid #0c7fbd;
    outline-offset: -3px;
}

.gallery-media-card__caption {
    padding: 0.8rem 0.9rem 0.9rem;
    color: #315f77;
    font-size: 0.92rem;
    line-height: 1.45;
}

.gallery-lightbox {
    position: fixed;
    z-index: 1100;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.gallery-lightbox:target {
    display: flex;
}

.gallery-lightbox-is-open {
    overflow: hidden;
}

.gallery-lightbox__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 24, 38, 0.76);
}

.gallery-lightbox__dialog {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    width: fit-content;
    max-width: calc(100vw - 4rem);
    max-height: calc(100vh - 4rem);
    overflow: auto;
    background: #fff;
    outline: 0;
}

.gallery-lightbox__close {
    position: absolute;
    top: 0.65rem;
    right: 0.8rem;
    z-index: 2;
    color: var(--gallery-ink);
    font-size: 2rem;
    line-height: 1;
    text-decoration: none;
}

.gallery-lightbox__nav {
    position: absolute;
    top: 50%;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 999px;
    background: rgba(0, 53, 83, 0.58);
    color: #fff;
    font-size: 2rem;
    line-height: 1;
    transform: translateY(-50%);
}

.gallery-lightbox__nav:hover,
.gallery-lightbox__nav:focus {
    background: rgba(0, 53, 83, 0.86);
}

.gallery-lightbox__nav:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 3px;
}

.gallery-lightbox__nav--prev {
    left: 0.9rem;
}

.gallery-lightbox__nav--next {
    right: 0.9rem;
}

.gallery-lightbox__media {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #001826;
}

.gallery-lightbox__media img {
    width: auto;
    max-width: calc(100vw - 4rem);
    max-height: calc(100vh - 8rem);
    object-fit: contain;
}

.gallery-lightbox__embed,
.gallery-lightbox__video {
    display: grid;
    min-height: min(60vh, 620px);
    place-items: center;
    padding: 3rem;
    color: #fff;
    overflow-wrap: anywhere;
}

.gallery-lightbox__embed iframe,
.gallery-lightbox__embed video {
    width: min(100%, 1080px);
    max-width: 100%;
    aspect-ratio: 16 / 9;
}

.gallery-lightbox__caption {
    padding: 1rem 1.2rem;
    color: #315f77;
    line-height: 1.5;
    max-width: min(100%, 1080px);
}

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

@media (max-width: 767.98px) {
    .gallery-index-page,
    .gallery-detail-page {
        padding: 1.65rem 0 3rem;
    }

    .gallery-index-header,
    .gallery-detail-header {
        margin-bottom: 1.9rem;
    }

    .gallery-media-grid {
        grid-template-columns: 1fr;
    }

    .gallery-lightbox {
        padding: 1rem;
    }

    .gallery-lightbox__dialog {
        max-width: calc(100vw - 2rem);
        max-height: calc(100vh - 2rem);
    }

    .gallery-lightbox__media img {
        max-width: calc(100vw - 2rem);
    }

    .gallery-lightbox__nav {
        width: 2.35rem;
        height: 2.35rem;
        font-size: 1.7rem;
    }

    .gallery-lightbox__nav--prev {
        left: 0.55rem;
    }

    .gallery-lightbox__nav--next {
        right: 0.55rem;
    }
}

.muted {
    color: var(--utef-muted);
}

figure {
    margin: 0;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

