:root {
    --color-primary-dark: #0f2b46;
    --color-primary-light: #3498db;
    --color-white: #ffffff;
    --color-bg-light: #f4f7f9;
    --color-text: #333333;
    
    --header-height: 65px; 
    --transition-speed: 0.3s;
}

body { margin: 0; font-family: system-ui, -apple-system, sans-serif; display: flex; flex-direction: column; min-height: 100vh; }
.site-main { flex: 1; } /* Drückt den Footer immer ans untere Ende der Seite */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1rem; }

.site-header { background-color: var(--color-primary-dark); color: var(--color-white); position: sticky; top: 0; z-index: 1000; box-shadow: 0 2px 10px rgba(0,0,0,0.1); }
.header-inner { display: flex; justify-content: space-between; align-items: center; height: var(--header-height); }
.brand-link { display: flex; align-items: center; text-decoration: none; color: var(--color-white); gap: 1rem; }
.brand-logo { height: 40px; width: auto; }
.brand-title { font-size: 1.25rem; font-weight: 600; letter-spacing: 0.5px; }

/* =========================================
   MOBILE MENU 
   ========================================= */
.nav-wrapper { position: fixed; top: var(--header-height); left: -100%; width: 100%; height: calc(100vh - var(--header-height)); background-color: var(--color-primary-dark); display: flex; flex-direction: column; justify-content: flex-start; transition: left var(--transition-speed) ease-in-out; overflow-y: auto; }
.nav-wrapper.is-open { left: 0; }
.nav-list { list-style: none; padding: 0; margin: 0; width: 100%; display: flex; flex-direction: column; }
.nav-item { width: 100%; border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.nav-link-wrapper { display: flex; justify-content: space-between; align-items: stretch; width: 100%; }
.nav-link { text-decoration: none; color: var(--color-white); font-size: 1.35rem; font-weight: 500; padding: 1.2rem 1.5rem; flex-grow: 1; text-align: left; transition: background-color 0.2s; }
.nav-link:active { background-color: rgba(255, 255, 255, 0.05); }
.submenu-toggle { background: none; border: none; border-left: 1px solid rgba(255, 255, 255, 0.08); color: var(--color-white); padding: 0 1.5rem; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background-color 0.1s, color 0.1s; }
.submenu-toggle:active { background-color: var(--color-white); color: var(--color-primary-dark); }
.nav-item.is-expanded .submenu-toggle { color: var(--color-primary-light); }
.submenu-toggle svg { transition: transform 0.3s ease; }
.nav-item.is-expanded .submenu-toggle svg { transform: rotate(180deg); }
.sub-nav-list { list-style: none; padding: 0; margin: 0; display: none; flex-direction: column; background-color: rgba(0, 0, 0, 0.15); width: 100%; }
.nav-item.is-expanded .sub-nav-list { display: flex; }
.sub-nav-link { display: block; text-decoration: none; color: #d1d8e0; font-size: 1.1rem; font-weight: 400; padding: 1rem 1.5rem 1rem 2.5rem; border-bottom: 1px solid rgba(255, 255, 255, 0.03); }
.sub-nav-link:active { color: var(--color-white); background-color: rgba(255,255,255,0.05); }
.lang-switcher { padding: 1rem; display: flex; justify-content: center; margin-top: 2rem; margin-bottom: 4rem; }
.flag-icon-wrapper { display: inline-block; width: 45px; height: 45px; border-radius: 50%; overflow: hidden; border: 2px solid var(--color-white); }
.flag-icon { width: 100%; height: 100%; object-fit: cover; display: block; }
.mobile-toggle { display: block; background: none; border: none; cursor: pointer; padding: 0.5rem; z-index: 1001; }
.hamburger-bar { display: block; width: 28px; height: 3px; margin: 6px auto; background-color: var(--color-white); transition: all 0.3s ease; border-radius: 3px; }
.mobile-toggle.is-open .hamburger-bar:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.mobile-toggle.is-open .hamburger-bar:nth-child(2) { opacity: 0; }
.mobile-toggle.is-open .hamburger-bar:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

/* =========================================
   DESKTOP VIEW (ab 768px)
   ========================================= */
@media (min-width: 768px) {
    :root { --header-height: 80px; }
    .brand-logo { height: 50px; } 
    .mobile-toggle { display: none; }
    .nav-wrapper { position: static; flex-direction: row; height: auto; width: auto; background-color: transparent; overflow-y: visible; align-items: center; gap: 2rem; }
    .nav-list { flex-direction: row; width: auto; gap: 2rem; }
    .nav-item { position: relative; width: auto; border: none; }
    .nav-link-wrapper { width: auto; }
    .nav-link { font-size: 1rem; padding: 1.5rem 0; text-align: center; } 
    .nav-link:hover, .nav-link.active { color: var(--color-primary-light); background: transparent; }
    .submenu-toggle { display: none; }
    .sub-nav-list { position: absolute; top: 100%; left: 50%; transform: translateX(-50%); width: max-content; min-width: 220px; background-color: var(--color-primary-dark); box-shadow: 0 4px 15px rgba(0,0,0,0.1); padding: 0.5rem 0; margin: 0; display: block; opacity: 0; visibility: hidden; transition: opacity 0.2s ease, visibility 0.2s ease; }
    .nav-item.has-children:hover .sub-nav-list { opacity: 1; visibility: visible; }
    .sub-nav-link { font-size: 0.95rem; padding: 0.8rem 1.5rem; text-align: left; border: none; }
    .sub-nav-link:hover { background-color: rgba(255,255,255,0.05); color: var(--color-white); }
    .lang-switcher { padding: 0; margin: 0; background: transparent; display: flex; align-items: center; }
    .flag-icon-wrapper { width: 36px; height: 36px; border: 2px solid rgba(255,255,255,0.4); transition: border-color 0.2s; }
    .flag-icon-wrapper:hover { border-color: var(--color-white); }
}

/* =========================================
   FOOTER (Neu)
   ========================================= */
.site-footer {
    background-color: var(--color-primary-dark);
    color: var(--color-white);
    padding: 2rem 0;
    margin-top: 4rem; /* Abstand zum Inhalt darüber */
}

.footer-inner {
    display: flex;
    justify-content: space-between; /* Schiebt Links und Rechts auseinander */
    align-items: center;
}

.footer-left {
    display: flex;
    gap: 2rem; /* Abstand zwischen Impressum und Datenschutz */
}

.footer-link {
    color: var(--color-white);
    text-decoration: none;
    font-weight: bold; /* Text in dick */
    font-size: 1.1rem;
}

/* Hover-Regel: Verhindert jegliche Farb- oder Unterstrich-Änderung */
.footer-link:hover, 
.footer-link:focus, 
.footer-link:active {
    color: var(--color-white);
    text-decoration: none;
    outline: none;
}

/* Mobile Ansicht für den Footer (unter 768px) */
@media (max-width: 767px) {
    .footer-inner {
        flex-direction: column; /* Alles untereinander */
        text-align: center;
        gap: 1.5rem;
    }
    
    .footer-left {
        flex-direction: column; /* Impressum und Datenschutz untereinander */
        gap: 1.5rem;
    }
}
