
/* --------------------------------------------
   Farben & Variablen
--------------------------------------------- */
:root {
    --ranger-blue: #0055aa;
    --ranger-blue-dark: #003f7f;
    --ranger-gold: #f1c40f;
    --light-bg: #f5f7fa;
    --card-bg: #ffffff;
    --text-dark: #222;
    --shadow: 0 2px 8px rgba(0,0,0,0.06);
    --shadow-hover: 0 10px 25px rgba(0, 85, 170, 0.3); 
    --radius: 12px;
}

/* --------------------------------------------
   Globales Layout
--------------------------------------------- */
body {
    margin: 0; padding: 0;
    font-family: "Segoe UI", Arial, sans-serif;
    background: var(--light-bg);
    color: var(--text-dark);
}

h1, h2 { text-align: center; color: var(--ranger-blue); margin-top: 20px; font-weight: 700; }

/* --------------------------------------------
   Intro Text
--------------------------------------------- */

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* Styling für den Intro-Text (falls du ihn doch mal anpassen willst) */
.intro-text-large {
   text-align: center;
    color: var(--ranger-blue); /* Dein kräftiges Blau */
    font-weight: 700;
    max-width: 850px;
    margin: 40px auto 5px auto; /* Wenig Abstand nach unten zum Namen */
    font-size: 1.5rem;
    line-height: 1.3;
}

/* Dein Name als "Unterschrift" */
.signature {
   text-align: center;
    color: #7f8c8d; /* Ein dezentes Grau */
    font-size: 1.0rem; /* Schön klein */
    font-weight: 400;
    margin-top: 0;
    font-style: italic; /* Kursiv wirkt wie unterschrieben */
    letter-spacing: 0.5px;
}

/* --------------------------------------------
   GELBE INFO-BOX
--------------------------------------------- */
.info-box {
    margin: 25px auto; 
    padding: 15px 20px;
    background: rgba(241, 196, 15, 0.15);
    border-left: 5px solid var(--ranger-gold);
    border-radius: 8px; 
    max-width: 800px; 
    text-align: center;
    line-height: 1.5;
    box-sizing: border-box;
}

.info-box strong, 
#modalBody strong {
    color: var(--ranger-blue);
    font-weight: 700; /* Damit es schön kräftig bleibt */
}

/* --------------------------------------------
   Layout Container
--------------------------------------------- */
.landing-grid, .grid, .gallery {
    display: grid;
    margin: 20px auto 40px auto;
    padding: 0 40px;
    max-width: 95%;
    box-sizing: border-box;
    gap: 30px;
}

.landing-grid {
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    justify-content: center;
    max-width: 1600px;
}

.gallery {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); /* Etwas kleinere Spalten für mehr Bilder */
    gap: 10px; /* Engeres Raster für die Galerie */
}

.grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

/* --------------------------------------------
   VEREINHEITLICHES KARTEN-DESIGN
--------------------------------------------- */
.landing-card, .card, .gallery-item {
    background: var(--card-bg);
    border: none;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px;
    text-decoration: none;
    color: var(--text-dark);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center; 
    text-align: center;
    cursor: pointer;
}

/* Speziell für die Galerie: Weniger Padding, damit mehr Bild zu sehen ist */
.gallery-item {
    padding: 5px; 
}

.landing-card:hover, .card:hover, .gallery-item:hover {
    transform: translateY(-4px); 
    box-shadow: var(--shadow-hover);
}

/* FIX: 3:2 FORMAT ÜBERALL */
.landing-card img, .card img, .gallery-item img {
    width: 100%;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    object-position: 50% 20%; /* <--- DAS HIER RETTET DIE KÖPFE */
    border-radius: 8px;
}

/* Startseite & Aktionen: Bilder ohne Rand oben */
.landing-card img, .card img {
    width: calc(100% + 40px);
    margin: -20px -20px 10px -20px;
    border-radius: 12px 12px 0 0;
}

/* Texte kompakt halten */
.landing-card h3, .card h3, .gallery-item h3 { margin: 5px 0; color: var(--ranger-blue); font-size: 1.1em; }
.landing-card p, .card p, .gallery-item p { margin: 5px 0 10px 0; font-size: 0.9em; line-height: 1.3; }

/* --------------------------------------------
   Buttons & Checkboxen
--------------------------------------------- */
button, .download-btn, #download-selected {
    background: var(--ranger-blue); color: white; border: none; padding: 10px 20px;
    font-size: 14px; border-radius: 8px; cursor: pointer; transition: 0.25s;
    display: inline-block; text-decoration: none; width: fit-content;
    margin: 5px auto 0 auto; 
}

button:hover, .download-btn:hover, #download-selected:hover { background: var(--ranger-blue-dark); }
.checkbox-container { display: flex; justify-content: center; align-items: center; gap: 8px; margin-top: 5px; font-size: 0.9em; }

/* --------------------------------------------
   LIGHTBOX & MODAL
--------------------------------------------- */
.lightbox { 
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; 
    background: rgba(0,0,0,0.95); display: flex; justify-content: center; 
    align-items: center; z-index: 9999; 
}

.lightbox.hidden { opacity: 0; pointer-events: none; }

/* Bild mit Übergang für das Einblenden aus der JS */
.lightbox img { 
    max-width: 90%; 
    max-height: 85%; 
    border-radius: 12px; 
    transition: opacity 0.3s ease; /* Wichtig für lbImg.style.opacity */
}

/* DER LADEPINNER (wird aktiv, wenn JS .loading hinzufügt) */
.lightbox.loading::after {
    content: "";
    position: absolute;
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.2);
    border-top: 5px solid var(--ranger-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 10001;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.lightbox-close { position: absolute; top: 25px; right: 40px; font-size: 45px; color: #fff; cursor: pointer; }

/* Pfeile mit blauem Hover-Effekt */
.lightbox-nav span { 
    position: absolute; 
    top: 50%; 
    transform: translateY(-50%); 
    font-size: 60px; 
    color: #fff; 
    cursor: pointer; 
    transition: all 0.3s ease;
    user-select: none;
    z-index: 10002;
}

.lightbox-nav span:hover { 
    color: var(--ranger-blue) !important; 
    transform: translateY(-50%) scale(1.1); /* Macht den Pfeil beim Hover etwas größer */
}

.lightbox-prev { left: 40px; } 
.lightbox-next { right: 40px; }

/* Download-Button in der Lightbox positionieren */
#lightbox-download-btn {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10003; /* Über dem Bild und den Pfeilen */
    padding: 12px 25px;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
}

.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.7); display: flex; justify-content: center; align-items: center; z-index: 10010; }
.modal-overlay.hidden { opacity: 0; pointer-events: none; }
.modal-content { background: white; padding: 35px 30px 30px 30px; border-radius: var(--radius); max-width: 450px; width: 90%; text-align: center; position: relative; }
.modal-close { position: absolute; top: 10px; right: 15px; font-size: 32px; color: #999; cursor: pointer; }
.progress-container { width: 100%; background: #eee; border-radius: 10px; margin: 20px 0; overflow: hidden; display: none; }
.progress-bar { width: 0%; height: 15px; background: var(--ranger-blue); transition: width 0.3s; }

/* --------------------------------------------
   MOBILE OPTIMIERUNG
--------------------------------------------- */
@media (max-width: 600px) {
    .landing-grid, .grid, .gallery { padding: 0 15px !important; }
}

/* Sanftes Scrollen für die ganze Seite aktivieren */
html {
    scroll-behavior: smooth;
}

/* Der Scroll-Button */
#scrollTopBtn {
    display: none; /* Standardmäßig unsichtbar */
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 99; /* Hinter Modals und Lightbox, aber über dem Content */
    border: none;
    outline: none;
    background-color: var(--ranger-blue);
    color: white;
    cursor: pointer;
    padding: 15px 20px;
    border-radius: var(--radius);
    font-size: 20px;
    font-weight: bold;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    transition: background-color 0.3s, transform 0.2s, opacity 0.3s;
}

#scrollTopBtn:hover {
    background-color: var(--ranger-blue-dark);
    transform: scale(1.1);
}

/* Falls der Button auf dem Handy zu groß ist */
@media (max-width: 600px) {
    #scrollTopBtn {
        bottom: 20px;
        right: 20px;
        padding: 10px 15px;
    }
}

/* Design für die rechtlichen Seiten */
.legal-page {
    line-height: 1.6;
    padding: 20px;
    max-width: 800px;
    margin: 40px auto;
    color: #333;
}

.legal-page h1 {
    color: #2c3e50;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
}

.legal-page h2 {
    color: #2980b9;
    margin-top: 30px;
}

.legal-page .back-link {
    display: inline-block;
    margin-bottom: 20px;
    text-decoration: none;
    color: #3498db;
    font-weight: bold;
}

.legal-page .back-link:hover {
    text-decoration: underline;
}

.legal-page a {
    color: black;
    text-decoration: underline;
}
