/* ========================================
   Farben und Grundeinstellungen
======================================== */

:root {
    --hintergrund: #0e1624;
    --karte: #ffffff;
    --text: #253044;
    --akzent: #2463a6;
    --linie: #dce1e8;
    --sekundaertext: #647084;

    --banner-start: #101d36;
    --banner-ende: #244b7a;

    --datum-hintergrund: #d9eaff;
    --datum-text: #123b70;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--hintergrund);
    color: var(--text);
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.6;
}

a {
    color: var(--akzent);
}

img {
    max-width: 100%;
}


/* ========================================
   Banner mit dunkelblauem Farbverlauf
======================================== */

.kopfbereich {
    padding: 40px 20px;
    background: linear-gradient(
        135deg,
        var(--banner-start),
        var(--banner-ende)
    );
    border-bottom: 1px solid #172a46;
    text-align: center;
}

.kopfbereich h1 {
    margin: 0 0 10px;
    color: #ffffff;
    font-size: clamp(2rem, 5vw, 3rem);
}

.kopfbereich p {
    margin: 0;
    color: #e0e9f5;
}


/* ========================================
   Hauptinhalt
======================================== */

.hauptinhalt {
    width: min(1200px, 100%);
    margin: 0 auto;
    padding: 32px 20px 60px;
}


/* ========================================
   Projektbeschreibung mit weißem Hintergrund
======================================== */

.projektbeschreibung {
    margin-bottom: 30px;
    padding: 24px;
    background: #ffffff;
    color: #253044;
    border: 1px solid #e1e6ec;
    border-radius: 12px;
}

.projektbeschreibung h2 {
    margin-top: 0;
    color: #172a46;
}

.projektbeschreibung p {
    color: #374151;
}

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


/* ========================================
   Projektdatum: dunkelblau auf hellblau
======================================== */

.projekt-datum {
    display: inline-block;
    margin-bottom: 12px;
    padding: 5px 12px;
    border-radius: 20px;
    background: var(--datum-hintergrund);
    color: var(--datum-text);
    font-size: 0.85rem;
    font-weight: bold;
}

.ohne-datum {
    background: #e8e8e8;
    color: #555555;
}


/* ========================================
   Projektübersicht und Karten
======================================== */

.projekt-raster {
    display: grid;
    grid-template-columns:
        repeat(auto-fit, minmax(min(260px, 100%), 1fr));
    gap: 24px;
}

.projekt-karte {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid #e1e6ec;
    border-radius: 14px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.18);
    transition: transform 0.2s, box-shadow 0.2s;
}

.projekt-karte:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.projekt-bild {
    display: block;
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.karten-inhalt {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: flex-start;
    padding: 20px;
    background: #ffffff;
}

.karten-inhalt h2 {
    margin: 0 0 10px;
    font-size: 1.25rem;
    line-height: 1.35;
}

.karten-inhalt h2 a {
    color: #172a46;
    text-decoration: none;
}

.karten-inhalt h2 a:hover {
    color: var(--akzent);
}

.projekt-beschreibung {
    margin: 0 0 20px;
    color: #586477;
    overflow-wrap: anywhere;
}

.mehr-link {
    margin-top: auto;
    color: var(--akzent);
    font-weight: bold;
    text-decoration: none;
}

.mehr-link:hover {
    text-decoration: underline;
}


/* ========================================
   Galerie
======================================== */

.galerie {
    display: grid;
    grid-template-columns:
        repeat(auto-fit, minmax(min(220px, 100%), 1fr));
    gap: 18px;
}

.galerie-element {
    overflow: hidden;
    margin: 0;
    background: #ffffff;
    border: 1px solid #dce1e8;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.18);
}

.galerie-element img {
    display: block;
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: transform 0.2s;
}

.galerie-element a:hover img {
    transform: scale(1.03);
}


/* ========================================
   Zurück-Link
======================================== */

.zurueck-link {
    display: inline-block;
    margin-bottom: 24px;
    color: #d9eaff;
    font-weight: bold;
    text-decoration: none;
}

.zurueck-link:hover {
    color: #ffffff;
    text-decoration: underline;
}


/* ========================================
   Lightbox
======================================== */

.lightbox {
    position: fixed;
    z-index: 1000;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(0, 0, 0, 0.92);
}

.lightbox.aktiv {
    display: flex;
}

.lightbox img {
    max-width: 95vw;
    max-height: 90vh;
    object-fit: contain;
}

.lightbox-schliessen {
    position: absolute;
    top: 15px;
    right: 25px;
    border: 0;
    background: transparent;
    color: #ffffff;
    font-size: 2.5rem;
    cursor: pointer;
}


/* ========================================
   Fußbereich
======================================== */

footer {
    padding: 24px 20px;
    border-top: 1px solid #454b55;
    color: #d4d9e1;
    text-align: center;
    font-size: 0.9rem;
}


/* ========================================
   Smartphones
======================================== */

@media (max-width: 600px) {
    .kopfbereich {
        padding: 28px 16px;
    }

    .hauptinhalt {
        padding: 20px 14px 40px;
    }

    .projekt-bild {
        height: 190px;
    }

    .galerie {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .galerie-element img {
        height: 150px;
    }

    .projektbeschreibung {
        padding: 18px;
    }
}

/* ========================================
   Videos
======================================== */
.video-element {
    overflow: hidden;
    border-radius: 8px;
    background: #202630;
}

.video-element video {
    display: block;
    width: 100%;
    max-height: 420px;
    background: #000;
}

.video-element p {
    margin: 0;
    padding: 10px;
    color: #fff;
    overflow-wrap: anywhere;
}

/* Navigation innerhalb der Bild-Lightbox */
.lightbox-navigation {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 64px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 8px;
    background: rgba(30, 42, 60, 0.78);
    color: #ffffff;
    font-size: 1.8rem;
    cursor: pointer;
    z-index: 1002;
}

.lightbox-navigation:hover {
    background: rgba(55, 78, 110, 0.95);
}

.lightbox-navigation:focus-visible,
.lightbox-schliessen:focus-visible {
    outline: 3px solid #d9eaff;
    outline-offset: 3px;
}

.lightbox-vorheriges {
    left: 20px;
}

.lightbox-naechstes {
    right: 20px;
}

.video-element figcaption {
    margin: 0;
    padding: 10px;
    color: #ffffff;
    overflow-wrap: anywhere;
}

@media (max-width: 600px) {
    .lightbox-navigation {
        width: 42px;
        height: 54px;
        font-size: 1.4rem;
    }

    .lightbox-vorheriges {
        left: 8px;
    }

    .lightbox-naechstes {
        right: 8px;
    }
}

.galerie-bereich > h2 {
    color: #ffffff !important;
}

