body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: url('../images/Terreng_Background.jpg') no-repeat center center fixed;
    background-size: cover;
    padding-top: 90px; /* Höhe Header + etwas Abstand */
}


/* HEADER FIXIEREN */
.header {
    position: fixed;       /* Header fixieren */
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #FFFFFF;
    padding: 15px 40px;
    border-radius: 0 0 40px 40px; /* Abrunden nur unten */
    margin: 0;               /* Margin entfernen, sonst Probleme bei fixed */
    z-index: 1000;           /* Über anderen Inhalten */
}


/* LOGO */
.logo img {
    height: 90px;
}

/* NAVIGATION */
.nav {
    display: flex;
    gap: 20px;
}

.nav a {
    text-decoration: none;
    padding: 12px 28px;
    border-radius: 25px;
    background: #2f4f3a;
    color: white;
    font-weight: bold;
    transition: 0.3s;
}

.nav a:hover {
    background: #3f6b4f;
}

/* BOXEN */
.box-container {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    padding: 30px 60px;
}

.box {
    display: flex;
    background: white;
    border-radius: 20px;
    overflow: hidden;

    overflow-y: auto;
    box-sizing: border-box;  /* verhindert Überlauf */
    overflow-wrap: break-word; /* lange Wörter umbrechen */

    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    flex: 1 1 100%;
    min-height: 250px;

    opacity: 0;
    transform: translateY(60px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

/* Wenn sichtbar */
.box.show {
    opacity: 1;
    transform: translateY(0);
}

/* Bild rechts */
.box img {
    width: 40%;        /* Bild ist nur 40% so groß wie sein Container */
    height: auto;      /* Seitenverhältnis bleibt korrekt */
    object-fit: contain;
    display: block;
    margin: auto;      /* Zentriert das Bild horizontal + vertikal */
}

/* Text links */
.box-text {
    flex: 0 0 60%;        /* Text nimmt 60% der Boxbreite */
    padding: 30px;
    overflow-y: auto;
    font-size: 2em;
    box-sizing: border-box;  /* verhindert Überlauf */
    overflow-wrap: break-word; /* lange Wörter umbrechen */
}

.box-text p {
    text-align: justify;
}

.box-text h1 {
    margin-top: 100;
    color: #2f4f3a;
}

.box-text p {
    line-height: 1.6;
    color: #333;
}

/* Text Animation */
.fade-text {
    opacity: 0;
    transform: translateX(-80px);
    transition: opacity 1.2s ease, transform 1.2s ease;
}

.fade-text.show {
    opacity: 1;
    transform: translateX(0);
}


.box reverse {
    flex-direction: row-reverse;
}

.box reverse img {
    order: -1;
}


/* Text von rechts */
.fade-right {
    opacity: 0;
    transform: translateX(80px);
    transition: opacity 1.2s ease, transform 1.2s ease;
}

.fade-right.show {
    opacity: 1;
    transform: translateX(0);
}


/* FOOTER */
.footer {
    background-color: #2f4f3a; /* Dunkelgrün */
    color: white;
    font-family: Arial, Helvetica, sans-serif;
    padding: 30px 40px;
	border-radius: 40px 40px 0 0; /* Abrunden nur unten */
}

.footer a {
    color: white;
    text-decoration: none;
    margin-right: 20px;
    transition: 0.3s;
}

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

.footer-top {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.footer-left, .footer-right, footer-bottom {
    min-width: 350px;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}


.footer-links a {
    margin-right: 15px;
}

/* Linie zwischen Top und Bottom */
hr {
    border: 0;
    border-top: 1px solid white;
    margin: 10px 0 20px 0;
}


/* Barrierefreiheit: Nutzer mit aktivierter Systemeinstellung "Bewegung
   reduzieren" (iOS: Einstellungen > Bedienungshilfen > Bewegung; Android:
   Einstellungen > Bedienungshilfe) bekommen die Inhalte sofort sichtbar
   statt der Fade/Slide-Animation. */
@media (prefers-reduced-motion: reduce) {
    .box, .fade-text, .fade-right {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* Responsive */

@media (max-width: 400px) {
    html, body {
        max-width: 80%;
        overflow-x: hidden; /* verhindert horizontales Scrollen */
    }
	
    .header {
        padding: 10px 10px;
        border-radius: 0 0 25px 25px;
		max-width: 100%;
    }

    .nav {
        gap: 8px;
        justify-content: flex-end;
    }

    .nav a {
        padding: 5px 12px;
        font-size: 10px;
        border-radius: 14px;
    }

    .box-text {
        font-size: 1em;
        box-sizing: border-box;  /* verhindert Überlauf */
        overflow-wrap: break-word; /* lange Wörter umbrechen */
    }

    .box-text h1 {
        font-size: 1.2em;
    }

    .logo img {
        height: 58px;
        width: auto;
    }
    /* Footer kompakter machen */
    .footer {
        padding: 20px 15px;
        font-size: 0.85em;   /* kleinere Schrift für Footer */
        line-height: 1.3;    /* dichteres Zeilenlayout */
		max-width: 100%;
    }

    .footer p {
        font-size: 0.85em;
    }

    .footer a {
        font-size: 0.85em;
        margin-right: 10px;
    }	
	
}

@media (max-width: 600px) {
    html, body {
        max-width: 100%;
        overflow-x: hidden; /* verhindert horizontales Scrollen */
    }
	
    .header {
        padding: 10px 10px;
        border-radius: 0 0 25px 25px;
		max-width: 100%;
    }

    .logo img {
        height: 58px;
        width: auto;
    }

    .nav {
        gap: 10px;
        justify-content: flex-end;		
    }

    .nav a {
        padding: 5px 12px;
        font-size: 10px;
        border-radius: 14px;
    }

    .box-container {
    display: flex;
    flex-wrap: wrap;
	padding: 10px;
        gap: 15px;
    }

    .box-text {
		flex: 1;
        padding: 30px;
        font-size: 1em;
        box-sizing: border-box;  /* verhindert Überlauf */
        overflow-wrap: break-word; /* lange Wörter umbrechen */		
    }

    .box-text h1 {
        font-size: 1.1em;
    }

    .box-text p {
        font-size: 0.95em;
        line-height: 1.5;
    }

    /* Footer kompakter machen */
    .footer {
        padding: 20px 15px;
        font-size: 0.85em;   /* kleinere Schrift für Footer */
        line-height: 1.3;    /* dichteres Zeilenlayout */
		max-width: 100%;
    }

    .footer p {
        font-size: 0.85em;
    }

    .footer a {
        font-size: 0.85em;
        margin-right: 10px;
    }

    .footer-top, .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }
    .footer-links {
        margin-bottom: 8px;
    }

    .logo img {
        height: 58px;
        width: auto;
    }
}


@media (max-width: 900px) {
    html, body {
        max-width: 100%;
        overflow-x: hidden;
        background-attachment: scroll; /* iOS/Android: fixed-Backgrounds ruckeln/rendern fehlerhaft */ /* verhindert horizontales Scrollen */
    }
	
	
    .header {
        padding: 8px 10px;
        border-radius: 0 0 25px 25px;
		max-width: 100%;
        flex-wrap: wrap;
        row-gap: 6px;
    }

    /* Etwas mehr Platz unter dem fixierten Header, falls er auf sehr
       schmalen Geraeten/mit groesserer System-Schriftgroesse doch einmal
       auf zwei Zeilen umbricht (siehe flex-wrap oben) - Sicherheitsnetz,
       damit Inhalte nie unter dem Header verschwinden. */
    body {
        padding-top: 100px;
    }

    .box-container {
    display: flex;
    flex-wrap: wrap;
	padding: 10px;
        gap: 20px;
    }	

    .box {
        flex-direction: column;
    }

    .box.reverse {
        flex-direction: column;
    }

    .box-text {
        font-size: 1em;
        box-sizing: border-box;  /* verhindert Überlauf */
        overflow-wrap: break-word; /* lange Wörter umbrechen */
    }

    .box img {
        width: 100%;
        height: auto;
    }

    .logo img {
        height: 34px;
        width: auto;
    }
    .nav {
        gap: 5px;
        justify-content: flex-end;		
    }
    .nav a {
        padding: 5px 9px;
        font-size: 9.5px;
        border-radius: 11px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        white-space: nowrap;
    }
    /* Footer kompakter machen */
    .footer {
        padding: 20px 15px;
        font-size: 0.85em;   /* kleinere Schrift für Footer */
        line-height: 1.3;    /* dichteres Zeilenlayout */
		max-width: 100%;
    }

    .footer p {
        font-size: 0.85em;
    }

    .footer a {
        font-size: 0.85em;
        margin-right: 10px;
    }	
}

