/* Baar Zeitgeist Font */
@import url('https://fonts.cdnfonts.com/css/baar-zeitgeist');
@import url('https://fonts.googleapis.com/css2?family=PT+Sans:wght@400;700&display=swap');

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'PT Sans', 'Baar Zeitgeist', 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
:root {
    --header-height: 80px;
}

header {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(15px);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    color: #333;
    font-size: 26px;
    font-weight: 700;
    font-family: 'Baar Zeitgeist', 'PT Sans', 'Arial', sans-serif;
    letter-spacing: 0.02em;
}

.logo .mirrored {
    display: inline-block;
    transform: scaleX(-1);
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 30px;
}

.main-nav a {
    text-decoration: none;
    color: #333;
    font-weight: 600;
    font-family: 'Baar Zeitgeist', 'PT Sans', 'Arial', sans-serif;
    padding: 10px 18px;
    border-radius: 25px;
    transition: all 0.4s ease;
    position: relative;
}

.main-nav a:hover {
    background: linear-gradient(135deg, #FFE66D 0%, #FF8FB1 50%, #C197D2 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 143, 177, 0.4);
}

/* Section Base Styles */
.section {
    padding: 100px 0 80px;
    position: relative;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.section {
    z-index: 1;
}

.section:not(:last-of-type) {
    padding-bottom: 180px;
    margin-bottom: -100px;
    clip-path: polygon(
        0 0,
        100% 0,
        100% calc(100% - 100px),
        95% calc(100% - 80px),
        90% calc(100% - 65px),
        80% calc(100% - 45px),
        70% calc(100% - 30px),
        60% calc(100% - 20px),
        50% calc(100% - 15px),
        40% calc(100% - 20px),
        30% calc(100% - 30px),
        20% calc(100% - 45px),
        10% calc(100% - 65px),
        5% calc(100% - 80px),
        0 calc(100% - 100px)
    );
}

.section:nth-child(1) { z-index: 5; }
.section:nth-child(2) { z-index: 4; }
.section:nth-child(3) { z-index: 3; }
.section:nth-child(4) { z-index: 2; }
.section:nth-child(5) { z-index: 1; }

.section:first-of-type {
    padding-top: calc(var(--header-height) + 20px);
}

.section .container {
    position: relative;
    z-index: 2;
}

.section h2 {
    font-size: 48px;
    margin-bottom: 60px;
    text-align: center;
    color: #333;
    font-weight: 700;
    font-family: 'Baar Zeitgeist', 'PT Sans', 'Arial', sans-serif;
    letter-spacing: 0.05em;
}

/* Startseite Section */
.startseite-section {
    background-image: url('../images/backgrounds/IMG_0622.jpg');
}

.startseite-content {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.startseite-teil1 {
    background: transparent;
    padding: 30px;
}

.aktuelles-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

.aktuelles-content > * {
    width: 100%;
    max-width: 600px;
}

.foto-platz {
    border-radius: 10px;
    overflow: hidden;
}

.foto-platz img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 10px;
    object-fit: cover;
    max-height: 400px;
}

.foto-platz.empty {
    height: 200px;
    background: #f0f0f0;
    border: 2px dashed #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
}

.placeholder-image {
    color: #999;
    font-style: italic;
}

/* Mehrere News im Editor durch eine horizontale Linie trennen */
.aktuelles-box {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.08), 0 5px 15px rgba(0, 0, 0, 0.05);
    padding: 30px 40px;
}

.aktuelles-box p {
    color: #222;
    margin-bottom: 10px;
}

.aktuelles-box h3,
.aktuelles-box h4 {
    color: #333;
    margin-bottom: 8px;
    font-family: 'Baar Zeitgeist', 'PT Sans', 'Arial', sans-serif;
}

.aktuelles-box h3 {
    font-size: 22px;
}

.aktuelles-box h4 {
    font-size: 18px;
}

.aktuelles-box hr {
    border: none;
    border-top: 1px solid rgba(51, 51, 51, 0.15);
    margin: 20px 0;
}

.aktuelles-box > :last-child {
    margin-bottom: 0;
}

.startseite-teil2 {
    background: transparent;
    padding: 30px;
}

.text-content p {
    font-size: 16px;
    line-height: 1.8;
    color: #555;
}

/* Über uns Section */
.ueber-uns-section {
    background-image: url('../images/backgrounds/IMG_1707.jpg');
}

/* Eltern Section */
.eltern-section {
    background-image: url('../images/backgrounds/IMG_1708.jpg');
}

/* Stellenangebote Section */
.stellenangebote-section {
    background-image: url('../images/backgrounds/IMG_1712.jpg');
}

/* Kontakt Section */
.kontakt-section {
    background-image: url('../images/backgrounds/IMG_1713.jpg');
}

/* Button Grid */
.button-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.button-grid.two-column-layout {
    grid-template-columns: repeat(2, 1fr);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Triangle Layout for Über uns */
.triangle-layout {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
}

.triangle-top {
    width: 100%;
    max-width: 400px;
}

.triangle-bottom {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 60px;
    width: 100%;
    max-width: 800px;
}

.button-item {
    text-align: center;
    background: transparent;
    padding: 20px;
}

/* Section Buttons */
.section-button {
    width: 180px;
    height: 180px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.4s ease;
    margin: 0 auto 15px;
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.section-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: transparent;
    transition: all 0.4s ease;
}

.section-button:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.2);
}

.section-button:hover::before {
    background: rgba(0, 0, 0, 0.2);
}

.section-button span {
    position: relative;
    z-index: 2;
    color: white;
    font-weight: 700;
    font-size: 18px;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.6);
    display: block;
    padding: 20px;
}

/* Button Background Images */
.verein-btn { background-image: url('../images/buttons/IMG_1729.jpg'); }
.krippe-btn { background-image: url('../images/buttons/IMG_1730.jpg'); }
.kindergarten-btn { background-image: url('../images/buttons/IMG_1733.jpg'); }
.termine-btn { background-image: url('../images/buttons/IMG_1734.jpg'); }
.elternarbeit-btn { background-image: url('../images/buttons/IMG_1736.jpg'); }
.informationen-btn { background-image: url('../images/buttons/IMG_1739.jpg'); }
.formulare-btn { background-image: url('../images/buttons/IMG_1740.jpg'); }
.fachkraefte-btn { background-image: url('../images/buttons/IMG_1741.jpg'); }

/* Job Listings */
.job-listings {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 40px;
}

.job-item {
    text-align: center;
    background: transparent;
    padding: 20px;
}

.job-btn {
    width: 200px;
    height: 100px;
    border-radius: 10px;
}

.praktikanten-btn { background-image: url('../images/buttons/IMG_1730.jpg'); }
.bufdi-btn { background-image: url('../images/buttons/IMG_1733.jpg'); }
.verwaltung-btn { background-image: url('../images/buttons/IMG_1734.jpg'); }

/* Kontakt Content */
.kontakt-content {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.08), 0 5px 15px rgba(0, 0, 0, 0.05);
    padding: 40px;
    max-width: 600px;
    margin: 0 auto;
}

.kontakt-info h3 {
    color: #333;
    margin-bottom: 20px;
    font-size: 28px;
    font-weight: 700;
    font-family: 'Baar Zeitgeist', 'PT Sans', 'Arial', sans-serif;
}

.kontakt-info h4 {
    color: #333;
    margin: 20px 0 10px;
    font-size: 20px;
    font-weight: 600;
    font-family: 'Baar Zeitgeist', 'PT Sans', 'Arial', sans-serif;
}

.kontakt-info p {
    margin-bottom: 15px;
    line-height: 1.8;
    font-size: 16px;
}

.kontakt-info .address,
.kontakt-info .contact-details p,
.kontakt-info .opening-hours {
    color: #222;
    font-size: 17px;
    line-height: 1.8;
}

.kontakt-info .address {
    font-weight: 700;
    margin-bottom: 15px;
}

/* Footer */
footer {
    background: linear-gradient(to bottom, rgba(255, 230, 109, 0.7) 0%, rgba(255, 182, 193, 0.7) 100%);
    backdrop-filter: blur(15px);
    color: #333;
    padding: 50px 0;
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 30px;
}

.footer-link {
    background: rgba(51, 51, 51, 0.8);
    color: white;
    padding: 14px 32px;
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.4s ease;
    font-weight: 600;
    font-size: 16px;
    font-family: 'Baar Zeitgeist', 'Arial', sans-serif;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    display: inline-block;
}

.footer-link:hover {
    background: linear-gradient(135deg, #FFE66D 0%, #FF8FB1 50%, #C197D2 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 143, 177, 0.4);
}

/* Button Text */
.button-text {
    margin-top: 15px;
    font-family: 'Baar Zeitgeist', 'PT Sans', 'Arial', sans-serif;
}

.button-text h3 {
    font-size: 22px;
    color: #333;
    margin-bottom: 10px;
    font-weight: 700;
    font-family: 'Baar Zeitgeist', 'PT Sans', 'Arial', sans-serif;
}

.button-text h4 {
    font-size: 16px;
    color: #555;
    margin-bottom: 8px;
    font-weight: 600;
    font-family: 'Baar Zeitgeist', 'PT Sans', 'Arial', sans-serif;
}

.button-text p {
    font-size: 15px;
    color: #666;
    margin: 5px 0;
    line-height: 1.6;
}

/* Responsive Design */
@media (max-width: 1100px) {
    :root {
        --header-height: 140px;
    }

    header .container {
        flex-direction: column;
        gap: 15px;
    }

    .main-nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }
}

@media (max-width: 1024px) {
    .section h2 {
        font-size: 40px;
    }

    .button-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }

    .triangle-bottom {
        gap: 40px;
        max-width: 600px;
    }
}

@media (max-width: 768px) {
    .logo h1 {
        font-size: 20px;
    }

    .main-nav a {
        padding: 8px 12px;
        font-size: 14px;
    }

    .section {
        padding: 120px 0 120px;
    }

    .section:not(:last-of-type) {
        padding-bottom: 200px;
        margin-bottom: -80px;
        clip-path: polygon(
            0 0,
            100% 0,
            100% calc(100% - 80px),
            95% calc(100% - 65px),
            90% calc(100% - 52px),
            80% calc(100% - 36px),
            70% calc(100% - 24px),
            60% calc(100% - 16px),
            50% calc(100% - 12px),
            40% calc(100% - 16px),
            30% calc(100% - 24px),
            20% calc(100% - 36px),
            10% calc(100% - 52px),
            5% calc(100% - 65px),
            0 calc(100% - 80px)
        );
    }


    .section h2 {
        font-size: 32px;
        margin-bottom: 40px;
    }

    .aktuelles-content {
        gap: 20px;
    }

    .button-grid,
    .button-grid.two-column-layout {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .triangle-layout {
        gap: 30px;
    }

    .triangle-bottom {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .section-button {
        width: 150px;
        height: 150px;
    }

    .section-button span {
        font-size: 16px;
    }

    .footer-links {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }

    .job-listings {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .section h2 {
        font-size: 28px;
        letter-spacing: 0.03em;
    }

    .section-button {
        width: 130px;
        height: 130px;
    }

    .section-button span {
        font-size: 14px;
        padding: 15px;
    }

    .kontakt-content {
        padding: 30px 20px;
    }

    .aktuelles-box {
        padding: 25px 20px;
    }
}

/* Anchor Scrolling (smooth scrolling for nav links is done in script.js) */
html {
    scroll-padding-top: var(--header-height);
}

/* Subpage Styles */
.subpage-hero {
    padding: 30px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    margin-top: var(--header-height);
}

.subpage-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 230, 109, 0.6) 0%, rgba(255, 182, 193, 0.6) 100%);
    z-index: 1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: #333;
}

.hero-content h1 {
    font-size: 48px;
    font-weight: 700;
    font-family: 'Baar Zeitgeist', 'PT Sans', Arial, sans-serif;
    letter-spacing: 0.05em;
}

.subpage-section {
    padding: 80px 0;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    min-height: 60vh;
}

.subpage-content {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 50px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.08), 0 5px 15px rgba(0, 0, 0, 0.05);
    max-width: 900px;
    margin: 0 auto;
    transition: all 0.3s ease;
}

.subpage-body {
    font-size: 16px;
    line-height: 1.8;
    color: #222;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.5);
}

.subpage-body h2,
.subpage-body h3 {
    font-family: 'Baar Zeitgeist', 'PT Sans', Arial, sans-serif;
    color: #333;
    margin-top: 30px;
    margin-bottom: 15px;
}

.subpage-body h2 {
    font-size: 32px;
    border-bottom: 2px solid rgba(255, 143, 177, 0.3);
    padding-bottom: 10px;
}

.subpage-body h3 {
    font-size: 24px;
}

.subpage-body p {
    margin-bottom: 15px;
}

.subpage-body ul,
.subpage-body ol {
    margin-left: 30px;
    margin-bottom: 15px;
}

.subpage-body li {
    margin-bottom: 8px;
}

.subpage-additional {
    margin-top: 60px;
    padding-top: 30px;
    font-style: italic;
    font-size: 15px;
    opacity: 0.9;
}

.subpage-downloads {
    margin-top: 40px;
}

.subpage-download-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.subpage-download-list li {
    margin-bottom: 12px;
}

.subpage-download-list a {
    color: #333;
    font-weight: 700;
    text-decoration: none;
    border-bottom: 1px solid rgba(51, 51, 51, 0.35);
    transition: all 0.3s ease;
}

.subpage-download-list a:hover {
    color: #555;
    border-bottom-color: rgba(85, 85, 85, 0.65);
}

.subpage-download-size {
    margin-left: 8px;
    color: #666;
    font-size: 14px;
}

@media (max-width: 768px) {
    .subpage-hero {
        padding: 20px;
    }

    .hero-content h1 {
        font-size: 32px;
    }

    .subpage-section {
        padding: 40px 0;
        background-attachment: scroll;
    }

    .subpage-content {
        padding: 30px 20px;
    }
}