/* =========================================================
   GRUNDLAGEN
   ========================================================= */

* 
{
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    height: 100%;
}

html {
    font-size: 16px;
}

body {
    margin: 0;
    background: #000;
    color: #fff;
    font-family:
        "Source Sans Pro",
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
    font-size: 1rem;
    line-height: 1.65;
    overflow: hidden;
}

a {
    color: #fff;
    text-decoration: none;
    transition:
        color 0.25s ease,
        opacity 0.25s ease;
}

a:hover {
    color: #ff9d3c;
}


/* =========================================================
   HINTERGRUND
   ========================================================= */

#bg {
    position: fixed;
    inset: 0;
    z-index: 0;

    background:
        linear-gradient(
            rgba(0, 0, 0, 0.35),
            rgba(0, 0, 0, 0.35)
        ),
        url("../img/overlay.png"),
        url("../img/bg-max.jpg");

    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;

    transform: scale(1);
    transition:
        filter 0.5s ease,
        transform 0.5s ease;
}

#bg::after {
    content: "";
    position: absolute;
    inset: 0;

    background:
        linear-gradient(
            135deg,
            rgba(0, 0, 0, 0.15),
            rgba(0, 0, 0, 0.45)
        );

    pointer-events: none;
}


/* =========================================================
   WRAPPER
   ========================================================= */

#wrapper {
    position: relative;
    z-index: 2;

    width: 100%;
    min-height: 100vh;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 2rem;
}


/* =========================================================
   STARTSEITE
   ========================================================= */

#header {
    width: 100%;
    text-align: center;

    transition:
        opacity 0.45s ease,
        transform 0.45s ease,
        filter 0.45s ease;
}

#header .content {
    display: flex;
    justify-content: center;
}

#header .inner {
    max-width: 800px;
}

#header h1 {
    margin: 0;

    font-size: clamp(2.5rem, 6vw, 5rem);
    font-weight: 400;
    line-height: 1.1;

    letter-spacing: 0.04em;
    text-transform: uppercase;

    text-shadow:
        0 3px 25px rgba(0, 0, 0, 0.6);
}

#header h2 {
    margin: 1rem 0 2rem;

    font-size: clamp(1.1rem, 2.5vw, 1.7rem);
    font-weight: 300;

    letter-spacing: 0.08em;
}

#header p {
    margin: 0;
}

#header .open-panel {
    display: inline-block;

    padding: 0.8rem 1.4rem;

    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 4px;

    background: rgba(0, 0, 0, 0.18);

    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);

    transition:
        background 0.3s ease,
        border-color 0.3s ease,
        transform 0.3s ease;
}

#header .open-panel:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #ff9d3c;

    transform: translateY(-2px);
}


/* =========================================================
   OVERLAY / MAIN
   ========================================================= */

#main {
    position: fixed;
    inset: 0;
    z-index: 10;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 2rem;

    pointer-events: none;
}


/* =========================================================
   GLASSPANEL
   ========================================================= */

#main article {
    /* HIER GEÄNDERT: absolute sorgt dafür, dass sich die Fenster 
       stapeln und nicht mehr nebeneinander schieben */
    position: absolute;
    left: 0;
    top: 0;

    width: min(1200px, 100%) !important;
    max-height: min(82vh, 900px);

    padding: 3.5rem 3rem 3rem;

    /* ... dein restliches CSS für das Glasspanel bleibt absolut unverändert (background, blur, opacity, etc.) ... */
    position: absolute;
    left: 5%;
    top: 10%;
    transform: translate(-50%, -50%) translateY(25px) scale(0.97);



    overflow-y: auto;
    overflow-x: hidden;

    background:
        linear-gradient(
            135deg,
            rgba(8, 15, 28, 0.78),
            rgba(3, 8, 18, 0.68)
        );

    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 12px;

    box-shadow:
        0 30px 80px rgba(0, 0, 0, 0.65),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);

    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transform:
        translateY(25px)
        scale(0.97);

    transition:
        opacity 0.4s ease,
        transform 0.4s ease,
        visibility 0.4s ease;
}


/* geöffnetes Panel */

#main article.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;

    transform:
        translateY(0)
        scale(1);
}


/* =========================================================
   HINTERGRUND BEI GEÖFFNETEM PANEL
   ========================================================= */

body.is-article-visible #bg {
    filter: brightness(0.55) blur(2px);
    transform: scale(1.02);
}

body.is-article-visible #header {
    opacity: 0.18;
    filter: blur(2px);
    transform: scale(0.98);
}


/* =========================================================
   ÜBERSCHRIFTEN
   ========================================================= */

.major {
    margin: 0 0 2rem;

    font-size: clamp(1.7rem, 4vw, 2.5rem);
    font-weight: 300;
    line-height: 1.2;

    letter-spacing: 0.04em;
    text-transform: uppercase;

    color: #fff;
}

.content-text p {
    margin: 0 0 1.25rem;
}


/* =========================================================
   SCHLIESSEN-BUTTON
   ========================================================= */

.close {
    position: absolute;
    top: 1rem;
    right: 1rem;

    width: 42px;
    height: 42px;

    padding: 0;

    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 50%;

    background: rgba(0, 0, 0, 0.25);

    color: #fff;

    font-family: Arial, sans-serif;
    font-size: 1.8rem;
    font-weight: 300;
    line-height: 38px;

    cursor: pointer;

    transition:
        background 0.25s ease,
        border-color 0.25s ease,
        color 0.25s ease,
        transform 0.25s ease;
}

.close:hover {
    background: rgba(255, 157, 60, 0.15);
    border-color: #ff9d3c;
    color: #ff9d3c;

    transform: rotate(90deg);
}


/* =========================================================
   SCROLLBAR
   ========================================================= */

#main article::-webkit-scrollbar {
    width: 8px;
}

#main article::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.15);
}

#main article::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.25);
    border-radius: 10px;
}

#main article::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 157, 60, 0.55);
}


/* =========================================================
   PRELOAD
   ========================================================= */

body.is-preload #header {
    opacity: 0;
    transform: translateY(15px);
}


/* =========================================================
   TABLET
   ========================================================= */

@media screen and (max-width: 736px) {

    #wrapper {
        padding: 1.25rem;
    }

    #bg {
        background:
            linear-gradient(
                rgba(0, 0, 0, 0.35),
                rgba(0, 0, 0, 0.35)
            ),
            url("../img/overlay.png"),
            url("../img/bg.jpg");

        background-position: center;
        background-size: cover;
    }

    #main {
        padding: 1rem;
    }

    #main article {
        max-height: 88vh;
        padding: 3.2rem 1.5rem 2rem;

        border-radius: 10px;
    }

    #header h1 {
        font-size: clamp(2rem, 10vw, 3.5rem);
    }

    #header h2 {
        margin-top: 0.75rem;
        margin-bottom: 1.5rem;
    }

    #header .open-panel {
        padding: 0.7rem 1rem;
        font-size: 0.95rem;
    }

}


/* =========================================================
   KLEINE SMARTPHONES
   ========================================================= */

@media screen and (max-width: 480px) {

    #wrapper {
        padding: 1rem;
    }

    #header h1 {
        font-size: 2rem;
    }

    #header h2 {
        font-size: 1rem;
    }

    #header .open-panel {
        max-width: 90%;
    }

    #main article {
        padding-left: 1.2rem;
        padding-right: 1.2rem;
    }

    .major {
        font-size: 1.5rem;
    }

}
