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.webp"), url("./media/rechts-mirrored.webp");
    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: 4em;
    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-right: 2em;
    display: flex;
    justify-content: flex-end;
    align-content: center;
    gap: 3em;
}
.minimal-list {
  list-style: inside;
  margin-top: 2em;
  margin-bottom: 2em;
}

.minimal-list li {
  margin-bottom: 0.5em;
  line-height: 1.3;
}

.mobile-hero {
    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 */
}

#sprechzeiten{
     margin: 3em 0 0 0;
    padding: 0;
    text-align: left;
}
  #anfahrtsplan {
    width: 100%;
    height: auto;
  }


/* Footer */
footer {
    margin: auto 0em 3em 0em; 
    text-align: center;
}
nav a {
    text-decoration: none;
    color: #666;
}

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

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

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

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

section h3 {
    text-align: center;
}

#sprechzeiten-tabelle {
    margin-left: 1em;
}

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 {
        margin: 1em 0 0 0;
    }
    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-right: 2em;
        display: flex;
        flex-direction: row;
        justify-content: flex-end; /* Diese Zeile hinzufügen */
        align-items: center;
        gap: 0.2em;
    }

    .minimal-list ul{
        list-style: none;
        padding-left: 1em;
    }

    .minimal-list li {
        margin-left: 0.5em;
    }
    
    #kontakt-grid {
        display: flex;
        flex-direction: column-reverse;   
    }

    details span {
        display: block;
        margin-left: 1rem; /* Bzw. padding-left: 1rem; */
        margin-top: 0.5rem; /* Optional: Kleiner Abstand nach oben zum Summary-Titel */
    }
    
    header {
        margin-top: 1em;
    }
}