/* --- 1. BASIS & LAYOUT --- */
html, body {
    height: 100%;
}

body {
    font-family: "EB Garamond", serif;
    margin: 0;
    padding: 0;
    background-color: #fdfdfd;
    color: #111;
    line-height: 1.7;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

.content-wrapper {
    flex: 1 0 auto;
    padding-top: 2cm; 
    transition: filter 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    width: 100%;
    box-sizing: border-box;
}

/* --- 2. HEADER (FIXIERT & WEISS) --- */
.header-bg {
    background-color: #ffffff;
    width: 100%;
    height: 2cm;
    display: flex;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 2000;
    border-bottom: 1px solid #eee;
}

.container {
    width: 85%;
    max-width: 500px;
    margin: 0 auto;
    position: relative;
}

header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* --- 3. BURGER-BUTTON (ANIMIERT ZUM X) --- */
.menu-btn {
    cursor: pointer;
    width: 25px;
    height: 14px;
    background: none;
    border: none;
    padding: 0;
    z-index: 2100;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.menu-btn span {
    display: block;
    height: 2px;
    width: 100%;
    background-color: #000;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

body.menu-open .menu-btn span:first-child {
    transform: translateY(6px) rotate(45deg);
}

body.menu-open .menu-btn span:last-child {
    transform: translateY(-6px) rotate(-45deg);
}

/* --- 4. NAVIGATION (ORANGE) --- */
.nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 300px;
    height: 100%;
    background-color: #FFA300; 
    z-index: 1500;
    transition: right 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    display: flex;
    flex-direction: column;
    padding: 3cm 25px 2rem 25px;
    box-sizing: border-box;
    box-shadow: -10px 0 30px rgba(0,0,0,0.1);
}

body.menu-open .nav-menu {
    right: 0;
}

.nav-menu a {
    text-decoration: none;
    color: #000;
    font-weight: 600;
    font-size: 1.6rem;
    margin-bottom: 1.5rem;
}

.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.1);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s;
    z-index: 1400;
}

body.menu-open .menu-overlay {
    opacity: 1;
    visibility: visible;
}

/* --- 5. BLUR LOGIK (MOBILE VS DESKTOP) --- */
body.menu-open .content-wrapper {
    filter: blur(5px);
    pointer-events: none;
}

@media (min-width: 1100px) {
    body.menu-open .content-wrapper {
        filter: none !important;
        pointer-events: auto;
    }
    body.menu-open .menu-overlay {
        opacity: 0 !important;
        visibility: hidden;
    }
}

/* --- 6. TEXT-STYLING & ABSTÄNDE --- */
main { padding: 3rem 0 5rem 0; }

.content-text { font-size: 18px; line-height: 1.8; }

/* Standard-Abstand für Geschichten */
.content-text p { 
    margin-bottom: 2rem; 
    margin-top: 0; 
    white-space: pre-wrap; 
}

/* SPEZIELLE ANPASSUNG FÜR IMPRESSUM / KONTAKT */
.legal-page .content-text p {
    margin-bottom: 1rem; /* Kompakterer Abstand für Adressblöcke */
    text-align: left;
}

.story-page .content-text {
    text-align: justify;
    hyphens: auto;
}

/* Initiale (Drop Cap) */
.story-page .content-text p:first-of-type::first-letter {
    float: left;
    font-size: 4em;
    line-height: 0.9;
    padding-right: 0.5rem;
    padding-top: 0.1rem;
    font-weight: 500;
}

/* --- 7. BEDIENELEMENTE --- */
.font-control-panel, #backToTop {
    position: fixed;
    bottom: 30px;
    height: 44px;
    background-color: #FFA300;
    border-radius: 22px;
    z-index: 900;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    border: none;
}

.font-control-panel {
    left: 20px;
    width: 150px;
    padding: 0 15px;
    justify-content: space-between;
}

#backToTop {
    right: 20px;
    width: 44px;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s ease;
}

#backToTop.show { opacity: 1; visibility: visible; }
#backToTop svg { width: 24px; height: 24px; fill: black; }

@media (min-width: 900px) {
    .font-control-panel { left: calc(50% - 250px - 150px - 40px); }
    #backToTop { right: calc(50% - 250px - 44px - 40px); }
}

#fontSlider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 3px;
    background: rgba(0,0,0,0.2);
    outline: none;
    cursor: pointer;
}

#fontSlider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    background: #000;
    border-radius: 50%;
}

/* --- 8. FOOTER --- */
footer {
    flex-shrink: 0;
    text-align: center;
    padding: 40px 0;
    font-size: 0.9rem;
    color: #888;
    border-top: 1px solid #eee;
    background-color: #fdfdfd;
}