/* Globale Stile für PC */
body {
    margin: 0;
    font-family: 'Baskerville Old Face', serif;
    overflow: hidden;
    background-color: #f4f4f4;
    color: #333;
}

/* Hauptcontainer für Flexbox-Layout */
.main-layout-container {
    display: flex;
    flex-direction: row-reverse; /* Seitenleiste rechts auf PC */
    min-height: 100vh;
}

.content-wrapper {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

/* Seitenleiste für PC */
.right-sidebar {
    width: 100px;
    background-color: #333;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: width 0.5s ease-out;
    overflow: hidden;
    text-align: center;
}

.right-sidebar.expanded {
    width: 300px;
}

.sidebar-text {
    font-family: 'Baskerville Old Face', serif;
    font-size: 80px;
    white-space: nowrap;
    transition: font-size 0.5s ease-out;
}

.right-sidebar.expanded .sidebar-text {
    font-size: 30px;
    font-weight: normal;
}

.right-sidebar.expanded .sidebar-text .highlight-inline {
    font-size: 80px;
    font-weight: bold;
}

/* Scroll-Container */
.scroll-container {
    height: 100vh;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
}

.page {
    width: 100%;
    height: 100vh;
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 20px;
    box-sizing: border-box;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease-in-out, transform 0.8s ease-in-out;
    position: relative;
}

.page.active {
    opacity: 1;
    transform: translateY(0);
}

/* Pseudo-Element für den dunklen Hintergrund auf allen Seiten */
.page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    z-index: 1;
}

/* Hintergrundbilder für jede Seite */
#page1 {
    background-image: url('bild.jpg'); /* HIER den Pfad für Seite 1 anpassen */
    background-size: cover;
    background-position: center;
    color: white;
}

#page2 {
    background-image: url('bild2.jpg'); /* HIER den Pfad für Seite 2 anpassen */
    background-size: cover;
    background-position: center;
    color: white;
}

#page3 {
    background-image: url('bild3.jpg'); /* HIER den Pfad für Seite 3 anpassen */
    background-size: cover;
    background-position: center;
    color: white;
}


/* Vordergrund-Elemente nach oben bringen (über dem Overlay) */
.page > * {
    position: relative;
    z-index: 2;
}

/* Bildeigenschaften für Seite 2 und 3 */
.page img {
    max-width: 80%;
    max-height: 50vh;
    object-fit: contain;
    margin-bottom: 20px;
    border-radius: 10px;
}

/* Text-Container für bessere Kontrolle über Abstände und Schrift */
.text-container {
    padding: 20px;
}

.page h1 {
    font-size: 3.5em;
    margin-bottom: 0.5em;
}

.page h2 {
    font-size: 2.5em;
    margin-bottom: 0.5em;
}

.page p {
    font-size: 1.5em;
    max-width: 600px;
    line-height: 1.6;
}

/* Stil für Links */
.page p a {
    color: white;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.5);
    transition: color 0.3s ease, border-bottom 0.3s ease;
}

.page p a:hover, .page p a:focus {
    color: white;
    border-bottom: 2px solid white;
}


/* Footer für PC */
.main-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: calc(100% - 100px);
    background-color: #333;
    color: white;
    padding: 20px;
    text-align: left;
    box-sizing: border-box;
    z-index: 99;
}

/* Navigationspunkte und Pfeile (Desktop) */
.nav-dots.mobile-only { display: none; }
.nav-dots.desktop-only {
    position: fixed;
    top: 50%;
    left: 20px;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 100;
}
.nav-dots .nav-arrow {
    background: none; border: none; color: #333; font-size: 24px; font-weight: bold; cursor: pointer; padding: 0; margin: 0 auto; transition: color 0.3s;
}
.nav-dots .nav-arrow:hover { color: #555; }
.nav-dots .nav-arrow:disabled { color: #ccc; cursor: not-allowed; }
.dot {
    display: block; width: 12px; height: 12px; background-color: rgba(0, 0, 0, 0.3); border-radius: 50%; transition: background-color 0.3s, transform 0.3s;
}
.dot.active { background-color: #333; transform: scale(1.2); }

/* Mauszeiger-Anpassungen */
.nav-dots .dot, .nav-dots .nav-arrow, .right-sidebar { cursor: pointer; }
.page p, .page h1, .page h2, .main-footer p { cursor: text; }

/* MOBILE ANPASSUNGEN (auf Bildschirmen bis 768px) */
@media (max-width: 768px) {
    /* Desktop-Elemente ausblenden */
    .desktop-only { display: none !important; }
    /* Mobile-Elemente anzeigen */
    .mobile-only { display: flex !important; }

    body {
        overflow-y: auto;
    }
    
    .main-layout-container {
        flex-direction: column;
        min-height: auto;
    }

    /* Seitenleiste wird zur festen Kopfzeile */
    .right-sidebar {
        width: 100%;
        height: auto;
        padding: 15px;
        position: fixed;
        top: 0;
        left: 0;
        z-index: 101;
        box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    }
    .sidebar-text { font-size: 30px; }
    .right-sidebar.mobile-expanded .sidebar-text { font-size: 24px; white-space: normal; }
    .right-sidebar.mobile-expanded .sidebar-text .highlight-inline { font-size: 24px; }
    .right-sidebar.expanded { width: 100%; }

    /* Platz für die feste Kopfzeile schaffen */
    .content-wrapper {
        padding-top: 60px;
    }

    .scroll-container {
        overflow-y: visible;
        height: auto;
        padding-bottom: 20px;
    }

    /* Footer ist nicht mehr fixiert */
    .main-footer {
        position: static;
        width: 100%;
        text-align: center;
        margin-top: 20px;
    }

    /* Navigationspunkte am unteren Rand fixieren */
    .nav-dots.mobile-only {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        justify-content: center;
        background-color: rgba(255, 255, 255, 0.8);
        padding: 10px 0;
        box-shadow: 0 -2px 5px rgba(0,0,0,0.1);
        z-index: 100;
        gap: 20px;
    }

    /* Platz für die feste Navigationsleiste schaffen */
    body {
        padding-bottom: 50px;
    }
}