/* ----------------------------------------------------------
   Team — Mini-Grid (Homepage) + Teamseite (/team)
   ---------------------------------------------------------- */

/* Mini-Grid auf der Homepage --------------------------------- */
.team-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: clamp(1rem, 2vw, 1.75rem);
    margin: 0;
    padding: 0;
}
@media (min-width: 576px)  { .team-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 768px)  { .team-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 992px) {
    .team-grid {
        grid-template-columns: repeat(4, minmax(0, 240px));
        justify-content: center;
        gap: clamp(1.5rem, 2.5vw, 2.5rem);
    }
}

.team-group-photo {
    position: relative;
    isolation: isolate;
    max-width: 100%;
    margin: 0 auto clamp(2rem, 4vw, 3rem);
}
.team-group-photo::before,
.team-group-photo::after {
    position: absolute;
    z-index: -1;
    content: "";
    width: clamp(7rem, 17vw, 13rem);
    aspect-ratio: 1;
    border-radius: 48% 52% 61% 39% / 42% 38% 62% 58%;
}
.team-group-photo::before {
    top: 8%;
    left: clamp(-2.5rem, -3vw, -1rem);
    background: rgba(var(--brand-primary-rgb), .14);
}
.team-group-photo::after {
    right: clamp(-2.5rem, -3vw, -1rem);
    bottom: 4%;
    background: rgba(var(--brand-secondary-rgb), .14);
}
.team-group-photo img {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
    height: auto;
    border-radius: clamp(1.25rem, 3vw, 2.25rem);
    box-shadow: 0 1.25rem 3rem rgba(11, 15, 25, .12);
}

.team-tile {
    text-align: center;
}
.team-tile > a {
    display: block;
    transition: transform .2s ease;
}
.team-tile > a:hover {
    transform: translateY(-3px);
}
.team-tile > a:hover .team-portrait {
    box-shadow: 0 8px 20px rgba(0, 0, 0, .12);
}

.team-portrait {
    aspect-ratio: 1 / 1;
    width: 100%;
    max-width: 160px;
    border-radius: 1rem;
    object-fit: cover;
    background: var(--bs-tertiary-bg, #f4f4f4);
    transition: box-shadow .2s ease;
    display: block;
    margin: 0 auto;
}
@media (min-width: 992px) {
    .team-portrait { max-width: 240px; }
}

.team-name {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.25;
    margin: .75rem 0 .125rem;
}
.team-role {
    font-size: .8125rem;
    color: var(--bs-secondary, #6c757d);
    margin: 0;
    line-height: 1.3;
}

/* Team-Seite ------------------------------------------------- */
.team-page.section-padded {
    padding-block: clamp(3rem, 4vw, 4rem);
}
.team-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(.5rem, 2vw, 1.5rem);
    max-width: 1000px;
    margin: 0 auto clamp(3rem, 6vw, 5rem);
    padding: clamp(1rem, 2.5vw, 1.75rem);
    border: 1px solid var(--border-subtle, #e6e6e6);
    border-radius: 1.25rem;
    background: var(--surface-warm, #fafaf8);
}
.team-stat {
    display: grid;
    align-content: center;
    justify-items: center;
    gap: .3rem;
    min-width: 0;
    text-align: center;
}
.team-stat-value {
    color: var(--brand-primary, #c52b6c);
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    font-weight: 700;
    line-height: 1.1;
}
.team-stat-value .fa-award {
    color: var(--brand-secondary-dark, #006a8c);
    font-size: .8em;
}
.team-stat-label {
    color: var(--text-body, #333333);
    font-size: clamp(.75rem, 1.4vw, .9375rem);
    font-weight: 600;
    line-height: 1.35;
}

.team-directory {
    position: relative;
}
.team-lang-filter {
    margin-bottom: clamp(2rem, 4vw, 3rem);
}
.team-lang-filter label {
    color: var(--text-body, #333333);
    background: var(--surface-white, #ffffff);
}
.team-lang-filter label:focus-visible,
.team-card:focus-visible,
.team-featured-details summary:focus-visible,
.team-person-gln-info:focus-visible,
.team-apprenticeship-note a:focus-visible,
.team-cta a:focus-visible {
    outline: 3px solid var(--brand-primary, #c52b6c);
    outline-offset: 3px;
}

.team-featured {
    display: grid;
    grid-template-columns: minmax(0, .65fr) minmax(0, 1fr);
    align-items: center;
    gap: clamp(1.5rem, 5vw, 4rem);
    margin: 0 0 clamp(2rem, 4vw, 3rem);
    padding: clamp(1rem, 4vw, 3rem);
    border: 1px solid var(--border-subtle, #e6e6e6);
    border-radius: clamp(1.25rem, 3vw, 2rem);
    background: var(--surface-warm, #fafaf8);
}
.team-featured-media {
    min-width: 0;
}
.team-featured-portrait {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 5;
    border-radius: 1rem;
    object-fit: cover;
    object-position: 50% 25%;
    background: var(--surface-beige, #f2ebe4);
}
.team-featured-content h2 {
    margin: 0 0 .75rem;
    color: var(--text-heading, #0b0f19);
    font-size: clamp(1.75rem, 3.4vw, 2.75rem);
    line-height: 1.12;
}
.team-featured-eyebrow,
.team-group-header h2 {
    color: var(--brand-secondary-dark, #006a8c);
    font-size: .8125rem;
    font-weight: 700;
    letter-spacing: .09em;
    text-transform: uppercase;
}
.team-featured-eyebrow {
    margin: 0 0 .5rem;
}
.team-quote {
    margin: 1.25rem 0;
    padding: .25rem 0 .25rem 1rem;
    border-left: 4px solid var(--brand-primary, #c52b6c);
    color: var(--text-heading, #0b0f19);
    font-size: clamp(1.125rem, 2vw, 1.375rem);
    font-weight: 600;
    line-height: 1.45;
}
.team-quote p {
    margin: 0;
}
.team-featured-details {
    margin-top: 1.25rem;
    color: var(--text-body, #333333);
    line-height: 1.65;
}
.team-featured-details summary {
    width: fit-content;
    color: var(--brand-secondary-dark, #006a8c);
    cursor: pointer;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: .2em;
}
.team-featured-details > :not(summary) {
    margin-top: 1rem;
}
.team-featured-details h3 {
    font-size: 1.125rem;
}

.team-groups {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: clamp(1.75rem, 3vw, 2.5rem) clamp(1rem, 2.2vw, 1.75rem);
    align-items: start;
}
.team-group {
    display: grid;
    grid-template-columns: subgrid;
    grid-column: 1 / -1;
    align-content: start;
    min-width: 0;
}
.team-group-header,
.team-group .team-cards,
.team-group .team-apprenticeship-note {
    grid-column: 1 / -1;
}
.team-group-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem 2rem;
    margin-bottom: .75rem;
}
.team-group-header h2 {
    margin: 0;
    font-size: clamp(1.25rem, 2.3vw, 1.75rem);
    letter-spacing: .04em;
}
.team-apprenticeship-note {
    margin: .75rem 0 0;
    color: var(--text-muted, #565973);
    font-size: .9375rem;
}
.team-apprenticeship-note a {
    color: var(--brand-secondary-dark, #006a8c) !important;
    font-weight: 700;
    text-underline-offset: .18em;
}
.team-cards {
    display: grid;
    grid-template-columns: subgrid;
    row-gap: clamp(1rem, 2.2vw, 1.75rem);
}
.team-card {
    position: relative;
    container-type: inline-size;
    min-width: 0;
    border: 1px solid var(--border-subtle, #e6e6e6);
    border-radius: 1.25rem;
    background: var(--surface-white, #ffffff);
    box-shadow: 0 .25rem 1rem rgba(11, 15, 25, .06);
    transition: box-shadow .25s ease, transform .25s ease;
}
.team-card:hover,
.team-card:focus-visible {
    transform: translateY(-4px);
    box-shadow: 0 .9rem 2rem rgba(11, 15, 25, .14);
}
.team-card:focus-visible {
    outline-offset: 4px;
}
.team-card:hover,
.team-card:focus-within {
    z-index: 2;
}
.team-card-visual {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4 / 5;
    margin: 0;
    border-radius: calc(1.25rem - 1px) calc(1.25rem - 1px) 0 0;
    background: var(--surface-beige, #f2ebe4);
}
.team-card-visual img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 25%;
    transition: transform .35s ease;
}
.team-card:hover .team-card-visual img,
.team-card:focus-visible .team-card-visual img {
    transform: scale(1.04);
}
.team-card-intro {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    padding: 1rem;
    color: var(--text-on-brand, #ffffff);
    background: rgba(11, 15, 25, .88);
    opacity: 0;
    transform: translateY(1rem);
    transition: opacity .2s ease, transform .2s ease;
}
.team-card:hover .team-card-intro,
.team-card:focus-visible .team-card-intro {
    opacity: 1;
    transform: translateY(0);
}
.team-card-content {
    padding: .8rem .9rem 1rem;
}
.team-card-content h3 {
    margin: 0 0 .25rem;
    color: var(--text-heading, #0b0f19);
    font-size: clamp(1.0625rem, 1.7vw, 1.25rem);
    font-weight: 700;
    line-height: 1.25;
}
.team-card-role {
    margin: 0 0 .75rem;
    color: var(--text-muted, #565973);
    font-size: .875rem;
    line-height: 1.4;
}

.team-language-badges,
.team-skills {
    display: flex;
    flex-wrap: wrap;
    gap: .375rem;
    margin: .75rem 0 0;
    padding: 0;
    list-style: none;
}
.team-language-badge,
.team-skills li {
    display: inline-flex;
    align-items: center;
    min-height: 1.65rem;
    padding: .2rem .55rem;
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 700;
    line-height: 1.2;
}
.team-language-badge {
    border: 1px solid var(--brand-secondary-dark, #006a8c);
    color: var(--brand-secondary-dark, #006a8c);
    background: var(--surface-white, #ffffff);
}
.team-skills li {
    border: 1px solid var(--border-medium, #dadada);
    color: var(--text-body, #333333);
    background: var(--surface-soft, #faf2eb);
    font-weight: 500;
}
.team-person-since {
    margin: .75rem 0 0;
    color: var(--text-muted, #565973);
    font-size: .8125rem;
}
.team-person-gln {
    position: relative;
    margin: .75rem 0 0;
    color: var(--text-body, #333333);
    font-size: .8125rem;
}
.team-person-gln-info {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.25rem;
    height: 1.25rem;
    margin-left: .2rem;
    border-radius: 50%;
    color: var(--brand-secondary-dark, #006a8c);
    cursor: help;
}
.team-person-gln-tooltip {
    position: absolute;
    z-index: 5;
    bottom: calc(100% + .5rem);
    left: 0;
    display: none;
    width: min(20rem, 80vw);
    padding: .75rem;
    border: 1px solid var(--border-subtle, #e6e6e6);
    border-radius: .75rem;
    color: var(--text-body, #333333);
    background: var(--surface-white, #ffffff);
    box-shadow: 0 .5rem 1.5rem rgba(11, 15, 25, .14);
    line-height: 1.5;
}
.team-card .team-person-gln-tooltip {
    width: min(20rem, calc(100cqi - 2.5rem));
}
.team-person-gln-info:hover + .team-person-gln-tooltip,
.team-person-gln-info:focus + .team-person-gln-tooltip {
    display: block;
}

.team-groups.reveal-ready .team-card {
    opacity: 0;
    transform: translateY(1rem);
    transition: opacity .45s ease var(--reveal-delay, 0ms), transform .45s ease var(--reveal-delay, 0ms), box-shadow .25s ease;
}
.team-groups.reveal-ready .team-card.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (min-width: 576px) {
    .team-groups { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .team-group[data-span="1"] { grid-column: span 1; }
}
@media (min-width: 768px) {
    .team-featured { grid-template-columns: minmax(0, .9fr) minmax(0, 1fr); }
    .team-card-content { padding: 1.1rem 1.2rem 1.35rem; }
}
@media (min-width: 992px) {
    .team-groups { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .team-group[data-span="2"] { grid-column: span 2; }
}
@media (min-width: 1200px) {
    .team-groups { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .team-group[data-span="3"] { grid-column: span 3; }
}
@media (max-width: 767.98px) {
    .team-featured { grid-template-columns: minmax(0, 1fr); }
    .team-featured-media { max-width: 28rem; width: 100%; margin-inline: auto; }
    .team-group-header { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 420px) {
    .team-stats { padding: .9rem .5rem; }
    .team-stat-label { font-size: .7rem; }
    .team-group-photo::before { left: -.75rem; }
    .team-group-photo::after { right: -.75rem; }
}
@media (prefers-reduced-motion: reduce) {
    .team-group-photo img,
    .team-tile > a,
    .team-portrait,
    .team-lang-filter label,
    .team-card,
    .team-card-visual img,
    .team-card-intro {
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
    }
    .team-groups.reveal-ready .team-card,
    .team-groups.reveal-ready .team-card.is-visible {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* Sprach-Filter (CSS-only via :checked + ~) ------------------ */
.team-lang-filter {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    justify-content: center;
    margin: 0 0 2rem;
    padding: 0;
    list-style: none;
}
.team-lang-filter input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.team-lang-filter label {
    cursor: pointer;
    padding: .4rem 1rem;
    border-radius: 999px;
    border: 1px solid var(--bs-border-color, #dee2e6);
    font-size: .9375rem;
    line-height: 1.3;
    background: var(--surface-white, #ffffff);
    transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.team-lang-filter input[type="radio"]:checked + label {
    background: var(--brand-secondary-dark, #006a8c);
    color: #fff;
    border-color: var(--brand-secondary-dark, #006a8c);
}
.team-lang-filter input[type="radio"]:focus-visible + label {
    outline: 2px solid var(--bs-primary, #d63384);
    outline-offset: 2px;
}
