/* ==========================================================================
   1. VARIABLEN & RESET
   ========================================================================== */

:root {
    --primary: #03932C;
    --secondary: #E36068;
    --text-dark: #0f172a;
    --text-light: #64748b;
    --bg-white: #ffffff;
    --bg-light: #f8fafc;
    --font-stack: 'Inter', system-ui, -apple-system, sans-serif;
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ==========================================================================
   2. BASIS-STYLING (BODY, LINKS, LISTEN)
   ========================================================================== */

html, body {
    height: 100%;
}

body {
    font-family: var(--font-stack);
    color: var(--text-dark);
    background-color: var(--bg-white);
    line-height: 1.6;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* ==========================================================================
   3. NAVIGATION & HEADER
   ========================================================================== */

header {
    display: flex;
    align-items: center;

    /* konstante Header-Höhe */
    height: 96px;
    padding: 0 5%;

    background: rgba(255, 255, 255, 0.8);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;

    box-shadow: 0 2px 20px rgba(0,0,0,0.03);
    backdrop-filter: blur(10px);
    transition: var(--transition);
}

header.scrolled {
    background: rgba(255, 255, 255, 1);
}

/* Logo */
.logo-img {
    height: 64px;
    width: auto;
    display: block;
    margin: 0;
}

/* Layout */
nav {
    display: flex;
    justify-content: center;
    flex: 1;
}

nav ul {
    display: flex;
    align-items: center;
    gap: 3rem;
}

.logo,
.header-spacer {
    flex: 1;
}

.header-spacer {
    visibility: hidden;
}

/* --- DROPDOWN MENÜ --- */

nav ul li.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: var(--bg-white);
    min-width: 220px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    padding: 1rem 0;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    display: block;
    z-index: 1100;
}

/* Öffnen nur, wenn per JS gesetzt */
.dropdown.open .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.dropdown:focus-within .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.dropdown-menu li {
    display: block;
    width: 100%;
}

.dropdown-menu li a {
    padding: 0.8rem 1.5rem;
    display: block;
    font-size: 0.9rem;
    color: var(--text-dark);
    font-weight: 500;
    transition: var(--transition);
}

.dropdown-menu li a:hover {
    background: var(--bg-light);
    color: var(--primary);
    padding-left: 2rem;
}

/* Pfeil: nur das HTML-Zeichen ▾ nutzen (kein ::before) */
.arrow {
    font-size: 0.95rem;
    margin-left: 0.45rem;
    display: inline-flex;
    align-items: center;
    line-height: 1;
    transform-origin: 50% 55%;
    transition: transform 0.25s ease;
}

.dropdown:hover .arrow {
    transform: rotate(180deg);
}

/* Größere Navi-Schrift + bessere Click-Area */
nav ul li > a,
.dropdown-trigger {
    font-size: 1.05rem;
    font-weight: 650;
    padding: 0.65rem 0.25rem;
    border-radius: 10px;
    transition: var(--transition);
}

/* Hover für Top-Level Links */
nav ul li > a:hover {
    background: rgba(3, 147, 44, 0.06);
    color: var(--text-dark);
}

/* Active State (dein PHP setzt class="is-active" am <a>) */
nav a.is-active {
    background: rgba(3, 147, 44, 0.10);
    color: var(--text-dark);
}

/* Rotation beim Hover */
.dropdown:hover .arrow,
.dropdown:focus-within .arrow {
    transform: rotate(180deg);
}

/* --- Dropdown Panel: größer, cleaner, besserer Hover --- */
.dropdown-menu {
    top: calc(100% + 12px);
    left: 50%;
    transform: translateX(-50%) translateY(6px);

    min-width: 260px;
    padding: 0.55rem;
    border-radius: 16px;

    background: rgba(255, 255, 255, 0.99);
    backdrop-filter: blur(12px);

    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow:
        0 20px 50px rgba(15, 23, 42, 0.14),
        0 2px 10px rgba(15, 23, 42, 0.06);

    opacity: 0;
    visibility: hidden;
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
    z-index: 1100;
}

/* kleine „Nase“ oben (optional, wirkt hochwertig) */
.dropdown-menu::before {
    content: "";
    position: absolute;
    top: -7px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 14px;
    height: 14px;
    background: rgba(255, 255, 255, 0.92);
    border-left: 1px solid rgba(15, 23, 42, 0.08);
    border-top: 1px solid rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(12px);
}

/* Auf Hover ODER Keyboard-Fokus öffnen */
.dropdown:hover .dropdown-menu,
.dropdown:focus-within .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* Dropdown Links: größere Schrift + schöner Hover */
.dropdown-menu li a {
    font-size: 1rem;
    font-weight: 600;
    padding: 0.85rem 1rem;
    border-radius: 12px;
    color: var(--text-dark);
    transition: background 0.18s ease, transform 0.18s ease, color 0.18s ease;
}

/* Hover: subtil, nicht „seitlich wegrutschen“ */
.dropdown-menu li a:hover,
.dropdown-menu li a:focus-visible {
    background: rgba(3, 147, 44, 0.10);
    color: var(--text-dark);
    transform: translateY(-1px);
    outline: none;
}

/* Optional: aktiver Unterpunkt im Dropdown */
.dropdown-menu a.is-active {
    background: rgba(3, 147, 44, 0.14);
}

/* Optional: etwas mehr Abstand zwischen Top-Level Items */
nav ul {
    gap: 3.2rem;
}

/* Dropdown-Trigger als Button, aber Link-Optik */
.dropdown-trigger {
    all: unset;
    cursor: pointer;

    display: inline-flex;
    align-items: center;

    font-family: inherit;
    font-size: 1.05rem;
    font-weight: 650;
    color: var(--text-dark);

    padding: 0.65rem 0.25rem;
    border-radius: 10px;

    transition: var(--transition);
}

/* Hover / Focus wie vorher */
.dropdown-trigger:hover,
.dropdown-trigger:focus-visible {
    background: rgba(3, 147, 44, 0.06);
    outline: none;
}

/* ==========================================================================
   4. FOOTER
   ========================================================================== */

.site-footer {
    margin-top: auto;
    position: relative;
    overflow: visible;

    background: #fff;
    border-top: 1px solid rgba(15,23,42,0.08);

    padding-inline: 5%;
    padding-top: clamp(2rem, 3vw, 3.25rem);
    padding-bottom: clamp(2.6rem, 4vw, 4.2rem);
}

/* Content: modern, nicht zentriert, volle Breite */
.footer-inner {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;

    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 2rem;

    min-width: 0;
}

/* Brand links */
.footer-brand {
    font-weight: 850;
    letter-spacing: -0.2px;
    font-size: 1.05rem;
    line-height: 1.25;
    color: rgba(15,23,42,0.60);

    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
}

/* Meta rechts */
.footer-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: flex-end;
    text-align: right;

    color: rgba(15,23,42,0.60);
    font-weight: 650;
    font-size: 0.92rem;

    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.footer-meta .footer-links {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    min-width: 0;
}

.footer-meta a {
    display: inline;
    padding: 0;
    border: 0;
    background: transparent;

    color: rgba(15,23,42,0.60);
    font-weight: 700;
    text-decoration: none;

    transition: color .18s ease;
}

.footer-meta a:hover {
    color: var(--primary);
}

/* CTA Button im Header */
.header-cta {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

.btn-header-cta {
    background: var(--primary);
    color: white;
    padding: 0.7rem 1.6rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition);
}

.btn-header-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(3, 147, 44, 0.3);
}

header {
    display: flex;
    align-items: center;
    height: 96px;
    padding: 0 5%;
    background: rgba(255, 255, 255, 0.8);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0,0,0,0.03);
    backdrop-filter: blur(10px);
    transition: var(--transition);
}

.logo,
.header-spacer,
.header-cta-desktop {
    flex: 1;
}

.header-spacer {
    visibility: hidden;
}

nav {
    display: flex;
    justify-content: center;
    flex: 1;
}

.header-cta-desktop {
    display: flex;
    justify-content: flex-end;
}

.header-cta-mobile {
    display: none;
}

.mobile-menu-toggle {
    display: none;
}

.mobile-menu-toggle {
    border: none;
    background: transparent;
    padding: 0;
    width: 44px;
    height: 44px;
    cursor: pointer;
    position: relative;
    z-index: 1201;
}

.mobile-menu-toggle span {
    display: block;
    width: 26px;
    height: 2.5px;
    background: var(--text-dark);
    border-radius: 999px;
    margin: 5px auto;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.mobile-menu-toggle.is-active span:nth-child(1) {
    transform: translateY(7.5px) rotate(45deg);
}

.mobile-menu-toggle.is-active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.is-active span:nth-child(3) {
    transform: translateY(-7.5px) rotate(-45deg);
}

.arrow {
    font-size: 0.95rem;
    margin-left: 0.45rem;
    display: inline-flex;
    align-items: center;
    line-height: 1;
    transform-origin: 50% 55%;
    transition: transform 0.25s ease;
}

.dropdown.open .arrow,
.dropdown:focus-within .arrow,
.dropdown:hover .arrow {
    transform: rotate(180deg);
}

@media (max-width: 900px) {
    header {
        height: 84px;
        padding: 0 1.2rem;
        justify-content: space-between;
    }

    .logo {
        flex: 0 0 auto;
    }

    .logo-img {
        height: 54px;
    }

    .header-cta-desktop,
    .header-spacer {
        display: none;
    }

    .mobile-menu-toggle {
        display: block;
        flex: 0 0 auto;
    }

    header nav {
        position: fixed;
        top: 84px;
        left: 0;
        right: 0;
        display: block;
        flex: unset;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(12px);
        border-top: 1px solid rgba(15, 23, 42, 0.08);
        box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);

        max-height: calc(100vh - 84px);
        overflow-y: auto;

        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        pointer-events: none;
        transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
    }

    nav.nav-open {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
        pointer-events: auto;
    }

    nav ul {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 1rem 1.2rem 0.5rem;
    }

    nav ul li {
        width: 100%;
    }

    nav ul li > a,
    .dropdown-trigger {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 1rem 0;
        font-size: 1rem;
        border-radius: 0;
        border-bottom: 1px solid rgba(15, 23, 42, 0.08);
    }

    .dropdown {
        position: static;
    }

    .dropdown-menu {
        position: static;
        transform: none;
        min-width: 100%;
        margin: 0.35rem 0 0.8rem;
        padding: 0.35rem;
        border-radius: 14px;
        border: 1px solid rgba(15, 23, 42, 0.08);
        box-shadow: none;
        background: var(--bg-light);

        opacity: 1;
        visibility: visible;
        display: none;
    }

    .dropdown-menu::before {
        display: none;
    }

    .dropdown.open .dropdown-menu {
        display: block;
        transform: none;
    }

    .dropdown:hover .dropdown-menu,
    .dropdown:focus-within .dropdown-menu {
        transform: none;
    }

    .dropdown-menu li a {
        padding: 0.85rem 1rem;
        font-size: 0.96rem;
        border-radius: 10px;
    }

    .header-cta-mobile {
        display: block;
        padding: 0.75rem 1.2rem 1.4rem;
    }

    .header-cta-mobile .btn-header-cta {
        display: inline-flex;
        justify-content: center;
        width: 100%;
        text-align: center;
        padding: 0.95rem 1.4rem;
    }

    body.menu-open {
        overflow: hidden;
    }
}

@media (max-width: 768px) {
    .site-footer {
        padding-inline: 1.2rem;
        padding-top: 1.75rem;
        padding-bottom: 2rem;
    }

    .footer-inner {
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        gap: 1rem;
    }

    .footer-brand {
        width: 100%;
        max-width: 32ch;
        font-size: 0.98rem;
        line-height: 1.4;
        text-align: center;
    }

    .footer-meta {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        text-align: center;
        gap: 0.5rem;
        font-size: 0.88rem;
        line-height: 1.5;
    }

    .footer-meta .footer-links {
        width: 100%;
        display: flex;
        justify-content: center;
        flex-wrap: wrap;
        gap: 0.75rem;
    }
}

@media (max-width: 480px) {
    .footer-brand {
        font-size: 0.92rem;
        max-width: 100%;
    }

    .footer-meta {
        font-size: 0.82rem;
    }

    .footer-meta .footer-links {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.35rem;
    }
}

@media (max-width: 768px) {
    .footer-meta .footer-links {
        width: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
        flex-wrap: wrap;
        gap: 0.75rem;
        text-align: center;
    }

    .footer-meta .footer-links a {
        display: inline-block;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .footer-meta .footer-links {
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }

    .footer-meta .footer-links a {
        width: 100%;
        text-align: center;
    }
}


/* ==========================================================================
   ANALYTICS CONSENT
   ========================================================================== */

.analytics-consent {
  position: fixed;
  left: 50%;
  bottom: 1rem;
  transform: translateX(-50%);
  z-index: 3000;

  width: min(1100px, calc(100% - 2rem));

  background: transparent;
  padding: 0;

  pointer-events: none;
}

.analytics-consent[hidden] {
  display: none !important;
}

.analytics-consent__box {
  pointer-events: auto;

  background: #ffffff;
  color: var(--text-dark);
  border: 1px solid #e5e7eb;
  border-radius: 22px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.18);
  padding: 1.25rem;

  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.analytics-consent__text {
  flex: 1;
}

.analytics-consent__text strong {
  display: block;
  font-size: 1.05rem;
  margin-bottom: 0.35rem;
}

.analytics-consent__text p {
  margin: 0;
  color: var(--text-light);
  font-size: 0.95rem;
  line-height: 1.5;
}

.analytics-consent__actions {
  display: flex;
  gap: 0.75rem;
  flex-shrink: 0;
}

.analytics-consent__btn {
  border: 0;
  border-radius: 999px;
  padding: 0.8rem 1.15rem;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.analytics-consent__btn:hover {
  transform: translateY(-1px);
}

.analytics-consent__btn--primary {
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 10px 24px rgba(3, 147, 44, 0.22);
}

.analytics-consent__btn--secondary {
  background: var(--bg-light);
  color: var(--text-dark);
  border: 1px solid #e5e7eb;
}

@media (max-width: 768px) {
  .analytics-consent {
    padding: 0.75rem;
  }

  .analytics-consent__box {
    flex-direction: column;
    align-items: stretch;
    border-radius: 18px;
  }

  .analytics-consent__actions {
    flex-direction: column-reverse;
  }

  .analytics-consent__btn {
    width: 100%;
  }
}

.analytics-consent__details {
    margin-top: 0.75rem;
    font-size: 0.92rem;
    padding-bottom: 5px;
}

.analytics-consent__details summary {
    cursor: pointer;
    font-weight: 800;
    color: var(--text-dark);
}

.analytics-consent__details p {
    margin-top: 0.65rem;
}

.analytics-consent__links {
    margin-top: 0.75rem;
    font-size: 0.9rem;
}

.analytics-consent__links a {
    color: var(--primary);
    font-weight: 800;
    text-decoration: underline;
    text-underline-offset: 0.2em;
}