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

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

/* ===== Images ===== */
#box2 img {
    max-width: 100%;
    height: auto;
    margin-top: 0.2em;
    margin-bottom: 2em;
    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;
}

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

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

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

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

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

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