/* ==========================================================================
   01. GLOBALE VARIABLEN (CI-FARBEN & SCHRIFTEN)
   ========================================================================== */

:root {
    /* --- Farben --- */
    --ci-green: #779816; 
    --ci-green-hover: #8cb133;
    --ci-green-background: #F7FFDE;
    --ci-weiss: #ffffff;

    /* --- Schriften --- */
    --font-primary: 'Delicious LB', sans-serif; /* Fallback auf sans-serif */
    --font-primary-bold: 'Delicious Heavy', sans-serif; /* Fallback auf sans-serif */
    --tags-text-align: left;

    /* --- Grid & Layout --- */
    --grid-gutter: 20px;
    --container-max-width: 1200px;
    --nav-px: 1.5rem; /* Horizontaler Abstand für Navigation */
}

/* ==========================================================================
   02. TYPOGRAFIE & SCHRIFTARTEN (FONTS)
   ========================================================================== */

@font-face {
    font-family: 'Delicious LB Bold';
    src: url('fonts/DeliciousLB-Bold.woff2') format('woff2'),
         url('fonts/DeliciousLB-Bold.woff') format('woff');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Delicious LB';
    src: url('fonts/DeliciousLB.woff2') format('woff2'),
         url('fonts/DeliciousLB.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Delicious Heavy';
    src: url('fonts/Delicious-Heavy.woff2') format('woff2'),
        url('fonts/Delicious-Heavy.woff') format('woff');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}



/* ==========================================================================
   03. BASE (GRUNDLEGENDE HTML-ELEMENTE)
   ========================================================================== */

body {
    font-family: var(--font-primary);
    color: var(--ci-green);
    background-color: var(--ci-green-background);
}

/* Hintergrundfarbe NUR für die Login-Seite */
body.view-login {
    background-color: var(--ci-green);
}

main {
    padding: 25px 0;
}

h1, h2, h3, h4 {
    font-family: var(--font-primary);
    font-weight: 300;
    text-transform: uppercase;
}

.intro h3 {
    margin-bottom: 20px;
}

.intro p,
.intro ul {
    margin-bottom: 50px;
}

strong {
    font-family: var(--font-primary-bold);
}

p {

}

.strong {
    font-family: var(--font-primary-bold);
}

.margin-top-30 {
    margin-top: 30px;
}

.margin-top-60 {
    margin-top: 60px;
}

/* ==========================================================================
   04. LAYOUT & EIGENES GRID-FRAMEWORK
   ========================================================================== */

/* --- Container --- */
.site-wrapper {
    width: 100%;
    margin-right: auto;
    margin-left: auto;
    padding-right: calc(var(--grid-gutter) / 2);
    padding-left: calc(var(--grid-gutter) / 2);
    /*max-width: var(--container-max-width);*/
}

/* --- Row --- */
.layout-row {
    display: flex;
    flex-wrap: wrap;
    margin-right: calc(var(--grid-gutter) / -2);
    margin-left: calc(var(--grid-gutter) / -2);
}

/* --- Modifier für doppelten Spaltenabstand (40px) --- */
.layout-row-double-gap {
    --grid-gutter: 100px;
}

/* Basis-Spalten-Definition */
[class*="col-"] {
    position: relative;
    width: 100%;
    padding-right: calc(var(--grid-gutter) / 2);
    padding-left: calc(var(--grid-gutter) / 2);
    box-sizing: border-box;
}

/* --- Mobile First Spalten (Default: 100% Breite) --- */
.col-xs-12 { flex: 0 0 100%; max-width: 100%; }
.col-xs-6  { flex: 0 0 50%; max-width: 50%; }

/* --- Tablet (ab 768px) --- */
@media (min-width: 768px) {
    .col-md-12 { flex: 0 0 100%; max-width: 100%; }
    .col-md-8  { flex: 0 0 66.666667%; max-width: 66.666667%; }
    .col-md-6  { flex: 0 0 50%; max-width: 50%; }
    .col-md-4  { flex: 0 0 33.333333%; max-width: 33.333333%; }
    .col-md-3  { flex: 0 0 25%; max-width: 25%; }
}

/* --- Desktop (ab 1024px) --- */
@media (min-width: 1024px) {
    .col-lg-12 { flex: 0 0 100%; max-width: 100%; }
    .col-lg-9  { flex: 0 0 75%; max-width: 75%; }
    .col-lg-8  { flex: 0 0 66.666667%; max-width: 66.666667%; }
    .col-lg-6  { flex: 0 0 50%; max-width: 50%; }
    .col-lg-4  { flex: 0 0 33.333333%; max-width: 33.333333%; }
    .col-lg-3  { flex: 0 0 25%; max-width: 25%; }
}

/* ==========================================================================
   05. KOMPONENTEN
   ========================================================================== */

/* --------------------------------------------------------------------------
   05.1 HEADER BEREICH (Logo, Button)
   -------------------------------------------------------------------------- */
.header-top-wrapper {
    background-color: var(--ci-weiss);
    border-bottom: 2px solid var(--ci-green);
}

/* Logo */
a.brand-logo img {
    width: 213px;
    height: 60px;
}

.styleguide-title {
    color: var(--ci-green);
    font-family: var(--font-primary);
    font-weight: normal;
    letter-spacing: 1px;
    font-size: 40px;
}

/* Anmelde-Button (Modul 'topbar') */
.container-topbar {
    padding-top: 8px;
}

.container-topbar .btn {
    background-color: var(--ci-green);
    color: var(--ci-weiss);
    border: none;
    border-radius: 0;
    padding: .6rem 1rem;
    font-size: 1rem;
    text-transform: uppercase;
    font-family: var(--font-primary);
    transition: background-color 0.3s ease;
}

.container-topbar .btn:hover {
    background-color: var(--ci-green-hover);
}

/* Barrierefreiheit: Topbar Button Fokus */
.container-topbar .btn:focus-visible {
    outline: 2px solid var(--ci-green);
    outline-offset: 2px;
}

/* --------------------------------------------------------------------------
   05.2 HAUPTNAVIGATION & SUCHE (BARRIEREFREI / CUSTOM CLASSES)
   -------------------------------------------------------------------------- */

.container-header .container-nav {
    /* Setzt Navigation und Suche auf Desktop in eine saubere Reihe */
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    gap: 20px;
    padding-top: 0;
    padding-bottom: 0;
}

.kwb-nav-wrapper {
    background-color: transparent;
    width: 100%;
    position: relative;
    padding: 0;
    margin: 0;
}

/* --- DESKTOP ANSICHT MENÜ --- */
.kwb-main-menu {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 35px; 
    margin: 0;
    padding: 0;
    list-style: none;
    background-color: transparent;
    flex-grow: 1; /* Nimmt den Platz ein und schiebt die Suche nach rechts */
}

.kwb-item {
    margin: 0;
    padding: 0;
    display: flex;
    position: relative;
}

.kwb-item::after {
    display: none !important;
}

.kwb-link {
    display: flex;
    align-items: center;
    padding: 0 0 .2em 0; 
    min-height: 50px; /* Höhe für ausreichenden Klickbereich (A11y) */
    color: var(--ci-weiss);
    font-family: var(--font-primary);
    font-size: 1.3rem;
    text-transform: uppercase;
    text-decoration: none;
    position: relative;
    transition: color 0.2s ease-in-out;
}

/* Barrierefreiheit: Deutlicher Fokus-Rahmen für Tastaturnutzer */
.kwb-link:focus-visible {
    outline: 2px solid var(--ci-weiss);
    outline-offset: 4px;
    border-radius: 2px;
}

/* Weiße Linie bei Hover & Aktiv */
.kwb-item.is-active > .kwb-link::after,
.kwb-item:hover > .kwb-link::after,
.kwb-item:focus-within > .kwb-link::after,
.kwb-item:has(.is-active) > .kwb-link::after {
    content: '';
    position: absolute;
    bottom: 0; 
    left: 0;
    right: 0; 
    height: 4px;
    background-color: var(--ci-weiss);
}

/* --- SUCHE IM NAVIGATIONSBEREICH --- */

.container-header .container-search {
    margin-top: 0;
}

.container-search {
    width: auto;
    flex-shrink: 0; /* Verhindert, dass die Suche vom Menü zerdrückt wird */
    display: flex;
    justify-content: flex-end; /* Richtet das Formular komplett rechtsbündig aus */
}

.container-search form {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 0;
}

/* Optionales Verstecken des Labels auf Desktop, falls nur Input gewünscht */
.container-search label {
    color: var(--ci-weiss);
    font-family: var(--font-primary);
    font-size: 1.1rem;
    margin: 0;
    display: none; 
}

.container-search input[type="search"],
.awesomplete > input {
    background-color: var(--ci-weiss);
    color: #333333;
    border: 2px solid transparent;
    border-radius: 0;
    padding: 8px 15px;
    font-family: var(--font-primary);
    width: 300px; /* Definierte Breite für das Feld */
    max-width: 100%;
}

/* Barrierefreiheit: Suchfeld Fokus */
.container-search input[type="search"]:focus-visible,
.awesomplete > input:focus-visible {
    outline: none;
    border-color: var(--ci-green-hover);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.4);
}

.container-search input[type="search"]::placeholder,
.awesomplete > input::placeholder {
    color: #999999;
    opacity: 1; 
}

/* Erweiterte Suche (Link) auf Desktop ausblenden, falls gewünscht */
.container-search a {
    display: none; 
    color: var(--ci-weiss);
    text-decoration: underline;
    font-size: 0.95rem;
    font-family: var(--font-primary);
}

.container-search a:focus-visible {
    outline: 2px solid var(--ci-weiss);
    outline-offset: 2px;
}

/* --- DROPDOWN LOGIK --- */
.kwb-submenu {
    display: none;
    position: absolute;
    top: 50px; 
    left: 0;
    z-index: 999;
    background-color: var(--ci-green);
    min-width: 220px;
    padding: 0;
    margin: 0;
    list-style: none;
}

/* Barrierefreiheit: Dropdown öffnet sich bei Hover ODER wenn der Link Tastatur-Fokus hat */
.kwb-item.has-dropdown:hover > .kwb-submenu,
.kwb-item.has-dropdown:focus-within > .kwb-submenu {
    display: block;
}

.kwb-submenu .kwb-item {
    width: 100%;
}

.kwb-submenu .kwb-link {
    font-size: 1.1rem;
    padding: 12px 15px; 
    min-height: auto; 
    text-transform: none; 
    width: 100%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2); 
}

.kwb-submenu .kwb-item:last-child .kwb-link {
    border-bottom: none;
}

.kwb-submenu .kwb-link::after {
    display: none !important;
}

.kwb-submenu .kwb-link:hover,
.kwb-submenu .kwb-link:focus {
    background-color: rgba(255, 255, 255, 0.1);
}

/* --- MOBILE ANSICHT (HAMBURGER & SUCHE) --- */
.kwb-hamburger-btn {
    display: none; 
    width: 44px;
    height: 50px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0 10px;
}

.kwb-hamburger-btn:focus-visible {
    outline: 2px solid var(--ci-weiss);
    outline-offset: -2px;
}

.kwb-hamburger-btn span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--ci-weiss);
    margin: 5px 0;
    transition: all 0.3s;
}

.kwb-item a.kwb-link:hover {
    color: #fff;
}

@media (max-width: 991px) {
    .container-header .container-nav {
        flex-direction: column;
        align-items: stretch;
        padding-top: 15px;
        padding-bottom: 15px;
    }

    .container-search {
        width: 100%;
        justify-content: flex-start;
        margin-top: 15px;
    }

    .container-search form {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
    }

    /* Auf Mobile das Label wieder anzeigen */
    .container-search label {
        display: block;
        margin-bottom: 5px;
    }

    .container-search input[type="search"],
    .awesomplete > input {
        width: 100%;
    }

    /* Auf Mobile erweiterten Suchlink wieder anzeigen */
    .container-search a {
        display: inline-block;
        margin-top: 10px;
    }

    .kwb-hamburger-btn {
        display: flex; 
        flex-direction: column;
        justify-content: center;
        margin-bottom: 15px;
    }

    .kwb-main-menu {
        display: none; 
        flex-direction: column;
        width: 100%;
        gap: 0; 
    }

    .kwb-main-menu.is-mobile-open {
        display: flex;
    }

    .kwb-item {
        flex-direction: column;
        width: 100%;
    }

    .kwb-link {
        width: 100%;
        padding: 10px 15px; 
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        min-height: auto;
    }

    .kwb-item.is-active > .kwb-link::after,
    .kwb-link:hover::after {
        left: 15px;
        right: 15px;
        bottom: 0;
    }

    .kwb-submenu {
        position: static; 
        display: block;
        background-color: rgba(0,0,0,0.1);
        padding-left: 15px;
        box-shadow: none;
    }
    
    .kwb-submenu .kwb-link {
        border-bottom: 1px solid rgba(255, 255, 255, 0.1); 
    }
}

/* --------------------------------------------------------------------------
   05.3 HERO BANNER (Mobile First Layout)
   -------------------------------------------------------------------------- */
.hero-banner {
    position: relative;
    width: 100%;
    min-height: 350px; /* Mobile First Höhe */
    display: flex;
    align-items: center;
    background-color: #2c3e50;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    overflow: hidden;
}

/* Dunkles Overlay für bessere Lesbarkeit der Schrift (Mobile First) */
.hero-banner::before {
    content: '';
    position: absolute;
    inset: 0; /* Modernes Äquivalent für top: 0; right: 0; bottom: 0; left: 0; */
    z-index: 1;
    background: rgba(30, 45, 65, 0.6);
}

.hero-content-container {
    position: relative;
    z-index: 2; 
    width: 100%;
    max-width: var(--container-max-width, 1200px); /* Fallback hinzugefügt */
    margin: 0 auto;
    padding: 2rem 1.5rem; 
}

.hero-subtitle {
    display: block;
    color: var(--ci-weiss);
    font-family: var(--font-primary);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px; 
    margin-bottom: 0.75rem;
}

.hero-title {
    color: var(--ci-weiss);
    font-family: var(--font-primary);
    font-size: clamp(2rem, 4vw, 3.5rem); /* Skaliert flüssig */
    line-height: 1.2;
    font-weight: 400; /* Standardisiert auf 400 statt 'normal' */
    margin: 0;
    max-width: 700px; 
}

/* --- DESKTOP ANPASSUNGEN --- */
@media (min-width: 769px) {
    .hero-banner {
        min-height: 450px; 
        background-position: center right; 
    }
    
    .hero-banner::before {
        /* Weicherer Gradient-Übergang auf größeren Bildschirmen */
        background: linear-gradient(
            to right, 
            rgba(30, 45, 65, 0.85) 0%, 
            rgba(30, 45, 65, 0.3) 50%, 
            rgba(30, 45, 65, 0) 100%
        );
    }
}

/* --------------------------------------------------------------------------
   05.4 LOGIN VIEW (Layout & Formular)
   -------------------------------------------------------------------------- */
body.view-login .site-grid {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin: 0;
    padding: 0;
}

body.view-login .container-component,
body.view-login main {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.custom-login-wrapper {
    width: 100%;
    padding: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.custom-login-box {
    background-color: var(--ci-weiss);
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.custom-login-logo {
    margin-bottom: 30px;
}

.custom-login-logo img {
    max-width: 200px;
    height: auto;
}

.custom-login-box fieldset {
    padding: 0;
    margin: 0;
    border: none;
    text-align: left;
}

.custom-login-box .control-label {
    margin-bottom: 5px;
    font-size: 0.9rem;
    color: #555555;
    font-weight: bold;
}

.custom-login-box .star {
    display: none !important;
}

.custom-login-box input.form-control {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #cccccc;
    border-radius: 4px;
    margin-bottom: 15px;
    font-family: var(--font-primary);
}

.custom-login-box input.form-control:focus {
    border-color: var(--ci-green);
    box-shadow: 0 0 0 0.2rem rgba(98, 126, 18, 0.25); 
    outline: none;
}

.custom-login-links {
    font-size: 0.85rem;
    margin-top: 15px;
}

.custom-login-links a {
    color: #6c757d;
    text-decoration: none;
}

.custom-login-links a:hover {
    color: var(--ci-green);
    text-decoration: underline;
}

/* --------------------------------------------------------------------------
   05.5 FOOTER
   -------------------------------------------------------------------------- */
.container-footer {
    border-top: none;
}

.container-footer a {
    color: var(--ci-weiss);
    text-decoration: none;
}

.container-footer a:hover {
    text-decoration: underline;
}

/* Logo-Reihe */
.footer-top img {
    max-height: 60px;
    width: auto;
    margin-left: 20px;
}

.logo-row-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin: 0 auto;
    max-width: 1000px;
    padding: 1rem;
}

.logo-row-container img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Footer Bottom Menu */
.footer-bottom {
    font-size: 0.85rem;
    color: #555555;
    text-transform: uppercase;
}

.footer-bottom a {
    color: #555555;
    text-decoration: none;
    font-weight: bold;
}

.footer-bottom a:hover {
    color: var(--ci-green);
}

.footer-bottom ul.custom-footer-menu {
    display: flex;
    align-items: center;
    justify-content: flex-end; 
    margin: 0;
    padding: 0;
    list-style: none;
}

.footer-bottom ul.custom-footer-menu li:not(:last-child):after {
    content: "|";
    margin: 0 15px;
    color: #999999;
}

/* --------------------------------------------------------------------------
   05.6 UI ELEMENTE (Cards, Buttons)
   -------------------------------------------------------------------------- */
.ui-card {
    background: var(--ci-weiss);
    /*border: 1px solid #e0e0e0;*/
    padding: 20px;
    height: 100%;
    transition: transform 0.2s ease;
}

.ui-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.login-btn,
.ui-btn {
    background-color: var(--ci-green);
    border: none;
    padding: 12px;
    font-size: 1rem;
    text-transform: uppercase;
    border-radius: 4px;
    transition: background-color 0.3s;
    color: var(--ci-weiss);
    font-family: var(--font-primary);
}

.login-btn:hover,
.login-btn:focus,
.login-btn:focus-visible,
.ui-btn:hover {
    background-color: var(--ci-green-hover);
    color: var(--ci-weiss);
}

.ui-btn-outline {
    border: 2px solid var(--ci-green);
    color: var(--ci-green);
    background: transparent;
    padding: 10px 20px;
    text-transform: uppercase;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.ui-btn-outline:hover {
    background: var(--ci-green);
    color: var(--ci-weiss);
}

/* ==========================================================================
   06. UTILITIES (HILFSKLASSEN FÜR ABSTÄNDE, FARBEN, TYPO)
   ========================================================================== */

/* --- Typografie --- */
.font-primary {
    font-family: var(--font-primary) !important;
}

.text-bold {
    font-weight: bold !important;
}

.text-normal {
    font-weight: normal !important;
}

/* --- Farben --- */
.ci-bg-green {
    background-color: var(--ci-green) !important;
}

.ci-text-green {
    color: var(--ci-green) !important;
}

/* --- Abstände (Margin/Padding) --- */
.mt-20 { margin-top: 20px; }
.mt-40 { margin-top: 40px; }
.mt-80 { margin-top: 80px; }
.mb-20 { margin-bottom: 20px; }
.mb-40 { margin-bottom: 40px; } /* Neu für 40px Abstand */
.mb-60 { margin-bottom: 60px; } /* Neu für 60px Abstand */
.py-50 { padding-top: 50px; padding-bottom: 50px; }

/* ==========================================================================
   07. KATEGORIE DOWNLOAD CARDS (OVERRIDE)
   ========================================================================== */

.download-category-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 0; /* Überschreibt das Standard-Padding der ui-card */
    overflow: hidden;
}

.download-category-card .category-image-wrapper {
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    background-color: var(--ci-weiss);
}

figure.category-image-wrapper {
    margin-block-start: 0;
    margin-block-end: 0;
    margin-inline-start: 0;
    margin-inline-end: 0;
    padding: 0;
}

.download-category-card .category-image-wrapper img {
    max-width: 100%;
    height: auto;
    display: block;
}

.download-category-card .category-download-btn {
    width: 100%;
    text-align: right;
    border-radius: 0; /* Button schließt scharf an den Kanten der Card ab */
    padding: 15px;
    font-size: 1rem;
    display: block;
    margin: 0;
}

a span.ui-btn.category-download-btn::after {
    text-decoration: none;
}

/* Basis-Link und ALLE seine Zustände bereinigen */
.article-link-card,
.article-link-card:hover,
.article-link-card:focus,
.article-link-card:active {
    text-decoration: none !important; 
    border: none !important;
    outline: none !important;
    color: inherit;
}

/* Button-Text explizit von Unterstreichungen befreien */
.article-link-card .category-download-btn,
.article-link-card:hover .category-download-btn {
    text-decoration: none !important;
}

/* Hover-Effekt für die gesamte Karte (Schatten & Bewegung) */
.article-link-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

/* ==========================================================================
   08. ARTIKEL DETAILANSICHT (SUBFORM DOWNLOADS)
   ========================================================================== */

.article-link-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none !important;
    border: none !important;
}

/* Einheitlicher Wrapper für alle Logos */
.category-image-wrapper {
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px 15px;
    margin: 0;
    background-color: var(--ci-weiss);
    /*border: 1px solid #e0e0e0;*/
}

.category-image-wrapper img {
    max-width: 90%;
    height: auto;
    object-fit: contain;
}

/* Entfernt den Rahmen, wenn das Bild seinen eigenen (dunklen) Hintergrund mitbringt */
.category-image-wrapper.no-border {
    border: none !important;
    padding: 0; /* Nimmt den Rand weg, damit das Bild satt abschließt */
}

/* Optional: Damit das Bild in der no-border Box den ganzen Raum füllt */
.category-image-wrapper.no-border img {
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
}

/* Optimierter Button für schmale Spalten */
.category-download-btn.small-btn {
    font-size: 0.75rem;
    padding: 10px 5px;
    line-height: 1.2;
    text-align: center;
    width: 100%;
    background-color: var(--ci-green);
    color: var(--ci-weiss);
    text-transform: uppercase;
    font-weight: bold;
    border-radius: 0;
}

.article-link-card:hover .category-download-btn {
    background-color: var(--ci-green-hover);
}

.article-link-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* Mobile First: In der mobilen Ansicht den Text wieder etwas größer */
@media (max-width: 767px) {
    .category-download-btn.small-btn {
        font-size: 0.9rem;
        padding: 15px;
    }
}

/* ==========================================================================
   09. UNTERNEHMENSFARBEN (OVERRIDE)
   ========================================================================== */

.color-grid {
    /* Nutzt das bestehende .layout-row Framework */
}

.color-item {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.color-title {
    font-family: var(--font-primary);
    font-size: 1.1rem;
    font-weight: normal;
    text-transform: uppercase;
    color: var(--ci-green); /* Anpassbar je nach Headline-CI */
    margin: 0 0 10px 0;
    letter-spacing: 0.5px;
}

.color-box {
    flex-grow: 1; /* Sorgt dafür, dass Boxen in einer Reihe gleich hoch sind */
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    /* Hintergrund- und Textfarbe wird inline gesetzt für Dynamik */
}

/* Accessibility: Fokus-Outline für Tastaturnavigation */
.color-box:focus-visible {
    outline: 3px solid var(--ci-green);
    outline-offset: 3px;
}

.color-box:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.color-details {
    list-style: none;
    margin: 0;
    padding: 0;
    font-family: var(--font-primary);
    font-size: 0.95rem;
    line-height: 1.6;
}

.color-details li {
    display: flex;
    flex-wrap: nowrap;
    margin-bottom: 8px;
}

.color-details li:last-child {
    margin-bottom: 0;
}

/* Feste Breite für die Labels, damit die Werte rechts exakt bündig untereinander stehen */
.color-label {
    flex: 0 0 85px; 
    font-family: var(--font-primary-bold); /* Bold für das Label */
    text-transform: uppercase;
}

.color-value {
    flex: 1;
    word-break: break-word; /* Verhindert das Ausbrechen langer Werte auf Mobile */
}

/* Mobile First Anpassungen */
@media (max-width: 767px) {
    .color-box {
        padding: 20px 15px;
    }
    
    .color-details {
        font-size: 0.9rem;
    }
    
    .color-label {
        flex: 0 0 75px; 
    }
}

/* ==========================================================================
   10. SCHRIFTFAMILIEN OVERRIDE (Layout exakt nach Screenshot)
   ========================================================================== */

.font-card {
    background-color: var(--ci-weiss);
    padding: 50px 40px;
    margin-bottom: 40px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
}

.font-card-title {
    font-family: var(--font-primary);
    color: var(--ci-green);
    font-size: 1.3rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-top: 0;
    margin-bottom: 40px;
}

.font-card-image {
    margin: 0 0 50px 0;
    padding: 0 0 0 100px;
    width: 100%;
}

.font-card-image img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Flex-Container für perfekten links/rechts Aufbau */
.font-card-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-end; /* Zieht den Text bündig zur Unterkante des Buttons */
    gap: 20px;
}

.font-usage {
    flex: 1;
    min-width: 300px;
    font-family: var(--font-primary);
    font-size: 0.9rem;
    line-height: 1.5;
    color: #555555;
    padding-bottom: 5px; /* Optischer Ausgleich für den Button */
}

.font-usage-label {
    color: var(--ci-green);
    font-family: var(--font-primary);
    text-transform: uppercase;
    margin-right: 10px;
}

.font-download-action {
    flex-shrink: 0;
}

/* Button-Styling exakt nach Screenshot (Eckig, Grün, Icon rechts) */
.font-download-btn {
    display: inline-flex;
    align-items: center;
    gap: 15px;
    font-size: 0.95rem;
    padding: 12px 20px 12px 25px;
    background-color: var(--ci-green);
    color: var(--ci-weiss);
    border: none;
    border-radius: 0; /* Eckiges Design */
    text-transform: uppercase;
    font-family: var(--font-primary);
    transition: background-color 0.3s ease;
    text-decoration: none;
}

.font-download-btn:hover {
    background-color: var(--ci-green-hover);
    color: var(--ci-weiss);
    text-decoration: none;
}

.font-download-btn .download-icon {
    width: 22px;
    height: 22px;
    stroke-width: 1.5;
}

/* Mobile First: Umbruch auf kleinen Bildschirmen */
@media (max-width: 767px) {
    .font-card {
        padding: 30px 20px;
    }
    
    .font-card-footer {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .font-download-action {
        width: 100%;
        margin-top: 15px;
    }
    
    .font-download-btn {
        width: 100%;
        justify-content: space-between; /* Button zieht sich über die ganze Breite, Icon rechts */
    }
}


/* ==========================================================================
   11. KOMMUNIKATIONSREGELN (ARTICLE OVERRIDE)
   ========================================================================== */

:root {
    /* Spezifische Ergänzung für die Regeln */
    --ci-duden-yellow: #ffdf00; /* Das klassische Duden-Gelb */
    --ci-duden-text: #1a1a1a;   /* Dunkler Text für maximalen Kontrast (A11y) */
}

/* --- Container & Basis --- */
.rules-page {
    /* Nutzt dein Grid, maximiert aber die Lesbarkeit für Fließtext */
    margin: 0 auto;
    color: var(--ci-green);
    line-height: 1.6;
    font-size: 1.1rem;
}

.rules-page h1 {
    color: var(--ci-green);
    margin-bottom: 40px;
    font-size: clamp(2rem, 4vw, 3rem); /* Skaliert flüssig (Mobile First) */
    font-family: var(--font-primary);
}

/* Der **FETTE TEXT** in der Hauptüberschrift */
.rules-page h1 strong {
    font-family: var(--font-primary-bold);
}

.rules-page h2 {
    font-family: var(--font-primary);
}

/* --- Einleitungstext (Hervorgehobene Box) --- */
.rules-page .intro-text {
    font-size: 1.2rem;
    background-color: var(--ci-weiss);
    border-left: 5px solid var(--ci-green);
    padding: 25px 25px 25px 30px;
    margin-bottom: 60px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03); /* Angelehnt an deine .font-card */
}

/* --- Einzelne Regel-Sektionen --- */
.rules-page .rule-block {
    margin-bottom: 50px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(119, 152, 22, 0.2); /* Dein CI-Grün mit 20% Deckkraft */
}

.rules-page .rule-block:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.rules-page .rule-block h2 {
    color: var(--ci-green);
    font-size: 1.5rem;
    margin-bottom: 25px;
    letter-spacing: 1px;
}

/* --- Listen-Styling --- */
.rules-page .rule-details ul {
    list-style-type: square; /* Passt zum eckigen Design deiner Buttons */
    padding-left: 20px;
    margin-top: 15px;
}

.rules-page .rule-details li {
    margin-bottom: 15px;
}

/* Stylt die "Labels" am Anfang der Listenpunkte (z.B. Höflichkeitsform:) */
.rules-page .rule-details li strong {
    font-family: var(--font-primary-bold);
    /*text-transform: uppercase;
    font-size: 0.95rem;*/
    letter-spacing: 0.5px;
    display: inline-block;
    margin-right: 5px;
}

/* --- Duden Hervorhebung --- */
/* Formatiert <strong>-Tags in reinen Textabsätzen (p) im Duden-Style */
.rules-page p strong {
    background-color: var(--ci-duden-yellow);
    color: var(--ci-duden-text);
    padding: 2px 6px;
    border-radius: 2px;
    font-family: var(--font-primary-bold);
    font-weight: normal; /* Weight wird durch den Font geregelt */
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
}

/* --- Accessibility (A11y) & Anker-Navigation --- */
/* Hebt die Sektion visuell hervor, wenn sie über das Inhaltsverzeichnis angesprungen wird */
.rules-page .rule-block:target {
    animation: targetHighlight 2s ease-out;
    scroll-margin-top: 120px; /* Verhindert, dass die Navigation den Titel verdeckt */
}

@keyframes targetHighlight {
    0% { 
        background-color: rgba(119, 152, 22, 0.1); 
        box-shadow: -15px 0 0 rgba(119, 152, 22, 0.1), 15px 0 0 rgba(119, 152, 22, 0.1);
    }
    100% { 
        background-color: transparent; 
        box-shadow: -15px 0 0 transparent, 15px 0 0 transparent;
    }
}

/* --- Mobile First Anpassungen (Tablets & Smartphones) --- */
@media (max-width: 767px) {
    .rules-page {
        font-size: 1rem;
    }
    
    .rules-page .intro-text {
        font-size: 1.1rem;
        padding: 20px;
        margin-bottom: 40px;
    }
    
    .rules-page .rule-block {
        margin-bottom: 40px;
        padding-bottom: 30px;
    }
    
    .rules-page .rule-block h2 {
        font-size: 1.3rem;
        margin-bottom: 15px;
    }
}

/* ==========================================================================
   SPALTEN-LAYOUT FÜR REGELN (MASONRY-STYLE)
   ========================================================================== */

.rules-column-layout {
    column-count: 1;
    column-gap: 40px; /* Abstand zwischen der linken und rechten Spalte */
}

@media (min-width: 768px) {
    .rules-column-layout {
        column-count: 2; /* Ab Tablet/Desktop 2 Spalten */
    }
}

.rules-column-layout .rule-block {
    break-inside: avoid; /* Verhindert, dass eine Regel über zwei Spalten aufgeteilt wird */
    page-break-inside: avoid; /* Fallback für ältere Browser */
    display: inline-block; /* Zwingt den Block zusammenzubleiben */
    width: 100%;
}


/* ==========================================================================
   12. E-MAIL SIGNATUREN (ARTICLE OVERRIDE)
   ========================================================================== */

.signature-view {
    margin-bottom: 2rem;
}

.signature-view__heading {
    color: var(--ci-green);
    font-family: var(--font-primary);
    font-weight: normal;
    font-size: 1.5rem;
    text-transform: uppercase;
    margin-bottom: 2.5rem;
    letter-spacing: 0.5px;
}

.signature-view__heading strong {
    font-family: var(--font-primary-bold);
    font-weight: normal; 
}

/* Neue Klasse für die H2 (Beispiel) */
.signature-view__subheading {
    color: var(--ci-green);
    font-family: var(--font-primary);
    font-weight: normal;
    font-size: 1.25rem;
    text-transform: uppercase;
    margin: 0 0 20px 0; /* Das Flex-Grid kümmert sich um den perfekten Abstand (gap) */
    letter-spacing: 0.5px;
}

.signature-grid {
    display: flex;
    flex-direction: column;
    gap: 40px; 
    max-width: 75%;
}

.signature-card {
    background-color: var(--ci-weiss);
    display: flex;
    flex-direction: column;
}

.signature-card__image-wrapper {
    width: 100%;
    display: block;
    line-height: 0; 
}

.signature-card__img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.signature-card__footer {
    background-color: var(--ci-green);
    display: flex;
    justify-content: flex-end; 
    padding: 0;
}

.signature-card__download-link {
    color: var(--ci-weiss);
    text-decoration: none;
    font-family: var(--font-primary);
    font-size: 0.85rem;
    text-transform: uppercase;
    padding: 12px 25px;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.signature-card__download-link:hover {
    background-color: var(--ci-green-hover);
    color: var(--ci-weiss);
    text-decoration: none;
}

.signature-card__download-link:focus-visible {
    background-color: var(--ci-green-hover);
    outline: none;
    box-shadow: inset 0 0 0 2px var(--ci-weiss);
}

@media (max-width: 767px) {
    .signature-grid {
        gap: 30px;
        min-width: 100%;
    }
    
    .signature-card__download-link {
        width: 100%;
        justify-content: space-between; 
        padding: 15px 20px;
    }
}


/* ==========================================================================
   ACF GALLERY - GLIGHTBOX ABSOLUTE OVERRIDE
   ========================================================================== */


.fields-container {
    list-style: none;
    padding-left: 0;
}

.tf-gallery-tags.position-above {
    background-color: var(--ci-green);
    padding: 20px;
    border-radius: 6px;
}


.tf-gallery-wrapper .tf-gallery-tags a {
    color: var(--ci-weiss)!important;
}

.tf-gallery-wrapper .tf-gallery-tags a:hover, .tf-gallery-wrapper .tf-gallery-tags a.active {
    background-color: var(--ci-weiss)!important;
    color: var(--ci-green)!important;
}



/* Pfad: /css/custom-gallery.css */

/* Basis-Layout der Lightbox (Fullscreen Overlay) */
.gslide.loaded {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.85);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 9999;
}

.gslide-inner-content {
    width: 100%;
    max-width: 1200px;
    padding: 1rem;
    box-sizing: border-box;
}

/* Mobile First: Stacking (Bild oben, Text unten) */
.ginner-container {
    display: flex;
    flex-direction: column;
    background-color: #ffffff;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    width: 100%;
}

/* Bild-Bereich */
.gslide-media {
    width: 100%;
    background-color: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.gslide-media img {
    width: 100%;
    height: auto;
    max-height: 50vh !important;
    object-fit: cover;
    display: block;
}

/* Beschreibungs-Bereich (Rechte Spalte / Unten) */
.gslide-description {
    width: 100%;
    max-width: 100% !important;
    background-color: #ffffff;
    padding: 2rem;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 1rem;
    line-height: 1.5;
    overflow-y: auto;
}

/* --- Fix: Typografie und Kontrast erzwingen (Plugin-Override) --- */
.gslide .gslide-description,
.gslide .gslide-description .gslide-desc,
.gslide .gslide-description .caption {
    color: #222222 !important; 
}

/* --- NEU: Download Button Styling --- */
.gallery-download-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    background-color: #72a023; /* Grün analog zum Screenshot */
    color: #ffffff !important; /* !important für Kontrast-Sicherung gegen Plugin-Styles */
    text-decoration: none;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.9rem;
    padding: 12px 20px;
    margin-top: 2rem; /* Abstand nach oben zum letzten Text */
    border-radius: 4px;
    box-sizing: border-box;
    transition: background-color 0.2s ease-in-out, transform 0.1s ease-in-out;
    cursor: pointer;
}

.gallery-download-btn:hover,
.gallery-download-btn:focus {
    background-color: #5b801c; /* Etwas dunkleres Grün beim Hovern */
    text-decoration: none;
    outline: 2px solid #5b801c;
    outline-offset: 2px;
}

.gallery-download-btn:active {
    transform: translateY(1px); /* Leichter Klick-Effekt */
}

.gallery-download-btn svg {
    margin-left: 10px;
    fill: currentColor;
    width: 20px;
    height: 20px;
}

/* --- Fix: Desktop Layout (Ab 992px) erzwingen --- */
@media screen and (min-width: 992px) {
    .gslide .ginner-container.desc-bottom {
        display: flex !important;
        flex-direction: row !important; 
        height: 80vh !important;
    }

    .gslide .gslide-media {
        flex: 0 0 65% !important;
        width: 65% !important;
        height: 100% !important;
        /*max-width: 65% !important;*/
    }

    .gslide .gslide-media img {
        max-height: 100% !important; 
        height: 100%;
        width: 100%;
        object-fit: cover;
    }

    .gslide .gslide-description {
        flex: 0 0 35% !important;
        width: 35% !important;
        max-width: 35% !important;
        height: 100% !important;
        padding: 3rem 2.5rem !important;
        display: flex !important; 
        flex-direction: column !important; /* Erlaubt es, den Button unten auszurichten */
    }

    /* Modifikation für den Desktop, damit der Button bei viel Platz nicht zu dominant wirkt, 
       sondern ordentlich im Textfluss oder am unteren Rand sitzt */
    .gslide .caption {
        flex-grow: 1; /* Schiebt den Button nach unten, falls gewünscht. Sonst entfernen. */
        display: flex;
        flex-direction: column;
    }
    
    .gallery-download-btn {
        margin-top: auto; /* Zwingt den Button an den unteren Rand des Containers */
    }
}










/* ==========================================================================
   SUCHERGEBNISSE (COM_FINDER) - KARTEN-LAYOUT (V2)
   ========================================================================== */

/* Abstand zwischen den einzelnen Listenpunkten */
.com-finder__results-list {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* Die einzelne Suchergebnis-Karte (Wrapper) */
.search-result-card {
    background-color: var(--ci-weiss);
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border-left: 5px solid var(--ci-green);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
}

/* Clearfix, damit die Box nicht zusammenfällt, wenn das Bild floatet */
.search-result-card::after {
    content: "";
    display: table;
    clear: both;
}

.search-result-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

/* --- Typografie & Links --- */
.search-result-card h2,
.search-result-card h3,
.search-result-card h4,
.search-result-card .result__title {
    font-family: var(--font-primary);
    font-size: 1.5rem;
    margin: 0 0 10px 0;
    line-height: 1.3;
}

.search-result-card h2 a,
.search-result-card h3 a,
.search-result-card .result__title a {
    color: var(--ci-green);
    text-decoration: none;
}

.search-result-card a:hover {
    text-decoration: underline;
}

/* --- Metadaten (Typ, Autor etc.) bändigen --- */
.search-result-card .result__taxonomy,
.search-result-card .article-info,
.search-result-card .meta {
    font-size: 0.85rem;
    color: #666666;
    padding-bottom: 15px;
    margin-bottom: 15px;
    border-bottom: 1px solid #eeeeee;
}

/* Hässliche, rohe URL ausblenden (optional, sieht aber besser aus) */
.search-result-card .result__url {
    display: none;
}

/* --- Bilder bändigen (Das Wichtigste!) --- */
.search-result-card img {
    max-width: 250px !important;
    height: auto !important;
    max-height: 160px;
    object-fit: contain; /* Logos bleiben komplett sichtbar */
    float: left; /* Fließt links neben dem Text */
    margin: 0 25px 15px 0;
    border-radius: 4px;
}

/* --- Mobile First Anpassungen --- */
@media (max-width: 767px) {
    .search-result-card {
        padding: 20px;
    }
    .search-result-card h2,
    .search-result-card .result__title {
        font-size: 1.3rem;
    }
    .search-result-card img {
        max-width: 100% !important;
        float: none;
        display: block;
        margin: 0 0 15px 0;
        max-height: 200px;
    }
}