/* ==========================================================================
   SCHALL / FRANCKE - ABSOLUTE 18PX UNIFORMITY (style.css)
   ========================================================================== */

/* Schriften aus dem Unterordner FONTS laden */
@font-face {
    font-family: 'Cormorant Garamond';
    font-style: normal;
    font-weight: 400;
    src: url('../fonts/cormorant-garamond-v21-latin-regular.woff2') format('woff2');
}

@font-face {
    font-family: 'Cormorant Garamond';
    font-style: normal;
    font-weight: 600;
    src: url('../fonts/cormorant-garamond-v21-latin-700.woff2') format('woff2');
}

/* DIE EISERNE REGEL: Zwingt absolut JEDES Zeichen auf der Website zu 100% */
body, html, header, main, div, p, span, h1, h2, h3, summary, details, a {
    color: #EBEBEB !important;
    opacity: 1 !important;
    font-family: 'Cormorant Garamond', serif !important;
    font-size: 19px !important;
    font-weight: 400 !important;
    line-height: 1.6 !important;
}

html {
    scroll-behavior: smooth;
}

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

body {
    background-color: #0C0C0C;
}

/* Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px 80px;
    background-color: transparent !important;
    z-index: 1000;
}

.logo a {
    text-decoration: none;
    letter-spacing: 2px;
}

nav a {
    text-decoration: none;
    margin-left: 30px;
    letter-spacing: 1px;
}

/* Landing Page */
.hero {
    width: 100%;
    height: 100vh;
    background-image: url('landing-bg.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Werkverzeichnis */
.werkverzeichnis {
    width: 100%;
    padding: 120px 40px 60px 80px; 
    box-sizing: border-box;
}

/* Verhindert das unruhige Springen in beide Richtungen (Desktop) */
.work-item {
    border-bottom: none;
    display: block;
    /* Zwingt den Browser beim Öffnen und Schließen, den Fokus starr zu halten */
    overflow-anchor: auto !important; 
}

/* Deaktiviert den störenden Browser-Automatismus direkt auf dem HTML-Befehl */
details {
    overflow-anchor: auto !important;
}


/* Feiner ausbalanciertes Spaltenraster */
.work-summary {
    display: grid;
    grid-template-columns: 70px 3.2fr 2.6fr 2.5fr 1.5fr;
    gap: 25px;
    cursor: pointer;
    list-style: none;
    user-select: none;
    align-items: flex-start;
    white-space: normal;
    word-break: break-word;
    padding: 16px 40px; 
}

.work-summary div:last-child {
    text-align: left;
}

/* ==========================================================================
   DESKTOP STANDARD (Gilt für Laptops & Monitore – Unverändert 50/50)
   ========================================================================== */

/* Aufgeklappter Inhalt: Jetzt mathematisch exakt bündig unter dem Stücktitel (Desktop) */
.work-content {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 40px !important;
    /* 40px Tabellen-Padding + 70px Jahr + 25px Gap = exakt 135px! */
    padding: 10px 40px 40px 135px !important; 
}



.work-text {
    padding: 0 !important; /* Säubert die alte, störende mobile Verschiebung */
}

.work-text p {
    margin-bottom: 16px;
}

.work-text p:last-child {
    margin-bottom: 0;
}

.work-image-click {
    cursor: pointer;
    width: 100%;
    height: auto;
    max-height: 450px;
    object-fit: cover;
    display: block;
}

/* INFO-SEKTION (Desktop) */
.info-header-line {
    padding-left: 140px !important; 
    margin-bottom: 40px !important;
}

.info-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 40px !important;
    padding-left: 140px !important; 
    padding-right: 40px !important;
    align-items: flex-start !important;
}

.info-left p {
    max-width: 500px !important;
}

.info-right h3 {
    letter-spacing: 2px !important;
    margin-bottom: 24px !important;
}

.info-right p {
    margin-bottom: 24px !important;
}

.info-right a {
    text-decoration: none !important;
    border-bottom: 1px solid rgba(235, 235, 235, 0.3) !important;
    padding-bottom: 2px !important;
}

.copyright-line {
    margin-top: 60px !important;
    display: block !important;
}

/* Lightbox System */
.lightbox {
    display: none;
    position: fixed;
    z-index: 2000;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(12, 12, 12, 0.98);
    align-items: center;
    justify-content: center;
}

.lightbox:target {
    display: flex;
}

.lightbox-content {
    position: relative;
    width: 95%;
    height: 95%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
}

.close-lightbox,
.nav-lightbox {
    text-transform: lowercase;
    text-decoration: none;
    user-select: none;
    font-size: 32px !important; 
    transition: opacity 0.2s;
    line-height: 1;
}

.close-lightbox:hover,
.nav-lightbox:hover {
    opacity: 0.5 !important;
}

.close-lightbox {
    position: absolute;
    top: 30px;
    right: 40px;
    z-index: 2100;
}

.nav-lightbox {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    padding: 20px;
}

.prev-img { left: 20px; }
.next-img { right: 20px; }

/* ==========================================================================
   RADIKALE MOBIL-OPTIMIERUNG (PERFEKTE TEXTACHSEN-BÜNDIGKEIT)
   ========================================================================== */
@media (max-width: 1024px) {
    
    header {
        padding: 20px 15px !important; 
        display: flex !important;
        justify-content: space-between !important;
        align-items: baseline !important;
        flex-wrap: nowrap !important;
    }

    .logo {
        max-width: 55% !important; 
    }

    .logo a {
        font-size: 18px !important;
        display: block !important;
        white-space: normal !important; 
        line-height: 1.3 !important;
    }

    nav {
        display: flex !important;
        flex-direction: row !important; 
        align-items: baseline !important; 
        justify-content: flex-end !important;
        flex-shrink: 0 !important; 
        white-space: nowrap !important; 
    }

    nav a {
        font-size: 18px !important; 
        margin-left: 20px !important; 
        display: inline-block !important;
    }
    
       /* 2. Werkverzeichnis-Container maximal ausdehnen */
    .werkverzeichnis {
        padding: 100px 0px 40px 0px !important; 
    }
    
    /* Hält das Akkordeon auf dem Smartphone beim Nachrutschen starr im Fokus */
    .work-item, details {
        overflow-anchor: auto !important;
    }
    
    /* 3. Die geschlossenen Tabellenzeilen */
    .work-summary {
        display: block !important;
        position: relative !important;
        padding: 14px 15px 14px 85px !important; 
    }


    
    .work-content {
        display: block !important;
        padding: 0px 0px 30px 0px !important; 
    }
    
    .work-text {
        padding: 0px 15px 20px 85px !important; 
    }
    
    .work-text p {
        margin-bottom: 12px !important;
    }
    
    .work-image-click {
        width: 100vw !important;
        max-width: 100vw !important;
        margin-left: 0px !important;
        padding: 0 !important;
        border-radius: 0 !important;
        height: auto !important;
        max-height: 350px !important;
        object-fit: cover !important;
    }
    
    #info,
    #info.info-centered-layout {
        padding: 100px 15px 60px 15px !important; 
        width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .info-header-line,
    .info-grid {
        padding-left: 0 !important; 
        padding-right: 0 !important;
    }
    
    .info-statement {
        text-align: center !important;
        font-size: 18px !important; 
        width: 100% !important;
    }
}
