/* =========================
   Grundeinstellungen
========================= */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body.galerie-page {
    margin: 0;
    min-width: 0;
    overflow-x: hidden;
    font-family: 'Inter', sans-serif;
    color: #222222;
    background: #f5f6f8;
}

img,
video {
    max-width: 100%;
}

.container {
    width: 90%;
    max-width: 1450px;
    margin: 0 auto;
}

/* =========================
   Header
========================= */

header {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;

    width: 100%;

    background: transparent;
    transition: transform 0.3s ease;

    border: 0;
    box-shadow: none;
}
header.header-hidden {
    transform: translateY(-100%);
}
.navbar {
    position: relative;

    height: 110px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.mobile-menu-button {
    display: none;
}

/* Logo */

.logo {
    display: flex;
    align-items: center;
    gap: 18px;

    color: inherit;
    text-decoration: none;
}

.logo:hover,
.logo:focus,
.logo:focus-visible {
    color: inherit;
    text-decoration: none;
}

.logo:focus-visible {
    outline: 3px solid #e30613;
    outline-offset: 4px;
    border-radius: 6px;
}

.logo-icon img {
    display: block;

    width: auto;
    height: 120px;

    object-fit: contain;

    transition: transform 0.3s ease;
}

.logo-icon img:hover {
    transform: scale(1.05);
}

.logo-text h3 {
    margin: 0;
    text-transform:uppercase;

    color: #e30613;
    font-size: 18px;
    line-height: 1;
}
.logo-text span {
    color: #ffffff;
    font-size: 16px;
}

/* Desktop-Navigation */

#hauptnavigation ul {
    display: flex;
    align-items: center;
    gap: 40px;

    margin: 0;
    padding: 0;

    list-style: none;
}

#hauptnavigation a {
    color: #ffffff;
    font-weight: 500;
    text-decoration: none;
    text-transform: uppercase;

    transition: color 0.3s ease;
}

#hauptnavigation a:hover,
#hauptnavigation a:focus-visible {
    color: #d70000;
    text-decoration: none;
}

#hauptnavigation a:focus-visible {
    outline: 3px solid #e30613;
    outline-offset: 4px;
    border-radius: 3px;
}

/* =========================
   Mobile Navigation
========================= */

@media (max-width: 1000px) {
    .navbar {
        height: auto;
        min-height: 90px;

        flex-direction: row;

        padding-top: 15px;
        padding-bottom: 15px;
    }

    .navbar .logo {
        min-width: 0;
        gap: 10px;
    }ew

    .navbar .logo-icon img {
        width: 65px;
        height: auto;
    }

    .navbar .logo-text h3 {
        margin: 0;
        font-size: 12px;
    }

    .navbar .logo-text span {
        font-size: 10px;
    }

    .mobile-menu-button {
        display: inline-flex;
        align-items: center;
        justify-content: center;

        flex-shrink: 0;

        margin-left: auto;
        padding: 12px 16px;

        border: 0;
        border-radius: 10px;

        background: #e30613;
        color: #ffffff;

        font: inherit;
        font-weight: 700;

        cursor: pointer;
    }

    .mobile-menu-button:focus-visible {
        outline: 3px solid #222222;
        outline-offset: 3px;
    }

    .navbar #hauptnavigation {
        position: absolute;
        top: 100%;
        right: 0;
        z-index: 1000;

        display: none;

        width: min(280px, 100%);
        padding: 12px;

        background: #ffffff;
        border-radius: 0 0 16px 16px;

        box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
    }

    .navbar #hauptnavigation.is-open {
        display: block;
    }

    .navbar #hauptnavigation ul {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 4px;

        width: 100%;
        margin: 0;
        padding: 0;

        list-style: none;
    }

    .navbar #hauptnavigation a {
        display: block;

        width: 100%;
        padding: 14px 16px;

        border-radius: 8px;

        color: #222222;
        font-weight: 500;
        text-decoration: none;
        text-transform: uppercase;

        overflow-wrap: anywhere;
    }

    .navbar #hauptnavigation a:hover,
    .navbar #hauptnavigation a:focus-visible {
        background: #fff0f1;
        color: #e30613;
    }
}

/* =========================
   Hero
========================= */



.galerie-hero {
    position: relative;
    min-height: 650px;
    padding: 130px 0 110px;

    display: flex;
    align-items: center;

    overflow: hidden;
    color: #ffffff;
    background-image: var(
        --galerie-hero-bild,
        linear-gradient(135deg, #7d0009 0%, #1f2937 100%)
    );
    background-position: center 58%;
    background-size: cover;
    background-repeat: no-repeat;
}

.galerie-hero-overlay {
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(90deg, rgba(8, 12, 20, .84) 0%, rgba(8, 12, 20, .48) 55%, rgba(8, 12, 20, .25) 100%),
        linear-gradient(0deg, rgba(0, 0, 0, .30), rgba(0, 0, 0, .08));
}

.galerie-hero-content {
    padding-top: 70px;
    padding-bottom: 70px;
}

.galerie-kicker {
    display: block;
    margin-bottom: 16px;
    color:#f80616;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 3px;
}

.galerie-hero h1 {
    max-width: 900px;
    margin: 0;
    font-size: clamp(52px, 8vw, 104px);
    line-height: .95;
    letter-spacing: -2px;
}

.galerie-hero p {
    max-width: 720px;
    margin: 26px 0 0;
    font-size: 21px;
    line-height: 1.7;
}

/* =========================
   Galerie-Hero mit Video
========================= */

.galerie-hero {
    position: relative;
    min-height: 850px;
    overflow: hidden;
    display: grid;
    align-items: center;
    isolation: isolate;
    color: #ffffff;
    background: #111827;
}

.galerie-hero-video {
    position: absolute;
    inset: 0;
    z-index: -2;

    display: block;
    width: 100%;
    height: 100%;

    object-fit: cover;
    object-position: center;

    pointer-events: none;
}

.galerie-hero-overlay {
    position: absolute;
    inset: 0;
    z-index: -1;

    background:
        linear-gradient(
            90deg,
            rgba(8, 12, 20, 0.82) 0%,
            rgba(8, 12, 20, 0.46) 55%,
            rgba(8, 12, 20, 0.22) 100%
        );

    pointer-events: none;
}

.galerie-hero-content {
    position: relative;
    z-index: 1;
    padding-top: 70px;
    padding-bottom: 70px;
}

.galerie-kicker {
    display: block;
    margin-bottom: 16px;

    color: #f90011;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 2px;
}

.galerie-hero h1 {
    max-width: 900px;
    margin: 0;

    font-size: clamp(52px, 8vw, 104px);
    line-height: 0.95;
    letter-spacing: -2px;
}

.galerie-hero p {
    max-width: 720px;
    margin: 26px 0 0;

    font-size: 21px;
    line-height: 1.7;
}

@media (max-width: 650px) {
    .galerie-hero {
        min-height: 620px;
    }

    .galerie-hero-video {
        object-position: center;
    }

    .galerie-hero-content {
        padding-top: 55px;
        padding-bottom: 55px;
    }

    .galerie-hero h1 {
        font-size: 54px;
        letter-spacing: -1px;
    }

    .galerie-hero p {
        font-size: 18px;
        line-height: 1.6;
    }
}
/* =========================
   Galerie und Slider
========================= */

.galerie-inhalt {
    padding: 90px 0 110px;
}

.galerie-einleitung {
    max-width: 850px;
    margin: 0 auto 70px;
    color: #555555;
    font-size: 20px;
    line-height: 1.8;
    text-align: center;
}

.galerie-slider-block {
    margin-bottom: 85px;
    padding: 42px;
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 0 18px 45px rgba(0, 0, 0, .09);
}

.galerie-slider-block:last-child {
    margin-bottom: 0;
}

.galerie-slider-kopf {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 520px);
    gap: 50px;
    align-items: end;
    margin-bottom: 30px;
}

.galerie-slider-nummer {
    display: block;
    margin-bottom: 8px;
    color: #e30613;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 2px;
}

.galerie-slider-kopf h2 {
    margin: 0;
    font-size: clamp(30px, 4vw, 50px);
    line-height: 1.1;
}

.galerie-slider-kopf p,
.galerie-slider-beschreibung {
    margin: 0;
    color: #5b616b;
    font-size: 17px;
    line-height: 1.7;
}

.galerie-slider-beschreibung p {
    margin: 0;
}

.galerie-slider-rahmen {
    position: relative;
    overflow: hidden;
    background: #0b1018;
    border-radius: 18px;
}

.galerie-slider-spur {
    position: relative;
    min-height: 620px;
}

.galerie-slide {
    position: absolute;
    inset: 0;
    margin: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateX(24px);
    transition: opacity .35s ease, transform .35s ease, visibility .35s ease;
}

.galerie-slide.is-active {
    position: relative;
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

.galerie-slide img,
.galerie-slide video {
    display: block;
    width: 100%;
    height: 620px;
    object-fit: contain;
    background: #0b1018;
}

.galerie-slide figcaption {
    position: absolute;
    left: 22px;
    right: 22px;
    bottom: 22px;
    padding: 14px 18px;
    color: #ffffff;
    background: rgba(8, 12, 20, .78);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    line-height: 1.5;
}

.galerie-slider-button {
    position: absolute;
    top: 50%;
    z-index: 5;
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    color: #ffffff;
    background: rgba(227, 6, 19, .90);
    font-size: 38px;
    line-height: 1;
    cursor: pointer;
    transform: translateY(-50%);
    transition: background .2s ease, transform .2s ease;
}

.galerie-slider-button:hover,
.galerie-slider-button:focus-visible {
    background: #b9000b;
    transform: translateY(-50%) scale(1.06);
}

.galerie-slider-button:focus-visible,
.galerie-thumbnail:focus-visible {
    outline: 3px solid #ffffff;
    outline-offset: 3px;
}

.galerie-slider-zurueck {
    left: 20px;
}

.galerie-slider-weiter {
    right: 20px;
}

.galerie-slider-status {
    position: absolute;
    z-index: 5;
    right: 20px;
    bottom: 20px;
    display: flex;
    gap: 7px;
    padding: 9px 13px;
    color: #ffffff;
    background: rgba(0, 0, 0, .70);
    border-radius: 999px;
    font-size: 14px;
    font-weight: 700;
}

.galerie-thumbnails {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 120px;
    gap: 12px;
    overflow-x: auto;
    padding: 16px 2px 2px;
    scrollbar-width: thin;
}

.galerie-thumbnail {
    height: 82px;
    overflow: hidden;
    display: grid;
    place-items: center;
    gap: 4px;
    padding: 0;
    border: 3px solid transparent;
    border-radius: 10px;
    color: #ffffff;
    background: #1f2937;
    cursor: pointer;
    opacity: .68;
    transition: border-color .2s ease, opacity .2s ease, transform .2s ease;
}

.galerie-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.galerie-thumbnail.is-active,
.galerie-thumbnail:hover {
    border-color: #e30613;
    opacity: 1;
    transform: translateY(-2px);
}

.galerie-video-symbol {
    font-size: 22px;
}

.galerie-thumbnail span:last-child {
    font-size: 11px;
    font-weight: 700;
}

.galerie-leer {
    margin: 0;
    padding: 28px;
    color: #5b616b;
    background: #f1f3f6;
    border-radius: 14px;
    text-align: center;
}

/* =========================
   Mobile Navigation
========================= */

@media (max-width: 1000px) {
    .container {
        width: 100%;
        padding-left: 20px;
        padding-right: 20px;
    }

    .navbar {
        height: auto;
        min-height: 90px;
        flex-direction: row;
        padding-top: 15px;
        padding-bottom: 15px;
    }

    .navbar .logo {
        min-width: 0;
        gap: 10px;
    }

    .navbar .logo-icon img {
        width: 65px;
        height: auto;
    }

    .navbar .logo-text h2 {
        font-size: 30px;
    }

    .navbar .logo-text span {
        font-size: 14px;
    }

    .mobile-menu-button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        margin-left: auto;
        padding: 12px 16px;
        border: 0;
        border-radius: 10px;
        background: #e30613;
        color: #ffffff;
        font: inherit;
        font-weight: 700;
        cursor: pointer;
    }

    .navbar #hauptnavigation {
        display: none;
        position: absolute;
        top: 100%;
        right: 0;
        width: min(280px, 100%);
        padding: 12px;
        background: #ffffff;
        border-radius: 0 0 16px 16px;
        box-shadow: 0 15px 35px rgba(0, 0, 0, .15);
        z-index: 1000;
    }

    .navbar #hauptnavigation.is-open {
        display: block;
    }

    .navbar #hauptnavigation ul {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        margin: 0;
        padding: 0;
        list-style: none;
    }

    .navbar #hauptnavigation a {
        display: block;

        width: 100%;
        padding: 14px 16px;

        border-radius: 8px;

        color: #222222;
        font-weight: 500;
        text-decoration: none;
        text-transform: uppercase;

        overflow-wrap: anywhere;
    }

    .navbar #hauptnavigation a:hover,
    .navbar #hauptnavigation a:focus-visible {
        background: #fff0f1;
        color: #e30613;
    }

    .mobile-menu-button:focus-visible {
        outline: 3px solid #222222;
        outline-offset: 3px;
    }
.galerie-slider-kopf {
        grid-template-columns: minmax(0, 1fr);
        gap: 18px;
    }

    .galerie-slider-spur,
    .galerie-slide img,
    .galerie-slide video {
        min-height: 0;
        height: 500px;
    }
}

@media (max-width: 650px) {
    .galerie-hero {
        min-height: 620px;
    }

    .galerie-hero-content {
        padding-top: 55px;
        padding-bottom: 55px;
    }

    .galerie-hero h1 {
        font-size: 35px;
        letter-spacing: -1px;
    }

    .galerie-hero p {
        font-size: 18px;
        line-height: 1.6;
    }

    .galerie-inhalt {
        padding: 55px 0 70px;
    }

    .galerie-einleitung {
        margin-bottom: 42px;
        font-size: 17px;
        text-align: left;
    }

    .galerie-slider-block {
        margin-bottom: 42px;
        padding: 20px;
        border-radius: 17px;
    }

    .galerie-slider-spur,
    .galerie-slide img,
    .galerie-slide video {
        height: 330px;
    }

    .galerie-slide figcaption {
        left: 12px;
        right: 12px;
        bottom: 12px;
        padding: 10px 12px;
        font-size: 14px;
    }

    .galerie-slider-button {
        width: 44px;
        height: 44px;
        font-size: 30px;
    }

    .galerie-slider-zurueck {
        left: 10px;
    }

    .galerie-slider-weiter {
        right: 10px;
    }

    .galerie-slider-status {
        right: 12px;
        bottom: 12px;
    }

    .galerie-thumbnails {
        grid-auto-columns: 92px;
    }

    .galerie-thumbnail {
        height: 68px;
    }
}

/* =========================
   Footer, unverändert zur Startseite
========================= */

.site-footer {
    padding: 28px 0;
    background: #111827;
    color: #ffffff;
}

.site-footer .footer-inhalt {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.footer-copyright,
.footer-ersteller {
    margin: 0;
    color: #d1d5db;
    font-size: 14px;
    line-height: 1.5;
}

.footer-links {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 18px;
}

.footer-rechtliches {
    display: flex;
    align-items: center;
    gap: 12px;
}

.site-footer a,
.site-footer a:visited {
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s ease;
}

.site-footer a:hover,
.site-footer a:focus-visible {
    color: #ff626c;
    text-decoration: none;
}

.site-footer a:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 4px;
    border-radius: 2px;
}

.footer-trenner,
.footer-haupttrenner {
    color: #6b7280;
}

.footer-ersteller a {
    margin-left: 4px;
}

@media (max-width: 850px) {
    .site-footer .footer-inhalt {
        flex-direction: column;
        justify-content: center;
        gap: 14px;
        text-align: center;
    }

    .footer-links {
        justify-content: center;
        flex-wrap: wrap;
        gap: 12px 16px;
    }
}

@media (max-width: 550px) {
    .site-footer {
        padding: 24px 0;
    }

    .footer-links {
        flex-direction: column;
        gap: 10px;
    }

    .footer-haupttrenner {
        display: none;
    }

    .footer-copyright,
    .footer-ersteller,
    .site-footer a {
        font-size: 13px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
    }
}


/* Header und Navigation exakt wie auf der Startseite */
header {
    background: transparent;
}

#hauptnavigation a {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
}

@media (max-width: 1000px) {
    header {
        background: transparent;
    }

    .navbar .logo-text h2 {
        margin: 0;
        font-family: 'Inter', sans-serif;
        font-size: 30px;
        font-weight: 700;
        line-height: 1;
    }

    .navbar .logo-text span {
        font-family: 'Inter', sans-serif;
        font-size: 14px;
        font-weight: 400;
    }

    .mobile-menu-button {
        font-family: 'Inter', sans-serif;
        font-weight: 700;
    }

    .navbar #hauptnavigation a {
        font-family: 'Inter', sans-serif;
        font-size: 16px;
        font-weight: 500;
    }
}


/* Navigationsschrift exakt wie auf der Startseite */
header .navbar #hauptnavigation ul li a {
    font-family: 'Inter', sans-serif;
    font-weight: 500 !important;
}


/* Einheitliche Handy-Herohoehe wie bei Lehrgaenge */
@media (max-width: 650px) {
    .galerie-hero {
        width: 100vw;
        min-height: 620px;
        height: 620px;
        max-height: 620px;
        margin: 0;
        margin-left: calc(50% - 50vw);
        padding-top: 110px;
        padding-bottom: 58px;
        border: 0;
        border-radius: 0;
        background-size: cover;
        background-repeat: no-repeat;
    }
}
