/* ==========================================================================
   Layout – Gemeinsame Stile für Header, Navigation und Footer
   Farbvorgaben folgen später
   ========================================================================== */

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

body {
    margin: 0;
    font-family: var(--font-family);
    background-color: #c8c8c8;
}

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

.site-header {
    background-color: var(--brand-yellow);
    /* border-bottom: 3px solid var(--brand-yellow-dark);*/
}

.site-header__inner {
    max-width: 100%;
    margin: 0 auto;
    padding: 12px 20px 12px 0;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 20px;
}

/* Spalte 1: Logo */
.site-header__logo-wrap {
    display: flex;
    align-items: center;
}

.site-header__logo-img {
    height: 48px;
    width: auto;
    display: block;
}

/* Spalte 2: Titel */
.site-header__title-wrap {
    text-align: center;
}

.site-header__title {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--brand-dark);
}

/* Spalte 3: FAGS-Nav-Trigger */
.site-header__action-wrap {
    display: flex;
    justify-content: flex-end;
}

/* --------------------------------------------------------------------------
   FAGS Off-Canvas Navigation
   -------------------------------------------------------------------------- */

/* Trigger-Button im Header */
.site-fags-nav__trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background-color: var(--brand-dark);
    color: var(--brand-yellow);
    font-size: 0.85rem;
    font-weight: bold;
    border: none;
    border-radius: var(--card-radius);
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 0.15s;
}

.site-fags-nav__trigger:hover {
    background-color: #222;
}

/* Hamburger-Icon (3 Linien) */
.site-fags-nav__trigger-icon {
    position: relative;
    display: block;
    width: 18px;
    height: 2px;
    background-color: currentColor;
    border-radius: 1px;
}

.site-fags-nav__trigger-icon::before,
.site-fags-nav__trigger-icon::after {
    content: "";
    position: absolute;
    left: 0;
    width: 18px;
    height: 2px;
    background-color: currentColor;
    border-radius: 1px;
}

.site-fags-nav__trigger-icon::before {
    top: -6px;
}
.site-fags-nav__trigger-icon::after {
    top: 6px;
}

/* Overlay + Panel-Wrapper */
.site-fags-nav {
    position: fixed;
    inset: 0;
    z-index: 900;
    visibility: hidden;
}

.site-fags-nav--open {
    visibility: visible;
}

/* Dunkles Overlay */
.site-fags-nav__overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0);
    transition: background-color 0.3s ease;
}

.site-fags-nav--open .site-fags-nav__overlay {
    background-color: rgba(0, 0, 0, 0.5);
}

/* Sliding Panel */
.site-fags-nav__panel {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 280px;
    background-color: var(--brand-dark);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.site-fags-nav--open .site-fags-nav__panel {
    transform: translateX(0);
}

/* Panel-Kopf */
.site-fags-nav__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    flex-shrink: 0;
}

.site-fags-nav__title {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--brand-yellow);
    letter-spacing: 0.06em;
}

.site-fags-nav__close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 1rem;
    cursor: pointer;
    border-radius: var(--card-radius);
    transition:
        color 0.15s,
        background-color 0.15s;
}

.site-fags-nav__close:hover {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.1);
}

/* Link-Liste */
.site-fags-nav__list {
    list-style: none;
    margin: 0;
    padding: 8px 0;
    flex: 1;
}

.site-fags-nav__link {
    display: block;
    padding: 11px 20px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 0.875rem;
    transition:
        background-color 0.15s,
        color 0.15s;
}

.site-fags-nav__link:hover {
    background-color: rgba(255, 255, 255, 0.07);
    color: var(--brand-yellow);
}

/* Trennlinie zwischen Hauptmenü und Hilfe */
.site-fags-nav__separator {
    height: 1px;
    background-color: rgba(255, 255, 255, 0.12);
    margin: 8px 0;
}

/* Responsive Header */
@media (max-width: 640px) {
    .site-header__inner {
        grid-template-columns: auto 1fr;
        grid-template-rows: auto auto;
        gap: 10px;
        padding: 10px 16px;
    }

    .site-header__title-wrap {
        text-align: left;
    }

    .site-header__action-wrap {
        grid-column: 1 / -1;
    }

    .site-header__action-btn {
        width: 100%;
        text-align: center;
    }

    .site-header__logo-img {
        height: 38px;
    }
}

/* --------------------------------------------------------------------------
   Topnav – horizontale Navigationsleiste unter dem Site-Header
   Desktop: Tabs links, Suche-Button rechts
   Mobil:   Navigation oben, gestapelt
   -------------------------------------------------------------------------- */

.site-topnav {
    background-color: #fff;
    border-bottom: 1px solid var(--color-border);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.07);
}

.site-topnav__inner {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

/* Label "Adresse hinzufügen" */
.site-topnav__label {
    font-size: 0.75rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-text-lightest);
    white-space: nowrap;
    margin: 0;
    padding: 14px 0;
}

/* Tab-Links */
.site-topnav__links {
    display: flex;
    align-items: center;
    gap: 2px;
    flex-wrap: wrap;
}

.site-topnav__link {
    display: block;
    padding: 14px 16px;
    color: var(--brand-dark);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 600;
    border-bottom: 3px solid transparent;
    white-space: nowrap;
    transition:
        border-color 0.15s,
        color 0.15s;
}

.site-topnav__link:hover {
    color: var(--color-black);
    border-bottom-color: var(--brand-yellow);
}

.site-topnav__link--active {
    color: var(--color-black);
    border-bottom-color: var(--brand-yellow);
}

/* Hamburger-Button – Desktop: versteckt */
.site-topnav__burger {
    display: none;
}

/* Dropdown-Drawer – Desktop: versteckt */
.site-topnav__drawer {
    display: none;
}

/* Suche-Button rechts */
.site-topnav__search-btn {
    display: block;
    padding: 8px 18px;
    background-color: var(--brand-yellow);
    color: var(--color-black);
    font-weight: bold;
    font-size: 0.875rem;
    text-decoration: none;
    border-radius: var(--card-radius);
    white-space: nowrap;
    flex-shrink: 0;
    box-shadow: none;
    transition: background-color 0.15s;
}

.site-topnav__search-btn:hover {
    background-color: var(--brand-yellow-dark);
}

/* --------------------------------------------------------------------------
   Haupt-Layout
   -------------------------------------------------------------------------- */

.site-layout {
    max-width: 960px;
    margin: 0 auto;
    padding: 20px;
}

/* --------------------------------------------------------------------------
   Main Content
   -------------------------------------------------------------------------- */

.site-main {
    min-width: 0;
}

/* --------------------------------------------------------------------------
   Responsive – Mobil (≤ 640px)
   -------------------------------------------------------------------------- */

@media (max-width: 640px) {
    /* Desktop-Elemente ausblenden */
    .site-topnav__links,
    .site-topnav__search-btn {
        display: none;
    }

    /* Bar: nur Hamburger-Button sichtbar */
    .site-topnav__inner {
        height: 46px;
        padding: 0 16px;
        justify-content: flex-end;
    }

    /* Hamburger-Button */
    .site-topnav__burger {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        background: none;
        border: none;
        cursor: pointer;
        color: var(--brand-dark);
        padding: 0;
    }

    /* Hamburger-Icon (3 Linien via box-shadow) */
    .site-topnav__burger-icon {
        position: relative;
        display: block;
        width: 22px;
        height: 2px;
        background-color: currentColor;
        border-radius: 1px;
        transition: background-color 0.2s ease;
    }

    .site-topnav__burger-icon::before,
    .site-topnav__burger-icon::after {
        content: "";
        position: absolute;
        left: 0;
        width: 22px;
        height: 2px;
        background-color: currentColor;
        border-radius: 1px;
        transition:
            transform 0.2s ease,
            top 0.2s ease;
    }

    .site-topnav__burger-icon::before {
        top: -7px;
    }
    .site-topnav__burger-icon::after {
        top: 7px;
    }

    /* Geöffnet: X-Icon */
    .site-topnav--open .site-topnav__burger-icon {
        background-color: transparent;
    }

    .site-topnav--open .site-topnav__burger-icon::before {
        top: 0;
        transform: rotate(45deg);
    }

    .site-topnav--open .site-topnav__burger-icon::after {
        top: 0;
        transform: rotate(-45deg);
    }

    /* Drawer – animiert aufklappen */
    .site-topnav__drawer {
        display: block;
        max-height: 0;
        overflow: hidden;
        background-color: #fff;
        border-top: 1px solid var(--color-border);
        transition: max-height 0.25s ease;
    }

    .site-topnav--open .site-topnav__drawer {
        max-height: 320px;
    }

    .site-topnav__drawer-label {
        display: block;
        padding: 10px 20px 6px;
        font-size: 11px;
        font-weight: bold;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        color: #888;
    }

    .site-topnav__drawer-link {
        display: block;
        padding: 13px 20px;
        color: var(--brand-dark);
        text-decoration: none;
        font-size: 0.9rem;
        font-weight: 600;
        border-bottom: 1px solid var(--color-border);
        transition: background-color 0.15s;
    }

    .site-topnav__drawer-link:hover {
        background-color: #fff9d6;
    }

    .site-topnav__drawer-action {
        padding: 12px 16px;
    }

    .site-topnav__drawer-btn {
        display: block;
        padding: 10px 16px;
        background-color: var(--brand-yellow);
        color: var(--color-black);
        text-align: center;
        text-decoration: none;
        font-weight: bold;
        font-size: 0.9rem;
        border-radius: var(--card-radius);
        transition: background-color 0.15s;
    }

    .site-topnav__drawer-btn:hover {
        background-color: var(--brand-yellow-dark);
    }

    .site-layout {
        padding: 12px 16px;
    }
}

/* --------------------------------------------------------------------------
   Page Intro – wiederverwendbare Byline + Bytext Sektion
   Einsatz: direkt nach dem gelben H1-Header-Balken auf allen Frontend-Seiten
   -------------------------------------------------------------------------- */

.page-intro {
    padding: 25px 30px;
    background-color: var(--color-bg-light);
    border-bottom: 1px solid var(--color-border);
}

.page-intro__byline {
    margin: 0 0 8px 0;
    font-size: var(--font-size-3xl);
    font-weight: bold;
    color: var(--color-black-light);
    line-height: 1.3;
}

.page-intro__bytext {
    margin: 0;

    line-height: 1.6;
    color: var(--color-text-light);
}

/* --------------------------------------------------------------------------
   Site Footer
   -------------------------------------------------------------------------- */

.site-footer {
    margin-top: 40px;
    background-color: var(--brand-dark);
    color: var(--color-text-footer);
    font-size: 0.85rem;
}

.site-footer__inner {
    max-width: 960px;
    margin: 0 auto;
    padding: 40px 20px 24px;
}

/* Dreispaltiges Grid */
.site-footer__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    padding-bottom: 32px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.site-footer__col-title {
    margin: 0 0 14px 0;
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--brand-yellow);
}

.site-footer__address {
    font-style: normal;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.75);
}

.site-footer__nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.site-footer__nav-link {
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    transition: color 0.15s;
}

.site-footer__nav-link:hover {
    color: var(--brand-yellow);
}

/* Copyright-Zeile */
.site-footer__bottom {
    padding-top: 20px;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.4);
    text-align: center;
}

/* Responsive Footer */
@media (max-width: 640px) {
    .site-footer__grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .site-footer__inner {
        padding: 28px 16px 20px;
    }
}
