﻿/* =========================================
   Header
   ========================================= */

.site-header {
    position: relative;
    z-index: 100;
    background: var(--color-background, #fff);
    color: var(--color-text, #141820);
    border-bottom: 1px solid var(--color-border, #e4e7eb);
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0 28px;

    width: 100%;
    min-height: 140px;
    padding: 10px clamp(24px, 7vw, 160px);
}


/* =========================================
   Logo
   ========================================= */

.site-logo {
    display: inline-flex;
    flex-shrink: 0;
    text-decoration: none;
}

.site-logo img {
    display: block;
    width: 140px;
    height: auto;
}


/* =========================================
   Hauptnavigation
   ========================================= */

.header-menu {
    margin-left: auto;
}

.main-nav__list,
.nav-dropdown__list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.main-nav__list {
    display: flex;
    align-items: center;
    gap: 30px;
}

.main-nav__link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding-block: 16px;

    color: inherit;
    font-family: inherit;
    font-size: 19px;
    font-weight: 800;
    line-height: 1.4;
    text-decoration: none;
    text-transform: uppercase;
    white-space: nowrap;
    cursor: pointer;

    transition: color 150ms ease;
}

.main-nav__link:hover,
.main-nav__link[aria-current="page"],
.nav-dropdown[open] > summary {
    color: var(--color-primary, #d60926);
}


/* =========================================
   Untermenüs
   ========================================= */

.nav-dropdown {
    position: relative;
}

.nav-dropdown > summary {
    list-style: none;
}

.nav-dropdown > summary::-webkit-details-marker {
    display: none;
}

.nav-chevron {
    flex-shrink: 0;
    width: 7px;
    height: 7px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: translateY(-2px) rotate(45deg);
}

.nav-dropdown[open] .nav-chevron {
    transform: translateY(1px) rotate(225deg);
}

.nav-dropdown__list {
    position: absolute;
    top: 100%;
    left: -16px;
    z-index: 10;

    width: max-content;
    min-width: 230px;
    max-width: min(320px, calc(100vw - 40px));
    padding: 8px;

    background: var(--color-background, #fff);
    border: 1px solid var(--color-border, #e4e7eb);
    border-radius: var(--radius-medium, 8px);
    box-shadow: 0 12px 28px rgb(0 0 0 / 10%);
}

.nav-dropdown__list a {
    display: block;
    padding: 12px 14px;

    border-radius: var(--radius-small, 4px);
    color: inherit;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.5;
    text-decoration: none;
    overflow-wrap: anywhere;

    transition:
        color 150ms ease,
        background-color 150ms ease;
}

.nav-dropdown__list a:hover,
.nav-dropdown__list a[aria-current="page"] {
    background: var(--color-surface, #f6f7f8);
    color: var(--color-primary, #d60926);
}

.main-nav__item:last-child .nav-dropdown__list {
    right: -16px;
    left: auto;
}


/* =========================================
   Social Media
   ========================================= */

.header-social {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    gap: 8px;
}

.header-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;

    width: 44px;
    height: 44px;
    border-radius: 50%;

    transition: background-color 150ms ease;
}

.header-social a:hover {
    background: var(--color-surface, #f6f7f8);
}

.header-social img {
    display: block;
    width: 24px;
    height: 24px;
}


/* =========================================
   Tastaturfokus
   ========================================= */

.site-header a:focus-visible,
.site-header button:focus-visible,
.site-header summary:focus-visible {
    outline: 2px solid var(--color-primary, #d60926);
    outline-offset: 4px;
    border-radius: var(--radius-small, 4px);
}


/* =========================================
   Mobiler Menüschalter
   ========================================= */

.menu-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;

    width: 44px;
    min-height: 44px;
    padding: 8px;

    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    cursor: pointer;
}

.menu-toggle__icon,
.menu-toggle__icon::before,
.menu-toggle__icon::after {
    display: block;
    width: 22px;
    height: 2px;
    background: currentColor;
}

.menu-toggle__icon {
    position: relative;
    flex-shrink: 0;
}

.menu-toggle__icon::before,
.menu-toggle__icon::after {
    position: absolute;
    left: 0;
    content: "";

    transition:
        transform 150ms ease,
        top 150ms ease;
}

.menu-toggle__icon::before {
    top: -7px;
}

.menu-toggle__icon::after {
    top: 7px;
}

.menu-toggle[aria-expanded="true"] .menu-toggle__icon {
    background: transparent;
}

.menu-toggle[aria-expanded="true"] .menu-toggle__icon::before {
    top: 0;
    transform: rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .menu-toggle__icon::after {
    top: 0;
    transform: rotate(-45deg);
}


/* =========================================
   Kompakter Desktop
   ========================================= */

@media (min-width: 1024px) and (max-width: 1279px) {
    .site-header__inner {
        min-height: 112px;
        padding-inline: 24px;
    }

    .site-logo img {
        width: 100px;
    }

    .main-nav__list {
        gap: 18px;
    }

    .main-nav__link {
        font-size: 16px;
    }

    .header-social {
        gap: 4px;
    }

    .header-social a {
        width: 40px;
        height: 40px;
    }
}


/* =========================================
   Tablet und Smartphone
   Gleiche Grenze wie in site.js
   ========================================= */

@media (max-width: 1023px) {
    .site-header__inner {
        flex-wrap: wrap;
        gap: 0 8px;

        min-height: 90px;
        padding: 12px 20px;
    }

    .site-logo {
        order: 1;
    }

    .site-logo img {
        width: 85px;
    }

    /* Social Icons bleiben neben dem Menüschalter sichtbar. */
    .header-social {
        order: 2;
        gap: 0;
        margin-left: auto;
    }

    .header-social a {
        width: 40px;
        height: 44px;
    }

    .header-social img {
        width: 22px;
        height: 22px;
    }

    .menu-toggle {
        order: 3;
    }

    .menu-toggle:not([hidden]) {
        display: inline-flex;
    }

    /* Menüschalter auch ohne Social Icons rechts ausrichten. */
    .site-logo + .header-menu + .menu-toggle {
        margin-left: auto;
    }

    /* Navigation unterhalb der oberen Headerzeile. */
    .header-menu {
        order: 4;
        flex-basis: 100%;

        width: 100%;
        min-width: 0;
        margin-left: 0;
        padding-block: 16px 8px;
    }

    /* Ohne JavaScript bleibt die Navigation zugänglich. */
    .site-header.is-enhanced .header-menu {
        display: none;
    }

    .site-header.is-enhanced.is-menu-open .header-menu {
        display: block;
    }

    .main-nav__list {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
    }

    .main-nav__item {
        border-top: 1px solid var(--color-border, #e4e7eb);
    }

    .main-nav__link {
        display: flex;
        justify-content: space-between;

        width: 100%;
        min-height: 48px;
        padding-block: 15px;

        font-size: 15px;
        white-space: normal;
    }

    .nav-dropdown__list,
    .main-nav__item:last-child .nav-dropdown__list {
        position: static;

        width: 100%;
        min-width: 0;
        max-width: none;
        margin-bottom: 12px;
        padding: 4px 8px;

        background: var(--color-surface, #f6f7f8);
        border: 0;
        box-shadow: none;
    }

    .nav-dropdown__list a {
        padding: 12px;
    }
}


/* =========================================
   Reduzierte Bewegung
   ========================================= */

@media (prefers-reduced-motion: reduce) {
    .site-header *,
    .site-header *::before,
    .site-header *::after {
        transition: none;
    }
}


/* =========================================
   Header beim Scrollen
   ========================================= */

.site-header {
    position: sticky;
    top: 0;
}

.site-header__inner {
    transition:
        min-height 200ms ease,
        padding-block 200ms ease;
}

.site-logo img {
    transition: width 200ms ease;
}

/* Schmaler Desktop-Header */
.site-header.is-scrolled {
    box-shadow: 0 4px 16px rgb(0 0 0 / 8%);
}

.site-header.is-scrolled .site-header__inner {
    min-height: 80px;
    padding-block: 8px;
}

.site-header.is-scrolled .site-logo img {
    width: 80px;
}

/* Schmaler mobiler Header */
@media (max-width: 1023px) {
    .site-header.is-scrolled .site-header__inner {
        min-height: 68px;
        padding-block: 6px;
    }

    .site-header.is-scrolled .site-logo img {
        width: 64px;
    }
}

/* Nach den neuen Übergängen erneut berücksichtigen. */
@media (prefers-reduced-motion: reduce) {
    .site-header__inner,
    .site-logo img {
        transition: none;
    }
}




/* =========================================
   Footer
   ========================================= */

.site-footer {
    padding-top: clamp(40px, 5vw, 72px);
    background: #202020;
    color: #fff;
}

.site-footer__inner,
.site-footer__bottom {
    width: 100%;
    padding-inline: clamp(24px, 7vw, 160px);
}

.site-footer__inner {
    display: grid;
    grid-template-columns: 1.2fr repeat(3, minmax(0, 1fr));
    gap: 40px;
    padding-bottom: 48px;
}

.site-footer__brand,
.site-footer__column {
    min-width: 0;
}


/* =========================================
   Logo
   ========================================= */

.site-footer__logo {
    display: inline-block;
    max-width: 100%;
}

.site-footer__logo img {
    display: block;
    width: 160px;
    height: auto;

    /*
       Für das schwarze Logo auf weißem JPG:
       Schwarz wird weiß, Weiß wird transparent.
    */
    filter: invert(1);
    mix-blend-mode: screen;
}

.site-footer__slogan {
    margin: 24px 0 0;
    color: #fff;
    font-size: 18px;
    font-weight: 500;
    line-height: 1.5;
}

/* =========================================
   Überschriften
   ========================================= */

.site-footer__heading {
    margin: 0 0 24px;
    color: inherit;
    font-size: 16px;
    font-weight: 800;
    line-height: 1.4;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.site-footer__heading::after {
    display: block;
    width: 28px;
    height: 3px;
    margin-top: 12px;
    background: var(--color-primary, #d60926);
    content: "";
}

.site-footer__subheading {
    margin: 0 0 8px;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.5;
    letter-spacing: normal;
}

.site-footer__subgroup + .site-footer__subgroup {
    margin-top: 24px;
}


/* =========================================
   Links
   ========================================= */

.site-footer__links,
.site-footer__social-links {
    display: flex;
    flex-direction: column;
    gap: 4px;

    margin: 0;
    padding: 0;
    list-style: none;
}

.site-footer__links a {
    display: inline-block;
    padding-block: 6px;

    color: #d6d6d6;
    font-size: 15px;
    line-height: 1.6;
    text-decoration: none;
    overflow-wrap: anywhere;

    transition: color 150ms ease;
}

.site-footer__links a:hover,
.site-footer__links a[aria-current="page"] {
    color: var(--color-primary, #d60926);
}


/* =========================================
   Social Media
   ========================================= */

.site-footer__social-links {
    gap: 8px;
}

.site-footer__social-links a {
    display: inline-flex;
    align-items: center;
    gap: 12px;

    min-height: 44px;
    padding-block: 6px;

    color: #d6d6d6;
    font-size: 15px;
    text-decoration: none;

    transition: color 150ms ease;
}

.site-footer__social-links a:hover {
    color: #fff;
    text-decoration: underline;
    text-underline-offset: 5px;
}

.site-footer__social-links img {
    flex-shrink: 0;
    width: 24px;
    height: 24px;

    /* Schwarze SVG-Symbole auf dunklem Hintergrund. */
    filter: brightness(0) invert(1);
}


/* =========================================
   Untere Abschlusszeile
   ========================================= */

.site-footer__bottom {
    padding-block: 20px;
    border-top: 1px solid rgb(255 255 255 / 15%);
}

.site-footer__bottom p {
    margin: 0;
    color: #bdbdbd;
    font-size: 13px;
    line-height: 1.6;
}


/* =========================================
   Tastaturfokus
   ========================================= */

.site-footer a:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 4px;
    border-radius: var(--radius-small, 4px);
}


/* =========================================
   Tablet
   ========================================= */

@media (max-width: 1023px) {
    .site-footer__inner,
    .site-footer__bottom {
        padding-inline: 24px;
    }

    .site-footer__inner {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 40px 32px;
        padding-bottom: 40px;
    }

    .site-footer__logo img {
        width: 140px;
    }
}


/* =========================================
   Smartphone
   ========================================= */

@media (max-width: 599px) {
    .site-footer__inner,
    .site-footer__bottom {
        padding-inline: 20px;
    }

    .site-footer__inner {
        grid-template-columns: minmax(0, 1fr);
        gap: 28px;
        padding-bottom: 32px;
    }

    .site-footer__logo img {
        width: 130px;
    }

    .site-footer__column {
        padding-top: 24px;
        border-top: 1px solid rgb(255 255 255 / 15%);
    }

    .site-footer__heading {
        margin-bottom: 16px;
    }

    .site-footer__links a {
        display: block;
        min-height: 44px;
        padding-block: 10px;
    }

    .site-footer__social-links {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px 24px;
    }
}


/* =========================================
   Reduzierte Bewegung
   ========================================= */

@media (prefers-reduced-motion: reduce) {
    .site-footer a {
        transition: none;
    }
}

/* Gleiche linke Kante wie beim Einstiegsbild */

.site-header__inner,
.site-footer__inner,
.site-footer__bottom {
    padding-inline: var(--site-gutter);
}

/* Navigation etwas ruhiger */

.main-nav__link {
    font-size: 17px;
    font-weight: 600;
}

@media (min-width: 1024px) and (max-width: 1279px) {
    .site-header__inner {
        padding-inline: 24px;
        column-gap: 20px;
    }

    .main-nav__list {
        gap: 16px;
    }

    .main-nav__link {
        font-size: 15px;
    }
}

@media (max-width: 1023px) {
    .site-header__inner,
    .site-footer__inner,
    .site-footer__bottom {
        padding-inline: 20px;
    }
}