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;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    flex: 1 1 100%;
    min-height: 250px;
}

/* 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: 1.5em;

}

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

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

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

.box reverse img {
    order: -1;
}

.container {
    display: flex;
    width: 100%;
}

.box-left {
    flex: 0 0 20%;   /* wächst nicht, schrumpft nicht, 20% Breite */
    font-size: 2em;	
    padding-top: 70px;
	padding-left: 30px;
    box-sizing: border-box;  /* Padding wird in die 20% eingerechnet, statt sie zu vergrößern */
    min-width: 0;            /* erlaubt dem Flex-Item, bei Bedarf zu schrumpfen */
    overflow-wrap: break-word;
}

.box-right {
    flex: 0 0 75%;   /* wächst nicht, schrumpft nicht, 80% Breite */
	font-size: 1em;
    padding-top: 30px;
	padding-right: 80px;
	padding-bottom: 30px; 
    padding-left: 20px;
    box-sizing: border-box;  /* Padding wird in die 75% eingerechnet, statt sie zu vergrößern (Ursache des Textüberlaufs) */
    min-width: 0;            /* erlaubt dem Flex-Item, bei Bedarf zu schrumpfen */
    overflow-wrap: break-word;
}

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


.blocksatz {
    text-align: justify;   /* Blocksatz, Text streckt sich über ganze Zeile */
	font-size: 1em;
}

.zentrieren {
    text-align: center;   /* Blocksatz, Text streckt sich über ganze Zeile */
	font-size: 1em;
}

.zentrierenbild {
    text-align: center;   /* Blocksatz, Text streckt sich über ganze Zeile */
	font-size: 1.5em;
}

/* TEAM-KARTEN (ersetzt die frühere <table class="mytable">) - siehe
   Erklaerung weiter unten am Dateiende. Auf Desktop 3 Karten
   nebeneinander, ab 700px Breite gestapelt - jede Karte behaelt dabei
   Foto+Name+Rolle+Bio zusammen. */
.team-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px 20px;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

.team-card {
    text-align: center;
}

.team-card img {
    width: 60%;
    max-width: 200px;
    height: auto;
    border-radius: 50%;
    margin: 0 auto 12px;
    display: block;
}

.team-card p {
    margin: 6px 0;
    line-height: 1.5;
}

.team-card .team-name {
    font-size: 1.05em;
}

.team-card .team-role {
    color: #444;
}

.team-card .team-bio {
    font-size: 0.9em;
    color: #555;
}

@media (max-width: 700px) {
    .team-grid {
        grid-template-columns: 1fr;
        gap: 32px;
        max-width: 480px;
    }

    .team-card img {
        width: 45%;
        max-width: 180px;
    }

    .team-card .team-bio {
        font-size: 0.95em;
    }
}

/* 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;
}




/* 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;
    }
    .box-left {
     flex: 0 0 10%;   /* wächst nicht, schrumpft nicht, 20% Breite */
     font-size: 1em;	
     padding-top: 70px;
	 padding-left: 30px;
    }
    .box-right {
     flex: 0 0 85%;   /* wächst nicht, schrumpft nicht, 80% Breite */
	 font-size: 0.7em;
     padding-top: 30px;
	 padding-right: 80px;
 	 padding-bottom: 30px; 
     padding-left: 20px;
	 box-sizing: border-box;  /* verhindert Überlauf */	 
    }

    .box-right p {
     text-align: justify;	
    }
    .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;
    }

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

@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;
    }
    .box-left {
     flex: 0 0 10%;   /* wächst nicht, schrumpft nicht, 20% Breite */
     font-size: 1em;	
     padding-top: 70px;
	 padding-left: 30px;
    }
    .box-right {
     flex: 0 0 85%;   /* wächst nicht, schrumpft nicht, 80% Breite */
	 font-size: 0.7em;
     padding-top: 30px;
	 padding-right: 80px;
 	 padding-bottom: 30px; 
     padding-left: 20px;
    }

    .box-right p {
     text-align: justify;	
    }
    /* 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;
        width: 100%;
        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;
    }

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

    /* box-left/box-right nutzten oben (400px/600px-Regeln) feste
       Prozent-Werte als flex-basis. Sobald .box hier auf
       flex-direction: column umschaltet, wirkt dieselbe flex-basis
       plötzlich auf die HÖHE statt die Breite - in Kombination mit
       "overflow: hidden" auf .box konnte das Überschriften-/Fließtext
       abschneiden. Für Mobile/Tablet daher explizit auf normale
       Block-Breite/Hoehe zurückgesetzt. */
    .box-left {
        flex: 0 0 auto;
        width: 100%;
        font-size: 1.3em;
        padding: 20px 20px 0 20px;
        box-sizing: border-box;
    }

    .box-right {
        flex: 1 1 auto;
        width: 100%;
        font-size: 0.95em;
        padding: 10px 20px 25px 20px;
        box-sizing: border-box;
    }
}

/* Hinweis Team-Bereich: die frühere <table class="mytable"> ordnete
   Foto/Name/Rolle/Bio als vier ZEILEN (je Person eine SPALTE) an. Beim
   reinen Umschalten von Tabellenzellen auf "display:block" (klassischer
   CSS-Trick fuer responsive Tabellen) wuerden auf dem Handy erst alle 3
   Fotos, dann alle 3 Namen, dann alle 3 Rollen usw. untereinander
   erscheinen - nicht mehr pro Person gruppiert. Deshalb wurde die
   Team-Sektion in HTML von einer Tabelle auf ein Grid aus einzelnen
   Personen-Karten umgestellt (siehe terreng.html: .team-grid/.team-card,
   Regeln dafuer weiter oben nach ".box-right p"). */
