.credits-gallery {
    padding-bottom: 1rem;
    text-align: center;
}

.credits-masthead {
    overflow: hidden;
    background-image: none;
}

.credits-masthead .credits-banner-image {
    position: absolute;
    z-index: 0;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    margin: 0;
    border-radius: 0;
    object-fit: cover;
    object-position: center;
}

.credits-masthead:before {
    z-index: 1;
}

.credits-masthead .container {
    z-index: 2;
}

.credits-gallery .section-heading {
    margin-top: 1rem;
    margin-bottom: 0.75rem;
    color: #233b57;
}

.gallery-description {
    margin-bottom: 1.5rem;
    color: #536a70;
}

.place-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
    gap: 1.25rem;
}

.mission-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
    gap: 1.25rem;
}

.place-card,
.character-card {
    overflow: hidden;
    margin: 0;
    border: 1px solid #dce5eb;
    border-radius: 0.85rem;
    background: #fff;
    box-shadow: 0 0.6rem 1.5rem rgba(23, 60, 72, 0.12);
}

.place-card img {
    width: 100%;
    max-width: none;
    max-height: none;
    aspect-ratio: 16 / 9;
    margin: 0;
    border-radius: 0;
    object-fit: cover;
}

.place-card figcaption,
.character-card figcaption {
    padding: 0.85rem 1rem;
    color: #173c48;
    font-family: "Open Sans", sans-serif;
    font-weight: 700;
    text-align: center;
}

.characters-section {
    margin-top: 3rem;
}

.character-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
    gap: 1rem;
}

.character-card {
    transition: transform 160ms ease, box-shadow 160ms ease;
}

.character-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 0.9rem 1.8rem rgba(23, 60, 72, 0.18);
}

.character-card:last-child {
    grid-column: 1 / -1;
    justify-self: center;
    width: min(100%, 170px);
}

.character-card img {
    width: 100%;
    max-width: none;
    max-height: none;
    aspect-ratio: 1;
    margin: 0;
    border-radius: 0;
    background: linear-gradient(145deg, #e8f4f7, #d6e5f1);
    object-fit: contain;
}

.gallery-credit {
    margin-top: 1.5rem;
    color: #697d82;
    font-size: 0.85rem;
    text-align: center;
}

.gallery-credit a {
    color: #2d4286;
}

@media (min-width: 576px) {
    .character-gallery {
        grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    }
}

@media (prefers-reduced-motion: reduce) {
    .character-card {
        transition: none;
    }
}
