/*
 * IFB Stadtbilder V1
 *
 * Originale, markenstilisierte Standortillustrationen für:
 * Senden, Ulm, Neu-Ulm und Ehingen.
 */

/* Homepage: Bildkarten statt reiner Adresszeilen */
.ifb-v5-city-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 20px;
}

.ifb-v5-city-card {
    min-width: 0;
    overflow: hidden;
    color: inherit !important;
    border: 1px solid var(--ifb-v5-line, #dce4ee);
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 10px 32px rgba(7, 29, 59, .06);
    text-decoration: none !important;
    transition:
        transform .18s ease,
        border-color .18s ease,
        box-shadow .18s ease;
}

.ifb-v5-city-card:hover,
.ifb-v5-city-card:focus-visible {
    transform: translateY(-5px);
    border-color: rgba(36, 27, 255, .28);
    box-shadow: 0 20px 48px rgba(7, 29, 59, .12);
}

.ifb-v5-city-card:focus-visible {
    outline: 3px solid rgba(36, 27, 255, .22);
    outline-offset: 3px;
}

.ifb-v5-city-card__media {
    position: relative;
    aspect-ratio: 16 / 10;
    margin: 0;
    overflow: hidden;
    background: #eef2ff;
}

.ifb-v5-city-card__media img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform .35s ease;
}

.ifb-v5-city-card:hover .ifb-v5-city-card__media img {
    transform: scale(1.035);
}

.ifb-v5-city-card__media::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 54%;
    background: linear-gradient(to top, rgba(4, 20, 47, .58), transparent);
    pointer-events: none;
}

.ifb-v5-city-card__media figcaption {
    position: absolute;
    z-index: 2;
    right: 14px;
    bottom: 13px;
    left: 14px;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .035em;
    text-shadow: 0 2px 12px rgba(0, 0, 0, .35);
}

.ifb-v5-city-card__body {
    min-height: 112px;
    padding: 20px;
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr) 24px;
    align-items: center;
    gap: 12px;
}

.ifb-v5-city-card__pin {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    color: #fff;
    border-radius: 12px;
    background: var(--ifb-v5-brand, #241bff);
}

.ifb-v5-city-card:nth-child(even) .ifb-v5-city-card__pin {
    background: var(--ifb-v5-teal, #079986);
}

.ifb-v5-city-card__pin svg {
    width: 21px;
    height: 21px;
}

.ifb-v5-city-card__body strong,
.ifb-v5-city-card__body small {
    display: block;
}

.ifb-v5-city-card__body strong {
    margin-bottom: 4px;
    color: var(--ifb-v5-navy, #071d3b);
    font-size: 21px;
    line-height: 1.15;
}

.ifb-v5-city-card__body small {
    color: var(--ifb-v5-muted, #617087);
    font-size: 13px;
    line-height: 1.45;
}

.ifb-v5-city-card__arrow {
    color: var(--ifb-v5-brand, #241bff);
}

.ifb-v5-city-card__arrow svg {
    width: 20px;
    height: 20px;
}

/* Standortseite: Bild als Vollbreitenkopf der Karte */
.ifb-location-card-v1 {
    padding-top: 0 !important;
    overflow: hidden;
    scroll-margin-top: 150px;
}

.ifb-location-card-v1__media {
    position: relative;
    aspect-ratio: 16 / 9;
    margin: 0 -30px 26px;
    overflow: hidden;
    background: #eef2ff;
}

.ifb-location-card-v1__media img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform .35s ease;
}

.ifb-location-card-v1:hover .ifb-location-card-v1__media img {
    transform: scale(1.025);
}

.ifb-location-card-v1__media::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 55%;
    background: linear-gradient(to top, rgba(4, 20, 47, .68), transparent);
    pointer-events: none;
}

.ifb-location-card-v1__media figcaption {
    position: absolute;
    z-index: 2;
    right: 20px;
    bottom: 17px;
    left: 20px;
    color: #fff;
    font-size: 13px;
    font-weight: 850;
    letter-spacing: .04em;
    text-shadow: 0 2px 12px rgba(0, 0, 0, .35);
}

.ifb-location-card-v1__description {
    margin: -7px 0 20px;
    color: var(--ifb-v5-muted, #617087);
    font-size: 14px;
    line-height: 1.6;
}

@media (max-width: 1120px) {
    .ifb-v5-city-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 650px) {
    .ifb-v5-city-grid {
        grid-template-columns: 1fr !important;
    }

    .ifb-v5-city-card__body {
        min-height: 96px;
    }

    .ifb-location-card-v1__media {
        margin-right: -24px;
        margin-left: -24px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ifb-v5-city-card,
    .ifb-v5-city-card__media img,
    .ifb-location-card-v1__media img {
        transition: none;
    }
}
