/* =========================================
   UNSER TEAM
   ========================================= */

.team-neu {
    width: 100%;
    max-width: 900px;
    margin: 0 auto 40px auto;
    box-sizing: border-box;
}


/* =========================================
   KOPFBEREICH
   ========================================= */

.team-kopf {
    background: #f1f6ff;
    border-radius: 18px;
    padding: 20px 30px;
    margin-bottom: 30px;
    box-sizing: border-box;
}

.team-titel {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 28px;
    margin-bottom: 20px;
}

.team-titel img {
    display: block;
    width: 100px;
    height: 100px;
    object-fit: contain;
    border-radius: 14px;
}

.team-titel h2 {
    margin: 0;
    color: #2864ad;
    font-size: 20px;
    line-height: 1.3;
}

.team-kopf p {
    margin: 0;
    color: #333333;
    font-size: 14px;
    line-height: 1.6;
}

/* =========================================
   SCHULLEITUNG
   ========================================= */

.team-bereich {
    margin: 35px auto;
    text-align: center;
}

.team-bereich h3 {
    margin: 0 0 20px 0;
    color: #2864ad;
    font-size: 18px;
}

.team-direktion {
    display: flex;
    justify-content: center;
}

.team-direktion > a {
    display: block;
    width: 230px;
    padding: 15px 15px 18px 15px;
    box-sizing: border-box;

    background: #f1f6ff;
    border-radius: 18px;
    box-shadow: 0 2px 7px rgba(0,0,0,0.12);

    text-align: center;
    text-decoration: none !important;

    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.team-direktion > a:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 18px rgba(0,0,0,0.18);
    text-decoration: none !important;
}

.team-direktion img {
    display: block;
    width: 200px;
    height: 250px;
    object-fit: cover;
    margin: 0 auto 14px auto;
    border-radius: 14px;
}

.team-direktion .team-name {
    display: block;
    color: #2864ad !important;
    font-size: 15px;
    font-weight: bold;
    line-height: 1.4;
    text-decoration: none !important;
}

.team-direktion .team-funktion {
    display: block;
    margin-top: 5px;
    color: #555555 !important;
    font-size: 13px;
    font-weight: normal;
    text-decoration: none !important;
}

/* =========================================
   LEHRERKARTEN
   ========================================= */

.team-lehrerbereich {
    margin: 45px auto 35px auto;
}

.team-lehrerbereich h3,
.team-neu > h3 {
    margin: 0 0 22px 0;
    color: #2864ad;
    font-size: 18px;
    text-align: center;
}

.team-raster {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 18px;
}

.team-raster > a {
    display: block;
    width: 205px;
    padding: 12px 12px 16px 12px;
    box-sizing: border-box;
    background: #f1f6ff;
    border-radius: 16px;
    box-shadow: 0 2px 7px rgba(0,0,0,0.12);
    text-align: center;
    text-decoration: none !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.team-raster > a:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 18px rgba(0,0,0,0.18);
    text-decoration: none !important;
}

.team-raster > a img {
    display: block;
    width: 181px;
    height: 220px;
    object-fit: cover;
    margin: 0 auto 13px auto;
    border-radius: 12px;
}

.team-raster > a .team-name {
    display: block;
    color: #2864ad !important;
    font-size: 14px;
    font-weight: bold;
    line-height: 1.35;
    text-decoration: none !important;
}

.team-raster > a .team-funktion {
    display: block;
    margin-top: 5px;
    color: #555555 !important;
    font-size: 12px;
    line-height: 1.35;
    text-decoration: none !important;
}


/* Platzhalter für noch fehlende Fotos */

.team-platzhalter {
    display: flex;
    width: 181px;
    height: 220px;
    margin: 0 auto 13px auto;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    border-radius: 12px;
    background: #e4efff;
    color: #2864ad !important;
    font-size: 32px;
    font-weight: bold;
}

/* =========================================
   TEAMFOTO
   ========================================= */

.teamfoto-abschluss {
    width: 100%;
    margin: 45px auto 20px auto;
    text-align: center;
}

.teamfoto-abschluss img {
    display: block;
    width: 100%;
    max-width: 850px;
    height: auto;
    margin: 0 auto;
    border-radius: 18px;
}

/* Teamfoto am Ende */

.team-abschluss {
    width: 100%;
    margin: 45px auto 20px auto;
    text-align: center;
}

.team-abschluss img {
    display: block;
    width: 100%;
    max-width: 850px;
    height: auto;
    margin: 0 auto;
    border-radius: 18px;
}

/* =========================================
   DIGITALE VISITENKARTE POPUP
   ========================================= */

.team-popup {
    display: none;
    position: fixed;
    z-index: 99999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(20, 35, 55, 0.65);
    align-items: center;
    justify-content: center;
    padding: 25px;
    box-sizing: border-box;
}

.team-popup-fenster {
    position: relative;
    width: 500px;
    max-width: 92vw;
    height: 94vh;
    max-height: 900px;
    background: #eef3f9;
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 15px 50px rgba(0,0,0,0.35);
}
.team-popup-fenster iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
}

.team-popup-schliessen {
    position: absolute;
    z-index: 10;
    top: 12px;
    right: 14px;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255,255,255,0.95);
    color: #2864ad;
    font-size: 27px;
    line-height: 36px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.18);
}

.team-popup-schliessen:hover {
    background: #ffffff;
    transform: scale(1.08);
}

.team-popup-fenster iframe {
    display: block;
    width: 111.12%;
    height: 111.12%;
    border: 0;

    transform: scale(0.90);
    transform-origin: top left;
}
/* =========================================
   POPUP AUF HANDY
   ========================================= */


/* =========================================
   POPUP HANDY
   ========================================= */

@media screen and (max-width: 600px) {

    .team-popup {
        padding: 6px;
        align-items: center;
        justify-content: center;
    }

    .team-popup-fenster {
        width: 96vw;
        max-width: 96vw;
        height: 94vh;
        max-height: 94vh;
        margin: 0;
        border-radius: 18px;
        overflow: hidden;
    }

    .team-popup-fenster iframe {
        display: block;
        width: 100%;
        height: 100%;
        border: 0;
        transform: none !important;
    }

    .team-popup-schliessen {
        top: 8px;
        right: 8px;
        width: 42px;
        height: 42px;
        z-index: 9999;
    }
}
