body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;     font-weight: 300;    
    margin: 0 1.5em 0 1.5em;
    padding: 0;
    background-image: url("./media/links.jpg"), url("./media/rechts-mirrored.png");
    background-position: left center, right center;
    background-repeat: no-repeat, no-repeat;
    background-attachment: fixed;
    background-size: auto 100%, auto 100%;
    display: flex;
    flex-direction: row;
    justify-content: center;
}

#karte {
    min-height: 100vh;
    background-color: white;
    width: 90%;
    max-width: 600px;
    padding: 2em 1em 0 1em;
    /* NEU: Flexbox und Box-Sizing für den Footer */
    box-sizing: border-box; 
    display: flex;
    flex-direction: column;
}

/* Kopfbereich */
header {
    margin-top: 10em;
    transition: margin-top 1s ease-in-out;
    text-align: center;
    /* ENTFERNT: "flex-grow: 1;" muss gelöscht werden, sonst funktioniert die Footer-Ausrichtung nicht richtig */
}

header h1 {
    margin: 0;
    color: #333;
}

header h2 {
    margin: 0;
    font-weight: 200;
}

h3 {
    font-weight: 200;
    color: #000000;
}

nav {
    margin-top: 1em;
    display: flex;
    justify-content: center;
    align-content: center;
    gap: 3em;
}


.lang_btn {
    background: white;
    color: #333;
    border: 1px solid;
    padding: 8px 12px;
    margin: 5px;
    cursor: pointer;
    transition: background 0.3s;
}

.lang_btn:hover {
    background: #b0b0b0;
}

.mobile-hero {
    display: none;
}

/* Inhalt anfangs ausblenden */
.main-content {
    opacity: 0;
    transition: all 1s ease-in-out;
    display: none;
}

main {
    margin: 3em 0 0 0;
}

main p {
    line-height: 1.6;
    text-align: left;
    hyphens: none; /* Aktiviert automatische Silbentrennung */
}

main a {
    text-decoration: none;
    color: #71b7f4;
}

main a:hover {
    text-decoration: underline;
}

article {
    margin: 3em 0 0 0;
    padding: 0;
    text-align: center;
}

#kontakt-grid {
    display: grid;
    grid-template-columns: 6fr 4fr; 
    align-items: start;
    gap: 1rem;
    text-align: left;
  }
  /* Styling für die klickbaren Kontakt-Links */
#kontakt-grid a {
    color: inherit; /* Der Link übernimmt die dunkle Farbe des normalen Textes anstatt blau zu werden */
    text-decoration: none; /* Entfernt die permanente Unterstreichung */
}

  #anfahrtsplan {
    width: 100%;
    height: auto;
  }

/* Footer */
footer {
    margin: auto 0em 3em 0em; 
    text-align: center;
}

footer a {
    text-decoration: none;
    color: #666;
}

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

section {
    margin: 3em 0em 3em 0em;
}

section h3 {
    text-align: center;
}

details summary {
    font-weight: 300;
    cursor: pointer;
    padding: 0.5em;
    outline: none;
    margin: 1em 0 0 0;
}

hr {
    border: 0;
    height: 1px;
    background: #ccc;
}

@media (max-width: 768px) {
    body {
        margin: 0; /* Entfernt die Ränder, das Weiß ist nun 100% breit */
        background-image: none; /* Entfernt das Hintergrundbild des Bodys */
        background-color: white; /* Stellt sicher, dass der Rest der Seite weiß ist */
    }
 
    #karte {
        border-radius: 0; /* Keine runden Ecken am Mobiltelefon */
        padding: 2em 1.5em 0 1.5em;
        width: 100%;
        max-width: 100%; /* Die Karte nutzt die gesamten 100% des Bildschirms */
    }
    main p {
        margin-top: 0;
        text-align: left;
        hyphens: auto; /* Aktiviert automatische Silbentrennung */
    }
    
    /* NEU: Das Bild für die Vollbild-Anzeige zwischen Titel und Buttons einblenden */
    .mobile-hero {
        display: block;
        width: calc(100% + 3em); /* Gleicht das Padding von #karte (1.5em links + 1.5em rechts) aus */
        margin-left: -1.5em; /* Zieht das Bild über den Rand bis zur Displaykante */
        margin-top: 2em;
        margin-bottom: 2em;
        height: auto;
        max-height: 35vh; /* Begrenzt die Höhe etwas, damit die Buttons im Sichtfeld bleiben */
        object-fit: cover; /* Beschneidet das Bild sauber, ohne es zu verzerren */
    }

    nav {
        margin-bottom: 0;
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 0.2em;
    }
    
    .lang_btn {
        width: 8em;
        margin-bottom: 0px;
    }
    
    #kontakt-grid {
        display: flex;
        flex-direction: column-reverse;   
    }
    
    header {
        margin-top: 1em;
    }
}