/* assets/css/main.css */

/* Basic reset-ish styles */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Roboto', sans-serif;
    color: #222;
    background-color: #f7f7f7;
    line-height: 1.5;
}

a {
    color: inherit;
    text-decoration: none;
}

.site-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.site-content {
    flex: 1 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid #e9e9e9;
    transition: box-shadow 0.18s ease, background-color 0.18s ease;
}

.site-header.is-scrolled {
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
    background: rgba(255, 255, 255, 0.98);
}

.site-header__inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

/* Logo links */
.site-logo {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
}

.site-logo__img {
    display: block;
    width: auto;
    height: 46px;
    object-fit: contain;
}

/* Nav rechts */
.main-nav {
    flex: 1 1 auto;
    display: flex;
    justify-content: flex-end;
    z-index: 99;
}

.main-nav__list {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 22px;
    /* eher “luftig” wie im Screenshot */
    margin: 0;
    padding: 0;
}

.main-nav__link {
    display: inline-flex;
    align-items: center;
    font-size: 0.95rem;
    color: #666;
    padding: 8px 2px;
    border-bottom: 2px solid transparent;
    transition: color 0.15s ease, border-color 0.15s ease;
    white-space: nowrap;
}

.main-nav__link:hover,
.main-nav__link:focus-visible {
    color: #fb1500;
    border-bottom-color: #fb1500;
    outline: none;
}

.pipe {
    color: #bbb;
    margin: 0 8px;
}

/* CTA Button "Kontakt" */
.btn-nav {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    border-radius: 5px;
    border: 2px solid #fb1500;
    background: #fb1500;
    color: #fff;
    font-weight: 600;
    font-size: 0.95rem;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.12);
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
    white-space: nowrap;
}

.btn-nav:hover,
.btn-nav:focus-visible {
    background: transparent;
    color: #fb1500;
    border-color: #fb1500;
    box-shadow: none;
    outline: none;
}

/* Dropdown */
.has-dropdown {
    position: relative;
}

.main-nav__link--dropdown {
    cursor: pointer;
}

.dropdown {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    min-width: 220px;
    background: #fff;
    border: 1px solid #e9e9e9;
    border-radius: 10px;
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.10);
    padding: 8px;
    list-style: none;
    margin: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity 0.12s ease, transform 0.12s ease, visibility 0.12s ease;
    z-index: 50;
}

.dropdown__link {
    display: block;
    padding: 10px 10px;
    border-radius: 8px;
    color: #444;
    font-size: 0.93rem;
}

.dropdown__link:hover,
.dropdown__link:focus-visible {
    background: #f6f6f6;
    color: #111;
    outline: none;
}

.is-active-page {
    color: #111;
    font-weight: bold;
}

/* Hover öffnen (Desktop) */
@media (hover: hover) and (pointer: fine) {

    .has-dropdown:hover .dropdown,
    .has-dropdown:focus-within .dropdown {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
}

/* Mobile toggle button */
.nav-toggle {
    display: none;
    border: 1px solid #e0e0e0;
    background: #fff;
    border-radius: 10px;
    padding: 10px 12px;
    font-weight: 600;
}

.nav-group__desktop {
    display: inline-flex;
    align-items: center;
    gap: 0;
    /* Pipes übernehmen Abstand */
}

/* Mobile Toggle & Mobile Dropdown standardmäßig verstecken */
.nav-group__mobileToggle,
.nav-group__mobileMenu {
    display: none;
}

/* Pipes im Inline-Block */
.nav-group__desktop .pipe {
    margin: 0 10px;
    color: #bbb;
}

/* ===== Burger Button ===== */
.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid #e0e0e0;
    background: #fff;
    border-radius: 12px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.burger {
    position: relative;
    width: 22px;
    height: 2px;
    background: #222;
    border-radius: 999px;
    transition: background 0.2s ease;
    display: inline-block;
}

.burger::before,
.burger::after {
    content: "";
    position: absolute;
    left: 0;
    width: 22px;
    height: 2px;
    background: #222;
    border-radius: 999px;
    transition: transform 0.25s ease, top 0.25s ease, opacity 0.2s ease;
}

.burger::before {
    top: -7px;
}

.burger::after {
    top: 7px;
}

/* Active -> X */
.nav-toggle.is-active .burger {
    background: transparent;
}

.nav-toggle.is-active .burger::before {
    top: 0;
    transform: rotate(45deg);
}

.nav-toggle.is-active .burger::after {
    top: 0;
    transform: rotate(-45deg);
}

/* Responsive */
@media (max-width: 920px) {
    .nav-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
    }

    .main-nav__list {
        position: absolute;
        right: 18px;
        top: 74px;
        background: #fff;
        border: 1px solid #e9e9e9;
        border-radius: 14px;
        box-shadow: 0 14px 30px rgba(0, 0, 0, 0.10);
        padding: 10px;
        width: min(92vw, 360px);
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
        display: none;
    }

    .main-nav__list.is-open {
        display: flex;
    }

    .main-nav__link {
        border-bottom: none;
        padding: 12px 10px;
        border-radius: 10px;
    }

    .main-nav__link:hover {
        border-bottom-color: transparent;
        background: #f6f6f6;
    }

    .dropdown {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        padding: 0 0 6px 0;
        display: none;
    }

    .has-dropdown.is-open .dropdown {
        display: block;
    }

    .dropdown__link {
        padding: 10px 10px 10px 18px;
    }

    .main-nav__item--cta .btn-nav {
        width: 100%;
        justify-content: center;
    }
    .nav-toggle {
        display: inline-flex;
    }

    /* Desktop inline Gruppe ausblenden */
    .nav-group__desktop {
        display: none;
    }

    /* Mobile Dropdown aktivieren */
    .nav-group__mobileToggle {
        display: inline-flex;
        width: 100%;
        justify-content: flex-start;
    }

    .nav-group__mobileMenu {
        display: none;
        /* wird per .is-open geöffnet */
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        padding: 0 0 6px 0;
        margin: 0;
    }

    .nav-group.is-open .nav-group__mobileMenu {
        display: block;
    }
}

/* Footer */
.site-footer {
    background: #222;
    color: #eee;
    padding: 1.5rem 0;
    flex-shrink: 0;
}

.site-footer__inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: grid;
    grid-template-columns: 1.6fr 1.4fr 1fr;
    align-items: start;
    gap: 2rem;
    font-size: 0.9rem;
}

.site-footer__menus {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2rem;
}

.footer-menu__title {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #bdbdbd;
    margin-bottom: 0.6rem;
}

.footer-menu__list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-menu__list li {
    margin-bottom: 0.35rem;
}

.site-footer__right p {
    margin-bottom: 0.35rem;
}

.site-footer a {
    color: #fff;
    text-decoration-line: underline;
    text-decoration-color: transparent;
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
    transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

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

@media (max-width: 980px) {
    .site-footer__inner {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1.6rem 2rem;
    }

    .site-footer__menus {
        display: contents;
    }
}

@media (max-width: 680px) {
    .site-footer__inner {
        grid-template-columns: 1fr;
        gap: 1.2rem;
    }
}
