/* =========================================================
   Content Block "SG-Rhade Jugendleiter" – Personen-/Ämterkarte
   ========================================================= */

.sg-person-card {
    --sg-green: #13730d;
    --sg-red: #a3123a;

    display: flex;
    flex-direction: column;
    height: 100%;
    background: #fff;
    border-top: 4px solid var(--sg-green);
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .08), 0 4px 14px rgba(0, 0, 0, .06);
    overflow: hidden;
    transition: box-shadow .2s ease, transform .2s ease;
}

.sg-person-card:hover {
    box-shadow: 0 2px 6px rgba(0, 0, 0, .10), 0 10px 24px rgba(0, 0, 0, .10);
    transform: translateY(-2px);
}

/* Foto: einheitlich 16:9. Breiter als alle Redaktions-Zuschnitte, daher wird nur oben/unten
   beschnitten, nie seitlich (Gruppenfotos bleiben vollständig). Ausschnitt eher oben (Gesichter). */
.sg-person-card__media {
    margin: 0;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #e9ecef;
}

/* Zuschnitt "16:5 – flach": Bildfeld folgt dem flachen Format statt 16:9 */
.sg-person-card__media--flat {
    aspect-ratio: 16 / 5;
}

.sg-person-card__media a {
    display: block;
    height: 100%;
}

.sg-person-card__image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 18%;
    transition: transform .4s ease;
}

.sg-person-card:hover .sg-person-card__image {
    transform: scale(1.04);
}

.sg-person-card__body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    padding: 1.25rem 1.5rem 1.5rem;
}

.sg-person-card__name {
    margin: 0 0 1rem;
    font-family: 'Ubuntu Condensed', sans-serif;
    font-size: 1.75rem;
    line-height: 1.15;
    color: #222;
}

.sg-person-card__name::after {
    content: "";
    display: block;
    width: 3rem;
    height: 3px;
    margin-top: .5rem;
    background: var(--sg-red);
    border-radius: 2px;
}

.sg-person-card__text {
    color: #444;
    line-height: 1.6;
}

/* Grid-Regel ".sg-flex-item--content p { flex: 1 0 auto }" hier neutralisieren */
.sg-person-card__text p {
    flex: none;
    margin-bottom: .75rem;
}

.sg-person-card__text p:last-child {
    margin-bottom: 0;
}

/* Weitere Fotos */
.sg-person-card__thumbs {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin: 1.25rem 0 0;
    padding: 0;
    list-style: none;
}

.sg-person-card__thumbs a {
    display: block;
    width: 64px;
    height: 64px;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 0 0 2px #fff, 0 0 0 3px #dee2e6;
}

.sg-person-card__thumbs img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sg-person-card a:focus-visible {
    outline: 3px solid var(--sg-green);
    outline-offset: 2px;
}

/* Karte füllt die Rasterzelle des Seitenlayouts (gleich hohe Karten je Zeile) */
.sg-flex-item--content > .frame-type-sar_jugendleiter {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
}

.sg-flex-item--content:has(> .frame-type-sar_jugendleiter) {
    padding: 0;
    background: transparent;
}

@media (prefers-reduced-motion: reduce) {
    .sg-person-card,
    .sg-person-card__image {
        transition: none;
    }

    .sg-person-card:hover,
    .sg-person-card:hover .sg-person-card__image {
        transform: none;
    }
}
