/* TGF.Team — Team-Übersicht (Reiter auf Desktop, Akkordeon auf Mobile).
   Liegt i.d.R. im Creme-Leseband (.reading.band): KEINE var(--text)/var(--muted)
   verwenden (lösen auf .tgf-public hell auf), sondern feste Leseband-Farben. */

.tgf-team {
    color: inherit;
}
/* Im schmalen Standard-Layout (Team-Seite) drückte die gefloatete „Mehr zum Thema"-Box Reiter
   und Karten auf die Restbreite zusammen → dort erst unter der Box beginnen. Im breiten Layout
   (Vorstand, .is-wide) ist neben der Box genug Platz; clear liesse dort links eine Lücke. */
.page:not(.is-wide) .tgf-team {
    clear: both;
}

/* ---------- Karten-Grid ----------
   CSS-Grid mit gap statt Bootstrap-.row/.col: randbündig per Konstruktion (Bootstraps
   Negativ-Margin-Gutter rückte die Karten neben der gefloateten Box um ein halbes Gutter ein).
   Spaltenzahl: 2 (mobil) / 3 (≥576px) / 4 (≥992px). 4 Spalten erst ab „lg", damit die
   Kacheln auf iPad-Hochformat (768–834px) nicht zu schmal werden — dort bleiben es 3
   Spalten; im Querformat (≥992px) sind es wieder 4. */
.tgf-team-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}
@media (min-width: 576px) {
    .tgf-team-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 992px) {
    .tgf-team-grid { grid-template-columns: repeat(4, 1fr); }
}

.tgf-team-card {
    border: 1px solid rgba(36, 27, 18, .12);
    border-radius: .5rem;
    overflow: hidden;
    background: #FFFEFB;
    text-decoration: none;
    color: inherit;
    transition: box-shadow .2s, transform .2s;
}
.tgf-team-card--link:hover {
    box-shadow: 0 10px 24px rgba(0, 0, 0, .12);
    transform: translateY(-3px);
    color: inherit;
}
.tgf-team-foto {
    width: 100%;
    /* aspect-ratio kommt inline aus der Modul-Einstellung TGF.Team:BildFormat */
    object-fit: cover;
    object-position: top center;
    display: block;
}
.tgf-team-caption {
    padding: .7rem .8rem .9rem;
}
.tgf-team-name {
    font-weight: 600;
    line-height: 1.2;
}
.tgf-team-card--link .tgf-team-name {
    color: var(--red, #c90000);
}
.tgf-team-funktion {
    font-size: .85rem;
    color: #6f5e4a;
    margin-top: .15rem;
    line-height: 1.35; /* sonst erbt sie den weiten Fliesstext-Abstand → zweizeilige Funktionen wirkten sperrig */
}

/* ---------- Nur die aktive/offene Gruppe zeigt Inhalt (gilt Desktop + Mobile) ---------- */
.tgf-team-group:not(.is-open) > .tgf-team-body {
    display: none;
}

/* Einzelgruppe (keine Reiter/Akkordeon-Leiste): oberen UND seitlichen Abstand weg → Karten
   bündig (oben + links/rechts) wie der Fliesstext/die Box. Höhere Spezifität als die Body-Padding-Regeln. */
.tgf-team-panels--single .tgf-team-group > .tgf-team-body {
    padding-top: 0;
    padding-left: 0;
    padding-right: 0;
}

/* ---------- Mobile: Akkordeon (Bootstrap accordion-button bringt Chevron/Look) ---------- */
.tgf-team-acc.accordion-button {
    font-family: var(--font-label, inherit);
    text-transform: uppercase;
    letter-spacing: .04em;
    font-size: .92rem;
    border-radius: 0;
}
.tgf-team-group {
    border-bottom: 1px solid rgba(36, 27, 18, .14);
}
.tgf-team-group > .tgf-team-body {
    padding: 1.2rem .25rem 1.6rem;
}

/* ---------- Desktop: Reiter (Bootstrap nav-tabs, lesbar gefärbt) ---------- */
@media (min-width: 768px) {
    .tgf-team-group {
        border-bottom: 0;
    }
    .tgf-team-group > .tgf-team-body {
        padding: 1.8rem 0 .5rem;
    }

    .tgf-team-tabs.nav-tabs {
        border-bottom-color: rgba(36, 27, 18, .18);
    }
    .tgf-team-tabs .nav-link {
        color: #6f5e4a;
        font-family: var(--font-label, inherit);
        text-transform: uppercase;
        letter-spacing: .04em;
        font-size: .82rem;
        border: 0;
        border-bottom: 2px solid transparent;
        background: transparent;
        margin-bottom: -1px;
    }
    .tgf-team-tabs .nav-link:hover {
        color: var(--red, #c90000);
        border-bottom-color: rgba(201, 0, 0, .35);
    }
    .tgf-team-tabs .nav-link.active {
        color: var(--red, #c90000);
        border-bottom-color: var(--red, #c90000);
    }
}
