:root {
    --light-blue: #d9e8f5;
    --dark-blue: #4a6d8c;
    --navy: #1e3a5f;
    --white: #ffffff;
    --text: #333333;
    --bg-light: #f4f8fc;
}

* {
    box-sizing: border-box;
}

html, body {
    font-family: 'Times New Roman', serif;
    margin: 0;
    padding: 0;
    max-width: 100%;
    overflow-x: hidden;
    color: var(--text);
    background-color: var(--white);
}

/* ============================
   HEADER
   ============================ */
.header {
    background-color: var(--light-blue);
    padding: 40px 5vw;
    width: 100%;
}

.header-content {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

.header h1 {
    color: var(--dark-blue);
    font-size: 3.8rem;
    margin: 0;
    line-height: 1.15;
}

.tagline {
    font-style: italic;
    margin-top: 10px;
    font-size: 1.4rem;
    color: var(--text);
}

.logo-top {
    max-height: 250px;
    width: auto;
    flex-shrink: 0;
}

/* ============================
   MAIN CONTENT
   ============================ */
.content-wrapper {
    margin-top: 40px;
    padding: 0 5vw;
    overflow-x: hidden;
}

.section {
    margin-bottom: 80px;
    text-align: center;
}

h2 {
    color: var(--dark-blue);
    font-size: 2rem;
    border-bottom: 1px solid var(--light-blue);
    display: inline-block;
    padding-bottom: 10px;
    margin-bottom: 25px;
}

/* ============================
   TEXT BLOCK (Unser Verein)
   ============================ */
.text-block {
    text-align: justify;
    hyphens: auto;
    line-height: 1.8;
}

.text-block::after {
    content: "";
    display: block;
    clear: both;
}

.members {
    float: right;
    margin: 0 0 15px 25px;
    width: 320px;
    height: auto;
    border-radius: 6px;
}

.text-block p {
    margin: 0;
    text-align: justify;
    hyphens: auto;
    line-height: 1.8;
}

details summary {
    cursor: pointer;
    color: var(--dark-blue);
    font-weight: bold;
    margin-top: 12px;
    text-align: left;
}

details p {
    margin-top: 12px;
    text-align: justify;
    hyphens: auto;
    line-height: 1.8;
}

/* ============================
   ANGEBOT BOX
   ============================ */
.offer-box {
    background-color: var(--light-blue);
    padding: 30px 40px;
    border-radius: 50px 0 0 50px;
    width: 80%;
    margin: 0 calc(-5vw) 0 auto;
    text-align: justify;
    hyphens: auto;
    box-shadow: 2px 4px 10px rgba(0,0,0,0.05);
    overflow: hidden;
}

.offer-box h3 {
    margin-top: 0;
    color: var(--dark-blue);
    text-align: center;
    font-size: 1.6rem;
}

.offer-box p {
    margin-bottom: 0;
    line-height: 1.7;
}

/* ============================
   LEHRER
   ============================ */
.teacher-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.teacher-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 20px 15px;
    background-color: var(--bg-light);
    border-radius: 10px;
    border: 1px solid var(--light-blue);
}

.profile-placeholder {
    width: 150px;
    height: 150px;
    background-color: #ddd;
    border-radius: 50%;
    margin-bottom: 12px;
}

.teacher-info {
    line-height: 1.5;
}

/* ============================
   CTA
   ============================ */
.cta-section {
    text-align: center;
    padding: 30px 20px;
    margin-top: 60px;
    margin-bottom: 60px;
}

.cta-section h3 {
    font-size: 1.3rem;
    color: var(--text);
    margin-bottom: 20px;
}

.cta-button {
    background-color: var(--navy);
    color: white;
    padding: 18px 45px;
    border-radius: 40px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1rem;
    display: inline-block;
    letter-spacing: 1px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    transition: background 0.2s ease, transform 0.2s ease;
}

.cta-button:hover {
    background-color: var(--dark-blue);
    transform: translateY(-2px);
}

/* ============================
   FOOTER
   ============================ */
.footer {
    background-color: var(--light-blue);
    width: 100%;
    padding: 50px 5vw 30px;
    text-align: center;
    line-height: 1.8;
    box-sizing: border-box;
}

.footer-contact {
    margin-bottom: 25px;
}

.contact {
    width: 100%;
    max-width: 550px;
    height: auto;
    margin: 0 auto;
}

.footer-social {
    display: flex;
    gap: 40px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

.social-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.social-icon {
    width: 22px;
    height: 22px;
    fill: var(--dark-blue);
    flex-shrink: 0;
}

.footer-social a {
    color: var(--dark-blue);
    text-decoration: none;
    font-weight: bold;
}

.footer-social a:hover {
    color: var(--navy);
    text-decoration: underline;
}

.footer-legal {
    margin-top: 20px;
    font-size: 0.85rem;
    border-top: 1px solid rgba(0,0,0,0.1);
    padding-top: 20px;
}

.footer-legal a {
    color: var(--dark-blue);
    text-decoration: none;
}

.footer-legal a:hover {
    text-decoration: underline;
}

.footer-legal span {
    margin: 0 10px;
}

/* ============================
   MOBILE  ≤ 768px
   ============================ */
@media (max-width: 768px) {

    /* Header: Logo unter den Titel */
    .header {
        padding: 30px 5vw;
    }

    .header-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 20px;
    }

    .header h1 {
        font-size: 2.4rem;
        br { display: none; } /* einzeilig auf Mobil */
    }

    .tagline {
        font-size: 1.1rem;
    }

    .logo-top {
        max-height: 160px;
    }

    /* Vereinsfoto: kein Float, zentriert */
    .members {
        float: none;
        display: block;
        width: 100%;
        max-width: 420px;
        margin: 0 auto 20px;
        border-radius: 8px;
    }

    /* Sektionen enger */
    .section {
        margin-bottom: 50px;
    }

    h2 {
        font-size: 1.6rem;
    }

    /* Angebots-Box: volle Breite, eckig */
    .offer-box {
        width: 100%;
        border-radius: 12px;
        margin: 0;
        padding: 24px 20px;
    }

    .offer-box h3 {
        font-size: 1.3rem;
    }

    /* Lehrer: 2 Spalten auf Mobil */
    .teacher-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }

    .profile-placeholder {
        width: 90px;
        height: 90px;
    }

    .teacher-card {
        padding: 14px 10px;
    }

    /* CTA Button volle Breite */
    .cta-section {
        margin-top: 20px;
        margin-bottom: 40px;
        padding: 20px 5vw;
    }

    .cta-button {
        display: block;
        width: 100%;
        max-width: 360px;
        margin: 0 auto;
        padding: 16px 20px;
        font-size: 1rem;
        text-align: center;
    }

    /* Footer */
    .footer {
        padding: 40px 5vw 24px;
    }

    .footer-social {
        flex-direction: column;
        align-items: center;
        gap: 16px;
    }

    .contact {
        max-width: 100%;
    }
}

/* ============================
   SEHR KLEINE SCREENS  ≤ 400px
   ============================ */
@media (max-width: 400px) {
    .header h1 {
        font-size: 1.9rem;
    }

    .teacher-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .profile-placeholder {
        width: 70px;
        height: 70px;
    }
}

/* ============================
   LEGAL PAGES (Impressum / Datenschutz)
   ============================ */
.legal-section {
    text-align: left;
    max-width: 800px;
    margin: 0 auto 80px;
}

.legal-content h3 {
    color: var(--dark-blue);
    font-size: 1.3rem;
    margin-top: 36px;
    margin-bottom: 10px;
    border-bottom: 1px solid var(--light-blue);
    padding-bottom: 6px;
}

.legal-content h4 {
    color: var(--dark-blue);
    font-size: 1rem;
    margin-top: 20px;
    margin-bottom: 6px;
}

.legal-content p {
    line-height: 1.8;
    margin-bottom: 14px;
    hyphens: auto;
}

.legal-source {
    margin-top: 40px;
    font-size: 0.85rem;
    color: #888;
}

.back-link {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--light-blue);
}

.back-link a {
    color: var(--dark-blue);
    text-decoration: none;
    font-weight: bold;
}

.back-link a:hover {
    text-decoration: underline;
}