/* --- Allgemeines Layout & Reset --- */
img {
    max-width: 100%;
    height: auto;
}
html, body {
    height: 100%;
}

body {
    display: flex;
    flex-direction: column;
    background: #EDEDED;
    font-family: Verdana, Tahoma, Helvetica, sans-serif;
    color: #666666;
    margin: 0;
    padding: 20px;
    box-sizing: border-box;
}

#wrapper {
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* Wrapper füllt den verfügbaren Platz */
    max-width: 1024px;
    width: 100%;
    margin: 0 auto;
    background-color: #FFF;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

a:link, a:visited {
    color: #4284C1;
    text-decoration: none;
}

a:hover, a:active {
    text-decoration:underline;
    color: #FF7926;
}

/* --- Header --- */
#header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    background: #7493A5; 
}

.logo {
    height: 50px;
    width: 257px;
}

/* --- Navigation --- */
.main-nav ul {
    list-style-type:none;
    margin: 0;
    padding: 0;
    display: flex;
}

.main-nav li {
    margin: 0 5px;
}

.main-nav a:link, .main-nav a:visited {
    font-family: Calibri, Times New Roman, sans-serif;
    display: block;
    color: #FFFFFF;
    text-align: center;
    padding: 5px;
    text-decoration: none;
}

.main-nav a:hover, .main-nav a:active {
    text-decoration:underline;
}

/* --- Hauptinhalt --- */
#middle {
    padding: 20px;
    text-align: left;
    line-height: 1.5em;
    flex-grow: 1; /* Hauptinhalt füllt den Platz, drückt Footer nach unten */
}

/* --- Layout für die Startseite (Zwei Spalten) --- */
.page-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: flex-start;
}
.box1 {
    flex: 1;
    min-width: 300px;
}
.box2 {
    flex: 1.5; /* Gibt der Textbox etwas mehr Raum */
    min-width: 300px;
}
.w3-content {
    margin: 0 auto; /* Zentriert die Slideshow innerhalb ihrer Box */
}

/* --- Footer --- */
#footer {
    padding: 15px 20px;
    color: #737373;
    font-size: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    border-top: 1px solid #eee;
}

.footerlinks ul {
    list-style-type:none;
    margin:0;
    padding:0;
    display: flex;
}

.footerlinks li {
    margin-left: 10px;
}

/* --- Responsives Design für kleine Bildschirme --- */
@media (max-width: 768px) {
    body {
        padding: 0;
    }
    #header {
        flex-direction: column;
        justify-content: center;
        gap: 15px;
    }
    #footer {
        flex-direction: column;
        justify-content: center;
        gap: 10px;
    }
}

/* --- News-Bereich auf der Startseite --- */
.news-section h2 {
    font-size: 24px; /* Macht die "News"-Überschrift kleiner */
    margin-bottom: 10px; /* Verringert den Abstand unter der Überschrift */
    padding-bottom: 5px;
    border-bottom: 1px solid #eee; /* Fügt eine feine Trennlinie hinzu */
}

/* --- Korrektur für Lightbox-Anzeige --- */
.lb-image {
    max-width: none !important;
}