/*
Theme Name: Rheinisches Dorf
Theme URI: https://dekt2027.ejir.de
Author: EKiR / Rheinische Dörfer
Author URI: https://www.ekir.de
Description: WordPress-Theme für die Rheinischen Dörfer der EKiR – Kirchentag 2027 Düsseldorf. Projektübersicht, Vernetzung und Mitgestaltung.
Version: 2.0.17
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: rheinisches-dorf
Tags: church, community, projects, kirchentag, ekir
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
*/

/* ============================================================
   DESIGN-TOKEN — Kirchentag 2027 Corporate Design
   Losung: „Du bist kostbar" · Jes 43,4
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Source+Sans+3:ital,wght@0,300;0,400;0,600;0,700;1,400&display=swap');

:root {
    /* Primärfarben */
    --kt-blau:        #0066b3;
    --kt-blau-hell:   #4da6e8;
    --kt-blau-pale:   #deeef9;
    --kt-orange:      #e8612a;
    --kt-orange-pale: #fce8dd;
    --kt-tuerkis:     #009bbb;
    --kt-dunkel:      #002d5c;

    /* Neutral */
    --kt-grau:        #6b7a8d;
    --kt-grau-hell:   #e8eef4;
    --kt-border:      #c8dcea;
    --kt-weiss:       #ffffff;
    --kt-bg:          #f4f7fa;

    /* Typografie */
    --kt-font:        'Source Sans 3', 'Open Sans', Arial, sans-serif;

    /* Radien & Schatten */
    --kt-radius:      6px;
    --kt-radius-lg:   12px;
    --kt-shadow:      0 2px 10px rgba(0,45,92,0.09);
    --kt-shadow-hover:0 6px 24px rgba(0,45,92,0.16);

    /* Layout */
    --kt-max-width:   1440px;
    --kt-content-width: 860px;
}

/* ============================================================
   RESET & BASE
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
    font-family: var(--kt-font);
    background: var(--kt-bg);
    color: var(--kt-dunkel);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--kt-blau); text-decoration: none; transition: color 0.15s; }
a:hover { color: var(--kt-dunkel); }

/* ============================================================
   SITE HEADER — sticky, nach Screenshot
   ============================================================ */

.site-header {
    background: var(--kt-weiss);
    border-bottom: 1px solid var(--kt-border);
    box-shadow: var(--kt-shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

/* Grüner/Bunter Farbstreifen oben */
.site-header::before {
    content: '';
    display: block;
    height: 4px;
    background: linear-gradient(90deg,
        #16a34a 0%, var(--kt-tuerkis) 25%,
        var(--kt-blau) 50%, var(--kt-blau-hell) 75%,
        var(--kt-orange) 100%);
}

.site-header-inner {
    max-width: var(--kt-max-width);
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
}

/* Logo-Bereich (nach Screenshot) */
.site-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--kt-dunkel);
}

.site-logo:hover { color: var(--kt-dunkel); }

.site-logo-icon {
    width: 36px; height: 36px;
    background: linear-gradient(135deg, var(--kt-blau) 0%, #7c3aed 100%);
    border-radius: var(--kt-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.site-logo-icon svg {
    display: block;
}

.site-logo-text {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--kt-dunkel);
    letter-spacing: -0.01em;
    line-height: 1.3;
}

.site-logo-sub {
    font-size: 0.72rem;
    font-weight: 400;
    color: var(--kt-grau);
    display: block;
    line-height: 1.3;
}

/* Navigation — Dropdown-System */
.site-nav {
    display: flex;
    align-items: center;
}

.rd-nav-list {
    display: flex;
    align-items: center;
    gap: 2px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.rd-nav-item {
    position: relative;
}

.rd-nav-item > a,
.rd-dropdown-toggle {
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--kt-grau);
    text-decoration: none;
    padding: 7px 14px;
    border-radius: var(--kt-radius);
    transition: background 0.15s, color 0.15s;
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--kt-font);
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.rd-nav-item > a:hover,
.rd-dropdown-toggle:hover,
.rd-has-dropdown:hover > .rd-dropdown-toggle {
    background: var(--kt-blau-pale);
    color: var(--kt-blau);
}

.rd-nav-item > a.active,
.rd-nav-item.active > a,
.rd-nav-item.active > .rd-dropdown-toggle {
    background: var(--kt-blau-pale);
    color: var(--kt-blau);
}

/* Lila-Variante für ADB-Dropdown */
.rd-dropdown-toggle--lila:hover,
.rd-has-dropdown:hover > .rd-dropdown-toggle--lila {
    background: #ede9fe;
    color: #7c3aed;
}

.rd-chevron {
    font-size: 0.7rem;
    transition: transform 0.2s;
}

.rd-has-dropdown:hover .rd-chevron,
.rd-has-dropdown.open .rd-chevron {
    transform: rotate(180deg);
}

/* Dropdown-Panel */
.rd-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--kt-weiss);
    border: 1px solid var(--kt-border);
    border-radius: var(--kt-radius);
    box-shadow: 0 8px 24px rgba(0,45,92,.12);
    min-width: 220px;
    padding: 6px 0;
    z-index: 9999;
    list-style: none;
    margin: 0;
    padding-top: 4px;
    pointer-events: auto;
}

.rd-has-dropdown:hover > .rd-dropdown,
.rd-has-dropdown.open > .rd-dropdown {
    display: block;
}

/* Allow mouse to travel from toggle to dropdown without closing */
.rd-has-dropdown {
    position: relative;
}

.rd-dropdown li {
    margin: 0;
}

.rd-dropdown a {
    display: block;
    padding: 10px 18px;
    font-size: 0.86rem;
    font-weight: 500;
    color: var(--kt-dunkel);
    text-decoration: none;
    transition: background 0.12s, color 0.12s;
}

.rd-dropdown a:hover {
    background: var(--kt-blau-pale);
    color: var(--kt-blau);
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: var(--kt-dunkel);
    font-size: 1.4rem;
}

/* ============================================================
   PAGE HEADER — Großer Hero-Bereich
   ============================================================ */

.page-hero {
    background: var(--kt-weiss);
    border-top: 5px solid var(--kt-orange);
    border-bottom: 1px solid var(--kt-border);
    padding: 48px 40px 40px;
    text-align: center;
    position: relative;
}

.page-hero::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 5px;
    background: linear-gradient(90deg,
        var(--kt-blau) 0%, var(--kt-tuerkis) 40%,
        var(--kt-blau-hell) 70%, var(--kt-orange) 100%);
}

.page-hero-losung {
    font-size: 0.73rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--kt-orange);
    margin: 0 0 12px;
}

.page-hero-title {
    font-family: var(--kt-font);
    font-size: clamp(1.8rem, 4.5vw, 2.8rem);
    font-weight: 700;
    color: var(--kt-dunkel);
    margin: 0 0 12px;
    line-height: 1.12;
    letter-spacing: -0.015em;
}

.page-hero-title span { color: var(--kt-blau); }

.page-hero-subtitle {
    color: var(--kt-grau);
    font-size: 1.05rem;
    font-weight: 400;
    margin: 0 0 24px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Filter-Bar */
.page-hero-filters {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ============================================================
   CONTENT WRAPPER
   ============================================================ */

.site-content {
    max-width: var(--kt-max-width);
    margin: 0 auto;
    padding: 40px 40px 40px;
}

.site-content--narrow {
    max-width: var(--kt-content-width);
}

/* ============================================================
   KACHEL-GRID — Projektübersicht
   ============================================================ */

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
    margin-top: 28px;
}

@media (min-width: 900px)  { .project-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1200px) { .project-grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1500px) { .project-grid { grid-template-columns: repeat(5, 1fr); } }

/* Einzelne Kachel */
.project-card {
    background: var(--kt-weiss);
    border: 1px solid var(--kt-border);
    border-radius: var(--kt-radius-lg);
    box-shadow: var(--kt-shadow);
    transition: transform 0.2s, box-shadow 0.2s;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--kt-shadow-hover);
}

/* Farbbalken oben */
.project-card::before {
    content: '';
    display: block;
    height: 4px;
    flex-shrink: 0;
    background: linear-gradient(90deg, var(--kt-orange), var(--kt-blau-hell));
}

.project-card--kirchenkreis::before {
    background: linear-gradient(90deg, var(--kt-blau), var(--kt-tuerkis));
}

.project-card--ehrenamtlich::before {
    background: linear-gradient(90deg, var(--kt-tuerkis), #16a34a);
}

.project-card-inner {
    padding: 22px 24px 24px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* Badge */
.badge {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 3px 10px;
    border-radius: 3px;
    margin-bottom: 14px;
    line-height: 1.6;
    align-self: flex-start;
}

.badge--gemeinde    { background: var(--kt-orange-pale); color: var(--kt-orange); }
.badge--kirchenkreis{ background: var(--kt-blau-pale);   color: var(--kt-blau);   }
.badge--ehrenamtlich{ background: #d4f0f5; color: var(--kt-tuerkis); }

.project-card-org {
    margin: 0 0 5px;
    font-size: 0.79rem;
    font-weight: 700;
    color: var(--kt-grau);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.project-card-inner > .project-card-title {
    font-size: 1.06rem;
    font-weight: 700;
    color: var(--kt-dunkel);
    margin-top: 0;
    margin-right: 0;
    margin-bottom: 12px;
    margin-left: 0;
    line-height: 1.4;
}

.project-card-excerpt {
    color: var(--kt-grau);
    font-size: 0.88rem;
    line-height: 1.6;
    margin: 0 0 18px;
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.project-card-btn {
    background: none;
    border: 1.5px solid var(--kt-blau);
    color: var(--kt-blau);
    font-family: var(--kt-font);
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    padding: 8px 16px;
    border-radius: var(--kt-radius);
    align-self: flex-start;
    margin-top: auto;
    transition: all 0.18s;
    text-decoration: none;
    display: inline-block;
}

.project-card-btn:hover {
    background: var(--kt-blau);
    color: var(--kt-weiss);
}

/* Angemeldet-Badge */
.badge-angemeldet {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.72rem;
    font-weight: 700;
    color: #16803c;
    background: #dcfce7;
    border: 1px solid #bbf7d0;
    border-radius: 4px;
    padding: 3px 10px;
    margin-bottom: 14px;
    line-height: 1.6;
    letter-spacing: 0.02em;
}

/* ============================================================
   FILTER BUTTONS
   ============================================================ */

.filter-btn {
    padding: 8px 20px;
    border-radius: 40px;
    border: 1.5px solid var(--kt-border);
    background: var(--kt-weiss);
    color: var(--kt-grau);
    cursor: pointer;
    font-family: var(--kt-font);
    font-size: 0.88rem;
    font-weight: 600;
    transition: all 0.18s;
}

.filter-btn:hover { border-color: var(--kt-blau); color: var(--kt-blau); }
.filter-btn.active { background: var(--kt-blau); border-color: var(--kt-blau); color: var(--kt-weiss); }

/* ============================================================
   CTA BUTTON
   ============================================================ */

.cta-btn {
    display: inline-block;
    padding: 12px 28px;
    background: var(--kt-orange);
    color: var(--kt-weiss) !important;
    text-decoration: none !important;
    border-radius: var(--kt-radius);
    font-family: var(--kt-font);
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    transition: background 0.18s, transform 0.15s;
    border: none;
    cursor: pointer;
}

.cta-btn:hover {
    background: #c94e1f;
    transform: translateY(-1px);
    color: var(--kt-weiss) !important;
}

.cta-btn--blau { background: var(--kt-blau); }
.cta-btn--blau:hover { background: var(--kt-dunkel); }
.cta-btn--gruen { background: #22883e; }
.cta-btn--gruen:hover { background: #186e2e; }
.cta-btn--lila { background: #7c3aed; }
.cta-btn--lila:hover { background: #5b21b6; }

/* ADB-Sektion auf Startseite */
.rd-adb-section {
    margin-top: 48px;
    padding-top: 36px;
    border-top: 2px solid var(--kt-border);
}

.rd-adb-intro {
    background: #ede9fe;
    border-left: 4px solid #7c3aed;
    border-radius: 0 var(--kt-radius) var(--kt-radius) 0;
    padding: 18px 22px;
    margin-bottom: 24px;
    color: var(--kt-dunkel);
    font-size: 0.95rem;
    line-height: 1.7;
}

.rd-adb-intro p:last-child { margin-bottom: 0; }

.cta-wrap--bottom {
    margin-top: 36px;
    text-align: center;
    padding: 28px 0 0;
    border-top: 1px solid var(--kt-border);
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

/* ============================================================
   INFOBOX / HINWEIS
   ============================================================ */

.infobox {
    background: var(--kt-blau-pale);
    border-left: 4px solid var(--kt-blau);
    border-radius: 0 var(--kt-radius) var(--kt-radius) 0;
    padding: 18px 22px;
    margin-bottom: 24px;
    color: var(--kt-dunkel);
    font-size: 0.95rem;
    line-height: 1.7;
}

.infobox--tuerkis {
    border-left-color: var(--kt-tuerkis);
}

/* ============================================================
   CONTENT CARDS — für Unterseiten (Mitmachen etc.)
   ============================================================ */

.content-card {
    background: var(--kt-weiss);
    border: 1px solid var(--kt-border);
    border-radius: var(--kt-radius-lg);
    box-shadow: var(--kt-shadow);
    transition: transform 0.2s, box-shadow 0.2s;
    overflow: hidden;
    margin-bottom: 16px;
}

.content-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--kt-shadow-hover);
}

.content-card::before {
    content: '';
    display: block;
    height: 4px;
    background: linear-gradient(90deg, var(--kt-blau), var(--kt-tuerkis));
}

.content-card.accent-orange::before {
    background: linear-gradient(90deg, var(--kt-orange), var(--kt-blau-hell));
}

.content-card-inner { padding: 24px 28px; }

.content-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--kt-dunkel);
    margin: 0 0 8px;
    line-height: 1.35;
}

.content-card-text {
    font-size: 0.93rem;
    color: var(--kt-dunkel);
    line-height: 1.65;
    margin-bottom: 12px;
}

/* Section Labels */
.section-label {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--kt-grau);
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    margin-top: 36px;
}

.section-label::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--kt-border);
}

/* ============================================================
   TAG-CHIPS
   ============================================================ */

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 14px 0 4px;
    list-style: none;
    padding: 0;
}

.tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.4;
}

.tag--blau    { background: var(--kt-blau-pale);   color: var(--kt-blau);   border: 1px solid var(--kt-border); }
.tag--orange  { background: var(--kt-orange-pale); color: var(--kt-orange); border: 1px solid #f0c4ae; }
.tag--tuerkis { background: #d4f0f5; color: #006d83; border: 1px solid #9dd6e3; }
.tag--gruen   { background: #dcfce7; color: #15803d; border: 1px solid #86efac; }
.tag--lila    { background: #ede9fe; color: #5b21b6; border: 1px solid #c4b5fd; }

/* ============================================================
   WORDPRESS DEFAULT CLASSES
   ============================================================ */

.alignleft   { float: left; margin-right: 1.5em; margin-bottom: 1em; }
.alignright  { float: right; margin-left: 1.5em; margin-bottom: 1em; }
.aligncenter { display: block; margin: 1em auto; }
.alignwide   { max-width: calc(var(--kt-max-width) + 80px); margin-left: auto; margin-right: auto; }
.alignfull   { width: 100vw; margin-left: calc(50% - 50vw); }

.wp-block-image figcaption {
    font-size: 0.82rem;
    color: var(--kt-grau);
    text-align: center;
    margin-top: 8px;
}

/* Gutenberg Blocks */
.entry-content h1, .entry-content h2, .entry-content h3,
.entry-content h4, .entry-content h5, .entry-content h6 {
    font-family: var(--kt-font);
    color: var(--kt-dunkel);
    line-height: 1.2;
    margin-top: 1.5em;
    margin-bottom: 0.5em;
}

.entry-content h1 { font-size: 2rem; }
.entry-content h2 { font-size: 1.5rem; }
.entry-content h3 { font-size: 1.25rem; }

.entry-content p {
    margin-bottom: 1em;
    line-height: 1.7;
}

.entry-content ul, .entry-content ol {
    margin-bottom: 1em;
    padding-left: 1.5em;
}

/* ============================================================
   SITE FOOTER — nach Screenshot
   ============================================================ */

.site-footer {
    border-top: 1px solid var(--kt-border);
    background: var(--kt-weiss);
    font-family: var(--kt-font);
}

.site-footer::before {
    content: '';
    display: block;
    height: 4px;
    background: linear-gradient(90deg,
        var(--kt-blau) 0%, var(--kt-tuerkis) 40%,
        var(--kt-blau-hell) 70%, var(--kt-orange) 100%);
}

.footer-inner {
    max-width: var(--kt-max-width);
    margin: 0 auto;
    padding: 32px 40px 24px;
}

.footer-contact {
    text-align: center;
    margin-bottom: 24px;
}

.footer-contact p {
    font-size: 0.92rem;
    color: var(--kt-grau);
    line-height: 1.6;
    margin: 0 0 4px;
}

.footer-contact-name {
    font-size: 1.05rem !important;
    font-weight: 700;
    color: var(--kt-dunkel) !important;
    margin-top: 10px !important;
}

.footer-contact-role {
    font-size: 0.88rem !important;
    color: var(--kt-grau) !important;
}

.footer-contact-email {
    margin-top: 6px !important;
}

.footer-contact-email a {
    color: var(--kt-blau);
    font-weight: 600;
    text-decoration: none;
}

.footer-contact-email a:hover {
    text-decoration: underline;
}

.footer-divider {
    border: none;
    border-top: 1px solid var(--kt-border);
    margin-bottom: 16px;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--kt-grau);
    font-size: 0.8rem;
}

.footer-losung {
    font-size: 0.88rem;
    font-style: italic;
    color: var(--kt-grau);
}

/* ============================================================
   PAGINATION
   ============================================================ */

.pagination {
    display: flex;
    gap: 4px;
    justify-content: center;
    margin-top: 40px;
}

.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px; height: 36px;
    border-radius: var(--kt-radius);
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--kt-grau);
    border: 1px solid var(--kt-border);
    text-decoration: none;
    transition: all 0.15s;
}

.pagination .page-numbers:hover {
    border-color: var(--kt-blau);
    color: var(--kt-blau);
}

.pagination .page-numbers.current {
    background: var(--kt-blau);
    border-color: var(--kt-blau);
    color: var(--kt-weiss);
}

/* ============================================================
   SIDEBAR
   ============================================================ */

.sidebar .widget {
    background: var(--kt-weiss);
    border: 1px solid var(--kt-border);
    border-radius: var(--kt-radius-lg);
    padding: 20px 24px;
    margin-bottom: 20px;
    box-shadow: var(--kt-shadow);
}

.sidebar .widget-title {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--kt-grau);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--kt-grau-hell);
}

/* ============================================================
   WP ADMIN BAR FIX
   ============================================================ */

body.admin-bar .site-header {
    top: 32px;
}

@media screen and (max-width: 782px) {
    body.admin-bar .site-header {
        top: 46px;
    }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 900px) {
    .site-header-inner {
        padding: 0 20px;
        height: auto;
        min-height: 56px;
        flex-wrap: wrap;
        gap: 8px;
        padding-top: 10px;
        padding-bottom: 10px;
    }
    .rd-nav-list {
        gap: 2px;
        flex-wrap: wrap;
    }
    .rd-nav-item > a,
    .rd-dropdown-toggle {
        font-size: 0.78rem;
        padding: 6px 12px;
    }
    .page-hero { padding: 36px 20px 32px; }
    .site-content { padding: 28px 20px 60px; }
    .footer-inner { padding: 24px 20px 16px; }
    .project-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
}

@media (max-width: 700px) {
    .site-header-inner {
        flex-wrap: nowrap;
        padding-top: 0;
        padding-bottom: 0;
        height: 56px;
    }

    /* Navigation ausblenden, Toggle zeigen */
    .site-nav .rd-nav-list { display: none; }
    .menu-toggle { display: block; }

    /* Offenes Mobile-Menü */
    .site-nav.open .rd-nav-list {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0; right: 0;
        background: var(--kt-weiss);
        border-bottom: 1px solid var(--kt-border);
        box-shadow: var(--kt-shadow);
        padding: 12px 20px;
        z-index: 9999;
    }

    .site-nav.open .rd-nav-item {
        width: 100%;
    }

    .site-nav.open .rd-nav-item > a,
    .site-nav.open .rd-dropdown-toggle {
        width: 100%;
        padding: 10px 14px;
        font-size: 0.88rem;
        justify-content: center;
        border-radius: var(--kt-radius);
    }

    /* Dropdowns im Mobile: immer sichtbar wenn Elternelement offen */
    .site-nav.open .rd-dropdown {
        position: static;
        box-shadow: none;
        border: none;
        background: var(--kt-bg);
        border-radius: var(--kt-radius);
        margin: 4px 0 8px;
        padding: 4px 0;
        min-width: 0;
    }

    .site-nav.open .rd-dropdown a {
        text-align: center;
        font-size: 0.85rem;
        padding: 8px 14px;
    }

    .project-grid { grid-template-columns: 1fr; }
    .footer-bottom { flex-direction: column; text-align: center; }
    .page-hero-title { font-size: 1.6rem; }
    .cta-wrap--bottom { flex-direction: column; align-items: center; }
    .rd-adb-section { margin-top: 32px; padding-top: 24px; }
}

/* ============================================================
   SCREEN READER TEXT
   ============================================================ */

.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute !important;
    width: 1px;
    word-wrap: normal !important;
}

/* ============================================================
   V2.0.9 – HEADER CUSTOM LOGO
   ============================================================ */

.site-logo-img {
    display: block;
    max-height: 64px;
    max-width: 64px;
    width: auto;
    height: auto;
    margin-right: 12px;
    object-fit: contain;
}

@media (max-width: 768px) {
    .site-logo-img {
        max-height: 48px;
        max-width: 48px;
    }
}

/* ============================================================
   V2.0.6 – FOOTER MIT ZWEI KONTAKTBLÖCKEN
   ============================================================ */

.footer-contact-intro {
    margin: 0 0 1.25rem 0;
    font-weight: 600;
    text-align: center;
}

.footer-contact-grid {
    display: grid;
    gap: 2rem;
    grid-template-columns: 1fr;
    margin-bottom: 1.5rem;
}

@media (min-width: 720px) {
    .footer-contact-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* Nur ein Kontaktblock sichtbar → mittig statt links */
.footer-contact-grid--single {
    grid-template-columns: 1fr !important;
    justify-items: center;
    max-width: 540px;
    margin-left: auto;
    margin-right: auto;
}

.footer-contact-grid .footer-contact {
    margin: 0;
    text-align: center;
}

.footer-contact-grid .footer-contact p {
    margin: 0 0 0.25rem 0;
}

/* ============================================================
   V2.0.6 – STARTSEITE: ZWEI LOGOS (Legacy-Klasse, falls genutzt)
   ============================================================ */

.rd-startseite-logos {
    display: grid;
    gap: 2.5rem;
    grid-template-columns: 1fr;
    padding: 3rem 1rem;
    max-width: 1100px;
    margin: 0 auto;
}

@media (min-width: 720px) {
    .rd-startseite-logos {
        grid-template-columns: 1fr 1fr;
        padding: 4rem 2rem;
    }
}

/* ============================================================
   V2.0.11 – STARTSEITE: ZWEI BEREICHS-SPALTEN MIT PROJEKTEN
   ============================================================ */

.rd-startseite-bereiche {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
    padding: 2rem 1rem 3rem;
    max-width: 1200px;
    margin: 0 auto;
}

@media (min-width: 900px) {
    .rd-startseite-bereiche {
        grid-template-columns: 1fr 1fr;
        gap: 3rem;
        padding: 2.5rem 2rem 4rem;
    }
}

.rd-startseite-spalte {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.rd-startseite-spalte .rd-startlogo {
    aspect-ratio: 16 / 9;
}

@media (min-width: 900px) {
    .rd-startseite-spalte .rd-startlogo {
        aspect-ratio: 4 / 3;
    }
}

/* Theme-Wrapper voll breit */
.rd-startseite-projekte,
.rd-startseite-projekte-shortcode {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    display: block !important;
}

/* Erste Verschachtelungsebene (egal welches Tag/Klasse das Plugin liefert):
   wird zum Flex-Container, der die Kacheln umbrechen lässt */
.rd-startseite-projekte-shortcode > * {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 1rem !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    list-style: none !important;
}

/* Alle direkten Kinder des Plugin-Containers = Kacheln → je 50 % */
.rd-startseite-projekte-shortcode > * > * {
    flex: 0 0 calc(50% - 0.5rem) !important;
    width: calc(50% - 0.5rem) !important;
    max-width: calc(50% - 0.5rem) !important;
    min-width: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}

/* Falls das Plugin direkt im Wrapper rendert (ohne Zwischen-Div):
   nimm den Wrapper selbst als Flex-Container */
.rd-startseite-projekte-shortcode:has(> .project-card, > article, > li) {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 1rem !important;
}

.rd-startseite-projekte-shortcode > .project-card,
.rd-startseite-projekte-shortcode > article,
.rd-startseite-projekte-shortcode > li {
    flex: 0 0 calc(50% - 0.5rem) !important;
    width: calc(50% - 0.5rem) !important;
    max-width: calc(50% - 0.5rem) !important;
}

/* Lange Wörter umbrechen, nicht überlaufen */
.rd-startseite-projekte * {
    overflow-wrap: anywhere;
    word-break: break-word;
}

/* Auf schmalen Schirmen wieder gestapelt */
@media (max-width: 600px) {
    .rd-startseite-projekte-shortcode > * > *,
    .rd-startseite-projekte-shortcode > .project-card,
    .rd-startseite-projekte-shortcode > article,
    .rd-startseite-projekte-shortcode > li {
        flex: 0 0 100% !important;
        width: 100% !important;
        max-width: 100% !important;
    }
}

.rd-startseite-projekte-leer {
    text-align: center;
    color: var(--kt-grau);
    font-style: italic;
    padding: 1rem;
    border: 1px dashed var(--kt-border);
    border-radius: var(--kt-radius);
}

/* Sprach-Buttons unter J+I-Logo */
.rd-sprach-buttons {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.rd-sprach-btn {
    display: inline-block;
    padding: 8px 18px;
    background: #ede9fe;
    color: #7c3aed;
    border: 1px solid #d8caf5;
    border-radius: var(--kt-radius);
    font-weight: 600;
    text-decoration: none;
    font-size: 0.9rem;
    transition: background 0.15s, color 0.15s, transform 0.15s;
}

.rd-sprach-btn:hover,
.rd-sprach-btn:focus {
    background: #7c3aed;
    color: #fff;
    transform: translateY(-1px);
}

.rd-startlogo {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 4 / 3;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    text-decoration: none;
    overflow: hidden;
}

.rd-startlogo:hover,
.rd-startlogo:focus {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.rd-startlogo img {
    max-width: 80%;
    max-height: 80%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.rd-startlogo-fallback {
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    padding: 1rem;
    color: inherit;
}

/* ============================================================
   V2.0.6 – TOP-LEVEL-NAV: KLICKBARER LINK + CHEVRON-TOGGLE
   Link und Chevron werden zu einem flex-Verbund im <li>,
   der exakt die Optik der bestehenden .rd-dropdown-toggle matched.
   ============================================================ */

.rd-nav-item.rd-has-dropdown {
    display: flex;
    align-items: center;
    gap: 0;
    position: relative;
}

.rd-toplevel-link {
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--kt-grau);
    text-decoration: none;
    padding: 7px 4px 7px 14px;
    border-radius: var(--kt-radius) 0 0 var(--kt-radius);
    transition: background 0.15s, color 0.15s;
    background: none;
    cursor: pointer;
    font-family: var(--kt-font);
    display: flex;
    align-items: center;
    white-space: nowrap;
    line-height: 1;
}

.rd-toplevel-link:hover,
.rd-toplevel-link:focus,
.rd-has-dropdown:hover > .rd-toplevel-link {
    background: var(--kt-blau-pale);
    color: var(--kt-blau);
}

.rd-toplevel-link--lila:hover,
.rd-toplevel-link--lila:focus,
.rd-has-dropdown:hover > .rd-toplevel-link--lila {
    background: #ede9fe;
    color: #7c3aed;
}

.rd-dropdown-toggle-chevron {
    background: none;
    border: 0;
    cursor: pointer;
    padding: 7px 10px 7px 4px;
    border-radius: 0 var(--kt-radius) var(--kt-radius) 0;
    font: inherit;
    color: var(--kt-grau);
    line-height: 1;
    transition: background 0.15s, color 0.15s;
    display: flex;
    align-items: center;
}

.rd-dropdown-toggle-chevron:hover,
.rd-dropdown-toggle-chevron:focus,
.rd-has-dropdown:hover > .rd-dropdown-toggle-chevron {
    background: var(--kt-blau-pale);
    color: var(--kt-blau);
}

.rd-dropdown-toggle-chevron--lila:hover,
.rd-dropdown-toggle-chevron--lila:focus,
.rd-has-dropdown:hover > .rd-dropdown-toggle-chevron--lila {
    background: #ede9fe;
    color: #7c3aed;
}

.rd-dropdown-toggle-chevron .rd-chevron {
    display: inline-block;
    font-size: 0.7rem;
    transition: transform 0.2s ease;
}

.rd-has-dropdown:hover .rd-dropdown-toggle-chevron .rd-chevron,
.rd-has-dropdown.open .rd-dropdown-toggle-chevron .rd-chevron,
.rd-dropdown-toggle-chevron[aria-expanded="true"] .rd-chevron {
    transform: rotate(180deg);
}

/* Mobile: gestapelt, mittig */
@media (max-width: 768px) {
    .rd-nav-item.rd-has-dropdown {
        flex-wrap: wrap;
        justify-content: center;
        width: 100%;
    }
    .rd-toplevel-link {
        padding: 12px 14px;
        text-align: center;
    }
    .rd-dropdown-toggle-chevron {
        padding: 12px 14px;
    }
}

