            /* ===== Verbessertes CSS für menzel63.de ===== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.9em;
    background-color: lavender;
    line-height: 130%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ===== Cookie-Popup ===== */
#cookie-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    display: none;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.cookie-popup-inner {
    background: white;
    padding: 30px;
    border-radius: 10px;
    max-width: 600px;
    width: 100%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.Text3 {
    margin-bottom: 20px;
    line-height: 1.6;
}

.Text3 p {
    font-size: 16px;
    color: #333;
}

.Text4, .Text5 {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1em;
}

#cookie-popup button {
    background-color: #0066cc;
    color: white;
    border: none;
    padding: 12px 30px;
    font-size: 16px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

#cookie-popup button:hover {
    background-color: #0052a3;
}

#cookie-popup .more a {
    color: #0066cc;
    text-decoration: underline;
}

#cookie-popup .more a:hover {
    color: #0052a3;
}

/* ===== Sticky Header ===== */
.sticky-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: white;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.header-image {
    width: 100%;
    height: auto;
    display: block;
    max-height: 120px;
    object-fit: cover;
    object-position: center;
}

/* ===== Hamburger Button ===== */
.hamburger {
    position: absolute;
    top: 10px;
    right: 15px;
    width: 40px;
    height: 40px;
    background: rgba(173, 182, 211, 0.95);
    border: 2px solid #333;
    border-radius: 5px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    z-index: 1001;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: #333;
    transition: all 0.3s;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* ===== Navigation - Mobile First ===== */
.nav-menu {
    position: fixed;
    top: 100px;
    right: -100%;
    width: 80%;
    max-width: 320px;
    height: calc(100vh - 100px);
    background: white;
    box-shadow: -2px 0 5px rgba(0,0,0,0.1);
    transition: right 0.3s;
    overflow-y: auto;
    z-index: 999;
}

.nav-menu.active {
    right: 0;
}

.nav-menu > ul {
    list-style: none;
    padding: 20px;
}

.nav-menu > ul > li {
    margin-bottom: 10px;
}

.nav-menu a {
    display: block;
    padding: 10px;
    color: #333;
    text-decoration: none;
    border-bottom: 1px solid #eee;
}

.nav-menu a:hover {
    background: lavender;
}

/* ===== Chronik Submenü ===== */
.has-submenu {
    position: relative;
}

.chronik-link {
    font-weight: bold;
    background: #f0f0f0;
}

/* Mobile: Desktop-Submenu komplett ausblenden */
.submenu-desktop {
    display: none !important;
}

/* Mobile: Mobile-Submenu als normale Liste anzeigen */
.submenu-mobile {
    list-style: none;
    padding: 0;
    margin: 0;
}

.submenu-mobile li {
    margin: 0;
}

.submenu-mobile a {
    padding-left: 25px;
    font-size: 14px;
}

/* ===== Overlay ===== */
.overlay {
    position: fixed;
    top: 100px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: none;
    z-index: 998;
}

.overlay.active {
    display: block;
}

/* ===== Main Content Wrapper ===== */
#innen {
    flex: 1;
    width: 100%;
}

/* ===== Content Box ===== */
#box2 {
    width: 700px;
    max-width: 100%;
    margin: 0 auto;
    padding: 1em;
    background: white;
    border-left: 1px solid black;
    border-right: 1px solid black;
    border-bottom: 1px solid black;
    margin-top: 90px;
    margin-bottom: 20px;
}

/* ===== Ereignis-Abschnitt: ersetzt br-Abstände ===== */
section.ereignis {
    padding: 1.5em 0;
}

section.ereignis h2 {
    margin-top: 0;
    margin-bottom: 0.6em;
}

/* ===== Formate für Ereignis/Chronik-Seite ===== */
.Bild1,
.Text1 {
    float: left;
}

.Bild1 {
    width: 74%;
}

/* padding-top entfernt: Text1 startet jetzt auf gleicher Höhe wie Bild1 */
.Text1 {
    width: 26%;
    padding-left: 20px;
    padding-top: 0;
}

.Bild2,
.Text2 {
    float: right;
}

.Bild2 {
    width: 74%;
}

/* padding-top entfernt: Text2 startet jetzt auf gleicher Höhe wie Bild2 */
.Text2 {
    width: 26%;
    padding-right: 25px;
    padding-top: 0;
}

.Text3 {
    width: 100%;
    float: none;
}

.Text4 {
    display: flex;
    display: -webkit-flex;
    display: -ms-flexbox;
    justify-content: center;
    align-items: center;
    width: 50%;
    float: left;
    margin-top: 10px;
}

.Text5 {
    display: flex;
    display: -webkit-flex;
    display: -ms-flexbox;
    justify-content: center;
    align-items: center;
    width: 50%;
    float: right;
    margin-top: 10px;
}

.Abstand {
    display: block;
}

.box4 {
    width: 100%;
    clear: both;
}

/* ===== Typography ===== */
h1 {
    font-size: 2.25em;
    line-height: 1.2em;
    margin: 0.8em 0;
    color: #333;
}

h2 {
    font-size: 1.6875em;
    line-height: 1.2em;
    margin: 0.8em 0;
    color: #555;
}

h3 {
    font-size: 1.3125em;
    line-height: 1.2em;
    margin: 0.8em 0;
}

h4 {
    font-size: 1.225em;
    line-height: 1.2em;
    margin: 0.8em 0;
    color: #1a4393;
}

h5 {
    font-size: 0.9375em;
    line-height: 1.2em;
    margin: 0.8em 0;
}

h6 {
    font-size: 0.75em;
    line-height: 1.2em;
    margin: 0.8em 0;
}

p {
    margin: 10px 0;
    line-height: 1.6;
    text-align: left;
}

#box2 h4 {
    color: #1a4393;
}

#box2 p {
    text-align: left;
}

/* ===== Images ===== */
#box2 img {
    max-width: 100%;
    height: auto;
    margin-top: 0;
    margin-bottom: 0;
    border-radius: 10px;
}

img {
    max-width: 100%;
    height: auto;
}

#Bild {
    width: 250px;
    height: 250px;
    float: right;
    margin-left: 1.25em;
    margin-right: 0.6em;
    margin-bottom: 0.6em;
}

/* ===== Bildklasse ===== */
.responsive {
    width: 100%;
    height: auto;
}

/* ===== Responsive Video (YouTube) ===== */
/* <iframe> mit <div class="responsive-video"></div> umschließen */
.responsive-video iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.responsive-video {
    position: relative;
    padding-bottom: 56.25%; /* Default for 16:9 ratio */
    padding-top: 0px;
    height: 0;
    overflow: hidden;
}

/* ===== Desktop/Mobile Toggle ===== */
#desktop {
    display: block;
}

#mobile {
    display: none;
}

/* ===== Digits Counter ===== */
.digits {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 100;
}

/* ===== Footer - Sticky ===== */
.footer {
    width: 100%;
    padding: 20px;
    background: lightsteelblue;
    text-align: center;
    font-size: 14px;
    border-top: 1px solid black;
    margin-top: auto;
}

.footer p {
    margin: 5px 0;
    text-align: center;
}

.footer a {
    color: #333;
    text-decoration: none;
    margin: 0 10px;
}

.footer a:hover {
    color: #0066cc;
    text-decoration: underline;
}

/* ===== Fusszeile (alternative Footer-Variante) ===== */
#Fusszeile {
    width: 100%;
    margin: 0 auto;
    padding: 0.5em;
    color: #333;
    background-color: lightsteelblue;
    border-top: 1px solid black;
    text-align: center;
    position: fixed;
    bottom: 0;
    left: 0;
}

#FusszeilenMenue {
    display: inline-block;
    margin: 0 auto;
}

#FusszeilenMenue .tverweis:link,
#FusszeilenMenue .tverweis:visited {
    text-decoration: none;
    color: black;
    padding: 0.5em;
    background-color: lightsteelblue;
    text-align: center;
}

#FusszeilenMenue .tverweis:hover {
    color: black;
    background-color: lavender;
}

/* ===== Links ===== */
a {
    color: #0066cc;
}

.verweis:link,
.verweis:visited {
    width: 10em;
    float: right;
    margin: 0.6em 1em 1em 0;
    padding: 1.0em;
    text-decoration: none;
    color: black;
    background-color: lightsteelblue;
    text-align: center;
}

.verweis:hover {
    color: black;
    background-color: lavender;
}

.tverweis:link,
.tverweis:visited {
    text-decoration: none;
    color: black;
    background-color: lightsteelblue;
    text-align: center;
}

.tverweis:hover {
    color: black;
    background-color: lavender;
}

/* ===== Flex Container ===== */
.flex-container {
    display: flex;
    flex-wrap: wrap;
    background-color: #efefef;
    justify-content: space-around;
}

.flex-container > div {
    background-color: #f1f1f1;
    margin: 10px;
    padding: 20px;
    font-size: 0.9em;
    border: 3px solid darkblue;
}

.leer-container {
    width: 552px;
    margin: 10px;
    height: 0; /* Important! for the divs to collapse should they fall in a new row */
    border: 0px;
}

/* ===== Utility Classes ===== */
.clearfix:after {
    content: ".";
    clear: both;
    display: block;
    visibility: hidden;
    height: 0px;
}

hr {
    margin: 0;
    border: none;
    border-top: 1px solid #ddd;
}

.tekst {
    padding: 1em;
}

/* ===== Background für große Bildschirme ===== */
@media screen and (min-width: 900px) {
    body {
        background-image: url(Bilder/Schemen4.png), url(Bilder/Schemen4.png);
        background-repeat: no-repeat, no-repeat;
        background-position: left top, right bottom;
        background-attachment: fixed, fixed;
    }
}

/* ===== TABLET (768px - 1199px) ===== */
@media (min-width: 768px) and (max-width: 1199px) {
    .hamburger {
        display: flex;
    }

    #box2 {
        width: 90%;
        margin-top: 110px;
    }

    .header-image {
        max-height: 90px;
    }

    .nav-menu {
        top: 110px;
        height: calc(100vh - 110px);
    }

    .overlay {
        top: 110px;
    }
}

/* ===== Medium Mobile Geräte (401px - 767px) ===== */
@media screen and (min-width: 401px) and (max-width: 767px) {
    #box2 {
        width: 100%;
        margin-top: 130px;
    }

    .header-image {
        max-height: 120px;
    }

    .nav-menu {
        top: 130px;
        height: calc(100vh - 130px);
    }

    .overlay {
        top: 130px;
    }
}

/* ===== Medium Screens (max 840px) ===== */
@media only screen and (max-width: 840px) {
    #box1,
    #box2,
    #box3 {
        width: 100%;
    }

    #box1 {
        display: none;
    }

    #box3 {
        display: block;
    }

    #FusszeilenMenue {
        display: none;
    }
}

/* ===== DESKTOP / LAPTOP (ab 1200px) ===== */
@media (min-width: 1200px) {
    .hamburger {
        display: none;
    }

    .sticky-header {
        background: lightsteelblue;
    }

    .header-image {
        max-height: 120px;
    }

    .nav-menu {
        position: static;
        width: 100%;
        max-width: none;
        height: auto;
        box-shadow: none;
        overflow-y: visible;
        background: lightsteelblue;
        border-bottom: 1px solid black;
    }

    .nav-menu > ul {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        padding: 10px;
        background: lightsteelblue;
    }

    .nav-menu > ul > li {
        margin: 5px;
        position: relative;
    }

    .nav-menu a {
        padding: 10px 15px;
        border: none;
        color: black;
    }

    .nav-menu a:hover {
        background: lavender;
        color: black;
    }

    .overlay {
        display: none !important;
    }

    #box2 {
        margin-top: 160px;
    }

    /* Desktop: Mobile-Submenu komplett ausblenden */
    .submenu-mobile {
        display: none !important;
    }

    /* Desktop: Desktop-Submenu vorbereiten */
    .submenu-desktop {
        display: none !important;
        position: absolute;
        top: 100%;
        left: 0;
        background: #ffffff;
        min-width: 380px;
        padding: 12px;
        box-shadow: 0 6px 16px rgba(0,0,0,0.25);
        z-index: 5000;
        grid-template-columns: repeat(2, 1fr);
        gap: 6px 14px;
    }

    /* Desktop: Wenn geöffnet */
    .submenu-desktop.open {
        display: grid !important;
    }

    .submenu-desktop li {
        list-style: none;
        margin: 0;
    }

    .submenu-desktop a {
        display: block;
        padding: 6px 10px;
        white-space: nowrap;
        border-radius: 4px;
        border: none;
    }

    .submenu-desktop a:hover {
        background: lavender;
    }

    .chronik-link {
        cursor: pointer;
        user-select: none;
        background: transparent;
        font-weight: normal;
    }
}

/* ===== Sehr große Bildschirme (ab 1900px) ===== */
@media only screen and (min-width: 1900px) {
    #box2 {
        width: 900px;
    }
}

/* ===== Kleine Mobile Geräte (max 400px) ===== */
@media screen and (max-width: 400px) {
    #box2 {
        width: 100%;
        margin-top: 130px;
        border-left: none;
        border-right: none;
    }

    .header-image {
        max-height: 120px;
    }

    .nav-menu {
        top: 130px;
        height: calc(100vh - 130px);
    }

    .overlay {
        top: 130px;
    }

    #Bild {
        width: 100%;
        height: auto;
        float: none;
        margin: 0 0 1em 0;
    }

    h1 {
        font-size: 1.5em;
    }

    h2 {
        font-size: 1.3em;
    }

    .Bild1,
    .Text1,
    .Bild2,
    .Text2,
    .Text3,
    .Text4,
    .Text5 {
        width: 100%;
        padding: 0;
    }

    #desktop {
        display: none;
    }

    #mobile {
        display: block;
    }

    #box3 {
        display: block;
    }

    #Fusszeile {
        border: 1px solid black;
        line-height: 2.0em;
    }

    #FusszeilenMenue {
        line-height: 2.0em;
    }
}
