/* Grundlegende Stile */
body {
    font-family: 'Optima', sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Allgemeine Stile für den Header */
header {
    background-color: #ffffff; /* Weißer Hintergrund */
    color: #003366; /* Schriftfarbe in der Farbe des Logos */
    padding: 5px 0;
    box-sizing: border-box;
    width: calc(100% - 250px); /* Berücksichtigt Navigation */
    margin-left: 250px;
    border-bottom: 2px solid #003366; /* Trennlinie */
    text-align: center; /* Zentriert den Header */
}

/* Zentrierter Container für den Header-Inhalt */
.header-container {
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
}

/* Hauptüberschrift */
.header-container h1 {
    font-size: 48px;
    font-weight: normal;
    margin: 0;
    padding: 0;
    letter-spacing: 2px; /* Buchstabenabstand hinzufügen */
    color: #003366;
    line-height: 1;
}

/* Unterzeile (Jörg Passlack) */
.header-container .subtitle {
    font-size: 24px;
    font-weight: bold;
    letter-spacing: 18px; /* Buchstabenabstand hinzufügen */
    color: #003366;
}

/* Begrüßungstext */
.welcome-text h2 {
    font-size: 32px;
    color: #333;
    text-align: center;
    margin-bottom: 20px;
}

.welcome-text p {
    font-size: 16px;
    color: #555;
    text-align: justify;
    line-height: 1.6;
    margin: 20px 0;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Navigation Styling */
nav {
    background-color: #ffffff;
    color: #000;
    padding: 20px;
    width: 250px;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2);
}

nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: center;
    margin-top: 50px;
}

nav ul li {
    margin: 7px 0;
}

nav ul li a {
    color: #000;
    text-decoration: none;
    display: block;
    padding: 10px;
    background-color: #fff;
    border: 2px solid #003366;
    border-radius: 5px;
    transition: background-color 0.3s;
}

nav ul li a:hover {
    background-color: #eee;
}

/* Hauptinhalt */
.main-content {
    display: flex;
    justify-content: center;
    flex: 1;
    padding: 20px;
    margin-left: 250px;
}

.content {
    max-width: 1000px;
    width: 100%;
    background-color: #fff;
    padding: 20px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    box-sizing: border-box;
}

/* Flexbox-Container für die Kacheln */
.tiles-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px; /* Abstand zwischen den Kacheln */
    justify-content: space-between;
    padding: 0 10px;
    max-width: 1000px;
    margin: 0 auto;
}

/* Dynamische Kacheln */
.tile {
    background-color: #6a6a6a;
    color: #fff;
    padding: 20px;
    flex: 1 1 calc(33.333% - 20px); /* 3 Kacheln pro Zeile */
    box-sizing: border-box; /* Berücksichtigt Padding */
    text-align: left;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s, box-shadow 0.3s;
    font-size: 16px;
    line-height: 1.5;
    word-wrap: break-word;
    min-height: 250px; /* Erhöht die Mindesthöhe, damit Text passt */
}

/* Dynamische Höhe */
.tile p {
    margin: 0;
    padding: 0;
}

/* Mobile Ansicht: Kacheln nehmen volle Breite ein */
@media (max-width: 768px) {
    .tile {
        flex-basis: 100%; /* Jede Kachel nimmt die volle Breite ein */
    }
}

/* Footer */
footer {
    background: #333;
    color: #fff;
    text-align: center;
    padding: 10px 0;
    position: fixed;
    width: 100%;
    bottom: 0;
}

/* Mobile Ansicht: Navigation und Inhalt */
@media (max-width: 768px) {
    body {
        flex-direction: column;
    }

    nav {
        width: 100%;
        height: auto;
        position: relative;
    }

    .main-content {
        margin-left: 0;
        width: 100%;
        padding: 10px;
    }

    .content {
        max-width: 100%;
    }

    .tile {
        width: 100%;
        height: auto;
        font-size: 14px;
        padding: 10px;
    }

    /* Hamburger-Button anzeigen */
    .hamburger-menu {
        display: block;
    }

    nav {
        transform: translateX(-100%);
        visibility: hidden;
    }

    nav.open {
        transform: translateX(0);
        visibility: visible;
    }
}

/* Zusätzliche Anpassungen für extrem kleine Bildschirme */
@media (max-width: 600px) {
    body {
        font-size: 16px;
    }

    nav ul {
        display: block;
        text-align: center;
    }

    nav ul li {
        display: block;
        margin: 10px 0;
    }

    header {
        text-align: center;
    }

    main {
        padding: 10px;
    }

    footer {
        position: static;
        padding: 10px 0;
    }
}
