/*
Theme Name: BesenFinder
Theme URI: https://besenfinder.de/
Author: BesenFinder
Description: Warmes, redaktionelles WordPress-Theme für saisonale Winzerbetriebe (Besen-, Rädle-, Hecken-, Straußen- und Kellerwirtschaften). Dunkler Sticky-Header mit Amber-Akzent, Hero-Suche, Karten-Layout. Passt zum BesenFinder-Plugin und bettet dessen [besenfinder]-Shortcode in ein stimmiges Design ein.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: besenfinder
*/

  :root {
    --amber-50: #FAEEDA;
    --amber-100: #FAC775;
    --amber-200: #EF9F27;
    --amber-400: #BA7517;
    --amber-600: #854F0B;
    --amber-800: #633806;
    --coral-50: #FAECE7;
    --coral-100: #F5C4B3;
    --coral-200: #F0997B;
    --coral-400: #D85A30;
    --coral-600: #993C1D;
    --green-50: #EAF3DE;
    --green-100: #C0DD97;
    --green-400: #639922;
    --green-600: #3B6D11;
    --gray-50: #F1EFE8;
    --gray-100: #D3D1C7;
    --gray-200: #B4B2A9;
    --gray-400: #888780;
    --gray-600: #5F5E5A;
    --gray-800: #444441;
    --gray-900: #2C2C2A;
    --bg: #FEFCF8;
    --bg-card: #FFFEF9;
    --text-primary: #1E1C18;
    --text-muted: #5F5E5A;
    --border: rgba(0,0,0,0.1);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
    --radius: 10px;
    --radius-lg: 16px;
  }

  * { box-sizing: border-box; margin: 0; padding: 0; }
  
  body {
    font-family: 'Source Sans 3', sans-serif;
    background: var(--bg);
    color: var(--text-primary);
    font-size: 16px;
    line-height: 1.6;
  }

  /* HEADER */
  header {
    background: var(--gray-900);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 2px solid var(--amber-400);
  }
  .header-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 32px;
    height: 64px;
  }
  /* Stats-Bar: schiebt sich nach rechts außen, bleibt in der Headerzeile */
  .header-stats {
    margin-left: auto;
    display: flex;
    align-items: center;
    flex-shrink: 0;
    color: rgba(255,255,255,0.7);
    font-size: 11px;
  }
  /* Wenn Stats vorhanden: nav soll nicht mehr auto-pushen */
  .header-inner:has(.header-stats) nav { margin-left: 0; }
  .header-inner:not(:has(.header-stats)) nav { margin-left: auto; }
  /* Ausblenden wenn zu schmal – verhindert Umbruch des Seitentitels/Logos */
  @media (max-width: 1000px) {
    .header-stats { display: none; }
    .header-inner:has(.header-stats) nav { margin-left: auto; }
  }
  .logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
  }
  .logo-icon {
    width: 36px;
    height: 36px;
    background: var(--amber-200);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
  }
  .logo-text {
    font-family: 'Playfair Display', serif;
    font-size: 18px;
    font-weight: 700;
    color: #fff;
  }
  .logo-text span { color: var(--amber-100); }
  nav {
    display: flex;
    gap: 4px;
    margin-left: auto;
  }
  nav a {
    color: var(--gray-200);
    text-decoration: none;
    font-size: 14px;
    padding: 6px 14px;
    border-radius: 6px;
    transition: all 0.2s;
  }
  nav a:hover { background: rgba(255,255,255,0.1); color: #fff; }
  .btn-add {
    background: var(--amber-200);
    color: var(--amber-800) !important;
    font-weight: 600;
  }
  .btn-add:hover { background: var(--amber-100) !important; }

  /* HERO SEARCH */
  .hero {
    background: linear-gradient(135deg, var(--gray-900) 0%, #3D2B0F 50%, #5C3D1A 100%);
    padding: 32px 24px 28px;
    text-align: center;
    position: relative;
    overflow: hidden;
  }
  /* Kompakter Hero (Startseite) – noch schmaler */
  .hero.is-compact { padding: 22px 24px 22px; }
  .hero.is-compact .hero-badge { margin-bottom: 8px; padding: 3px 12px; font-size: 11px; }
  .hero.is-compact h1 { font-size: 30px; margin-bottom: 6px; }
  .hero.is-compact p  { font-size: 14px; margin-bottom: 12px; }
  .hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23EF9F27' fill-opacity='0.05'%3E%3Ccircle cx='30' cy='30' r='3'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  }
  .hero-content { position: relative; max-width: 720px; margin: 0 auto; }
  .hero-badge {
    display: inline-block;
    background: rgba(239,159,39,0.2);
    border: 1px solid rgba(239,159,39,0.4);
    color: var(--amber-100);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 4px 14px;
    border-radius: 20px;
    margin-bottom: 16px;
  }
  .hero h1 {
    font-family: 'Playfair Display', serif;
    font-size: 34px;
    font-weight: 700;
    color: #fff;
    line-height: 1.15;
    margin-bottom: 8px;
  }
  .hero h1 span { color: var(--amber-100); }
  .hero p {
    color: var(--gray-100);
    font-size: 15px;
    margin-bottom: 18px;
    font-weight: 300;
  }
  .search-bar {
    display: flex;
    gap: 8px;
    max-width: 640px;
    margin: 0 auto;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: var(--radius-lg);
    padding: 8px;
    backdrop-filter: blur(8px);
  }
  .search-input-wrap {
    flex: 1;
    position: relative;
  }
  .search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
    font-size: 18px;
  }
  .search-bar input {
    width: 100%;
    background: rgba(255,255,255,0.9);
    border: none;
    border-radius: 8px;
    padding: 10px 12px 10px 40px;
    font-size: 15px;
    font-family: inherit;
    color: var(--text-primary);
    outline: none;
  }
  .search-bar select {
    background: rgba(255,255,255,0.9);
    border: none;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 14px;
    font-family: inherit;
    color: var(--text-primary);
    outline: none;
    cursor: pointer;
    min-width: 120px;
  }
  .btn-search {
    background: var(--amber-200);
    color: var(--amber-800);
    border: none;
    border-radius: 8px;
    padding: 10px 22px;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
  }
  .btn-search:hover { background: var(--amber-100); }
  .hero-stats {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-top: 28px;
  }
  .hero-stat {
    color: var(--gray-100);
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
  }
  .hero-stat strong { color: var(--amber-100); font-size: 18px; font-weight: 600; }

  /* FILTER BAR */
  .filter-bar {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 0;
    position: sticky;
    top: 64px;
    z-index: 90;
    box-shadow: var(--shadow-sm);
  }
  .filter-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
    min-height: 56px;
  }
  .filter-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    white-space: nowrap;
  }
  .filter-pills {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
  }
  .pill {
    padding: 5px 14px;
    border-radius: 20px;
    border: 1.5px solid var(--border);
    background: transparent;
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
  }
  .pill:hover { border-color: var(--amber-200); color: var(--amber-600); background: var(--amber-50); }
  .pill.active { border-color: var(--amber-400); background: var(--amber-50); color: var(--amber-600); font-weight: 600; }
  .pill .dot {
    width: 8px; height: 8px; border-radius: 50%;
    display: inline-block;
  }
  .pill.besen .dot { background: #D85A30; }
  .pill.raedle .dot { background: #185FA5; }
  .pill.hecken .dot { background: #3B6D11; }
  .pill.strauss .dot { background: #854F0B; }
  .pill.keller .dot { background: #533AB7; }
  .filter-divider { width: 1px; height: 28px; background: var(--border); }
  .filter-select {
    border: 1.5px solid var(--border);
    border-radius: 8px;
    padding: 5px 10px;
    font-size: 13px;
    font-family: inherit;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    outline: none;
  }
  .filter-select:focus { border-color: var(--amber-200); }
  .filter-count {
    margin-left: auto;
    font-size: 13px;
    color: var(--text-muted);
    white-space: nowrap;
  }

  /* MAIN LAYOUT */
  .main {
    max-width: 1280px;
    margin: 32px auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 28px;
    align-items: start;
  }

  /* SIDEBAR */
  .sidebar { position: sticky; top: 130px; }
  .sidebar-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
  }
  .sidebar-card h3 {
    font-family: 'Playfair Display', serif;
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 14px;
    color: var(--text-primary);
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
  }
  .sidebar-form label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 5px;
    margin-top: 12px;
  }
  .sidebar-form label:first-of-type { margin-top: 0; }
  .sidebar-form input,
  .sidebar-form select {
    width: 100%;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 14px;
    font-family: inherit;
    background: var(--bg);
    color: var(--text-primary);
    outline: none;
    transition: border-color 0.2s;
  }
  .sidebar-form input:focus,
  .sidebar-form select:focus { border-color: var(--amber-200); }
  .btn-primary {
    width: 100%;
    background: var(--amber-400);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 10px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    margin-top: 12px;
    transition: all 0.2s;
  }
  .btn-primary:hover { background: var(--amber-600); }
  .legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 0;
    font-size: 13px;
    border-bottom: 1px solid var(--border);
  }
  .legend-item:last-child { border-bottom: none; }
  .legend-dot {
    width: 12px; height: 12px; border-radius: 50%;
    flex-shrink: 0;
  }
  .legend-text { flex: 1; color: var(--text-primary); }
  .legend-region {
    font-size: 11px;
    color: var(--text-muted);
    display: block;
  }
  .legend-count {
    background: var(--gray-50);
    border-radius: 20px;
    padding: 1px 8px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
  }

  /* EVENTS GRID */
  .events-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
  }
  .events-header h2 {
    font-family: 'Playfair Display', serif;
    font-size: 22px;
    font-weight: 600;
  }
  .view-toggle {
    display: flex;
    gap: 4px;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    padding: 3px;
    background: var(--bg-card);
  }
  .view-btn {
    border: none;
    background: transparent;
    border-radius: 6px;
    padding: 5px 10px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s;
    color: var(--text-muted);
  }
  .view-btn.active {
    background: var(--amber-50);
    color: var(--amber-600);
  }
  .events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
  }
  .events-list .event-card {
    display: flex;
    gap: 16px;
    align-items: flex-start;
  }
  
  /* EVENT CARD */
  .event-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    transition: all 0.25s;
    cursor: pointer;
    position: relative;
    overflow: hidden;
  }
  .event-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
  }
  .event-card.besen::before { background: #D85A30; }
  .event-card.raedle::before { background: #185FA5; }
  .event-card.hecken::before { background: #3B6D11; }
  .event-card.strauss::before { background: #854F0B; }
  .event-card.keller::before { background: #533AB7; }
  .event-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--amber-100);
  }
  .card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 10px;
    gap: 8px;
  }
  .card-type-badge {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 3px 10px;
    border-radius: 20px;
    flex-shrink: 0;
  }
  .badge-besen { background: #FAECE7; color: #993C1D; }
  .badge-raedle { background: #E6F1FB; color: #185FA5; }
  .badge-hecken { background: #EAF3DE; color: #3B6D11; }
  .badge-strauss { background: #FAEEDA; color: #854F0B; }
  .badge-keller { background: #EEEDFE; color: #3C3489; }
  .card-status {
    font-size: 11px;
    padding: 3px 10px;
    border-radius: 20px;
  }
  .status-open { background: var(--green-50); color: var(--green-600); font-weight: 600; }
  .status-upcoming { background: var(--amber-50); color: var(--amber-600); font-weight: 600; }
  .status-closed { background: var(--gray-50); color: var(--gray-400); }
  .card-name {
    font-family: 'Playfair Display', serif;
    font-size: 17px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
    line-height: 1.3;
  }
  .card-winzer {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 10px;
  }
  .card-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 12px;
  }
  .card-info-row {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    color: var(--text-muted);
  }
  .card-info-row svg { flex-shrink: 0; }
  .card-info-row strong { color: var(--text-primary); }
  .card-tags {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
  }
  .tag {
    font-size: 11px;
    background: var(--gray-50);
    color: var(--gray-600);
    border-radius: 4px;
    padding: 2px 8px;
    font-weight: 500;
  }
  .card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
  }
  .card-region {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
  }
  .card-link {
    font-size: 12px;
    color: var(--amber-400);
    font-weight: 600;
    text-decoration: none;
  }
  .card-link:hover { color: var(--amber-600); text-decoration: underline; }

  /* MODAL */
  .modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 200;
    align-items: center;
    justify-content: center;
    padding: 20px;
  }
  .modal-overlay.open { display: flex; }
  .modal {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 680px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
  }
  .modal-header {
    padding: 24px 28px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  .modal-header h2 {
    font-family: 'Playfair Display', serif;
    font-size: 22px;
    font-weight: 700;
  }
  .modal-close {
    background: var(--gray-50);
    border: none;
    border-radius: 50%;
    width: 36px; height: 36px;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
  }
  .modal-close:hover { background: var(--gray-100); }
  .modal-tabs {
    display: flex;
    gap: 0;
    padding: 20px 28px 0;
    border-bottom: 1px solid var(--border);
  }
  .modal-tab {
    padding: 8px 18px;
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: all 0.2s;
  }
  .modal-tab.active {
    color: var(--amber-600);
    border-bottom-color: var(--amber-400);
    font-weight: 600;
  }
  .modal-body { padding: 24px 28px 28px; }
  .tab-panel { display: none; }
  .tab-panel.active { display: block; }
  .form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }
  .form-group { display: flex; flex-direction: column; gap: 6px; }
  .form-group.full { grid-column: 1 / -1; }
  .form-group label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
  }
  .form-group input,
  .form-group select,
  .form-group textarea {
    border: 1.5px solid var(--border);
    border-radius: 8px;
    padding: 9px 12px;
    font-size: 14px;
    font-family: inherit;
    background: var(--bg);
    color: var(--text-primary);
    outline: none;
    transition: border-color 0.2s;
  }
  .form-group input:focus,
  .form-group select:focus,
  .form-group textarea:focus { border-color: var(--amber-200); }
  .form-group textarea { resize: vertical; min-height: 80px; }
  .form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
  }
  .btn-secondary {
    background: transparent;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    padding: 9px 20px;
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    color: var(--text-muted);
    transition: all 0.2s;
  }
  .btn-secondary:hover { border-color: var(--gray-200); background: var(--gray-50); }
  .btn-submit {
    background: var(--amber-400);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 9px 24px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
  }
  .btn-submit:hover { background: var(--amber-600); }

  /* IMPORT ZONE */
  .import-zone {
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 32px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 16px;
  }
  .import-zone:hover { border-color: var(--amber-200); background: var(--amber-50); }
  .import-zone-icon { font-size: 40px; margin-bottom: 8px; }
  .import-zone p { color: var(--text-muted); font-size: 14px; }
  .import-zone strong { color: var(--text-primary); }
  .scraper-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 8px;
  }
  .scraper-status {
    width: 10px; height: 10px; border-radius: 50%;
    flex-shrink: 0;
  }
  .scraper-status.active { background: #39A845; }
  .scraper-status.paused { background: #EF9F27; }
  .scraper-name { flex: 1; font-size: 14px; font-weight: 500; }
  .scraper-info { font-size: 12px; color: var(--text-muted); }
  .scraper-btn {
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 4px 12px;
    font-size: 12px;
    font-family: inherit;
    cursor: pointer;
    background: transparent;
    color: var(--text-muted);
    transition: all 0.2s;
  }
  .scraper-btn:hover { border-color: var(--amber-200); color: var(--amber-600); }

  /* PAGINATION / NO RESULTS */
  .no-results {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
  }
  .no-results-icon { font-size: 48px; margin-bottom: 12px; }

  /* TOAST */
  .toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--gray-900);
    color: #fff;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 14px;
    box-shadow: var(--shadow-lg);
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s;
    z-index: 999;
    display: flex;
    align-items: center;
    gap: 8px;
    border-left: 4px solid var(--amber-200);
  }
  .toast.show { transform: translateY(0); opacity: 1; }

  /* DETAIL MODAL */
  .detail-dates {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0;
  }
  .date-chip {
    background: var(--amber-50);
    border: 1px solid var(--amber-100);
    color: var(--amber-600);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
  }
  .detail-section { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--border); }
  .detail-section h3 { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); margin-bottom: 10px; }
  .info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .info-item label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); display: block; margin-bottom: 2px; }
  .info-item span { font-size: 14px; font-weight: 500; }

  @media (max-width: 900px) {
    .main { grid-template-columns: 1fr; }
    .sidebar { position: static; }
    .hero h1 { font-size: 26px; }
    .hero.is-compact h1 { font-size: 22px; }
    .hero.is-compact p  { font-size: 13px; }
    .search-bar { flex-wrap: wrap; }
    .hero-stats { gap: 20px; }
    .form-grid { grid-template-columns: 1fr; }
  }

/* ============================================================
   WORDPRESS-ERGÄNZUNGEN (Theme-spezifisch, nicht im Prototyp)
   ============================================================ */

/* Zugänglichkeit */
.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--amber-200); color: var(--amber-800);
  padding: 10px 16px; border-radius: 0 0 8px 0; font-weight: 600;
}
.skip-link:focus { left: 0; }

/* Inhalts-Container für Seiten/Beiträge */
.bf-container {
  max-width: 880px;
  margin: 40px auto;
  padding: 0 24px;
}
.bf-container.wide { max-width: 1280px; }

.bf-article {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px 44px;
  box-shadow: var(--shadow-sm);
}
.bf-article h1.entry-title,
.bf-article h1.entry-title.wp-block-heading {
  font-family: 'Playfair Display', serif;
  font-size: 28px; line-height: 1.2; font-weight: 700;
  color: var(--text-primary); margin-bottom: 8px;
}
.entry-meta {
  font-size: 13px; color: var(--text-muted);
  margin-bottom: 24px; padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.entry-content { font-size: 17px; line-height: 1.7; color: var(--gray-800); }
.entry-content > * { margin-bottom: 20px; }
/* Block-Editor erzeugt teils Klassen wie .wp-block-heading; explizit ansprechen */
.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4,
.entry-content h1.wp-block-heading,
.entry-content h2.wp-block-heading,
.entry-content h3.wp-block-heading,
.entry-content h4.wp-block-heading {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.25;
}
.entry-content h1 { font-size: 26px; margin-top: 32px; }
.entry-content h2 { font-size: 22px; margin-top: 28px; }
.entry-content h3 { font-size: 19px; margin-top: 24px; }
.entry-content h4 { font-size: 17px; margin-top: 22px; }
.entry-content a { color: var(--coral-400); text-decoration: underline; text-underline-offset: 2px; }
.entry-content a:hover { color: var(--coral-600); }
.entry-content img { max-width: 100%; height: auto; border-radius: var(--radius); }
.entry-content blockquote {
  border-left: 4px solid var(--amber-200);
  background: var(--amber-50);
  padding: 16px 20px; border-radius: 0 8px 8px 0;
  font-style: italic; color: var(--gray-800);
}
.entry-content pre {
  background: var(--gray-900); color: #f5f5f0;
  padding: 18px; border-radius: var(--radius); overflow-x: auto; font-size: 14px;
}
.entry-content code { background: var(--gray-50); padding: 2px 6px; border-radius: 4px; font-size: 0.9em; }
.entry-content ul, .entry-content ol { padding-left: 24px; }
.entry-content li { margin-bottom: 8px; }

/* Blog-/Archiv-Übersicht als Karten (nutzt Event-Grid-Optik) */
.bf-posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}
.bf-post-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex; flex-direction: column;
}
.bf-post-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.bf-post-thumb { aspect-ratio: 16/9; overflow: hidden; background: var(--gray-50); }
.bf-post-thumb img { width: 100%; height: 100%; object-fit: cover; }
.bf-post-body { padding: 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.bf-post-body h2 { font-family: 'Playfair Display', serif; font-size: 20px; line-height: 1.3; }
.bf-post-body h2 a { color: var(--text-primary); text-decoration: none; }
.bf-post-body h2 a:hover { color: var(--coral-400); }
.bf-post-meta { font-size: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.bf-post-excerpt { font-size: 14px; color: var(--gray-800); flex: 1; }
.bf-readmore {
  align-self: flex-start; margin-top: 8px;
  color: var(--coral-400); font-weight: 600; font-size: 14px; text-decoration: none;
}
.bf-readmore:hover { color: var(--coral-600); }

/* Seiten-Titel-Banner (kompakte Hero-Variante für Unterseiten) */
.page-banner {
  background: linear-gradient(135deg, var(--gray-900) 0%, #3D2B0F 50%, #5C3D1A 100%);
  padding: 48px 24px; text-align: center;
}
.page-banner h1 {
  font-family: 'Playfair Display', serif;
  font-size: 34px; font-weight: 700; color: #fff; max-width: 800px; margin: 0 auto;
}
.page-banner p { color: var(--gray-100); margin-top: 8px; font-weight: 300; }

/* Footer */
.site-footer {
  background: var(--gray-900);
  color: var(--gray-200);
  margin-top: 32px;
  border-top: 2px solid var(--amber-400);
}
.footer-inner {
  max-width: 1280px; margin: 0 auto; padding: 18px 24px 14px;
  display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 40px;
  align-items: start;
}
/* Logo im Footer: exakt die gleichen Maße wie im Header */
.footer-brand .logo { gap: 12px; }
.footer-brand .logo-icon {
  width: 36px; height: 36px;
  background: var(--amber-200);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
}
.footer-brand .logo-text { font-size: 18px; font-weight: 700; line-height: 1.4; }
.footer-brand p {
  color: var(--gray-200);
  font-size: 14px; line-height: 1.45;
  margin-top: 6px; max-width: 320px;
  font-weight: 300;
}
/* Rechte Spalten: Überschrift mit gleicher Schrift, Größe und Gewicht wie die Marke,
   plus kleiner Offset, damit die Grundlinie zur vertikal zentrierten Marke passt. */
.footer-col { padding-top: 8px; }
.footer-col h4 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.4;
  color: #fff;
  margin: 0 0 6px;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 3px; }
.footer-col li:last-child { margin-bottom: 0; }
.footer-col a { color: var(--gray-200); text-decoration: none; font-size: 14px; }
.footer-col a:hover { color: var(--amber-100); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  margin-top: 8px; padding: 8px 24px; text-align: center;
  font-size: 13px; color: var(--gray-400);
  max-width: 1280px; margin-left: auto; margin-right: auto;
}
.footer-bottom a { color: var(--amber-100); text-decoration: none; }

/* Plugin-Hinweis (wenn Shortcode fehlt) */
.bf-plugin-note {
  max-width: 880px; margin: 40px auto; padding: 24px 28px;
  background: var(--amber-50); border: 1px solid var(--amber-200);
  border-radius: var(--radius-lg); color: var(--amber-800);
}
.bf-plugin-note h3 { font-family: 'Playfair Display', serif; margin-bottom: 8px; }
.bf-plugin-note code { background: rgba(0,0,0,0.06); padding: 2px 6px; border-radius: 4px; }

/* Pagination */
.bf-pagination { display: flex; gap: 8px; justify-content: center; margin: 40px 0; flex-wrap: wrap; }
.bf-pagination .page-numbers {
  padding: 8px 14px; border: 1.5px solid var(--border); border-radius: 8px;
  text-decoration: none; color: var(--text-muted); font-size: 14px; font-weight: 500;
}
.bf-pagination .page-numbers.current { background: var(--amber-200); color: var(--amber-800); border-color: var(--amber-400); }
.bf-pagination .page-numbers:hover { border-color: var(--amber-200); color: var(--amber-600); }

@media (max-width: 768px) {
  .footer-inner { grid-template-columns: 1fr; gap: 28px; }
  .bf-article { padding: 28px 22px; }
  .bf-article h1.entry-title { font-size: 28px; }
}

/* Navigations-Menü (wp_nav_menu gibt <nav><ul>…</ul></nav> aus) */
.bf-menu {
  list-style: none; margin: 0; padding: 0;
  display: flex; align-items: center; gap: 4px;
}
header nav { margin-left: auto; }
.bf-menu li { margin: 0; }
.bf-menu a {
  color: var(--gray-200); text-decoration: none; font-size: 14px;
  padding: 6px 14px; border-radius: 6px; transition: all 0.2s; display: inline-block;
}
.bf-menu a:hover { background: rgba(255,255,255,0.1); color: #fff; }
.bf-menu .current-menu-item > a { color: #fff; }
/* Menüpunkt mit CSS-Klasse "btn-add" (im WP-Menü vergeben) wird zum Amber-Button */
.bf-menu .btn-add > a,
.bf-menu li.btn-add a {
  background: var(--amber-200); color: var(--amber-800); font-weight: 600;
}
.bf-menu .btn-add > a:hover { background: var(--amber-100); }

@media (max-width: 768px) {
  .header-inner { gap: 12px; }
  .bf-menu { gap: 0; flex-wrap: wrap; }
  .bf-menu a { padding: 6px 10px; font-size: 13px; }
}

/* ============================================================
   GETEILTES LAYOUT: feststehende Suche links, Ergebnisse rechts
   (Template "BesenFinder geteilt" + Plugin-Shortcodes
    [besenfinder_suche] / [besenfinder_ergebnisse])
   ============================================================ */
.bf-split {
  max-width: 1280px;
  margin: 32px auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 28px;
  align-items: start;
}
/* Linke Spalte bleibt beim Scrollen stehen */
.bf-split-aside {
  position: sticky;
  top: 88px;               /* unter dem festen Header */
  align-self: start;
}
.bf-split-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  max-height: calc(100vh - 110px);
  overflow-y: auto;        /* sehr lange Filter bei Bedarf scrollbar */
}
.bf-split-title {
  font-family: 'Playfair Display', serif;
  font-size: 16px; font-weight: 600;
  margin: 0 0 14px; padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  color: var(--text-primary);
}
.bf-split-main { min-width: 0; }

/* Im geteilten Layout die Steuerelemente platzsparend untereinander stapeln */
.bf-split .bf-controls-only .bf-search-row { flex-wrap: wrap; }
.bf-split .bf-controls-only .bf-search-row > * { flex: 1 1 100%; }
.bf-split .bf-controls-only .bf-filter-wrap {
  flex-direction: column; align-items: stretch; gap: 12px;
  position: static; box-shadow: none; border: 0; padding: 16px 0 0; min-height: 0;
}
.bf-split .bf-controls-only .bf-pills { flex-direction: column; }
.bf-split .bf-controls-only .bf-count { margin: 8px 0 0; }
/* Ergebnis-Raster in der schmaleren Hauptspalte */
.bf-split .bf-results-only .bf-grid {
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

/* Mobil: einspaltig, Suche wieder oben (nicht mehr feststehend) */
@media (max-width: 900px) {
  .bf-split { grid-template-columns: 1fr; }
  .bf-split-aside { position: static; }
  .bf-split-panel { max-height: none; }
}

/* ===== Back-to-top Button ===== */
#bf-back-to-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 999;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--amber-200, #EF9F27);
  color: #fff;
  box-shadow: 0 4px 16px rgba(0,0,0,0.18), 0 1px 4px rgba(0,0,0,0.10);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease, background 0.2s ease, box-shadow 0.2s ease, scale 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}
#bf-back-to-top svg {
  width: 20px;
  height: 20px;
  display: block;
}
#bf-back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
#bf-back-to-top:hover {
  background: var(--amber-400, #BA7517);
  box-shadow: 0 6px 20px rgba(0,0,0,0.22), 0 2px 6px rgba(0,0,0,0.12);
  scale: 1.1;
}
#bf-back-to-top:active {
  scale: 0.95;
  background: var(--amber-600, #854F0B);
}
@media (max-width: 600px) {
  #bf-back-to-top {
    bottom: 18px;
    right: 18px;
    width: 44px;
    height: 44px;
  }
}