/*
 * Fairwoll Firmen Stylesheet
 * Version: 17.0 - COMPLETE LIVE MERGE
 * Status: Original Live-Code + Sidebar Fix + New Events/Q&A
 */

/* ========================================================= */
/* === 1. VARIABLEN ======================================== */
/* ========================================================= */
:root {
    --color-primary: #388E3C;
    --color-primary-dark: #2e7832;
    --color-accent: #6AA5C6;
    --color-highlight: #ffc107;
    --color-text-dark: #2c3e50;
    --color-text: #4a4a4a;
    --color-text-light: #ffffff;
    --color-bg-light: #f8f8f8;
    --color-border: #e0e7ee;
}

/* ========================================================= */
/* === GLOBALE STILE & GRUNDLEGENDES LAYOUT ================ */
/* ========================================================= */
.fw-main-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* tighter on mobile (user wants more content width) */
@media (max-width: 900px){
  .fw-main-wrapper{ padding: 0 12px; }
}

p {
    margin-bottom: 1em;
    max-width: 75ch;
    color: var(--color-text);
}

ul, ol {
    margin: 1em 0 1em 1.5em;
    padding: 0;
}

/* ========================================================= */
/* === KOPFBEREICH (Hero Section) ========================== */
/* ========================================================= */
.fw-single-header {
    position: relative;
    width: 100%;
    height: 450px;
    overflow: hidden;
    border-radius: 26px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 0 50px;
    text-align: center;
    background-color: #6c757d;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Mobile: header full-bleed and no radius */
@media (max-width: 900px){
  .fw-single-header,
  .fw-header-image{
    border-radius: 0;
    margin-left: -12px;
    margin-right: -12px;
    width: calc(100% + 24px);
  }
}

.fw-single-header-image img {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    object-fit: cover; z-index: 0;
}

.fw-single-overlay {
    background-color: rgba(0, 0, 0, 0.4);
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 1;
}

.fw-single-header-content-wrapper {
    position: relative;
    z-index: 10;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--color-text-light);
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.6);
    margin: 0 auto;
    padding: 0 20px;
}

.fw-single-logo-wrapper {
    position: relative;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
    padding: 10px;
    width: 180px;
    height: 180px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.fw-single-logo {
    width: 100%;
    height: auto;
    border-radius: 12px;
}

.fw-single-title {
    font-size: 2.2rem;
    margin: 20px 0 10px;
    font-weight: 800;
    color: var(--color-text-light);
    text-shadow:
        -1px -1px 0 #000,
        1px -1px 0 #000,
        -1px 1px 0 #000,
        1px 1px 0 #000;
}

.fw-single-tags-wrapper {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.fw-single-tag {
    background-color: rgba(255, 255, 255, 0.9);
    color: var(--color-text);
    padding: 8px 15px;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.fw-single-tag:hover {
    transform: translateY(-2px);
}

.fw-single-tag.online { background-color: #6AA5C6; color: #fff; }
.fw-single-tag.stationaer { background-color: #C6A26A; color: #fff; }
.fw-single-tag.region { background-color: var(--color-primary); color: var(--color-text-light); }
.fw-single-tag.kategorie { background-color: var(--color-accent); color: var(--color-text-light); }

/* --- NEU: Dashboard Button Style --- */
.fw-btn-dashboard {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 12px 24px; margin-top: 20px;
    background-color: #2c3e50; color: #ffffff !important;
    text-decoration: none; font-weight: bold; border-radius: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3); transition: all 0.3s ease;
    border: 2px solid rgba(255,255,255,0.2);
}
.fw-btn-dashboard:hover {
    background-color: var(--color-primary); transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.4); border-color: #fff;
}
.fw-btn-dashboard i { font-size: 1.1em; }

/* ========================================================= */
/* === INHALTSBEREICH & SEITENLEISTE ======================= */
/* ========================================================= */
.fw-content-container {
    display: flex;
    flex-direction: column; /* Mobile First: Untereinander */
    gap: 30px;
    padding: 30px 0;
    max-width: 1400px;
    margin: 0 auto;
}

.fw-main-content {
    flex: 3;
    margin: 0 auto;
    width: 100%; /* Safety */
}

.fw-sidebar {
    flex: 1;
    background-color: #ffffff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    border: 1px solid #e0e7ee;
    
    /* NEU: Sticky Position (wirkt erst ab Desktop Breakpoint) */
    position: -webkit-sticky;
    position: sticky;
    top: 20px;
}

.fw-sidebar-widget {
    background-color: var(--color-bg-light);
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
}

.fw-sidebar-widget h3 {
    margin-top: 0;
    border-bottom: 2px solid var(--color-primary);
    padding-bottom: 10px;
    margin-bottom: 20px;
    color: var(--color-text-dark);
}

/* ========================================================= */
/* === CONTAINER FÜR INHALTSEKTIONEN ======================= */
/* ========================================================= */
.fw-section-container {
    background-color: #ffffff;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    border: 1px solid #e0e7ee;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.fw-section-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.fw-section-container h2 {
    margin-top: 0;
    margin-bottom: 15px;
    border-bottom: 2px solid var(--color-primary);
    padding-bottom: 10px;
    color: var(--color-text-dark);
}

/* ========================================================= */
/* === KONTAKT & INFOS ===================================== */
/* ========================================================= */
.fw-contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.fw-contact-item {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 1.1rem;
    border-left: 3px solid var(--color-primary);
    padding-left: 15px;
}

.fw-contact-item i {
    color: var(--color-primary);
    font-size: 1.3rem;
}

.fw-social-icons-wrapper {
    margin-top: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.fw-social-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 25px;
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.fw-social-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.fw-social-link[href*="facebook"] { background-color: #3b5998; }
.fw-social-link[href*="instagram"] { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); }
.fw-social-link[href*="linkedin"] { background-color: #0077B5; }

/* ========================================================= */
/* === NACHHALTIGKEIT SEKTION ============================== */
/* ========================================================= */
.fw-sustainability-block {
    background-color: var(--color-bg-light);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03);
    margin-bottom: 30px;
    border: 1px solid #e0e7ee;
    transition: border-color 0.3s ease;
}

.fw-sustainability-block:hover {
    border-color: var(--color-primary);
}

.fw-sustainability-block h2 {
    font-size: 1.5rem;
    margin-top: 0;
    margin-bottom: 15px;
    border-bottom: 2px solid var(--color-primary);
    padding-bottom: 10px;
    color: var(--color-text-dark);
}

.fw-sustainability-block p {
    font-size: 1rem;
    color: var(--color-text);
}

.fw-sustainability-block a {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

.fw-sustainability-block a:hover {
    color: var(--color-primary-dark);
}

/* ========================================================= */
/* === BEWERTUNGEN ========================================= */
/* ========================================================= */
.fw-reviews-section {
    padding: 30px;
}

.fw-reviews-summary {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e0e7ee;
}

.fw-review-average-rating {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--color-primary);
}

.fw-review-stars {
    color: #ffc107;
    font-size: 1.5rem;
    letter-spacing: 1px;
}

.fw-review-count {
    color: #7a94ad;
}

.fw-review-item {
    border-left: 4px solid var(--color-primary);
    background-color: var(--color-bg-light);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03);
    transition: border-color 0.3s ease;
}

.fw-review-item:hover {
    border-color: var(--color-primary-dark);
}

.fw-review-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.fw-review-author {
    font-style: italic;
    color: #7a94ad;
}

.fw-review-title {
    margin: 0;
    font-size: 1.2rem;
}

.fw-review-content {
    margin-top: 5px;
}

.fw-review-form-container {
    padding-top: 30px;
    border-top: 1px dashed #e0e7ee;
    margin-top: 30px;
}

/* ========================================================= */
/* === FORMULARELEMENTE (Sterne) =========================== */
/* ========================================================= */
.fw-rating-stars-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.fw-rating-stars {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 0;
}

.fw-rating-stars input {
    display: none;
}

.fw-rating-stars label {
    font-size: 1.8rem;
    color: #ccc;
    cursor: pointer;
    transition: color 0.2s ease;
    margin: 0;
    padding: 0 2px;
}

.fw-rating-stars input:checked ~ label {
    color: var(--color-highlight);
}

.fw-rating-stars label:hover,
.fw-rating-stars label:hover ~ label {
    color: var(--color-highlight);
}

/* ========================================================= */
/* === FORMULARELEMENTE (Verbesserte Felder) =============== */
/* ========================================================= */
.fw-form-wrap {
    max-width: 1000px;
    margin: 0 auto;
    padding: 30px;
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    margin-top: 30px;
    margin-bottom: 30px;
}

.fw-form-wrap h2 {
    text-align: center;
    margin-bottom: 20px;
}

.fw-form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 25px;
}

.fw-form-group.checkbox {
    flex-direction: column;
    align-items: flex-start;
}

.fw-form-help-text {
    display: block;
    font-size: 0.9em;
    color: #7a94ad;
    margin-top: 5px;
    line-height: 1.4;
    max-width: 650px;
}

.fw-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--color-text);
}

.fw-form input[type="text"],
.fw-form input[type="email"],
.fw-form input[type="url"],
.fw-form input[type="tel"],
.fw-form input[type="password"],
.fw-form textarea,
.fw-form select {
    width: 100%;
    padding: 0.8em 1em;
    border: 1px solid #d0dbe2;
    border-radius: 8px;
    box-sizing: border-box;
    transition: all 0.3s ease;
    font-family: inherit;
    font-size: 1rem;
    color: var(--color-text);
}

.fw-form input:focus,
.fw-form select:focus,
.fw-form textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.2);
    background-color: #fcfdfe;
}

.fw-form textarea {
    resize: vertical;
    min-height: 120px;
}

.fw-form-file-upload {
    display: flex;
    flex-direction: column;
    margin-top: 15px;
}

.fw-form-file-upload input[type="file"] {
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.fw-form-file-upload .fw-current-image {
    max-width: 150px;
    height: auto;
    border-radius: 8px;
    margin-top: 10px;
    border: 1px solid #e0e0e0;
}

.fw-form button[type="submit"] {
    background-color: var(--color-primary);
    color: white;
    padding: 14px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    margin-top: 20px;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.2s ease;
    width: 100%;
}

.fw-form button[type="submit"]:hover {
    background-color: var(--color-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.fw-success,
.fw-error,
.fw-success-message,
.fw-error-message {
    padding: 1em;
    margin: 1.5em 0;
    border-radius: 5px;
    font-size: 1.1em;
    font-weight: bold;
    text-align: center;
}

.fw-success, .fw-success-message {
    background-color: #e6f7e6;
    color: #387038;
    border: 1px solid #a3e9a3;
}

.fw-error, .fw-error-message {
    background-color: #ffe6e6;
    color: #993d3d;
    border: 1px solid #ff9999;
}

.fw-success-message a,
.fw-error-message a {
    color: var(--color-primary);
    text-decoration: underline;
    font-weight: normal;
}

.fw-checkbox-group {
    display: flex;
    flex-wrap: wrap;
    flex-direction: row;
    justify-content: center;
    gap: 15px;
    align-items: center;
}

.fw-checkbox-group label {
    display: flex;
    align-items: center;
    margin-top: 0;
    margin-bottom: 0;
    font-weight: normal;
}

.fw-checkbox-group input[type="checkbox"] {
    margin-right: 8px;
    width: auto;
}

#bundesland_firmen {
    -webkit-appearance: menulist !important;
    -moz-appearance: menulist !important;
    appearance: menulist !important;
}

/* ========================================================= */
/* === EDIT-FORMULAR BUTTONS =============================== */
/* ========================================================= */
.fw-edit-form-buttons,
.fw-password-form button[type="submit"] {
    margin-top: 25px;
    flex-wrap: wrap;
    text-align: center;
}

.fw-submit-button,
.fw-delete-button,
.fw-password-form button[type="submit"] {
    font-size: 1rem;
    font-weight: 600;
    padding: 12px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.15s ease;
    width: 100%;
    margin-top: 20px;
}

.fw-submit-button {
    background-color: var(--color-primary);
    color: white;
}

.fw-submit-button:hover {
    background-color: var(--color-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.fw-delete-button {
    background-color: #dc3232;
    color: white;
}

.fw-delete-button:hover {
    background-color: #a02020;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.fw-form-wrap .fw-submit-button {
    width: 100%;
}

/* ========================================================= */
/* === ADRESS-CONTAINER ==================================== */
/* ========================================================= */
.fw-address-container {
    padding: 20px;
    margin: 20px 0;
    border: 1px solid #d3d3d3;
    border-radius: 8px;
    background-color: #f7f7f7;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.fw-address-container:hover {
    border-color: var(--color-primary);
    box-shadow: 0 4-10px rgba(0, 0, 0, 0.1);
}

.fw-address-container h3 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1.2rem;
    color: var(--color-primary);
    border-bottom: 2px solid var(--color-primary);
    padding-bottom: 5px;
}

.fw-address-container .fw-form-group {
    margin-bottom: 15px;
}

/* ========================================================= */
/* === FIRMEN-GRID-LAYOUT ================================== */
/* ========================================================= */
.fw-firmen-grid, .firmen-grid {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 2rem;
}

.fw-firmen-card, .fw-grid-item-card {
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    position: relative;
    transition: transform 0.3s ease-in-out;
    display: flex;
    flex-direction: column;
    min-height: 400px;
}

.fw-firmen-card:hover, .fw-grid-item-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.fw-card-link, .fw-grid-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.fw-card-link:hover, .fw-grid-link:hover {
    text-decoration: none;
}

.fw-firmen-card-image, .fw-grid-item-image {
    width: 100%;
    height: 150px;
    overflow: hidden;
}

.fw-firmen-card-image img, .fw-grid-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.fw-firmen-card-header, .fw-grid-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    text-align: center;
}

.fw-firmen-card-logo-wrapper, .fw-grid-logo-wrapper {
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    padding: 5px;
    width: 80px;
    height: 80px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
    margin-bottom: 10px;
    overflow: hidden;
}

.fw-firmen-card-logo, .fw-grid-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 10px;
}

.fw-firmen-card-title-wrapper, .fw-grid-title-wrapper {
    flex-grow: 1;
}

.fw-firmen-card-title, .fw-grid-title {
    margin: 0;
    font-size: 1.2rem;
    color: var(--color-text-dark);
    line-height: 1.2;
}

.fw-firmen-card-rating {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    margin-top: 5px;
    font-size: 0.9em;
}

.fw-firmen-card-stars {
    color: #ffc107;
    font-size: 1.2em;
}

.fw-firmen-card-rating-value {
    font-weight: bold;
    color: var(--color-text);
}

.fw-firmen-card-review-count {
    color: #666;
}

.fw-firmen-card-tags-wrapper, .fw-grid-tags-wrapper {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    padding: 0 15px;
    margin-bottom: 15px;
    margin-top: 10px;
}

.fw-tag, .fw-grid-tag {
    color: #fff;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.fw-tag-online { background-color: #6AA5C6; }
.fw-tag-stationaer { background-color: #C6A26A; }
.fw-tag-region { background-color: var(--color-primary); }
.fw-tag-kategorie { background-color: var(--color-accent); }

.fw-firmen-card-content, .fw-grid-content {
    padding: 0 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.fw-firmen-card-excerpt, .fw-grid-excerpt {
    font-size: 0.9rem;
    color: var(--color-text);
    margin-bottom: 0;
    flex-grow: 1;
}

.fw-firmen-card-button-wrapper, .fw-grid-button-wrapper {
    padding: 15px;
    text-align: center;
    margin-top: auto;
}

.fw-firmen-card-button, .fw-grid-button {
    background-color: var(--color-primary);
    color: #fff;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: bold;
    display: inline-block;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.fw-firmen-card-button:hover, .fw-grid-button:hover {
    background-color: var(--color-primary-dark);
    transform: translateY(-2px);
}

/* ========================================================= */
/* === RESPONSIVE DESIGN (DETAIL) ========================== */
/* ========================================================= */
@media (min-width: 992px) {
    /* WICHTIG: Sidebar nebeneinander auf Desktop */
    .fw-content-container {
        flex-direction: row;
    }

    .fw-sidebar {
        display: block;
    }

    .fw-form-buttons {
        display: flex;
        justify-content: flex-start;
        gap: 15px;
        flex-wrap: wrap;
    }

    .fw-submit-button,
    .fw-delete-button {
        width: auto;
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    .fw-content-container {
        flex-direction: column;
        gap: 20px;
    }

    .fw-sidebar {
        display: block;
    }
}

@media (max-width: 767px) {
    .fw-main-wrapper {
        padding: 0;
    }

    .fw-content-container {
        flex-direction: column;
        gap: 20px;
        padding: 0 20px;
        margin-top: 20px;
    }

    .fw-main-content {
        max-width: none;
        margin: 0;
    }

    .fw-sidebar {
        padding: 30px;
        max-width: none;
        margin: 0;
    }

    .firmen-filter-row {
        flex-direction: column;
    }

    .fw-firmen-grid, .firmen-grid {
        grid-template-columns: 1fr;
    }

    .fw-firmen-card, .fw-grid-item-card {
        margin: 0 auto;
        max-width: 500px;
    }

    .fw-single-header {
        height: 400px;
        padding: 0 20px;
        text-align: center;
        justify-content: center;
    }

    .fw-single-header-content-wrapper {
        flex-direction: column;
        align-items: center;
        text-align: center;
        width: 100%;
        justify-content: space-around;
        max-width: 100%;
    }

    .fw-single-logo-wrapper {
        position: relative;
        margin-top: 0;
        margin-bottom: 20px;
        width: 120px;
        height: 120px;
        order: -1;
    }

    .fw-single-title {
        font-size: 2rem;
    }

    .fw-contact-info {
        grid-template-columns: 1fr;
    }

    .firmen-filter-row select,
    .firmen-filter-row input[type="text"] {
        min-width: 100%;
        padding: 12px;
        border-radius: 8px;
        border: 1px solid #e0e0e0;
        background-color: #ffffff;
    }

    .firmen-filter-buttons {
        display: flex;
        gap: 10px;
    }

    .firmen-filter-buttons button {
        flex-grow: 1;
    }

    /* === Mobile-spezifische Anpassungen für Bewertungssterne === */
    .fw-rating-stars {
        justify-content: flex-start;
        gap: 0;
        font-size: 1.5rem;
    }

    .fw-rating-stars label {
        margin: 0 2px;
        font-size: 1.5rem;
    }
}

/* ========================================================= */
/* === SONSTIGES & SAFETY ================================== */
/* ========================================================= */
button,
.fw-firmen-card-button,
.fw-grid-button,
.fw-widget-cta-button,
.fw-form button[type="submit"],
.firmen-filter-buttons button {
    border-radius: 6px;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.text-muted { color: #7a94ad; }
.small { font-size: 0.9rem; }
.center { text-align: center; }

.fw-current-image-preview {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 15px;
    padding: 10px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background-color: #f9f9f9;
}

.fw-current-image-preview img {
    max-width: 150px;
    height: auto;
    border-radius: 8px;
    margin-bottom: 10px;
}

.fw-current-image-preview label {
    display: inline-flex;
    align-items: center;
    font-weight: normal;
    font-size: 0.9em;
    color: #666;
    cursor: pointer;
}

.fw-current-image-preview input[type="checkbox"] {
    margin-right: 5px;
    width: auto;
}

/* ========================================================= */
/* === REDESIGN FILTER & WIDGETS (NEU) ===================== */
/* ========================================================= */

/* Filter-Container */
.filter-box {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05); 
  border: 1px solid #e0e7ee; 
  padding: 20px;
  margin-bottom: 20px;
}

/* Gruppierung */
.fw-filter-group {
  margin-bottom: 20px;
}

.fw-filter-label,
.fw-filter-group label {
  display: block;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-text-dark); 
  margin-bottom: 8px;
}

/* Select */
#bundesland_firmen {
  appearance: none;
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #d0dbe2;
  border-radius: 8px;
  background: #fff url("data:image/svg+xml;utf8,<svg fill='%234a4a4a' height='20' width='20' viewBox='0 0 20 20'><path d='M5.5 7l4.5 4 4.5-4z'/></svg>") no-repeat right 12px center;
  background-size: 16px;
  font-size: 0.95rem;
  cursor: pointer;
  transition: border-color 0.2s;
}
#bundesland_firmen:focus {
  border-color: var(--color-primary);
  outline: none;
}

/* Checkboxen */
.fw-checkbox-group {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
  cursor: pointer;
  user-select: none;
}
.fw-checkbox-group input[type="checkbox"] {
  appearance: none;
  width: 18px;
  height: 18px;
  border: 2px solid var(--color-primary); 
  border-radius: 4px;
  margin-right: 10px;
  position: relative;
  transition: border-color 0.2s, background-color 0.2s;
}
.fw-checkbox-group input[type="checkbox"]:checked {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
}
.fw-checkbox-group input[type="checkbox"]:checked::after {
  content: "✔";
  color: var(--color-text-light); 
  font-size: 12px;
  position: absolute;
  top: 0;
  left: 3px;
}

/* Buttons */
.fw-filter-actions {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}
.fw-btn {
  flex: 1;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: background 0.2s, color 0.2s;
}
.fw-btn-primary {
  background: var(--color-primary);
  color: var(--color-text-light);
}
.fw-btn-primary:hover {
  background: var(--color-primary-dark);
}
.fw-btn-secondary {
  background: var(--color-bg-light);
  color: var(--color-text);
}
.fw-btn-secondary:hover {
  background: #e2e6ea;
}

/* Widget Container */
.fw-widget {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  padding: 16px;
  margin-bottom: 20px;
}

/* Widget Titel */
.fw-widget h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--color-text-dark);
  margin-bottom: 12px;
  border-bottom: 2px solid var(--color-bg-light);
  padding-bottom: 6px;
}

/* Firmenname */
.fw-widget .fw-company-name {
  font-weight: 600;
  font-size: 1rem;
  margin: 12px 0 8px;
  color: var(--color-accent);
}

/* Badges (Region, Kategorie) */
.fw-widget .fw-badge {
  display: inline-block;
  padding: 4px 10px;
  margin: 4px 6px 0 0;
  font-size: 0.8rem;
  border-radius: 999px;
  font-weight: 500;
  color: var(--color-text-light);
}
.fw-badge.green { background: var(--color-primary); }
.fw-badge.blue { background: var(--color-accent); }

/* Button im Widget */
.fw-widget .fw-btn {
  display: inline-block;
  margin-top: 14px;
  padding: 8px 14px;
  border-radius: 8px;
  background: var(--color-primary);
  color: var(--color-text-light);
  font-weight: 500;
  text-align: center;
  transition: background 0.2s;
}
.fw-widget .fw-btn:hover {
  background: var(--color-primary-dark);
}

/* Logo-Größe im Widget */
.fw-widget .fw-widget-logo {
    display: block;
    max-width: 80px;
    height: auto;
    border-radius: 8px;
    margin: 0 auto 12px;
}

/* ========================================================= */
/* === NEU: EVENTS & Q&A (ERGÄNZUNGEN) ===================== */
/* ========================================================= */

/* EVENT CARD NEU */
.fw-event-card {
    display: flex; gap: 15px;
    border: 1px solid #eee; border-left: 4px solid var(--color-text-dark);
    padding: 15px; background: #fff; margin-bottom: 15px;
    border-radius: 4px; align-items: center; transition: box-shadow 0.2s;
}
.fw-event-card:hover { box-shadow: 0 4px 10px rgba(0,0,0,0.05); }

.fw-event-date {
    text-align: center; min-width: 60px; padding: 5px;
    background: var(--color-bg-light); border-radius: 6px;
}
.fw-event-day { font-size: 1.4rem; font-weight: bold; color: var(--color-text-dark); display: block; line-height: 1; }
.fw-event-month { font-size: 0.8rem; text-transform: uppercase; color: #777; display: block; margin-top: 2px; }

.fw-event-details { flex-grow: 1; }
.fw-event-title { margin: 0 0 5px 0; font-size: 1.1rem; }
.fw-event-title a { text-decoration: none; color: var(--color-text-dark); }
.fw-event-meta { font-size: 0.85rem; color: #666; display: flex; gap: 10px; align-items: center; margin-bottom: 5px; }

.fw-event-price-tag {
    background: #e8f5e9; color: var(--color-primary);
    padding: 2px 8px; border-radius: 10px; font-weight: bold; font-size: 0.85rem;
}
.fw-event-online-badge {
    background: #e3f2fd; color: #1565c0; padding: 2px 6px; border-radius: 4px; font-size: 0.75rem; vertical-align: middle;
}

/* Q&A CHAT DESIGN */
.fw-qa-container { width: 100%; margin-bottom: 40px; }
.fw-qa-card { 
    background: #fff; border: 1px solid #e0e0e0; 
    border-radius: 8px; margin-bottom: 20px; overflow: hidden; 
}
.fw-qa-question-row {
    padding: 20px; display: flex; gap: 15px; align-items: flex-start;
}
.fw-qa-avatar { 
    width: 40px; height: 40px; background: var(--color-bg-light); 
    border-radius: 50%; display: flex; align-items: center; justify-content: center; 
    font-weight: bold; color: #555; flex-shrink: 0;
}
.fw-qa-content { flex-grow: 1; }
.fw-qa-meta { font-size: 0.85rem; color: #888; margin-bottom: 5px; }
.fw-qa-name { font-weight: bold; color: var(--color-text-dark); margin-right: 5px; }
.fw-qa-text { font-size: 1rem; color: var(--color-text); line-height: 1.5; font-style: italic; }

.fw-qa-answer-row {
    background: #fafafa; border-top: 1px solid #eee;
    padding: 15px 20px; display: flex; gap: 15px;
}
.fw-qa-answer-icon { color: var(--color-primary); font-size: 1.2rem; width: 40px; text-align: center; }
.fw-qa-answer-body { flex-grow: 1; }
.fw-qa-answer-header { font-size: 0.8rem; font-weight: bold; color: var(--color-primary); text-transform: uppercase; margin-bottom: 5px; }
.fw-qa-answer-text { color: #444; }

.fw-qa-form-wrapper { 
    background: #f9f9f9; border: 1px solid #eee; 
    border-radius: 8px; padding: 25px; margin-top: 30px; 
}
.fw-qa-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin-bottom: 15px; }
.fw-qa-input { width: 100%; padding: 12px; border: 1px solid #ccc; border-radius: 4px; box-sizing: border-box; }
.fw-qa-btn { 
    background: var(--color-text-dark); color: #fff; border: none; padding: 12px 25px; 
    border-radius: 4px; font-weight: 600; cursor: pointer; 
}
@media(max-width: 600px) { .fw-qa-grid { grid-template-columns: 1fr; } }

/* ========================================================= */
/* === PARTNER ACCOUNT HIGHLIGHTING (ARCHIVE/GRID) ========= */
/* ========================================================= */

/* 1. Visuelle Hervorhebung des gesamten Kastens */
.fw-partner-highlight {
    border: 2px solid var(--color-primary) !important; /* Markante Umrandung (uebersteuert Grid-Defaults) */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1), 0 0 0 4px #e8f5e9 !important; /* Schatten + Schimmer */
    position: relative;
    overflow: visible; /* Wichtig, damit das Badge sichtbar ist */
    padding-top: 0; /* Das Badge wird innerhalb des Kastens positioniert */
}

.fw-firmen-card:hover .fw-partner-highlight {
    /* Setzt den Hover-Effekt des Kastens außer Kraft, um Konflikte zu vermeiden */
    transform: none; 
}

/* 2. Partner Banner/Badge (oben links) */
.fw-partner-badge {
    position: absolute;
    top: -1px; /* Leicht über den Rand */
    left: -1px;
    background: var(--color-primary); /* Dunkles Grün */
    color: var(--color-text-light);
    font-size: 0.85em;
    font-weight: bold;
    padding: 6px 12px;
    border-bottom-right-radius: 8px;
    z-index: 10;
    text-transform: uppercase;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.2);
}

/* Koop-Partner als "Werbekachel" im Firmen-Grid */
.fw-partner-ad-card{
    border: 2px dashed var(--color-primary) !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    position: relative;
}
.fw-partner-ad-card .fw-partner-badge{
    left: auto;
    right: -1px;
    border-bottom-right-radius: 0;
    border-bottom-left-radius: 8px;
}
.fw-partner-ad-card .fw-firmen-card-content{
    background: linear-gradient(180deg, rgba(232,245,233,0.35), rgba(255,255,255,1));
}

/* 3. Icons für Features */
.fw-feature-hint {
    margin-left: 8px;
    font-size: 1.1em;
    color: #ffcc00; /* Goldene Farbe für die Icons */
    opacity: 0.9;
}

/* Optional: Animationseffekt beim Hover */
.fw-partner-highlight:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.2), 0 0 0 4px #c8e6c9;
}

/* === FINETUNE 2026-01-22 (single + archive) === */

/* Single: header radius + safe overflow */
.fw-single-header,
.fw-header-image{
  border-radius: 26px;
  overflow: hidden;
}

/* Remove any old overlay effect */
.fw-single-overlay,
.fw-header-overlay,
.fw-header-gradient{
  display:none !important;
}

/* Ensure content never overlaps header unintentionally */
.fw-single-grid,
.fw-single-grid .fw-content,
.fw-single-grid .fw-sidebar{
  position: relative;
  z-index: 1;
}

/* Verified badge on its own line (under header) */
.fw-verified-row{
  display:flex;
  justify-content:flex-start;
  margin: 12px 0 8px;
}
.fw-verified-badge{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 800;
  letter-spacing: .4px;
  background: linear-gradient(135deg,#f6c13a,#f3a71b);
  color:#fff;
  box-shadow: 0 10px 22px rgba(0,0,0,.12);
  text-transform: uppercase;
  font-size: 13px;
}

/* Social buttons (single) */
.fw-single-social-row{
  display:flex;
  gap:10px;
  align-items:center;
  margin: 10px 0 0;
}
.fw-social-btn{
  width:42px;
  height:42px;
  border-radius:999px;
  display:flex;
  align-items:center;
  justify-content:center;
  color:#fff;
  text-decoration:none;
  box-shadow: 0 8px 18px rgba(0,0,0,.12);
}
.fw-social-btn--fb{ background:#1877f2; }
.fw-social-btn--ig{ background:linear-gradient(45deg,#f09433,#e6683c,#dc2743,#cc2366,#bc1888); }
.fw-social-btn:hover{ opacity:.92; }

/* Single: module chips grid (pattern/supply) */
.fw-module-grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 10px 0 14px;
}
@media (max-width: 900px){
  .fw-module-grid{ grid-template-columns: 1fr; }
}

/* Modal / Popover visibility */
.fw-modal-backdrop{
  position:fixed;
  inset:0;
  background: rgba(0,0,0,.48);
  backdrop-filter: blur(2px);
  z-index: 9998;
  display:none;
}
.fw-modal{
  position:fixed;
  left:50%;
  top:50%;
  transform: translate(-50%,-50%);
  width: min(920px, calc(100vw - 26px));
  max-height: calc(100vh - 26px);
  /* Subtle branded background so it doesn't feel like a blank white sheet */
  background:
    radial-gradient(900px 520px at 0% 0%, color-mix(in srgb, var(--color-primary, #388E3C) 18%, transparent), transparent 60%),
    radial-gradient(760px 420px at 100% 0%, rgba(255,193,7,.14), transparent 62%),
    radial-gradient(820px 460px at 50% 120%, rgba(0,0,0,.06), transparent 60%),
    #ffffff;
  border-radius: 18px;
  box-shadow: 0 22px 70px rgba(0,0,0,.28);
  z-index: 9999;
  display:none;
  overflow:hidden;
}

/* Add a very light texture on top of the gradients */
.fw-modal::before{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  background:
    repeating-linear-gradient(135deg, rgba(0,0,0,.035) 0 1px, transparent 1px 12px);
  opacity:.35;
}

.fw-modal > *{ position:relative; }
.fw-modal.is-open,
.fw-modal-backdrop.is-open{
  display:block;
}
.fw-modal-header{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(0,0,0,.08);
  background: rgba(255,255,255,.78);
  backdrop-filter: blur(10px);
}
.fw-modal-title{
  margin:0;
  font-size: 16px;
  font-weight: 800;
}
.fw-modal-close{
  border:0;
  background:transparent;
  font-size: 22px;
  line-height: 1;
  cursor:pointer;
  padding: 4px 8px;
}
.fw-modal-body{
  padding: 14px 16px;
  overflow:auto;
  max-height: calc(100vh - 120px);
  background: rgba(255,255,255,.74);
  backdrop-filter: blur(10px);
}

/* Desktop: logo bottom-left, 50% overlap */
@media (min-width: 901px){
  .fw-logo-overlay{
    position:absolute;
    left: 40px;
    bottom: -55px;
    width: 150px;
    height: 150px;
    border-radius: 18px;
    /* Keep logo in the foreground (above header/media layers) */
    z-index: 60;
    background:#fff;
    padding: 8px;
    box-shadow: 0 18px 40px rgba(0,0,0,.20);
    display:flex;
    align-items:center;
    justify-content:center;
  }
  .fw-logo-overlay img{
    width:100%;
    height:100%;
    object-fit:contain;
    border-radius: 14px;
  }
  /* Push content down so it doesn't collide with logo overlap */
  .fw-single-grid{ margin-top: 64px; }
}

/* Mobile: logo stays bottom-left but no huge empty gaps */
@media (max-width: 900px){
  .fw-logo-overlay{
    position:absolute;
    left: 16px;
    bottom: -38px;
    width: 96px;
    height: 96px;
    border-radius: 16px;
    z-index: 60;
    background:#fff;
    padding: 6px;
    box-shadow: 0 12px 28px rgba(0,0,0,.18);
    display:flex;
    align-items:center;
    justify-content:center;
  }
  .fw-single-grid{ margin-top: 46px; }
}

/* Desktop layout: content left, sidebar right and aligned to top */
@media (min-width: 901px){
  .fw-single-grid{
    display:grid;
    grid-template-columns: minmax(0,1fr) 360px;
    gap: 40px;
    align-items:start;
  }
  .fw-sticky-container{
    position: sticky;
    top: 22px;
  }
}

/* Archive: promo badge smaller */
.fw-grid-promo-badge{
  font-size: 12px;
  padding: 0;
}
.fw-grid-promo-badge a{
  display:inline-flex;
  align-items:center;
  gap:8px;
  font-weight:800;
  font-size:12px;
  padding: 6px 10px;
  border-radius:999px;
  background: rgba(255,255,255,.92);
  color:#2b2b2b;
  text-decoration:none;
  border: 1px solid rgba(0,0,0,.08);
}
.fw-grid-promo-badge a:hover{ background:#fff; }

/* ========================================================= */
/* === SINGLE: Meta Badges (Kategorie/Region/QA/Events) ===== */
/* ========================================================= */
.fw-meta-row{
  display:flex;
  flex-wrap:wrap;
  gap: 10px;
  align-items:center;
  margin: 12px 0 8px;
}
.fw-cat-wrapper{ display:flex; flex-wrap:wrap; gap:10px; }
.fw-meta-item{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding: 10px 16px;
  border-radius: 999px;
  text-decoration:none;
  font-weight: 800;
  letter-spacing: .02em;
  background: rgba(255,255,255,.75);
  color: rgba(0,0,0,.78);
  border: 1px solid rgba(0,0,0,.08);
  backdrop-filter: blur(6px);
}
.fw-meta-item i{ opacity:.9; }
.fw-meta-item.cat{
  background: rgba(106,165,198,.25);
  border-color: rgba(106,165,198,.35);
  color: #114a63;
  text-transform: uppercase;
  font-size: 13px;
}
.fw-meta-item.highlight{
  background: rgba(255,193,7,.18);
  border-color: rgba(255,193,7,.35);
  color: #6a5200;
}
.fw-meta-item.edit{
  background: rgba(15,23,42,.75);
  border-color: rgba(15,23,42,.8);
  color: #fff;
}
.fw-meta-item.edit:hover{ filter: brightness(1.03); }

/* tighter on mobile */
@media (max-width: 900px){
  .fw-meta-item{ padding: 9px 14px; font-size: 16px; }
  .fw-meta-item.cat{ font-size: 12px; }
}

/* ========================================================= */
/* === DETAILS: Nachhaltigkeit / Besonderheiten = LIVE ====== */
/* ========================================================= */
.fw-details{
  margin: 14px 0;
  background: #fff;
  border-radius: 18px;
  border: 2px solid rgba(0,0,0,.06);
  box-shadow: 0 10px 28px rgba(0,0,0,.06);
  overflow:hidden;
}
.fw-details summary{
  list-style:none;
}
.fw-details summary::-webkit-details-marker{ display:none; }
.fw-details-summary{
  display:flex;
  align-items:center;
  gap: 12px;
  padding: 18px 18px;
  font-weight: 900;
  font-size: 22px;
  color: #253746;
  cursor:pointer;
}
.fw-details-body{
  padding: 0 18px 18px 18px;
  font-size: 18px;
  line-height: 1.55;
  color: var(--color-text-dark);
}
.fw-details[open] .fw-details-body{ display:block; }

.fw-details-green{ border-color: rgba(56,142,60,.18); }
.fw-details-gold{ border-color: rgba(255,193,7,.22); }

@media (max-width: 900px){
  .fw-details-summary{ font-size: 18px; padding: 16px; }
  .fw-details-body{ padding: 0 16px 16px; font-size: 16px; }
}


/* Archive mobile: grid cards to the edge */
@media (max-width: 900px){
  .archive-firmen .fw-main-wrapper{
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  .archive-firmen .fw-firmen-grid{
    padding-left: 0 !important;
    padding-right: 0 !important;
    gap: 14px;
  }
  .archive-firmen .fw-firmen-card{
    border-radius: 18px;
    margin-left: 10px;
    margin-right: 10px;
  }
}

/* Archive layout */
.archive-firmen .fw-main-wrapper{
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 24px 60px;
}
.archive-firmen .page-header{
  text-align:center;
  margin-bottom: 44px;
}
.archive-firmen .taxonomy-description{
  max-width: 800px;
  margin: 0 auto;
  color: #666;
  font-size: 1.1rem;
}
.archive-firmen .fw-pagination{
  margin-top: 60px;
  text-align:center;
}
.archive-firmen .fw-empty-state{
  text-align:center;
  padding: 60px;
  background: #f9f9f9;
  border-radius: 22px;
}



@media (max-width: 900px){
  .fw-single-header,
  .fw-header-image{
    border-radius: 0 !important;
  }
  .fw-single-header-image,
  .fw-single-header-image img{
    border-radius: 0 !important;
  }
}



@media (max-width: 900px){
  .fw-single-page .fw-content{
    padding-left: 4px;
    padding-right: 4px;
  }
}



/* Tabs box */
.fw-tabs{ display:flex; gap:10px; margin: 6px 0 16px; }
.fw-tab{
  flex:1;
  padding: 14px 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  border: 2px solid var(--color-primary, #2f5daa);
  color: var(--color-primary, #2f5daa);
  font-weight:800;
  cursor:pointer;
}
.fw-tab:not(.is-active){
  opacity: .95;
}
.fw-tab.is-active{
  background: var(--color-primary, #2f5daa);
  color: #fff;
}
.fw-tab-panels{ padding-top: 18px; }
.fw-tab-panel{ display:none; }
.fw-tab-panel.is-active{ display:block; }



/* Details open styling (keep open by default) */
.fw-details[open] > summary::marker{ display:none; }
.fw-details[open] > summary::-webkit-details-marker{ display:none; }

/* v6 tweak: more space under module chips */
.fw-module-grid{ margin-bottom: 12px; }

/* ==========================================================
   2026-01-22 v8.2 Hotfix – single header/logo + module chips
   ========================================================== */

/* Header: Desktop rund, Logo darf über Header hinaus stehen */
.fw-single-page .fw-single-header{
  border-radius: 26px;
  overflow: visible; /* wichtig: sonst wird das überlappende Logo abgeschnitten */
}

/* Mobile: Header ohne Radius (wie gewünscht) */
@media (max-width: 900px){
  .fw-single-page .fw-single-header{ border-radius: 0 !important; }
}

/* Logo in den Vordergrund */
.fw-single-page .fw-logo-overlay{
  z-index: 60;
}

/* Module Chips: nebeneinander + Theme-Farben */
.fw-single-page .fw-module-grid{
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 10px;
  margin-bottom: 12px; /* etwas Luft unter Supplychain/Lieferkette */
}

.fw-single-page .fw-module-grid .fw-module-chip{
  flex: 1 1 calc(50% - 6px);
  min-width: 140px;
}

/* Outline-Style an Theme-Primary anlehnen */
.fw-single-page .fw-module-chip--outline{
  border: 1px solid var(--color-primary);
  color: var(--color-primary);
  background: rgba(255,255,255,0.65);
  border-radius: 999px;
  padding: 14px 16px;
  font-weight: 800;
  letter-spacing: .02em;
  box-shadow: 0 10px 24px rgba(0,0,0,0.08);
  backdrop-filter: blur(6px);
}

.fw-single-page .fw-module-chip--outline:hover,
.fw-single-page .fw-module-chip--outline:focus{
  background: var(--color-primary);
  color: #fff;
}

/* Hint: zentriert + etwas mehr Kontrast auf hellen Hintergründen */
.fw-single-page .fw-module-hint{
  text-align: center;
  color: rgba(0,0,0,.55);
}

/* Modal: leichtes "Glass" statt klinisch weiß (nur Hintergrund, Inhalt bleibt Modul) */
.fw-single-page .fw-modal{
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(10px);
}


/* === Archive Grid Mobile Hotfix (full width cards + stable image ratio) === */

.archive-firmen .fw-firmen-grid{justify-items:stretch;}
.archive-firmen .fw-firmen-card{width:100%;}

.fw-firmen-rating-badge .fw-firmen-stars span{color:#f6c343 !important;}

@media (max-width: 640px){
  .archive-firmen .fw-main-wrapper{padding-left:0 !important; padding-right:0 !important;}
  .archive-firmen .page-header{padding-left:16px !important; padding-right:16px !important;}
  .archive-firmen .fw-firmen-grid{
    grid-template-columns: 1fr !important;
    gap: 18px !important;
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  .archive-firmen .fw-firmen-card{
    max-width:none !important;
    margin:0 !important;
  }
  .archive-firmen .fw-firmen-card-image{
    height:auto !important;
    aspect-ratio: 16 / 10;
    min-height: 220px;
  }
}

/* Aktion badge: keep compact */
.fw-firmen-card-promo{padding:10px 14px; font-size:13px; border-radius:999px;}

.fw-grid-rating i{color:#f6c343 !important;}

.fw-grid-action-badge{
  position:absolute;
  left:16px;
  bottom:16px;
  background:rgba(255,255,255,.88);
  color:#111;
  padding:10px 14px;
  border-radius:999px;
  font-weight:700;
  display:inline-flex;
  align-items:center;
  gap:8px;
  box-shadow: 0 10px 24px rgba(0,0,0,.12);
}
.fw-grid-action-badge i{opacity:.85;}

.fw-firmen-card-image-wrap{position:relative;}
/* =================================================================
   FINAL GRID FIX: CLEAN & MINIMAL
   ================================================================= */

/* 1. DAS GITTER (Mobile-Safe) */
.fw-firmen-grid {
    display: grid !important;
    /* Grid passt sich automatisch an, min 280px */
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)) !important;
    gap: 25px !important;
    align-items: stretch !important;
    margin: 40px 0 !important;
    width: 100% !important;
    padding: 0 !important;
    box-sizing: border-box !important;
}

/* 2. DIE KARTE */
.fw-firmen-card {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    background: #fff !important;
    border: 1px solid rgba(0,0,0,0.08) !important;
    border-radius: 12px !important; /* Weniger rund, wirkt technischer */
    box-shadow: 0 2px 8px rgba(0,0,0,0.03) !important;
    overflow: hidden !important;
    position: relative !important;
    width: 100% !important;
}

.fw-firmen-card:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 20px rgba(0,0,0,0.06) !important;
}

/* 3. BILD */
.fw-firmen-card-image-wrap {
    position: relative !important;
    width: 100% !important;
    height: 200px !important;
    overflow: hidden !important;
}

.fw-firmen-card-image {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    transition: transform 0.5s ease;
}

.fw-firmen-card:hover .fw-firmen-card-image {
    transform: scale(1.03);
}

/* 4. PROMO BADGE (Ultra-Minimal) */
/* Kein Blobb mehr, nur ein kleines, schickes Label */
.fw-promo-badge, 
span.badge-promo {
    position: absolute !important;
    top: 8px !important;
    right: 8px !important;
    background: rgba(229, 57, 53, 0.95) !important; /* Rot, leicht transparent */
    color: #fff !important;
    font-size: 0.65rem !important; /* Sehr klein */
    font-weight: 700 !important;
    padding: 3px 6px !important; /* Minimales Padding */
    border-radius: 4px !important; /* Eckig statt rund */
    z-index: 10 !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1 !important;
    box-shadow: none !important; /* Kein Schatten -> Flach */
}

/* 5. STERNE (Gold erzwingen) */
.fw-firmen-rating-badge i,
.fw-firmen-stars i,
.fa-star {
    color: #FFC107 !important; /* Gold */
    font-weight: 900 !important; /* Solid */
}

/* 6. INHALT */
.fw-firmen-card-content {
    padding: 18px !important;
    flex-grow: 1 !important;
    display: flex !important;
    flex-direction: column !important;
}

.fw-firmen-card-title {
    margin: 0 0 6px 0 !important;
    font-size: 1.1rem !important;
    line-height: 1.3 !important;
    font-weight: 700 !important;
    color: #1d1d1f !important;
}

/* Tags (Regionen) - Dezent */
.fw-firmen-card-tags .fw-tag {
    background: #f5f5f7 !important;
    color: #666 !important;
    border-radius: 3px !important;
    padding: 2px 6px !important;
    font-size: 0.7rem !important;
    margin-right: 5px !important;
    display: inline-block;
}

.fw-firmen-card-tags .fw-tag-cat{
  background: rgba(56,142,60,.10) !important;
  color: #2e7d32 !important;
  font-weight: 700;
}
.fw-firmen-card-tags .fw-tag-more{
  background: rgba(0,0,0,.06) !important;
  color: #666 !important;
  font-weight: 700;
}
.fw-firmen-card-tags .fw-tag-region i{ margin-right:4px; }

/* Grid-Card: wichtige Badges, aber clean */
.fw-card-meta-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
.fw-card-meta-left{ display:flex; align-items:center; gap:10px; min-width:0; }
.fw-card-meta-right{ display:flex; align-items:center; gap:8px; flex-wrap:wrap; justify-content:flex-end; }

.fw-card-meta-count{
  font-size: 0.75rem;
  color: #999;
  margin-left: 6px;
}

.fw-mini-pill{
  display:inline-flex;
  align-items:center;
  gap:6px;
  border:1px solid rgba(0,0,0,.08);
  background: rgba(245,245,247,.9);
  color:#444;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 0.72rem;
  line-height: 1;
  white-space: nowrap;
}
.fw-mini-pill i{ opacity:.85; }
.fw-mini-pill__num{ font-weight:800; color:#222; }
.fw-mini-pill__text{ font-weight:700; }

/* Crowdfunding-Pill (Startnext) */
.fw-mini-pill.fw-pill-crowdfunding i{ opacity: 1; }

/* Tags: leichte Differenzierung */
.fw-firmen-card-tags .fw-tag-cat{ background: #e8f5e9 !important; color:#2e7d32 !important; }
.fw-firmen-card-tags .fw-tag-more{ background:#eee !important; color:#666 !important; }

/* 7. FOOTER */
.fw-firmen-card-footer {
    padding: 12px 18px !important;
    background: #fff !important; /* Weiß statt Grau -> Cleaner */
    border-top: 1px solid #f0f0f0 !important;
    margin-top: auto !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
}

.fw-card-btn {
    font-size: 0.85rem !important;
    font-weight: 600 !important;
    color: #388E3C !important;
    text-decoration: none !important;
}

/* 8. MOBILE FIX (Perfekte Breite) */
@media (max-width: 600px) {
    .fw-firmen-grid {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        margin: 20px 0 !important;
        gap: 15px !important;
    }

    .fw-firmen-card {
        width: 100% !important;
        margin: 0 !important;
        border-radius: 10px !important;
        /* Verhindert seitliches Scrollen durch Border-Box */
        box-sizing: border-box !important; 
    }

    .fw-firmen-card-image-wrap {
        height: 160px !important; /* Kompakter auf Handy */
    }
}

/* ===================================================================== */
/*  Single Firma – Hero Header (Apple-Style)                              */
/*  (wird von includes/shortcode-single-firmen.php verwendet)             */
/* ===================================================================== */

/* 1. Das große Bild */
.fw-single-hero {
    width: 100%;
    height: 350px;
    background-size: cover;
    background-position: center;
    position: relative;
    margin-bottom: 0;
}

/* Dunkler Verlauf */
.fw-hero-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0) 60%, rgba(0,0,0,0.1) 100%);
}

/* 2. Bereich unter dem Bild */
.fw-single-header-content {
    position: relative;
    margin-top: -60px;
    margin-bottom: 40px;
    padding-left: 20px;
    padding-right: 20px;
    display: flex;
    align-items: flex-end;
    gap: 25px;
    z-index: 10;
}

/* 3. Logo */
.fw-single-logo-wrap {
    width: 130px;
    height: 130px;
    background: #fff;
    border-radius: 24px;
    padding: 6px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.fw-single-logo-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 18px;
}

/* 4. Titel */
.fw-single-headline {
    padding-bottom: 10px;
}

.fw-single-headline h1 {
    font-size: 2.5rem;
    font-weight: 800;
    color: #1d1d1f;
    margin: 5px 0;
    line-height: 1.1;
}

.fw-header-cat-badge {
    text-transform: uppercase;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--color-primary);
    background: rgba(56, 142, 60, 0.1);
    padding: 4px 10px;
    border-radius: 4px;
    display: inline-block;
}

.fw-header-location {
    color: #666;
    margin: 0;
    font-size: 1.1rem;
}

/* 5. Bearbeiten Button */
.fw-edit-btn-floating {
    margin-left: auto;
    background: #1d1d1f;
    color: #fff;
    padding: 10px 20px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    align-self: flex-end;
    margin-bottom: 15px;
}
.fw-edit-btn-floating:hover {
    background: #333;
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .fw-single-hero { height: 200px; }

    .fw-single-header-content {
        flex-direction: column;
        align-items: flex-start;
        margin-top: -40px;
        gap: 15px;
    }

    .fw-single-logo-wrap { width: 100px; height: 100px; }

    .fw-single-headline h1 { font-size: 1.8rem; }

    .fw-edit-btn-floating {
        position: absolute;
        top: 20px;
        right: 0;
    }
}
@media (min-width: 1024px) {
  .fw-single-page {
    font-size: 0.92rem;
  }

  .fw-single-page .fw-main-title {
    font-size: 2.0rem;
  }

  .fw-single-page .fw-section-title {
    font-size: 1.25rem;
  }

  .fw-single-page .fw-details-body,
  .fw-single-page .fw-contact-widget,
  .fw-single-page .fw-sidebar-widget {
    font-size: 0.92rem;
  }
} /* Partner-Siegel rechts oben platzieren */
.fw-firmen-card-image-wrap {
    position: relative;
}

.fw-partner-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    left: auto;              /* wichtig */
    z-index: 5;
}