/* ============================================================
   TEAMTAFEL – Stylesheet
   Angelehnt an style-FSde.css
   Mit 5 Farben: grün, gelb, rot, schwarz, lila
   + Personen-Auswahl wie Navigation
   + Logo 300 × 300 (überall)
   ============================================================ */

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
}

body {
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    line-height: 1.6;
    color: #222;
    background: #fff;
}

a {
    color: #2196F3;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* ============================================================
   LOGO
   ============================================================ */
.logo-tt {
    text-align: center;
    padding: 2rem 1rem 0.5rem;
}

.logo-tt img {
    width: 300px;
    height: 300px;
    object-fit: contain;
    display: block;
    margin: 0 auto;
    border-radius: 20px;
    background: #fff;
    padding: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* ============================================================
   NAVI
   ============================================================ */
.hauptnav-ausklapp {
    background: #fff;
    border-top: 1px solid #eaeaea;
    border-bottom: 1px solid #eaeaea;
    margin-top: 1rem;
    text-align: center;
}

.navi-toggle {
    display: none;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 999px;
    padding: 0.6rem 1.2rem;
    margin: 0.75rem auto;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
}

.navi-toggle-pfeil {
    font-size: 0.8rem;
    margin-left: 0.4rem;
}

.navi-haupt {
    list-style: none;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    margin: 0;
}

.navi-punkt {
    position: relative;
}

.navi-link {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    border-radius: 999px;
    color: #333;
    font-weight: 500;
    transition: background 0.2s, color 0.2s;
    background: transparent;
    border: none;
    font-size: 1rem;
    cursor: pointer;
    font-family: inherit;
    text-decoration: none;
}

.navi-link:hover {
    background: rgba(0, 0, 0, 0.06);
    text-decoration: none;
    color: #333;
}

.navi-link.aktiv {
    background: #333;
    color: #fff;
}

.navi-unter {
    list-style: none;
    padding: 0;
    margin: 0;
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    border: 1px solid #eaeaea;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    min-width: 220px;
    z-index: 50;
    padding: 0.5rem 0;
}

.navi-punkt.offen .navi-unter {
    display: block;
}

.navi-unter li a {
    display: block;
    padding: 0.5rem 1.25rem;
    color: #333;
}

.navi-unter li a:hover {
    background: rgba(0, 0, 0, 0.06);
    text-decoration: none;
}

.pfeil {
    font-size: 0.7rem;
    margin-left: 0.3rem;
}

/* ============================================================
   KALENDER
   ============================================================ */
.kalender-wrap {
    max-width: 850px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.kalender-kopf {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    gap: 0.5rem;
}

.kalender-kopf h2 {
    margin: 0;
    font-size: 1.4rem;
    color: #2196F3;
    text-align: center;
    flex: 1;
}

.kalender-pfeil {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    background: #f0f0f0;
    color: #333;
    font-weight: bold;
    font-size: 1rem;
    transition: background 0.2s;
    text-decoration: none;
}

.kalender-pfeil:hover {
    background: #e0e0e0;
    text-decoration: none;
    color: #333;
}

/* ============================================================
   PERSONEN-AUSWAHL (wie Navigation)
   ============================================================ */
.personen-auswahl {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin: 1rem 0;
    padding: 0.5rem 0;
    text-align: center;
    border-top: 1px solid #eaeaea;
    border-bottom: 1px solid #eaeaea;
}

.person-btn {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    border-radius: 999px;
    background: transparent;
    color: #333;
    font-size: 1rem;
    font-weight: 500;
    font-family: inherit;
    transition: background 0.2s, color 0.2s;
    text-decoration: none;
    white-space: nowrap;
    border: none;
}

.person-btn:hover {
    background: rgba(0, 0, 0, 0.06);
    text-decoration: none;
    color: #333;
}

.person-btn.aktiv {
    background: #333;
    color: #fff;
    font-weight: 500;
}

.person-btn.aktiv:hover {
    background: #333;
    color: #fff;
}

/* ============================================================
   MONATSTABELLE
   ============================================================ */
table.monat {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

table.monat th {
    padding: 0.6rem 0.3rem;
    background: #F5F5F5;
    border: 1px solid #e0e0e0;
    font-size: 0.9rem;
    font-weight: 600;
}

table.monat td {
    border: 1px solid #e0e0e0;
    padding: 0.3rem 0.2rem 0.4rem;
    text-align: center;
    vertical-align: top;
    height: 80px;
    position: relative;
    cursor: pointer;
    transition: background 0.15s;
    background: #fff;
}

table.monat td:hover {
    background: #f9f9f9;
}

table.monat td.leer {
    background: #FAFAFA;
    cursor: default;
}

table.monat td.leer:hover {
    background: #FAFAFA;
}

table.monat td.feiertag {
    background: #F3E5F5;
}

table.monat td.feiertag:hover {
    background: #EDE0F0;
}

table.monat td.heute {
    outline: 3px solid #2196F3;
    outline-offset: -3px;
}

.tag-nr {
    font-weight: bold;
    font-size: 1rem;
    display: block;
    margin-bottom: 0.25rem;
}

.feiertag-name {
    font-size: 5.5pt;
    color: #6A1B9A;
    font-weight: bold;
    margin-top: 3px;
    text-align: center;
    line-height: 1.1;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.punkte {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    justify-content: center;
    margin-top: 0.2rem;
}

.punkt {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.punkt.gruen   { background: #4CAF50; }
.punkt.gelb    { background: #FFC107; }
.punkt.rot     { background: #F44336; }
.punkt.schwarz { background: #000; }
.punkt.lila    { background: #9C27B0; }

.zeitbalken {
    display: flex;
    gap: 1px;
    justify-content: center;
    margin-top: 0.15rem;
    height: 8px;
}

.zeitbalken span {
    flex: 1;
    max-width: 4px;
    border-radius: 1px;
}

.zeitbalken span.gruen   { background: #4CAF50; }
.zeitbalken span.gelb    { background: #FFC107; }
.zeitbalken span.rot     { background: #F44336; }
.zeitbalken span.schwarz { background: #000; }
.zeitbalken span.lila    { background: #9C27B0; }
.zeitbalken span.leer    { background: #eee; }

/* ============================================================
   LEGENDE
   ============================================================ */
.legende {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.2rem;
    margin: 1.5rem 0;
    padding: 1rem;
    background: #F9F9F9;
    border-radius: 10px;
}

.legende-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.legende-item .punkt {
    width: 14px;
    height: 14px;
}

/* ============================================================
   MODAL
   ============================================================ */
.modal-bg {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 1000;
    padding: 1rem;
    overflow-y: auto;
}

.modal-bg.offen {
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.modal-box {
    background: #fff;
    border-radius: 14px;
    max-width: 700px;
    width: 100%;
    margin: 2rem auto;
    padding: 1.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
    position: relative;
}

.modal-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: #f0f0f0;
    border: none;
    border-radius: 50%;
    width: 34px;
    height: 34px;
    font-size: 1.2rem;
    cursor: pointer;
    line-height: 1;
}

.modal-close:hover {
    background: #e0e0e0;
}

.modal-box h3 {
    margin: 0 0 1rem;
    color: #2196F3;
    text-align: center;
}

.modal-tabelle {
    width: 100%;
    border-collapse: collapse;
}

.modal-tabelle th,
.modal-tabelle td {
    padding: 0.5rem 0.7rem;
    border-bottom: 1px solid #eaeaea;
    text-align: left;
    font-size: 0.95rem;
}

.modal-tabelle th {
    background: #F5F5F5;
    font-weight: 600;
}

.modal-tabelle td.zeit {
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    color: #444;
}

.modal-hinweis {
    margin-top: 1rem;
    padding: 0.8rem;
    background: #FFF9C4;
    border-left: 4px solid #FFC107;
    border-radius: 6px;
    font-size: 0.9rem;
}

.modal-person {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 0.4rem;
    vertical-align: middle;
}

/* ============================================================
   KACHELN
   ============================================================ */
.werbebereich {
    max-width: 850px;
    margin: 2rem auto 1rem;
    padding: 0 1rem;
}

.kachel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
}

.kachel {
    display: block;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    transition: transform 0.15s, box-shadow 0.15s;
}

.kachel:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
    text-decoration: none;
}

.kachel img {
    width: 100%;
    height: 120px;
    object-fit: contain;
    display: block;
    padding: 0.5rem;
    background: #fff;
}

.werbehinweis {
    max-width: 850px;
    margin: 1rem auto;
    padding: 0 1rem;
    font-size: 0.8rem;
    color: #666;
    text-align: center;
}

/* ============================================================
   FOOTER
   ============================================================ */
.startseite-footer {
    max-width: 850px;
    margin: 2rem auto 0;
    padding: 0 1rem 2rem;
    text-align: center;
}

.trennlinie {
    border: none;
    border-top: 1px solid #eaeaea;
    margin: 1rem 0;
}

.footer-inhalt p {
    margin: 0.3rem 0;
    font-size: 0.9rem;
    color: #666;
}

.footer-inhalt a {
    color: inherit;
}

.footer-inhalt a:hover {
    text-decoration: underline;
}

/* ============================================================
   MOBIL
   ============================================================ */
@media (max-width: 700px) {
    .navi-toggle {
        display: inline-block;
    }

    .navi-haupt {
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 0.5rem;
    }

    .navi-haupt.offen {
        display: flex;
    }

    .navi-punkt {
        width: 100%;
    }

    .navi-link {
        width: 100%;
        text-align: center;
    }

    .navi-unter {
        position: static;
        transform: none;
        box-shadow: none;
        border: none;
        background: rgba(0, 0, 0, 0.03);
        margin-top: 0.3rem;
    }

    table.monat td {
        height: 60px;
        padding: 0.2rem 0.1rem;
    }

    .tag-nr {
        font-size: 0.85rem;
    }

    .feiertag-name {
        font-size: 5pt;
    }

    .logo-tt img {
        width: 200px;
        height: 200px;
    }

    .kalender-kopf h2 {
        font-size: 1.1rem;
    }

    .person-btn {
        font-size: 1rem;
        padding: 0.5rem 1rem;
    }
}

@media (max-width: 400px) {
    .punkt { width: 8px; height: 8px; }
    .zeitbalken { display: none; }
}