/* ==========================================================================
   A49 — Header & Toggle-Navigation
   assets/css/toggle-navigation-a49.css
   Alle Farben ausschließlich über die Variablen in :root
   ========================================================================== */

:root {
    --a49-blue: var(--blue);                      /* Menü-Button */
    --a49-blue-light-dark: var(--blue-hover-dark); /* Overlay-Fläche, Button-Hover */
    --a49-blue-light: var(--blue-hover-light);
    --a49-accent: var(--orange);                  /* Hover, aktiv, CTA */
    --a49-accent-dark: var(--orange90);           /* CTA-Hover */
    --a49-ink: var(--blue-hover-dark);            /* Vereinsname im Header */

    --a49-white: rgba(255,255,255,1);
    --a49-white-85: rgba(255,255,255,.85);
    --a49-white-70: rgba(255,255,255,.7);
    --a49-white-55: rgba(255,255,255,.55);
    --a49-white-40: rgba(255,255,255,.4);
    --a49-white-22: rgba(255,255,255,.22);
    --a49-white-12: rgba(255,255,255,.12);
}

/* --- Header --------------------------------------------------------------- */

.a49-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 900;
}

.a49-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: clamp(16px, 2vw, 28px) clamp(20px, 5vw, 80px);
}

.a49-header__brand,
.a49-header__brand:hover {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    color: var(--a49-ink);
}

.a49-header__logo {
    display: block;
    height: clamp(42px, 5vw, 60px);
    width: auto;
}

.a49-header__name {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.2;
}

@media (max-width: 575px) {
    .a49-header__name { display: none; }
}

/* --- Menü-Button ---------------------------------------------------------- */

.a49-navtoggle {
    position: relative;
    z-index: 1010;
    display: inline-flex;
    align-items: center;
    gap: 16px;
    height: 56px;
    padding: 0 28px;
    border: 0;
    border-radius: 999px;
    background: var(--a49-blue);
    color: var(--a49-white);
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background .25s ease;
}

.a49-navtoggle:hover,
.a49-navtoggle:focus-visible {
    background: var(--a49-blue-light-dark);
}

.a49-navtoggle__icon {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 22px;
    height: 14px;
}

.a49-navtoggle__icon span {
    display: block;
    height: 2px;
    background: currentColor;
    transition: transform .3s cubic-bezier(.2, .8, .25, 1);
}


@media (max-width: 575px) {
    .a49-navtoggle {
        height: 48px;
        padding: 0 20px;
        gap: 12px;
        font-size: 13px;
    }
}

/* --- Overlay -------------------------------------------------------------- */

.a49-nav {
    position: fixed;
    inset: 0;
    z-index: 1000;
    padding: clamp(110px, 14vh, 150px) clamp(20px, 5vw, 80px) clamp(48px, 8vh, 80px);
    background: var(--a49-blue-light-dark);
    color: var(--a49-white);
    opacity: 0;
    visibility: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    transition: opacity .3s ease, visibility .3s ease;
}

/* hidden-Attribut steuert nur den Ausgangszustand, nicht die Sichtbarkeit */
.a49-nav[hidden] {
    display: block;
}

.a49-nav.is-open {
    opacity: 1;
    visibility: visible;
}

body.a49-nav-open {
    overflow: hidden;
}

.a49-nav__inner {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: clamp(48px, 8vw, 120px);
    align-items: center;
    max-width: 1440px;
    width: 100%;
    margin: auto;
}

@media (max-width: 991px) {
    .a49-nav__inner {
        grid-template-columns: 1fr;
        align-items: start;
        gap: 48px;
    }
}

/* --- Schließen-Button ----------------------------------------------------- */

.a49-navclose {
    position: absolute;
    top: clamp(16px, 2vw, 28px);
    right: clamp(20px, 5vw, 80px);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    padding: 0;
    border: 1px solid var(--a49-white-40);
    border-radius: 999px;
    background: none;
    cursor: pointer;
    transition: background .25s ease, border-color .25s ease;
}

.a49-navclose:hover,
.a49-navclose:focus-visible {
    background: var(--a49-white-12);
    border-color: var(--a49-accent);
}

.a49-navclose span {
    position: absolute;
    width: 22px;
    height: 2px;
    background: var(--a49-white);
}

.a49-navclose span:first-child { transform: rotate(45deg); }
.a49-navclose span:last-child  { transform: rotate(-45deg); }

@media (max-width: 575px) {
    .a49-navclose {
        width: 48px;
        height: 48px;
    }
}

/* --- Menüliste ------------------------------------------------------------ */

.a49-nav__list,
.a49-nav__list ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.a49-nav__list > li {
    padding: clamp(8px, 1.2vh, 14px) 0;
    border-bottom: 1px solid var(--a49-white-22);
    transition: border-color .2s ease;
}

.a49-nav__list > li:hover {
    border-bottom-color: var(--a49-accent);
}

.a49-nav__list > li > a,
.a49-nav__list > li > .a49-nav__parent {
    display: flex;
    align-items: baseline;
    gap: clamp(14px, 2vw, 26px);
    width: 100%;
    padding: 0;
    border: 0;
    background: none;
    font-family: inherit;
    font-size: clamp(26px, 3.4vw, 40px);
    font-weight: 600;
    letter-spacing: -0.03em;
    line-height: 1.1;
    color: var(--a49-white);
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    transition: color .2s ease;
}

.a49-nav__list > li > a:hover,
.a49-nav__list > li > .a49-nav__parent:hover,
.a49-nav__list > li.is-open > .a49-nav__parent {
    color: var(--a49-white);
}

.a49-nav__list > li:hover .a49-nav__num,
.a49-nav__list > li.is-open .a49-nav__num,
.a49-nav__list > li.is-current .a49-nav__num,
.a49-nav__list > li.is-open .a49-nav__marker {
    color: var(--a49-accent);
}

.a49-nav__num {
    flex: 0 0 auto;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: .04em;
    color: var(--a49-white-55);
    transition: color .2s ease;
}

.a49-nav__text {
    flex: 1 1 auto;
    transform: translateX(0);
    transition: transform .3s cubic-bezier(.22, .8, .3, 1);
}

.a49-nav__text i[class*="fa-"] {
    font-size: .8em;
    vertical-align: .05em;
}

.a49-nav__list > li > a:hover .a49-nav__text,
.a49-nav__list > li > .a49-nav__parent:hover .a49-nav__text,
.a49-nav__list > li > a:focus-visible .a49-nav__text,
.a49-nav__list > li > .a49-nav__parent:focus-visible .a49-nav__text {
    transform: translateX(12px);
}

.a49-nav__marker {
    flex: 0 0 auto;
    font-size: 20px;
    font-weight: 400;
    line-height: 1;
    color: var(--a49-white-55);
    transition: transform .3s ease, color .2s ease;
}

.a49-nav__list > li.is-open .a49-nav__marker {
    transform: rotate(45deg);
}

/* --- Zweite Ebene --------------------------------------------------------- */

.a49-nav__subwrap {
    overflow: hidden;
    max-height: 0;
    transition: max-height .35s cubic-bezier(.22, .7, .25, 1);
}

.a49-nav__sub {
    opacity: 0;
    transition: opacity .28s ease;
}

.a49-nav__list > li.is-open .a49-nav__sub {
    opacity: 1;
}

.a49-nav__sub > li {
    padding: 0;
    border: 0;
}

.a49-nav__sub > li:first-child { margin-top: 12px; }
.a49-nav__sub > li:last-child  { margin-bottom: 4px; }

.a49-nav__sub a {
    position: relative;
    display: block;
    padding: 8px 0 8px clamp(38px, 5vw, 66px);
    font-size: clamp(17px, 1.7vw, 21px);
    font-weight: 500;
    color: var(--a49-white-85);
    text-decoration: none;
    transform: translateX(0);
    transition: color .2s ease, transform .3s cubic-bezier(.2, .8, .2, 1);
}

.a49-nav__sub .current-menu-item > a,
.a49-nav__sub .current_page_item > a {
    color: var(--a49-white);
}

/* Hover: orange + leicht eingerückt (wie 1. Ebene) */
.a49-nav .a49-nav__sub a:hover,
.a49-nav .a49-nav__sub a:focus-visible {
    color: var(--a49-accent) !important;
    transform: translateX(10px);
}

.a49-nav__sub .current-menu-item > a,
.a49-nav__sub .current_page_item > a {
    font-weight: 600;
}

.a49-nav__sub .current-menu-item > a::before,
.a49-nav__sub .current_page_item > a::before {
    content: "";
    position: absolute;
    top: 50%;
    left: calc(clamp(38px, 5vw, 66px) - 16px);
    width: 6px;
    height: 6px;
    margin-top: -3px;
    border-radius: 50%;
    background: var(--a49-accent);
}

/* --- Rechte Spalte -------------------------------------------------------- */

.a49-nav__aside {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.a49-nav__intro {
    margin: 0;
    font-size: clamp(17px, 1.6vw, 21px);
    line-height: 1.65;
    color: var(--a49-white-85);
}

.a49-nav__actions {
    display: grid;
    gap: 12px;
}

/* --- Buttons im Overlay --------------------------------------------------- */

.a49-nav__btn {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 16px !important;
    height: 68px !important;
    padding: 0 30px !important;
    margin: 0 !important;
    border: 1px solid var(--a49-white-40) !important;
    border-radius: 4px !important;
    font-size: 18px !important;
    font-weight: 600 !important;
    letter-spacing: normal !important;
    color: var(--a49-white) !important;
    background: transparent !important;
    text-decoration: none !important;
    text-indent: 0 !important;
    transform: none !important;
    animation: none !important;
    transition: background .25s ease, color .25s ease, border-color .25s ease !important;
}

.a49-nav__btn > span {
    transform: none !important;
    animation: none !important;
    transition: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.a49-nav__btn::before,
.a49-nav__btn::after,
.a49-nav__btn > span::before,
.a49-nav__btn > span::after {
    content: none !important;
}

.a49-nav__btn:hover,
.a49-nav__btn:focus-visible {
    background: var(--a49-white-12) !important;
    border-color: var(--a49-white) !important;
    color: var(--a49-white) !important;
}

.a49-nav__btn--solid {
    background: var(--a49-accent) !important;
    border-color: var(--a49-accent) !important;
    color: var(--a49-white) !important;
}

.a49-nav__btn--solid:hover,
.a49-nav__btn--solid:focus-visible {
    background: var(--a49-accent-dark) !important;
    border-color: var(--a49-accent-dark) !important;
    color: var(--a49-white) !important;
}

/* --- Social Media --------------------------------------------------------- */

.a49-nav__social {
    display: flex;
    gap: 22px;
    font-size: 21px;
}

.a49-nav__social a {
    color: var(--a49-white-70);
    text-decoration: none;
    transition: color .2s ease;
}

.a49-nav__social a:hover {
    color: var(--a49-accent);
}

/* --- Reduzierte Bewegung -------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
    .a49-nav,
    .a49-nav__subwrap,
    .a49-nav__sub,
    .a49-nav__marker,
    .a49-navtoggle__icon span,
    .a49-navclose,
    .a49-nav__text,
    .a49-nav__sub a {
        transition: none;
    }
}
