/* 1. SCHRIFTART */
@font-face {
    font-family: 'Druk Wide';
    src: url('assets/font/DrukWideCyWeb-Bold.woff2') format('woff2'); 
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}

/* 2. GRUND-SETUP */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scrollbar-gutter: stable; /* Verhindert das Springen des Layouts */
    background-color: #000;
}

body {
    width: 100%;
    background-color: #ffffff;
    scroll-behavior: smooth;
    overflow-x: hidden;
    font-family: 'Druk Wide', sans-serif;
    color: #fff;
    -webkit-font-smoothing: antialiased;
}

/* 3. BRANDING BAR (FIXED) */
.top-branding-bar {
    position: fixed;
    backdrop-filter: blur(2px);
    top: 0;
    left: 0;
    width: 100%;
    height: 90px;
    z-index: 10001;
    background-color: transparent;
    pointer-events: none;
}

.header-inner-container {
    width: 100%;
    height: 100%;
    display: flex;
    border-bottom: 0.5px solid #ffffff;
}

.bar-section {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    pointer-events: auto;
}

.bar-side {
    width: 10%;
    cursor: pointer;
    transition: background 0.3s ease;
}

.bar-side:hover {
    background: rgba(255, 255, 255, 0.05);
}

.bar-center {
    width: 80%;
    border-left: 0.5px solid rgba(255, 255, 255, 0.5);
    border-right: 0.5px solid rgba(255, 255, 255, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
}

.nav-icon {
    width: 24px;
    height: 24px;
}

/* 4. SUB-BARS */
/* 4. SUB-BARS */
.sub-bar {
    position: fixed;
    top: 90px;
    height: 0;
    width: auto;
    overflow: hidden;
    background-color: rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(2px);
    z-index: 10000;
    transition: height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    
    /* DIE LÖSUNG: */
    border-bottom: 0.5px solid #ffffff; /* Linie ist IMMER da */
    margin-top: -0.5px; /* Schiebt die Sub-Bar exakt hinter die Top-Bar Linie */
}

.sub-bar.active {
    height: 90px;
    /* border-bottom hier entfernen, da sie oben schon definiert ist */
}

.align-left { left: 0; border-right: 0.5px solid #ffffff; }
.align-right { right: 0; border-left: 0.5px solid #ffffff; }

.sub-bar-content {
    height: 90px;
    padding: 0 40px;
    display: flex;
    align-items: center;
    gap: 20px;
    color: transparent;
    -webkit-text-stroke: 1px white;
    text-transform: uppercase;
    font-size: 1,2rem;
    letter-spacing: 0.1em;
    white-space: nowrap;
    transition: opacity 0.3s ease; /* Sanfter Fade für den Text */
    opacity: 0; /* Standardmäßig unsichtbar */
}

.sub-bar.active .sub-bar-content {
    opacity: 1; /* Sichtbar wenn aktiv */
}

.sub-bar-content a {
    color: transparent;
    -webkit-text-stroke: 1px white;
    text-decoration: none;
    transition: all 0.3s;
}

.sub-bar-content a:hover {
    color: white;
    -webkit-text-stroke: 0;
}

/* 5. TEXT STYLES */
.branding-text {
    font-weight: 900;
    color: transparent;
    -webkit-text-stroke: 1.2px white;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.top-bar-text { font-size: 1.8vw; }

/* 6. PROJECT ROWS */
.project-row {
    width: 100%;
    position: relative;
    overflow: hidden;
}

.project-row:first-of-type { margin-top: -1px; }

.project-images {
    display: flex;
    width: 100%;
}

.project-images img {
    width: 50%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
}

/* Gap-Fix für die Nahtstelle in der Mitte */
.project-images img:first-child {
    width: 50.1%;
    margin-right: -0.1%;
}

.project-overlay-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    width: 100%;
    text-align: center;
    pointer-events: none;
}

.project-title { font-size: 3.5vw; }

.project-link {
    text-decoration: none;
    cursor: pointer;
    pointer-events: auto;
    transition: all 0.4s ease;
}

.project-link:hover {
    color: white;
    -webkit-text-stroke: 0 transparent;
}

/* 7. MODAL */
.video-modal {
    display: none;
    position: fixed;
    z-index: 20000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: #fff;
    /* Ermöglicht das Scrollen des gesamten Fensters */
    overflow-y: auto; 
    -webkit-overflow-scrolling: touch; /* Sanftes Scrollen auf iOS */
}

.modal-content {
    /* Nicht mehr zentriert, sondern mit Abstand oben/unten */
    position: relative;
    margin: 60px auto; /* 60px Abstand oben/unten, horizontal mittig */
    width: 90%;
    max-width: 1200px;
    display: flex;
    flex-direction: column;
    /* Keine feste max-height mehr, das Fenster darf so lang sein wie nötig */
}

.modal-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 15px;
}

.modal-header {
        color: #000;
        font-size: 1.5vw; 
        text-transform: uppercase;
        display: block; /* Stellt sicher, dass es Raum einnimmt */
}

#player {
    width: 100%;
    background: #000;
    height: auto; /* Video behält sein Seitenverhältnis */
}

.video-modal .modal-footer {
    color: #000;
    padding-top: 25px;
    padding-bottom: 60px; /* Abstand nach unten, damit es nicht am Rand klebt */
    
    
    /* Scroll-Logik für den Footer deaktivieren, da wir jetzt das ganze Fenster scrollen */
    overflow-y: visible; 
    max-height: none; 
    
    /* Desktop-Schriftgröße */
    font-size: 16px;
    line-height: 1.1;
    font-family: 'Menlo';
    font-weight: bold;

}

video::-webkit-media-controls-start-playback-button {
    display: none !important;
    -webkit-appearance: none;
}

/* Scrollbalken-Styling für die Credits */
.modal-footer::-webkit-scrollbar {
    width: 3px;
}
.modal-footer::-webkit-scrollbar-thumb {
    background: #000;
}

.close-video {
    font-size: 24px;
    color: #000;
    cursor: pointer;
    transition: all 0.3s;
}

.close-video:hover { color: transparent; -webkit-text-stroke: 1px #000; }

#player { width: 100%; background: #000; }

.modal-footer { color: #000; font-size: 0.8rem; padding-top: 15px; }

/* 8. SCROLLBAR STYLE */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #000; }
::-webkit-scrollbar-thumb { background: #333; border-radius: 4px; }

/* NEU: Sichtbarkeits-Logik für den Textwechsel */
.mobile-text { display: none; }
.desktop-text { display: inline; }

/* 9. MOBILE */
@media (max-width: 768px) {
    /* Text-Switch aktivieren */
    .desktop-text { display: none; }
    .mobile-text { display: inline; }

    /* 1. Erstmal alle Bilder in den Project-Rows verstecken */
    .project-images img {
        display: none;
    }

    /* 2. Nur das "geflaggte" Bild wieder anzeigen */
    .project-images img.mobile-visible {
        display: block;
        width: 100%;   /* Es nimmt die volle Breite ein */
        height: auto;  /* Behält das Seitenverhältnis */
    }

    /* 3. Den Container anpassen, damit er nicht mehr auf 2 Spalten splittet */
    .project-images {
        display: block; /* Falls du vorher Flexbox für 2 Bilder genutzt hast */
    }


    /* Header auf 20px schrumpfen */
    .top-branding-bar { height: 40px; }
    .header-inner-container { border-bottom: 0.3px solid #ffffff; }
    
    .bar-section { height: 100%; }
    .bar-side { width: 20%; }
    .bar-center { 
        width: 60%; 
        border-left: 0.3px solid rgba(255, 255, 255, 0.5);
        border-right: 0.3px solid rgba(255, 255, 255, 0.5);
    }

    /* Icons verkleinern */
    .nav-icon { width: 18px; height: 18px; }

    /* Branding Text verkleinern & Kontur anpassen */
    
    /* 1. Zuerst die allgemeine Optik für ALLES was Branding ist */
    .branding-text {
        font-weight: 900;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        /* Hier KEINE font-size festlegen, wenn sie überall anders sein soll! */
    }

    /* 2. Nur der Text oben in der Menüleiste */
    .top-bar-text { 
        font-size: 10px !important; 
        -webkit-text-stroke: 0 !important;
        color: white !important;
    }

    /* 3. Nur die Titel auf den Projektbildern */
    .project-title { 
        font-size: 16px !important; 
        color: white !important;
    }


    .sub-bar {
        /* WICHTIG: Die top-Position muss auch im geschlossenen Zustand 20px sein */
        top: 40px !important;
        height: 0;
        overflow: hidden;
        /* Die Linie bleibt IMMER fest an der Unterkante der Sub-Bar */
        border-bottom: 0.3px solid rgba(255, 255, 255, 0.5); 
        transition: height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 10000;
        background-color: rgba(0, 0, 0, 0.1);
        backdrop-filter: blur(2px);
    }
/* Sub-Bar auf 20px anpassen */
    .sub-bar.active { 
        height: 40px !important;
        top: 40px !important;
        border-bottom: 0.3px solid #ffffff;
    }

    /* Kombinierte Inhalts-Logik für Mobile */
    .sub-bar-content { 
        height: 40px; 
        min-height: 40px; 
        padding: 0 20px;
        gap: 10px;
        display: flex;
        align-items: center;
        justify-content: center;
        opacity: 0; /* Standardmäßig unsichtbar für Fade-Out */
        transition: opacity 0.2s ease; /* Schnelles Ausfaden beim Schließen */
    }

    /* Einblenden wenn aktiv */
    .sub-bar.active .sub-bar-content {
        opacity: 1;
        transition: opacity 0.4s ease 0.1s; /* Langsames Einfaden mit Delay beim Öffnen */
    }

    /* Der Fix für den Stroke in der Sub-Bar */
    .sub-bar-content a, 
    .sub-bar-content span {
        font-size: 10px;
        -webkit-text-stroke: 0px white !important;
        color: white;
        letter-spacing: 0.05em !important;
        text-transform: uppercase;
    }
    
    .divider { 
        -webkit-text-stroke: 0 !important; 
        color: white !important; 
    }

 

    .modal-header {
        color: #000 !important;
        font-size: 0.8rem; /* Titel etwas kleiner */
        text-transform: uppercase;
        display: block; /* Stellt sicher, dass es Raum einnimmt */
    }

    .modal-footer {
        /* 1. Wir geben dem Browser eine Größe, die er akzeptiert */
        font-size: 11px !important; 
        line-height: 1.4;
        padding-top: 15px;

        /* 2. Wir schalten die automatische iOS-Vergrößerung aus */
        -webkit-text-size-adjust: none;

        /* 3. DER TRICK: Optische Verkleinerung auf ca. 7px */
        transform: scale(1.0); 
        transform-origin: top left; /* WICHTIG: Text bleibt links oben verankert */
        
        /* 4. Da scale den Platz nicht freigibt, müssen wir die Breite anpassen */
        width: 150% !important; 
        margin-bottom: -30px; /* Gleicht den leeren Raum aus, der durch das Skalieren entsteht */
    }



    /* Projekt-Ansicht */
    .project-images { flex-direction: row; }
    .project-images img { width: 50.1%; }
    .project-images img:first-child { margin-right: -0.1%; }
    
    .project-title { 
        font-size: 16px; 
        -webkit-text-stroke: 0.4px white;
    }
} /* Ende der Media Query */