/* === Selbst gehostete Schriften (DSGVO-konform) === */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-display: swap;
    font-weight: 100 900;
    src: url('/assets/fonts/inter-latin-wght-normal.woff2') format('woff2');
}
@font-face {
    font-family: 'Fraunces';
    font-style: normal;
    font-display: swap;
    font-weight: 100 900;
    src: url('/assets/fonts/fraunces-latin-opsz-normal.woff2') format('woff2');
}

/* === Reset CSS === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* === Global Styles === */
:root {
    --color-primary: #1F6E43; /* Waldgrün */
    --color-dark: #34344A; /* Indigo */
    --color-accent: #E08A3C; /* Bernstein */
    --color-bg: #FAFAF7; /* Fast-Weiß */
    --color-bg-warm: #EFECCA; /* Beige */
    --color-text: #34344A; /* Fließtext */
    --color-text-muted: #6F6F76; /* Nebentext */
    --color-on-dark: #FFFFFF; /* Weiß */
    --color-border: #E5E3DA; /* helle Rahmen */
    --color-primary-dark: #185737; /* Waldgrün dunkler, für Hover */

    /* Statusfarben */
    --color-error: #C0392B; /* Rot für Fehler */

    /* Schatten */
    --schatten-karte: 0 4px 16px rgba(52, 52, 74, 0.08);
    --schatten-karte-hover: 0 8px 28px rgba(52, 52, 74, 0.12);

    --font-heading: 'Fraunces', serif;
    --font-body: 'Inter', sans-serif;
}

/* === Basic Styles === */
body {
    font-family: var(--font-body);
    color: var(--color-text);
    background-color: var(--color-bg);
    line-height: 1.6;
}
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--color-dark);
}
a {
    color: var(--color-primary);
}

/* === Header Styles === */
header {
    padding: 1rem 2rem;
    border-bottom: 1px solid var(--color-border);
}
nav {
    display: flex;
    align-items: center;
    gap: 2rem;
}
nav ul {
    display: flex;
    gap: 1.5rem;
    list-style: none;
    margin-left: auto;
}
nav a {
    text-decoration: none;
    color: var(--color-text);
    font-weight: 500;
    transition: color 0.2s ease;
}
nav a:hover {
    color: var(--color-primary);
}
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-heading);
    font-size: 1.4rem;
    color: var(--color-dark);
}
.logo img {
    display: block;
    transform: translateY(-2px);
}


/* === Buttons === */
.btn {
    display: inline-block;
    background-color: var(--color-primary);
    color: var(--color-on-dark);
    font-weight: 500;
    padding: 0.7rem 1.4rem;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 1rem;
}
.btn:hover {
    background-color: var(--color-primary-dark);
}

/* === Hero Section Styles === */
.hero {
    display: flex;
    align-items: center;
    gap: 3rem;
    padding: 5rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}
.hero-text {
    flex: 1;
}
.hero-image {
    flex: 1;
}
.hero-text h1 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
}
.hero-text p {
    font-size: 1.15rem;
    color: var(--color-text-muted);
    margin-bottom: 2rem;
    max-width: 45ch;
}
.hero-image img {
    width: 100%;
    height: auto;
    border-radius: 12px;
}

/* === Leistungen (Startseite) === */
.leistungen {
    background-color: var(--color-bg-warm);
    padding: 5rem 2rem;
}
.leistungen h2 {
    font-size: 2.2rem;
    text-align: center;
    margin-bottom: 3rem;
}

/* === Dienstleistungen: Grid (2x2 auf Desktop) === */
.karten {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    max-width: 1100px;
    margin: 0 auto;
}
@media (min-width: 768px) {
    .karten {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* === Karten & Icon === */
.karte {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    background-color: var(--color-bg);
    border: 1px solid var(--color-border);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--schatten-karte);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    text-decoration: none;
    color: inherit;
}
.karte:hover {
    transform: translateY(-4px);
    box-shadow: var(--schatten-karte-hover);
}
.karte-kopf {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 0.8rem;
}
.karte-icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
}
.karte-icon img,
.karte-icon svg {
    display: block;
    width: 40px;
    height: 40px;
    object-fit: contain;
}
.karte h3 {
    font-size: 1.3rem;
    margin: 0;
}
.karte p {
    color: var(--color-text-muted);
}

/* === Über-uns Teaser === */
.ueber-teaser {
    display: flex;
    align-items: center;
    gap: 3rem;
    padding: 5rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}
.ueber-bild {
    flex: 1;
}
.ueber-text {
    flex: 1;
}
.ueber-bild img {
    width: 100%;
    height: auto;
    border-radius: 12px;
}
.ueber-text h2 {
    font-size: 2.2rem;
    margin-bottom: 1.5rem;
}
.ueber-text p {
    color: var(--color-text-muted);
    margin-bottom: 2rem;
    max-width: 50ch;
}

/* === CTA-Band === */
.cta-band {
    background-color: var(--color-primary);
    color: var(--color-on-dark);
    padding: 5rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1.5rem;
}
.btn-hell {
    background-color: var(--color-on-dark);
    color: var(--color-primary);
}
.btn-hell:hover {
    background-color: var(--color-bg-warm);
}

/* === Footer Styles === */
footer {
    background-color: var(--color-dark);
    color: var(--color-on-dark);
    padding: 3rem 2rem 1.5rem;
}
.footer-inhalt {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 2rem;
    max-width: 1100px;
    margin: 0 auto;
    padding-bottom: 2rem;
}
.footer-spalte h4 {
    font-family: var(--font-body);
    margin-bottom: 1rem;
}
.footer-spalte ul {
    list-style: none;
}
.footer-spalte a {
    color: var(--color-on-dark);
    text-decoration: none;
    line-height: 2;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}
.footer-spalte a:hover {
    opacity: 1;
}
.footer-unten {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1100px;
    margin: 0 auto;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    font-size: 0.9rem;
}
.footer-unten ul {
    display: flex;
    gap: 1rem;
    list-style: none;
}
.footer-unten a {
    color: var(--color-on-dark);
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}
.footer-unten a:hover {
    opacity: 1;
}
.footer-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-heading);
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}
/* === Blog-Übersicht === */
.blog-liste {
    max-width: 750px;
    margin: 0 auto;
    padding: 2rem 2rem 4rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}
.blog-eintrag {
    display: block;
    background-color: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 1.5rem;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.blog-eintrag:hover {
    transform: translateY(-3px);
    box-shadow: var(--schatten-karte);
}
.blog-eintrag h2 {
    font-size: 1.4rem;
    margin: 0.3rem 0 0.5rem;
}
.blog-eintrag p {
    color: var(--color-text-muted);
    margin: 0;
}
.beitrag-datum {
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

/* === Blogartikel === */
.beitrag {
    max-width: 750px;
    margin: 0 auto;
    padding: 4rem 2rem;
}
.beitrag h1 {
    font-size: 2.5rem;
    margin: 0.5rem 0 2rem;
}
.beitrag h2 {
    font-size: 1.6rem;
    margin: 2rem 0 1rem;
}
.beitrag p {
    margin-bottom: 1rem;
}
.beitrag ul {
    margin: 0 0 1rem 1.5rem;
}
.beitrag li {
    margin-bottom: 0.4rem;
}
/* === Kategorie-Filter & Kategorien === */
.kategorie-filter {
    max-width: 750px;
    margin: 0 auto;
    padding: 0 2rem 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}
.kategorie-filter a,
.beitrag-kategorien a {
    font-size: 0.9rem;
    padding: 0.4rem 0.9rem;
    border: 1px solid var(--color-border);
    border-radius: 999px;
    text-decoration: none;
    color: var(--color-text);
    transition: all 0.2s ease;
}
.kategorie-filter a:hover,
.beitrag-kategorien a:hover {
    background-color: var(--color-primary);
    color: var(--color-on-dark);
    border-color: var(--color-primary);
}
.beitrag-kategorien {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

/* === Blog-Pagination === */
.blog-pagination {
    max-width: 750px;
    margin: 0 auto;
    padding: 1rem 2rem 4rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    font-size: 0.9rem;
}
.blog-pagination a {
    text-decoration: none;
    color: var(--color-primary);
    font-weight: 500;
}
.blog-pagination span {
    color: var(--color-text-muted);
}
/* === Kontaktformular Styles === */
.kontakt {
    max-width: 600px;
    margin: 0 auto;
    padding: 4rem 2rem;
}
.kontakt h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}
.kontakt > p {
    color: var(--color-text-muted);
    margin-bottom: 2rem;
}
.kontakt .btn {
    margin-top: 0.5rem;
}
.form-gruppe {
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
}
.form-gruppe label {
    font-weight: 500;
    margin-bottom: 0.5rem;
}
.form-gruppe input, .form-gruppe textarea {
    font-family: var(--font-body);
    font-size: 1rem;
    padding: 0.7rem;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    transition: border-color 0.2s ease;
}
.form-gruppe input:focus, .form-gruppe textarea:focus {
    outline: none;
    border-color: var(--color-primary);
}
.fehler {
    color: var(--color-error);
    font-size: 0.85rem;
    margin-top: 0.3rem;
    min-height: 1rem;
}

/* === Seitenkopf (Unterseiten) === */
.seite-kopf {
    text-align: center;
    padding: 5rem 2rem 2rem;
    max-width: 700px;
    margin: 0 auto;
}
.seite-kopf h1 {
    font-size: 2.8rem;
    margin-bottom: 1rem;
}
.seite-kopf p {
    color: var(--color-text-muted);
    font-size: 1.15rem;
}

/* === Leistungen-Detailseite (Bild-Text im Wechsel) === */
.leistung-detail {
    padding: 4rem 2rem;
}
.leistung-detail.alt {
    background-color: var(--color-bg-warm);
}
.leistung-inhalt {
    display: flex;
    align-items: center;
    gap: 3rem;
    max-width: 1100px;
    margin: 0 auto;
}
.leistung-detail.alt .leistung-inhalt {
    flex-direction: row-reverse;
}
.leistung-bild {
    flex: 1;
}
.leistung-bild img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    display: block;
}
.leistung-text {
    flex: 1;
}
.leistung-kopf {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1rem;
}
.leistung-icon {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
}
.leistung-icon img,
.leistung-icon svg {
    display: block;
    width: 44px;
    height: 44px;
    object-fit: contain;
}
.leistung-text h2 {
    font-size: 2rem;
    margin: 0;
}
.leistung-text p {
    color: var(--color-text-muted);
    max-width: 60ch;
}
/* === Rechtsseiten (Impressum, Datenschutz) === */
.rechtstext {
    max-width: 750px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

.rechtstext h1 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
}

.rechtstext h2 {
    font-size: 1.5rem;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

.rechtstext p {
    margin-bottom: 1rem;
    color: var(--color-text);
}

.rechtstext a {
    color: var(--color-primary);
}
/* === Hamburger Menu Styles === */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.8rem;
    color: var(--color-dark);
    cursor: pointer;
}

/* === Responsive Styles === */
@media (max-width: 768px) {
    .hero, .ueber-teaser {
        flex-direction: column;
    }
    .footer-inhalt {
        grid-template-columns: 1fr;
    }
    .leistung-inhalt,
    .leistung-detail.alt .leistung-inhalt {
        flex-direction: column;
    }
    .hero-text h1 {
        font-size: 2rem;
    }
    .leistungen h2, .ueber-text h2 {
        font-size: 1.8rem;
    }
    .footer-unten {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    .menu-toggle {
        display: block;
    }
    nav ul {
        display: none;
        position: absolute;
        top: 70px;
        right: 1rem;
        left: 1rem;
        gap: 1rem;
        background-color: var(--color-bg);
        padding: 1.5rem;
        border-radius: 12px;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    }
    nav ul.offen {
        display: flex;
    }
}
@media (max-width: 480px) {
    header {
        padding: 1rem;
    }
}
/* === Cookie-Banner === */
#cc-main {
    --cc-font-family: var(--font-body);
    --cc-btn-border-radius: 8px;
    --cc-primary-color: var(--color-text);
    --cc-secondary-color: var(--color-text-muted);
    --cc-btn-primary-bg: var(--color-primary);
    --cc-btn-primary-hover-bg: var(--color-primary-dark);
    --cc-btn-primary-color: #ffffff;
    --cc-btn-primary-hover-color: #ffffff;
}
.cc-link {
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    color: var(--color-on-dark);
    opacity: 0.8;
    cursor: pointer;
    transition: opacity 0.2s ease;
}
.cc-link:hover {
    opacity: 1;
}
/* === Sprachumschalter === */
.lang-switch {
    text-decoration: none;
    color: var(--color-text);
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.4rem 0.7rem;
    border: 1px solid var(--color-border);
    border-radius: 999px;
    transition: all 0.2s ease;
}
.lang-switch:hover {
    background-color: var(--color-primary);
    color: var(--color-on-dark);
    border-color: var(--color-primary);
}
/* === Blog: Zurück-Link & Artikel-Navigation === */
.beitrag-zurueck {
    max-width: 750px;
    margin: 0 auto;
    padding: 2rem 2rem 0;
}
.beitrag-zurueck a {
    text-decoration: none;
    color: var(--color-text-muted);
    font-size: 0.9rem;
    transition: color 0.2s ease;
}
.beitrag-zurueck a:hover {
    color: var(--color-primary);
}
.beitrag-nav {
    max-width: 750px;
    margin: 0 auto;
    padding: 2rem;
    display: flex;
    justify-content: space-between;
    gap: 1.5rem;
    border-top: 1px solid var(--color-border);
}
.beitrag-nav-link {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    text-decoration: none;
    max-width: 47%;
}
.beitrag-nav-link span {
    font-size: 0.85rem;
    color: var(--color-text-muted);
}
.beitrag-nav-link strong {
    font-family: var(--font-heading);
    font-weight: 500;
    color: var(--color-primary);
    line-height: 1.3;
}
.beitrag-nav-next {
    text-align: right;
    margin-left: auto;
    align-items: flex-end;
}
/* === Blog-Suche === */
.kategorie-suche {
    margin-left: auto;
    font-weight: 600;
}
.blog-suche {
    max-width: 750px;
    margin: 0 auto;
    padding: 1rem 2rem 4rem;
}
/* Pagefind an das Marken-Design anpassen */
:root {
    --pagefind-ui-primary: var(--color-primary);
    --pagefind-ui-text: var(--color-text);
    --pagefind-ui-background: var(--color-bg);
    --pagefind-ui-border: var(--color-border);
    --pagefind-ui-tag: var(--color-bg-warm);
    --pagefind-ui-border-radius: 8px;
    --pagefind-ui-font: var(--font-body);
}
/* === Accessibility === */

/* Etwas dunklerer Nebentext für ausreichenden Kontrast (auch auf Beige) */
:root {
    --color-text-muted: #5A5A61;
}

/* Sprunglink "Zum Inhalt springen" (nur bei Tastatur-Fokus sichtbar) */
.skip-link {
    position: absolute;
    left: 0;
    top: -100px;
    background: var(--color-primary);
    color: var(--color-on-dark);
    padding: 0.7rem 1.2rem;
    border-radius: 0 0 8px 0;
    z-index: 1000;
    transition: top 0.15s ease;
}
.skip-link:focus {
    top: 0;
}
#inhalt:focus {
    outline: none;
}
.footer-titel {
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--color-on-dark);
    margin-bottom: 1rem;
}

/* Deutlich sichtbarer Fokusrahmen für Tastaturnutzer */
:focus-visible {
    outline: 3px solid var(--color-primary);
    outline-offset: 2px;
    border-radius: 2px;
}
.footer a:focus-visible,
.cta-band a:focus-visible,
.btn-hell:focus-visible {
    outline-color: var(--color-on-dark);
}
.form-gruppe input:focus-visible,
.form-gruppe textarea:focus-visible {
    outline: 3px solid var(--color-primary);
    outline-offset: 1px;
}

/* CTA-Überschrift lesbar auf grünem Grund */
.cta-band h2 {
    color: var(--color-on-dark);
}

/* Bewegung reduzieren, wenn im Betriebssystem gewünscht */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    .karte:hover,
    .blog-eintrag:hover {
        transform: none;
    }
}
/* === Blog-Navigation: Vor/Zurück als Karten === */
.beitrag-nav-link {
    padding: 1rem 1.2rem;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    background: var(--color-bg);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.beitrag-nav-link:hover {
    border-color: var(--color-primary);
    box-shadow: var(--schatten-karte);
    transform: translateY(-2px);
}
/* === Spamschutz-Feld unsichtbar halten === */
.hp-feld {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}
/* === Dankeseite (zweisprachig) === */
.danke {
    padding-bottom: 4rem;
}
.danke p[lang] {
    margin-bottom: 0.4rem;
}
.danke-aktion {
    margin-top: 1.5rem;
    display: flex;
    gap: 0.8rem;
    justify-content: center;
    flex-wrap: wrap;
}
.beitrag img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 1.5rem 0;
}
/* === Datenschutz-Hinweis am Formular === */
.form-hinweis {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin-bottom: 1.5rem;
    line-height: 1.5;
}
.partner {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
    text-align: center;
}
.partner-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: center;
    margin-top: 1.5rem;
}
.partner-badges img {
    width: 140px;
    height: 140px;
}
.footer-badge {
    margin-top: 1.2rem;
    width: 90px;
    height: 90px;
}