/* assets/css/style.css */
/* Header background-position horizontal auf 50% gesetzt. */

body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.6;
    background-image: url('/assets/images/hg001.png');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    /* padding-bottom: 5em; */ /* Entfernt */
}

header {
    color: #fff;
    padding: 0;
    text-align: center;
    position: relative;
    background-image:
        url('/assets/images/headerfluss.svg'),
        url('/assets/images/headerwellebraun01.svg');
    background-repeat: no-repeat;
    /* Angepasste Positionierung mit 50% horizontal */
    background-position:
        80% calc(100% + 120px),
        80% calc(100% + 1500px);
    background-size:
        800px auto,
        800px auto;
    min-height: 220px; /* Beibehaltung der Höhe */
    overflow: visible; /* Wichtig, damit herausragende Teile sichtbar sind */
}

#headersection {
    position: relative;
    width: 100%;
    height: 220px;
    padding: 0;
    box-sizing: border-box;
    background-image:
        url('/assets/images/Kompass_Icon.svg'),
        url('/assets/images/logo_schatzilo.svg');
    background-repeat: no-repeat;
    background-position:
        right 30px top 20px,
        left 30px top 20px;
    background-size:
        200px auto,
        350px auto;
    overflow: visible; /* Sicherstellen, dass dieser Bereich keinen Overflow hidden hat */
}

/* #karteheader Regeln wurden entfernt */

/* User's updated main rule */
main {
    padding: 2em 4em 4em 4em;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 8px;
    margin-left: auto;
    margin-right: auto;
}

/* User's updated section rule */
section {
    max-width: 800px;
    width: 95%;
    color: #333;
    box-sizing: border-box;
    margin-left: auto;
    margin-right: auto;
}

/* Spezifische Anpassung für #schatzsucheMenu beibehalten */
#schatzsucheMenu {
    text-align: center;
    background-color: transparent;
    box-shadow: none;
    padding: 0;
    border: none;
    border-radius: 0;
    margin: 0 auto; /* Behält Zentrierung bei */
    max-width: 100%;
    margin-top: 0;
}

.schatz-box {
    display: inline-block;
    margin: 10px;
    border: 1px solid #ddd;
    width: 240px;
    height: auto;
    overflow: hidden;
    text-align: center;
    vertical-align: top;
    position: relative;
    background-color: #fff;
    border-radius: 5px;
}

.schatz-box img {
    max-width: 100%;
    max-height: 100%;
    vertical-align: middle;
    display: block;
    width: 100%;
    object-fit: cover;
}

.schatz-box a {
    display: block;
    height: auto;
    line-height: initial;
    text-decoration: none;
    color: inherit;
}

.schatz-box h2, .schatz-box p {
    line-height: initial;
    padding: 0 10px;
}
.schatz-box h2 {
    font-size: 1.1em;
    margin: 10px 0 5px 0;
}
.schatz-box p {
    font-size: 0.9em;
    margin: 0 0 10px 0;
    color: #555;
}

.schatz-box div.symbols {
    line-height: initial;
    margin: 0 0 15px 0;
}

.schatz-box div.symbols img {
    padding: 0 3px;
    width: 24px;
    height: 24px;
    vertical-align: middle;
}

/* --- Responsive Anpassungen --- */

/* Section max-width Anpassungen */
@media (min-width: 801px) {
    section:not(#schatzsucheMenu) { max-width: 700px; } /* Apply only to non-menu sections */
    #schatzsucheMenu { max-width: 100%; }
    header {
        background-position:
           80% calc(100% + 50px),
           80% calc(100% + 400px);
        background-size:
            1000px auto,
            1000px auto;
    }
    #headersection {
        background-position:
            right 30px top 20px,
            left 30px top 20px;
        background-size:
            190px auto,
            400px auto;
    }
}
@media (min-width: 1001px) {
    section:not(#schatzsucheMenu) { max-width: 800px; }
    #schatzsucheMenu { max-width: 100%; }
    header {
        background-position:
           80% calc(100% + 70px),
           80% calc(100% + 500px);
        background-size:
            1200px auto,
            1200px auto;
    }
    #headersection {
        background-position:
            right 30px top 20px,
            left 30px top 20px;
        background-size:
            190px auto,
            400px auto;
    }
}
@media (min-width: 1101px) {
    section:not(#schatzsucheMenu) { max-width: 900px; }
     #schatzsucheMenu { max-width: 100%; }
     header {
        background-position:
           80% calc(100% + 90px),
           80% calc(100% + 600px);
        background-size:
            1400px auto,
            1400px auto;
    }
    #headersection {
        background-position:
            right 30px top 20px,
            left 30px top 20px;
        background-size:
            190px auto,
            400px auto;
    }
}
@media (min-width: 1401px) {
    section:not(#schatzsucheMenu) { max-width: 1000px; }
     #schatzsucheMenu { max-width: 100%; }
     header {
        background-position:
           80% calc(100% + 120px),
           80% calc(100% + 700px);
        background-size:
            1600px auto,
            1600px auto;
    }
    #headersection {
        background-position:
            right 30px top 20px,
            left 30px top 20px;
        background-size:
            190px auto,
            400px auto;
    }
}
@media (min-width: 1601px) {
    section:not(#schatzsucheMenu) { max-width: 1300px; }
     #schatzsucheMenu { max-width: 100%; }
     header {
        background-position:
           80% calc(100% + 210px),
           80% calc(100% + 1100px);
        background-size:
            2500px auto,
            2500px auto;
    }
    #headersection {
        background-position:
            right 30px top 20px,
            left 30px top 20px;
        background-size:
            200px auto,
            500px auto;
    }
}


/* Mobile Layouts für schatz-box und Header */

/* Zwei Spalten für Screens < 800px und >= 700px */
@media (max-width: 799px) {
    main {
        padding: 1.5em;
        /* margin-top wurde entfernt */
    }
    section {
         width: 95%;
         /* margin-bottom: 1.5em; */ /* Entfernt */
    }
     #schatzsucheMenu {
         padding: 0;
         margin-top: 0;
         margin-bottom: 1.5em; /* Behält Abstand für Menü bei */
     }
    .schatz-box {
        width: calc(50% - 22px);
        max-width: none;
    }
     /* Header Anpassungen für kleine Screens */
     header {
        min-height: 100px;
        background-position:
            80% calc(100% + 90px),
            80% calc(100% + 450px);
        background-size:
            1000px auto,
            1000px auto;
     }
    #headersection {
        height: 100px;
        background-position:
            right 30px top 10px,
            left 30px top 10px;
        background-size:
            90px auto,
            330px auto;
    }
    /* Footer Anpassungen für kleine Screens */
    footer ul li {
        display: block;
        margin: 0.5em 0;
    }
}

/* Eine Spalte für Screens < 700px */
@media (max-width: 699px) {
    .schatz-box {
        display: block;
        width: 90%;
        max-width: 400px;
        margin-left: auto;
        margin-right: auto;
        margin-top: 15px;
        margin-bottom: 15px;
    }
    header {
         min-height: 80px;
         background-position:
             80% calc(100% + 50px),
             80% calc(100% + 300px);
         background-size:
             700px auto,
             700px auto;
     }
     #headersection {
         height: 100px;
         background-position:
             right 30px top 10px,
             left 30px top 10px;
         background-size:
             90px auto,
             330px auto;
     }
}


/* Footer Styles */
footer {
    background: #8B4513;
    color: #fff;
    text-align: center;
    padding: 1em 0;
    width: 100%;
    height: auto;
    box-sizing: border-box;
}

footer ul {
    list-style: none;
    padding: 0;
    margin: 0 0 0.5em 0;
}

footer ul li {
    display: inline;
    margin: 0 1em;
}

footer ul li a {
    color: #DAA520;
    text-decoration: none;
}

footer ul li a:hover {
    text-decoration: underline;
}

footer p {
    font-size: 0.8em;
    margin: 0;
    margin-top: 5px;
    padding-bottom: 0.5em;
}

#schulklassen-info-modal { 
  display: none; 
  position: fixed; 
  z-index: 2000; 
  top: 0; left: 0; 
  width: 100vw; 
  height: 100vh; 
  background: rgba(0,0,0,0.5);
}
#schulklassen-info-modal > div {
  background: #fff;
  color: #222;
  max-width: 95vw;
  width: 440px;
  margin: 8vh auto 0 auto;
  padding: 2em;
  border-radius: 12px;
  position: relative;
}
#schulklassen-info-modal button {
  position: absolute;
  top: 12px;
  right: 14px;
  font-size: 1.4em;
  border: none;
  background: none;
  cursor: pointer;
}


* {
    box-sizing: border-box;
    max-width: 100vw;
}

.download-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 22px;
    margin-bottom: 24px;
    padding: 0;
    list-style: none;
}
.download-grid .download-card {
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 11px;
    box-shadow: 0 2px 8px #0001;
    padding: 14px 12px 8px 12px;
    width: 220px;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0;
    text-align: center;
    transition: box-shadow 0.15s;
}
.download-grid .download-card:hover {
    box-shadow: 0 4px 24px #0002;
    background: #eef2f7;
}
.download-card img {
    margin: 10px 0 5px 0;
    max-width: 170px;
    max-height: 110px;
    border-radius: 6px;
    border: 1px solid #ccc;
}
.download-card .file-link {
    font-weight: 600;
    color: #264672;
    text-decoration: none;
}
.download-card .file-size {
    font-size: 0.95em;
    color: #888;
    margin-bottom: 7px;
}