/**
 * FBM Post Slider Premium - Cirkle Theme Style
 * 
 * Responsiver Post-Slider im Cirkle Theme Stil
 * mit Dark/Light Mode Support
 * 
 * WICHTIG: Alle CSS-Regeln sind isoliert und gelten NUR innerhalb von .fbm-post-slider-wrapper
 * Dies verhindert Konflikte mit anderen Slidern und Elementen auf der Seite.
 * 
 * @package FBM_Post_Slider
 * @version 1.0.9
 */

/* ========================================
   CSS ISOLATION - Verhindert Konflikte mit anderen Slidern
   ======================================== */

/* WICHTIG: Alle FBM Post Slider Regeln gelten NUR innerhalb von .fbm-post-slider-wrapper */
/* Diese Regel stellt sicher, dass andere Slider explizit ausgeschlossen sind */
/* KEINE aggressiven Schutzregeln - unsere Regeln sind bereits spezifisch genug */

/* ========================================
   CIRKLE THEME VARIABLES
   ======================================== */

.fbm-post-slider-wrapper.cirkle-fbm-integration {
    /* Cirkle Theme Farben */
    --cirkle-primary: #007cba;
    --cirkle-secondary: #005a87;
    --cirkle-accent: #667eea;
    --cirkle-success: #28a745;
    --cirkle-warning: #ffc107;
    --cirkle-danger: #dc3545;
    --cirkle-info: #17a2b8;
    
    /* Cirkle Theme Hintergründe */
    --cirkle-bg-primary: #ffffff;
    --cirkle-bg-secondary: #f8f9fa;
    --cirkle-bg-tertiary: #e9ecef;
    
    /* Cirkle Theme Text */
    --cirkle-text-primary: #23282d;
    --cirkle-text-secondary: #6c757d;
    
    /* Cirkle Theme Borders */
    --cirkle-border-color: #e9ecef;
    
    /* Slider spezifische Variablen */
    --slider-card-bg: var(--cirkle-bg-primary);
    --slider-card-border: var(--cirkle-border-color);
    --slider-card-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    --slider-card-shadow-hover: 0 8px 24px rgba(0, 124, 186, 0.15);
    --slider-arrow-bg: var(--cirkle-primary);
    --slider-arrow-hover: var(--cirkle-secondary);
    --slider-dot-color: var(--cirkle-primary);
    --slider-dot-active: var(--cirkle-secondary);
}

/* ========================================
   DARK MODE SUPPORT
   ======================================== */

html[data-theme="dark-mode"] .fbm-post-slider-wrapper.cirkle-fbm-integration {
    --cirkle-bg-primary: #242526;
    --cirkle-bg-secondary: #2d2d2d;
    --cirkle-bg-tertiary: #404040;
    --cirkle-text-primary: #ffffff;
    --cirkle-text-secondary: #cccccc;
    --cirkle-border-color: #404040;
    --slider-card-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    --slider-card-shadow-hover: 0 8px 24px rgba(0, 124, 186, 0.25);
}

html[data-theme="light-mode"] .fbm-post-slider-wrapper.cirkle-fbm-integration {
    --cirkle-bg-primary: #ffffff;
    --cirkle-bg-secondary: #f8f9fa;
    --cirkle-bg-tertiary: #e9ecef;
    --cirkle-text-primary: #23282d;
    --cirkle-text-secondary: #6c757d;
    --cirkle-border-color: #e9ecef;
}

/* ========================================
   SLIDER WRAPPER
   ======================================== */

.fbm-post-slider-wrapper {
    /* Harmonisierung mit fbm-simple-toolbox (wizard.css: --fbm-ui-fs-*) */
    --fbm-ui-fs-body: 17px;
    --fbm-ui-fs-h3: 20px;
    --fbm-ui-fs-subtitle: 0.95rem;
    --fbm-ui-fs-badge: 12px;
    position: relative;
    margin: 30px 0;
    padding: 20px 0;
    overflow: visible;
}

.fbm-post-slider-wrapper .fbm-post-slider-container {
    position: relative;
    overflow: hidden;
    padding-top: 10px;
    padding-bottom: 10px;
    margin-top: 5px;
    margin-bottom: 5px;
    padding-left: 50px;
    padding-right: 50px;
    box-sizing: border-box;
}

/* Vertikale Liste (Shortcode slide_layout="stack" oder "stack_mobile" im mobilen Stapel) */
.fbm-post-slider-wrapper.fbm-slide-layout--active-stack .fbm-post-slider-container {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    overflow: visible;
    padding-left: 10px;
    padding-right: 10px;
}

.fbm-post-slider-wrapper.fbm-slide-layout--active-stack .fbm-post-slide {
    width: 100% !important;
    max-width: 100%;
    padding-left: 0;
    padding-right: 0;
    opacity: 1 !important;
    transform: none !important;
}

.fbm-post-slider-wrapper.fbm-slide-layout--active-stack .fbm-slider-prev,
.fbm-post-slider-wrapper.fbm-slide-layout--active-stack .fbm-slider-next,
.fbm-post-slider-wrapper.fbm-slide-layout--active-stack .fbm-slider-dots {
    display: none !important;
}

/* Container bleibt sichtbar nach Initialisierung - keine zusätzlichen Styles nötig */

/* Slick Slider Container - nur für FBM Post Slider */
.fbm-post-slider-wrapper .fbm-post-slider-container .slick-list {
    box-sizing: border-box;
    overflow: hidden;
}

.fbm-post-slider-wrapper .fbm-post-slider-container .slick-track {
    display: flex;
    align-items: stretch;
}

.fbm-post-slider-wrapper .fbm-post-slider-container .slick-slide {
    height: auto;
    box-sizing: border-box;
}

.fbm-post-slider-wrapper .fbm-post-slider-container .slick-slide > div {
    height: auto;
    display: flex;
    box-sizing: border-box;
}

/* Deckende Flächen hinter den Navigationspfeilen - nur für FBM Post Slider */
.fbm-post-slider-wrapper .fbm-post-slider-container::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: -100px;
    z-index: 5;
    pointer-events: none;
}

.fbm-post-slider-wrapper .fbm-post-slider-container::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    right: -100px;
    z-index: 5;
    pointer-events: none;
}

/* ========================================
   POST CARD STYLING
   ======================================== */

.fbm-post-slider-wrapper .fbm-post-slide {
    padding: 0 15px;
    outline: none;
    box-sizing: border-box;
}

/* Verstecke Slides vor Initialisierung - verhindert FOUC (nicht bei slide_layout=stack) */
.fbm-post-slider-wrapper:not(.fbm-slide-layout--stack) .fbm-post-slider-container:not(.slick-initialized) .fbm-post-slide {
    display: none !important;
}

.fbm-post-slider-wrapper.fbm-slide-layout--stack .fbm-post-slider-container:not(.slick-initialized) .fbm-post-slide {
    display: block !important;
    width: 100%;
}

/* Zeige Slides nach Initialisierung */
.fbm-post-slider-wrapper .fbm-post-slider-container.slick-initialized .fbm-post-slide {
    display: block;
}

/* Gesamte Karte klickbar: Overlay unterhalb Inhalt; Klicks durch nicht verlinkte Bereiche (pointer-events) */
.fbm-post-slider-wrapper .fbm-post-card--has-overlay {
    position: relative;
}

.fbm-post-slider-wrapper .fbm-post-card--has-overlay .fbm-post-card-image {
    position: relative;
    z-index: 2;
    pointer-events: none;
}

.fbm-post-slider-wrapper .fbm-post-card--has-overlay .fbm-post-card-image a,
.fbm-post-slider-wrapper .fbm-post-card--has-overlay .fbm-post-card-image button.fbm-post-card-image-link {
    pointer-events: auto;
}

.fbm-post-slider-wrapper .fbm-post-card--has-overlay .fbm-post-card-image button.fbm-post-card-image-link {
    display: block;
    width: 100%;
    padding: 0;
    margin: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    font: inherit;
    color: inherit;
    text-align: inherit;
    appearance: none;
}

.fbm-post-slider-wrapper .fbm-post-card--has-overlay .fbm-post-card-content {
    position: relative;
    z-index: 2;
    pointer-events: none;
}

.fbm-post-slider-wrapper .fbm-post-card--has-overlay .fbm-post-card-content a,
.fbm-post-slider-wrapper .fbm-post-card--has-overlay .fbm-post-card-content button {
    pointer-events: auto;
}

.fbm-post-slider-wrapper .fbm-post-card-overlay-link {
    position: absolute;
    inset: 0;
    z-index: 1;
    border-radius: inherit;
    background: transparent;
}

.fbm-post-slider-wrapper button.fbm-post-card-overlay-link {
    display: block;
    width: 100%;
    height: 100%;
    padding: 0;
    margin: 0;
    border: 0;
    cursor: pointer;
    font: inherit;
    color: inherit;
    appearance: none;
}

.fbm-post-slider-wrapper .fbm-post-card {
    background: var(--slider-card-bg);
    border: 1px solid var(--slider-card-border);
    border-radius: 12px;
    overflow: visible;
    transition: all 0.3s ease;
    box-shadow: var(--slider-card-shadow);
    /* WICHTIG: height: auto ermöglicht flexible Höhe, min-height wird von JS gesetzt */
    height: auto;
    min-height: 0; /* WICHTIG: 0 statt auto, damit JS min-height setzen kann */
    display: flex;
    flex-direction: column;
    color: var(--cirkle-text-primary);
    margin-top: 5px;
    margin-bottom: 5px;
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    visibility: visible !important;
    /* WICHTIG: Flexbox-Eigenschaften für gleichmäßige Höhen */
    flex: 0 0 auto; /* Verhindert, dass Cards sich dehnen */
}

.fbm-post-slider-wrapper .fbm-post-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--slider-card-shadow-hover);
    border-color: var(--cirkle-primary);
}

/* ========================================
   POST CARD IMAGE
   ======================================== */

.fbm-post-slider-wrapper .fbm-post-card-image {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    overflow: hidden;
    background: var(--cirkle-bg-tertiary);
    border-radius: 12px 12px 0 0;
}

.fbm-post-slider-wrapper .fbm-post-card-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    border-radius: 12px 12px 0 0;
}

.fbm-post-slider-wrapper .fbm-post-card:hover .fbm-post-card-image img {
    transform: scale(1.05);
}

.fbm-post-slider-wrapper .fbm-post-card-image a {
    display: block;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

/* ========================================
   POST CATEGORY BADGE
   ======================================== */

.fbm-post-slider-wrapper .fbm-post-category {
    position: absolute;
    z-index: 4;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    max-width: calc(100% - 30px);
}

.fbm-post-slider-wrapper .fbm-post-category.fbm-badge-position-top-left {
    top: 15px;
    left: 15px;
}

.fbm-post-slider-wrapper .fbm-post-category.fbm-badge-position-top-right {
    top: 15px;
    right: 15px;
}

.fbm-post-slider-wrapper .fbm-post-category.fbm-badge-position-bottom-left {
    bottom: 15px;
    left: 15px;
}

.fbm-post-slider-wrapper .fbm-post-category.fbm-badge-position-bottom-right {
    bottom: 15px;
    right: 15px;
}

.fbm-post-slider-wrapper .fbm-category-badge {
    display: inline-block;
    padding: 6px 12px;
    background: var(--cirkle-primary);
    color: #ffffff;
    border-radius: 6px;
    font-size: var(--fbm-ui-fs-badge);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

/* Zwei-Badge-Modus: Eltern leicht abgesetzt (optional) */
.fbm-post-slider-wrapper .fbm-category-badge--parent {
    background: rgba(0, 0, 0, 0.45);
    text-transform: none;
    font-weight: 500;
}

.fbm-post-slider-wrapper .fbm-category-badge--inline {
    text-transform: none;
    font-weight: 600;
}

.fbm-post-slider-wrapper .fbm-post-card:hover .fbm-category-badge {
    background: var(--cirkle-secondary);
    transform: scale(1.05);
}

/* ========================================
   STICKY BADGE
   ======================================== */

.fbm-post-slider-wrapper .fbm-post-sticky {
    position: absolute;
    z-index: 5;
}

.fbm-post-slider-wrapper .fbm-post-sticky.fbm-badge-position-top-left {
    top: 15px;
    left: 15px;
}

.fbm-post-slider-wrapper .fbm-post-sticky.fbm-badge-position-top-right {
    top: 15px;
    right: 15px;
}

.fbm-post-slider-wrapper .fbm-post-sticky.fbm-badge-position-bottom-left {
    bottom: 15px;
    left: 15px;
}

.fbm-post-slider-wrapper .fbm-post-sticky.fbm-badge-position-bottom-right {
    bottom: 15px;
    right: 15px;
}

.fbm-post-slider-wrapper .fbm-sticky-badge {
    display: inline-block;
    padding: 6px 12px;
    background: var(--cirkle-warning);
    color: #ffffff;
    border-radius: 6px;
    font-size: var(--fbm-ui-fs-badge);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.fbm-post-slider-wrapper .fbm-post-card:hover .fbm-sticky-badge {
    background: #e0a800;
    transform: scale(1.05);
}

/* Wenn beide Badges vorhanden sind, Abstand anpassen */
.fbm-post-slider-wrapper .fbm-post-category.fbm-badge-position-top-left + .fbm-post-sticky.fbm-badge-position-top-right,
.fbm-post-slider-wrapper .fbm-post-sticky.fbm-badge-position-top-left + .fbm-post-category.fbm-badge-position-top-right {
    margin-top: 0;
}

.fbm-post-slider-wrapper .fbm-post-category.fbm-badge-position-top-right + .fbm-post-sticky.fbm-badge-position-top-left,
.fbm-post-slider-wrapper .fbm-post-sticky.fbm-badge-position-top-right + .fbm-post-category.fbm-badge-position-top-left {
    margin-top: 0;
}

/* ========================================
   POST CARD CONTENT
   ======================================== */

.fbm-post-slider-wrapper .fbm-post-card-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
}

.fbm-post-slider-wrapper .fbm-post-title {
    margin: 0 0 15px 0;
    font-size: var(--fbm-ui-fs-h3);
    font-weight: 700;
    line-height: 1.4;
    color: var(--cirkle-text-primary);
    order: 1;
}

.fbm-post-slider-wrapper .fbm-post-title a {
    color: var(--cirkle-text-primary);
    text-decoration: none;
    transition: color 0.3s ease;
    text-align: inherit;
}

.fbm-post-slider-wrapper .fbm-post-title a:hover {
    color: var(--cirkle-primary);
}

.fbm-post-slider-wrapper .fbm-post-title a:focus {
    outline: 2px solid var(--cirkle-primary);
    outline-offset: 2px;
    border-radius: 2px;
}

.fbm-post-slider-wrapper .fbm-post-title a:focus-visible {
    outline: 3px solid var(--cirkle-primary);
    outline-offset: 3px;
}

.fbm-post-slider-wrapper .fbm-post-title button {
    color: var(--cirkle-text-primary);
    text-decoration: none;
    transition: color 0.3s ease;
    background: none;
    border: 0;
    padding: 0;
    font: inherit;
    font-weight: inherit;
    cursor: pointer;
    text-align: inherit;
    width: 100%;
}

.fbm-post-slider-wrapper .fbm-post-title button:hover {
    color: var(--cirkle-primary);
}

.fbm-post-slider-wrapper .fbm-post-title button:focus {
    outline: 2px solid var(--cirkle-primary);
    outline-offset: 2px;
    border-radius: 2px;
}

.fbm-post-slider-wrapper .fbm-post-title button:focus-visible {
    outline: 3px solid var(--cirkle-primary);
    outline-offset: 3px;
}

/* ========================================
   POST META
   ======================================== */

.fbm-post-slider-wrapper .fbm-post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
    font-size: var(--fbm-ui-fs-subtitle);
    color: var(--cirkle-text-secondary);
    order: 2;
}

.fbm-post-slider-wrapper .fbm-post-date,
.fbm-post-slider-wrapper .fbm-post-author {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.fbm-post-slider-wrapper .fbm-post-date i,
.fbm-post-slider-wrapper .fbm-post-author i {
    font-size: var(--fbm-ui-fs-badge);
    color: var(--cirkle-primary);
}

/* ========================================
   POST EXCERPT
   ======================================== */

.fbm-post-slider-wrapper .fbm-post-excerpt {
    margin-bottom: 15px;
    flex: 1;
    order: 3;
    visibility: visible !important;
    display: block !important;
    opacity: 1 !important;
}

.fbm-post-slider-wrapper .fbm-post-excerpt p {
    margin: 0;
    color: var(--cirkle-text-secondary);
    font-size: var(--fbm-ui-fs-body);
    line-height: 1.55;
}

/* Features (analog FBM Management Tool / Erweiterungen-Shop-Karten) */
.fbm-post-slider-wrapper .fbm-post-features-wrap {
    order: 4;
    margin: 0 0 12px 0;
    flex: 0 0 auto;
}

/* Direkt unter dem Vorschautext / individuellen Text */
.fbm-post-slider-wrapper .fbm-post-excerpt .fbm-post-features-wrap {
    order: 0;
    margin-top: 12px;
    margin-bottom: 0;
}

.fbm-post-slider-wrapper .fbm-post-features-heading {
    margin: 0 0 8px 0;
    font-size: var(--fbm-ui-fs-subtitle);
    font-weight: 600;
    color: var(--cirkle-text-primary);
}

.fbm-post-slider-wrapper ul.fbm-product-features.fbm-post-slider-features {
    list-style: none;
    margin: 0;
    padding: 0;
}

.fbm-post-slider-wrapper .fbm-post-slider-features .fbm-feature {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 0 0 6px 0;
    font-size: calc(var(--fbm-ui-fs-body) * 0.95);
    color: var(--cirkle-text-secondary);
    line-height: 1.45;
}

.fbm-post-slider-wrapper .fbm-post-slider-features .fbm-feature:last-child {
    margin-bottom: 0;
}

.fbm-post-slider-wrapper .fbm-post-slider-features .fbm-feature .fas.fa-check {
    color: var(--cirkle-success);
    margin-top: 0.2em;
    flex-shrink: 0;
}

.fbm-post-slider-wrapper .fbm-post-features-wrap--align-left .fbm-post-slider-features,
.fbm-post-slider-wrapper .fbm-post-features-wrap--align-left .fbm-post-features-heading {
    text-align: left;
}

.fbm-post-slider-wrapper .fbm-post-features-wrap--align-left .fbm-feature {
    justify-content: flex-start;
}

.fbm-post-slider-wrapper .fbm-post-features-wrap--align-center .fbm-post-slider-features,
.fbm-post-slider-wrapper .fbm-post-features-wrap--align-center .fbm-post-features-heading {
    text-align: center;
}

.fbm-post-slider-wrapper .fbm-post-features-wrap--align-center .fbm-feature {
    justify-content: center;
}

.fbm-post-slider-wrapper .fbm-post-features-wrap--align-right .fbm-post-slider-features,
.fbm-post-slider-wrapper .fbm-post-features-wrap--align-right .fbm-post-features-heading {
    text-align: right;
}

.fbm-post-slider-wrapper .fbm-post-features-wrap--align-right .fbm-feature {
    justify-content: flex-end;
}

/* ========================================
   READ MORE BUTTON
   ======================================== */

.fbm-post-slider-wrapper .fbm-post-read-more {
    margin-top: auto;
    padding-top: 15px;
    text-align: left;
}

.fbm-post-slider-wrapper .fbm-post-read-more.fbm-button-position-left-top {
    order: -1;
    margin-top: 0;
    margin-bottom: 15px;
    padding-top: 0;
    padding-bottom: 0;
    text-align: left;
}

.fbm-post-slider-wrapper .fbm-post-read-more.fbm-button-position-left-center {
    order: 4;
    margin-top: 15px;
    margin-bottom: 15px;
    padding-top: 0;
    padding-bottom: 0;
    text-align: left;
}

.fbm-post-slider-wrapper .fbm-post-read-more.fbm-button-position-left-bottom {
    order: 999;
    margin-top: auto;
    margin-bottom: 0;
    padding-top: 15px;
    padding-bottom: 0;
    text-align: left;
}

.fbm-post-slider-wrapper .fbm-post-read-more.fbm-button-position-right-top {
    order: -1;
    margin-top: 0;
    margin-bottom: 15px;
    padding-top: 0;
    padding-bottom: 0;
    text-align: right;
}

.fbm-post-slider-wrapper .fbm-post-read-more.fbm-button-position-right-center {
    order: 4;
    margin-top: 15px;
    margin-bottom: 15px;
    padding-top: 0;
    padding-bottom: 0;
    text-align: right;
}

.fbm-post-slider-wrapper .fbm-post-read-more.fbm-button-position-right-bottom {
    order: 999;
    margin-top: auto;
    margin-bottom: 0;
    padding-top: 15px;
    padding-bottom: 0;
    text-align: right;
}

.fbm-post-slider-wrapper .fbm-post-read-more.fbm-button-position-center-top {
    order: -1;
    margin-top: 0;
    margin-bottom: 15px;
    padding-top: 0;
    padding-bottom: 0;
    text-align: center;
}

.fbm-post-slider-wrapper .fbm-post-read-more.fbm-button-position-center-center {
    order: 4;
    margin-top: 15px;
    margin-bottom: 15px;
    padding-top: 0;
    padding-bottom: 0;
    text-align: center;
}

.fbm-post-slider-wrapper .fbm-post-read-more.fbm-button-position-center-bottom {
    order: 999;
    margin-top: auto;
    margin-bottom: 0;
    padding-top: 15px;
    padding-bottom: 0;
    text-align: center;
}

.fbm-post-slider-wrapper .fbm-read-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--cirkle-primary);
    color: #ffffff;
    text-decoration: none;
    border-radius: 6px;
    font-size: var(--fbm-ui-fs-body);
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.fbm-post-slider-wrapper .fbm-read-more-btn:hover {
    background: var(--cirkle-secondary);
    transform: translateX(5px);
    color: #ffffff;
}

.fbm-post-slider-wrapper .fbm-read-more-btn:focus {
    outline: 2px solid var(--cirkle-primary);
    outline-offset: 2px;
}

.fbm-post-slider-wrapper .fbm-read-more-btn:focus-visible {
    outline: 3px solid var(--cirkle-primary);
    outline-offset: 3px;
}

.fbm-post-slider-wrapper .fbm-read-more-btn i {
    transition: transform 0.3s ease;
}

.fbm-post-slider-wrapper .fbm-read-more-btn:hover i {
    transform: translateX(3px);
}

/* Preis-Fußzeile: Betrag im Weiterlesen-Button, Hinweistext darunter (nicht im Button) */
.fbm-post-slider-wrapper .fbm-slide-card-price-block {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.fbm-post-slider-wrapper .fbm-read-more-btn.fbm-read-more-btn--slide-price {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    justify-content: center;
    text-align: center;
}

.fbm-post-slider-wrapper .fbm-slide-card-price-note {
    margin: 0;
    padding: 0 2px;
    line-height: 1.4;
    color: var(--cirkle-text-secondary, #5a5a5a);
    font-weight: 400;
}

/* ========================================
   SLIDER ARROWS
   ======================================== */

.fbm-post-slider-wrapper .fbm-slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 8;
    width: 45px;
    height: 45px;
    background: var(--slider-arrow-bg);
    color: #ffffff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 124, 186, 0.3);
    outline: none;
}

.fbm-post-slider-wrapper .fbm-slider-arrow:hover {
    background: var(--slider-arrow-hover);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 124, 186, 0.4);
}

.fbm-post-slider-wrapper .fbm-slider-arrow:active {
    transform: translateY(-50%) scale(0.95);
}

.fbm-post-slider-wrapper .fbm-slider-arrow:focus {
    outline: 2px solid var(--cirkle-primary);
    outline-offset: 2px;
}

.fbm-post-slider-wrapper .fbm-slider-arrow:focus-visible {
    outline: 3px solid var(--cirkle-primary);
    outline-offset: 3px;
}

/* Optional (Backend): Pfeile erst bei Hover — gesamter Slider-Bereich (Container/slick-track) + Pfeile */
.fbm-post-slider-wrapper.fbm-arrows-hover-only .fbm-slider-arrow {
    opacity: 0;
    /* pointer-events bleiben aktiv: sonst „fällt“ die Maus durch unsichtbare Pfeile und der Wrapper verliert :hover */
    pointer-events: auto;
}

.fbm-post-slider-wrapper.fbm-arrows-hover-only:hover .fbm-slider-arrow,
.fbm-post-slider-wrapper.fbm-arrows-hover-only:focus-within .fbm-slider-arrow,
.fbm-post-slider-wrapper.fbm-arrows-hover-only .fbm-post-slider-container:hover ~ .fbm-slider-arrow,
.fbm-post-slider-wrapper.fbm-arrows-hover-only .fbm-slider-dots:hover ~ .fbm-slider-arrow,
.fbm-post-slider-wrapper.fbm-arrows-hover-only .fbm-slider-arrow:hover {
    opacity: 1;
}

.fbm-post-slider-wrapper.fbm-arrows-hover-only .fbm-slider-arrow:focus-visible {
    opacity: 1;
}

@media (hover: none) {
    .fbm-post-slider-wrapper.fbm-arrows-hover-only .fbm-slider-arrow {
        opacity: 1;
        pointer-events: auto;
    }
}

.fbm-post-slider-wrapper .fbm-slider-prev {
    left: -20px;
}

.fbm-post-slider-wrapper .fbm-slider-next {
    right: -20px;
}

.fbm-post-slider-wrapper .fbm-slider-arrow i {
    transition: transform 0.3s ease;
}

.fbm-post-slider-wrapper .fbm-slider-prev:hover i {
    transform: translateX(-2px);
}

.fbm-post-slider-wrapper .fbm-slider-next:hover i {
    transform: translateX(2px);
}

/* ========================================
   SLIDER DOTS
   ======================================== */

.fbm-post-slider-wrapper .fbm-slider-dots {
    margin-top: 30px;
    text-align: center;
}

.fbm-post-slider-wrapper .fbm-slider-dots .slick-dots {
    position: static;
    display: inline-block;
    margin: 0;
    padding: 0;
    list-style: none;
}

/* Navigationspunkte ausblenden - Desktop */
@media (min-width: 769px) {
    .fbm-post-slider-wrapper.fbm-hide-dots-desktop .fbm-slider-dots,
    .fbm-post-slider-wrapper.fbm-hide-dots-desktop .fbm-slider-dots .slick-dots,
    .fbm-post-slider-wrapper.fbm-hide-dots-desktop .fbm-post-slider-container .slick-dots {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        height: 0 !important;
        overflow: hidden !important;
    }
}

/* Navigationspunkte ausblenden - Mobile */
@media (max-width: 768px) {
    .fbm-post-slider-wrapper.fbm-hide-dots-mobile .fbm-slider-dots,
    .fbm-post-slider-wrapper.fbm-hide-dots-mobile .fbm-slider-dots .slick-dots,
    .fbm-post-slider-wrapper.fbm-hide-dots-mobile .fbm-post-slider-container .slick-dots {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        height: 0 !important;
        overflow: hidden !important;
    }
}

.fbm-post-slider-wrapper .fbm-slider-dots .slick-dots li {
    display: inline-block;
    margin: 0 5px;
}

.fbm-post-slider-wrapper .fbm-slider-dots .slick-dots li button {
    width: 12px;
    height: 12px;
    padding: 0;
    border: 2px solid var(--slider-dot-color);
    border-radius: 50%;
    background: transparent;
    color: transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
}

.fbm-post-slider-wrapper .fbm-slider-dots .slick-dots li button:hover,
.fbm-post-slider-wrapper .fbm-slider-dots .slick-dots li.slick-active button {
    background: var(--slider-dot-active);
    border-color: var(--slider-dot-active);
    transform: scale(1.2);
}

/* ========================================
   SLICK SLIDER OVERRIDES
   ======================================== */

.fbm-post-slider-wrapper .fbm-post-slider-container .slick-list {
    /* WICHTIG: Negativer Margin kompensiert Slide-Padding für gleichmäßige Abstände */
    margin: 0 -15px;
    overflow: hidden;
}

.fbm-post-slider-wrapper .fbm-post-slider-container .slick-slide {
    padding: 0 15px;
    /* WICHTIG: height: auto ermöglicht flexible Höhe basierend auf min-height */
    height: auto;
    display: flex;
    align-items: stretch;
}

.fbm-post-slider-wrapper .fbm-post-slider-container .slick-track {
    display: flex;
    /* WICHTIG: align-items: stretch sorgt für gleichmäßige Höhen, funktioniert mit min-height */
    align-items: stretch;
}

.fbm-post-slider-wrapper .fbm-post-slider-container .slick-slide > div {
    /* WICHTIG: height: 100% sorgt dafür, dass der Slide-Container die volle Höhe nutzt */
    height: 100%;
    width: 100%;
    display: flex;
    align-items: stretch;
}

/* ========================================
   NO POSTS MESSAGE
   ======================================== */

.fbm-post-slider-wrapper .fbm-post-slider-no-posts {
    text-align: center;
    padding: 40px 20px;
    color: var(--cirkle-text-secondary);
    font-size: var(--fbm-ui-fs-body);
    background: var(--cirkle-bg-secondary);
    border-radius: 12px;
    border: 1px solid var(--cirkle-border-color);
}

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

@media (max-width: 1024px) {
    .fbm-post-slider-wrapper .fbm-slider-prev {
        left: -15px;
    }
    
    .fbm-post-slider-wrapper .fbm-slider-next {
        right: -15px;
    }
    
    .fbm-post-slider-wrapper .fbm-slider-arrow {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
}

@media (max-width: 800px) {
    /* WICHTIG: Ab 800px nur noch 1 Slide, da 2 Slides extrem verzerrt dargestellt werden */
    .fbm-post-slider-wrapper {
        --fbm-ui-fs-body: 16px;
        --fbm-ui-fs-h3: 18px;
        --fbm-ui-fs-subtitle: 0.9rem;
        margin: 20px 0;
        padding: 15px 0;
    }
    
    .fbm-post-slider-wrapper .fbm-post-slider-container {
        /* WICHTIG: Reduziertes Padding für bessere Nutzung des verfügbaren Platzes */
        padding-left: 20px;
        padding-right: 20px;
    }
    
    .fbm-post-slider-wrapper .fbm-post-card-content {
        padding: 15px;
    }
    
    .fbm-post-slider-wrapper .fbm-slider-prev {
        left: 10px;
    }
    
    .fbm-post-slider-wrapper .fbm-slider-next {
        right: 10px;
    }
    
    .fbm-post-slider-wrapper .fbm-slider-arrow {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
    
    .fbm-post-slider-wrapper .fbm-post-meta {
        gap: 10px;
    }
    
    /* Pfeile auf mobilen Geräten ausblenden */
    .fbm-post-slider-wrapper.fbm-hide-arrows-mobile .fbm-slider-arrow {
        display: none !important;
    }
}

@media (max-width: 480px) {
    .fbm-post-slider-wrapper {
        --fbm-ui-fs-body: 15px;
        --fbm-ui-fs-h3: 16px;
        --fbm-ui-fs-subtitle: 0.875rem;
        margin: 15px 0;
        padding: 10px 0;
    }
    
    .fbm-post-slider-wrapper .fbm-post-slider-container {
        /* WICHTIG: Minimales Padding für sehr kleine Bildschirme */
        padding-left: 10px;
        padding-right: 10px;
    }
    
    .fbm-post-slider-wrapper .fbm-post-slide {
        padding: 0 5px;
    }
    
    .fbm-post-slider-wrapper .fbm-post-slider-container .slick-list {
        /* WICHTIG: Negativer Margin kompensiert Slide-Padding */
        margin: 0 -5px;
    }
    
    .fbm-post-slider-wrapper .fbm-post-slider-container .slick-slide {
        padding: 0 5px;
    }
    
    .fbm-post-slider-wrapper .fbm-post-card-content {
        padding: 12px;
    }
    
    .fbm-post-slider-wrapper .fbm-post-title {
        margin-bottom: 10px;
    }
    
    .fbm-post-slider-wrapper .fbm-post-meta {
        flex-direction: column;
        gap: 8px;
        margin-bottom: 10px;
    }
    
    .fbm-post-slider-wrapper .fbm-post-excerpt {
        margin-bottom: 10px;
    }
    
    .fbm-post-slider-wrapper .fbm-read-more-btn {
        padding: 8px 16px;
    }
    
    .fbm-post-slider-wrapper .fbm-slider-prev {
        left: 5px;
    }
    
    .fbm-post-slider-wrapper .fbm-slider-next {
        right: 5px;
    }
    
    .fbm-post-slider-wrapper .fbm-slider-arrow {
        width: 30px;
        height: 30px;
        font-size: 12px;
    }
    
    .fbm-post-slider-wrapper .fbm-slider-dots {
        margin-top: 20px;
    }
}

/* ========================================
   ACCESSIBILITY
   ======================================== */

/* Screen Reader Text - globale Klasse, bleibt ohne Wrapper */
.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    position: absolute !important;
    height: 1px;
    width: 1px;
    overflow: hidden;
    word-wrap: normal !important;
}

.screen-reader-text:focus {
    background-color: var(--cirkle-bg-primary);
    border-radius: 3px;
    box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
    clip: auto !important;
    color: var(--cirkle-text-primary);
    display: block;
    font-size: 14px;
    font-weight: bold;
    height: auto;
    left: 5px;
    line-height: normal;
    padding: 15px 23px 14px;
    text-decoration: none;
    top: 5px;
    width: auto;
    z-index: 100000;
}

/* Post-Karten sollten fokussierbar sein */
.fbm-post-slider-wrapper .fbm-post-card[tabindex="0"]:focus {
    outline: 2px solid var(--cirkle-primary);
    outline-offset: 2px;
    border-radius: 12px;
}

.fbm-post-slider-wrapper .fbm-post-card[tabindex="0"]:focus-visible {
    outline: 3px solid var(--cirkle-primary);
    outline-offset: 3px;
}

/* ========================================
   LOADING STATE
   ======================================== */

.fbm-post-slider-wrapper.loading {
    min-height: 300px;
    position: relative;
}

.fbm-post-slider-wrapper.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 4px solid var(--cirkle-border-color);
    border-top-color: var(--cirkle-primary);
    border-radius: 50%;
    animation: fbm-spin 1s linear infinite;
    z-index: 100;
    opacity: 0.8;
}

@keyframes fbm-spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* ========================================
   TRANSITIONS
   ======================================== */

/* Transitions nur für spezifische FBM Post Slider Elemente - nicht für alle Kindelemente */
.fbm-post-slider-wrapper .fbm-post-card {
    transition: all 0.3s ease;
}

.fbm-post-slider-wrapper .fbm-slider-arrow {
    transition: all 0.3s ease;
}

.fbm-post-slider-wrapper .fbm-read-more-btn {
    transition: all 0.3s ease;
}

.fbm-post-slider-wrapper .fbm-post-card-image img {
    transition: transform 0.5s ease;
}

.fbm-post-slider-wrapper .fbm-category-badge,
.fbm-post-slider-wrapper .fbm-sticky-badge {
    transition: all 0.3s ease;
}

.fbm-post-slider-wrapper .fbm-post-title a {
    transition: color 0.3s ease;
}

.fbm-post-slider-wrapper .fbm-read-more-btn i,
.fbm-post-slider-wrapper .fbm-slider-arrow i {
    transition: transform 0.3s ease;
}

/* ========================================
   RESIZE OPTIMIERUNG
   ======================================== */

/* WICHTIG: Deaktiviere Transitions während Resize, um Verzerrungen zu vermeiden */
.fbm-post-slider-wrapper.resizing .fbm-post-slider-container,
.fbm-post-slider-wrapper.resizing .fbm-post-slider-container * {
    transition: none !important;
}

/* Verhindere Layout-Verschiebungen während Resize */
.fbm-post-slider-wrapper.resizing .fbm-post-slider-container .slick-track {
    transform: none !important;
}

/* Stelle sicher, dass der Container während Resize nicht verzerrt wird */
.fbm-post-slider-wrapper.resizing .fbm-post-slider-container .slick-list {
    overflow: hidden !important;
}

/* ========================================
   EINGEBAUTES MODAL (Markup startet im Slider; beim Öffnen ggf. an body angehängt)
   ======================================== */

.fbm-ps-modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.fbm-ps-modal:not([hidden]) {
    display: flex;
}

.fbm-ps-modal[aria-hidden="false"] {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.fbm-ps-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    cursor: pointer;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

@media (prefers-reduced-transparency: reduce) {
    .fbm-ps-modal__backdrop {
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
        background: rgba(0, 0, 0, 0.6);
    }
}

.fbm-ps-modal__dialog {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 720px;
    max-height: min(88vh, 900px);
    background: #fff;
    color: #1a1a1a;
    border-radius: 12px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.fbm-ps-modal__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 18px;
    border-bottom: 1px solid #e5e5e5;
    flex-shrink: 0;
}

.fbm-ps-modal__header--no-title {
    justify-content: flex-end;
}

.fbm-ps-modal__title {
    margin: 0;
    font-size: 1.25rem;
    line-height: 1.3;
}

.fbm-ps-modal__close {
    flex: 0 0 auto;
    border: 0;
    background: transparent;
    font-size: 1.75rem;
    line-height: 1;
    cursor: pointer;
    padding: 0 4px;
    color: #555;
}

.fbm-ps-modal__close:hover,
.fbm-ps-modal__close:focus,
.fbm-ps-modal__close:focus-visible {
    /* Wie fbm-ui-core: Theme-Button-Hover (farbige Fläche) verhindern — nur Icon-Farbe */
    background: none !important;
    background-color: transparent !important;
    box-shadow: none;
    color: #000;
    outline: none;
}

.fbm-ps-modal__close:focus-visible {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

.fbm-ps-modal__body {
    padding: 18px;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    flex: 1 1 auto;
    min-height: 0;
}

.fbm-ps-modal__body--text-center {
    text-align: center;
}

.fbm-ps-modal__body--text-left {
    text-align: left;
}

.fbm-ps-modal__body--text-right {
    text-align: right;
}

.fbm-ps-modal__footer {
    flex-shrink: 0;
    padding: 0 18px 18px;
}

.fbm-ps-modal__cta-grid {
    display: grid;
    /* Spalten nicht unter den Inhalt schrumpfen lassen (sonst wird einzeiliger Text abgeschnitten). */
    grid-template-columns: repeat(3, minmax(min-content, 1fr));
    grid-auto-rows: minmax(auto, auto);
    gap: 10px;
    align-items: stretch;
    margin-top: 4px;
    padding-top: 12px;
    border-top: 1px solid #e5e5e5;
}

.fbm-ps-modal__cta-cell {
    min-width: min-content;
    display: flex;
    align-items: stretch;
    justify-content: stretch;
}

.fbm-ps-modal__cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 100%;
    border-radius: 6px;
    text-decoration: none !important;
    font-weight: 500;
    box-sizing: border-box;
    line-height: 1.2;
    color: #ffffff;
    background-color: #34b7f1;
    transition: opacity 0.2s ease, filter 0.2s ease;
    white-space: nowrap;
    overflow: visible;
}

.fbm-ps-modal__cta-btn > i {
    flex-shrink: 0;
}

.fbm-ps-modal__cta-btn .fbm-ps-modal__cta-btn-text {
    flex: 0 1 auto;
    min-width: auto;
    overflow: visible;
    white-space: nowrap;
}

/* Größen S … XXL: Abmessungen in em → skalieren mit der Schriftgröße (auch bei Inline font-size aus dem Backend). */
.fbm-ps-modal__cta-btn--size-s {
    gap: 0.47em;
    min-height: 2.65em;
    padding: 0.47em 0.78em;
    font-size: 0.8rem;
}
.fbm-ps-modal__cta-btn--size-s i {
    font-size: 0.9em;
}

.fbm-ps-modal__cta-btn--size-m {
    gap: 0.53em;
    min-height: 2.9em;
    padding: 0.66em 0.79em;
    font-size: 0.95rem;
}

.fbm-ps-modal__cta-btn--size-l {
    gap: 0.54em;
    min-height: 3em;
    padding: 0.72em 0.95em;
    font-size: 1.05rem;
}
.fbm-ps-modal__cta-btn--size-l i {
    font-size: 1.05em;
}

.fbm-ps-modal__cta-btn--size-xl {
    gap: 0.55em;
    min-height: 3.05em;
    padding: 0.76em 1.09em;
    font-size: 1.15rem;
}
.fbm-ps-modal__cta-btn--size-xl i {
    font-size: 1.1em;
}

.fbm-ps-modal__cta-btn--size-xxl {
    gap: 0.6em;
    min-height: 3.1em;
    padding: 0.8em 1.2em;
    font-size: 1.25rem;
}
.fbm-ps-modal__cta-btn--size-xxl i {
    font-size: 1.15em;
}

.fbm-ps-modal__cta-btn:hover {
    filter: brightness(1.06);
}

/* Modal-CTAs: schmalen Viewports volle Breite (Grid im Editor bleibt 3×3; Positionen kommen per Inline-Style). */
@media (max-width: 768px) {
    .fbm-ps-modal__cta-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .fbm-ps-modal__cta-cell {
        grid-column: 1 / -1 !important;
        grid-row: auto !important;
        min-width: 0;
        max-width: 100%;
    }

    .fbm-ps-modal__cta-btn {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    /*
     * Schriftgröße: auf schmalen Displays eine Stufe kleiner als Desktop.
     * !important setzt auch optionale Inline-font-size aus dem Backend außer Kraft (sonst z. B. 32px auf 360px breit).
     */
    .fbm-ps-modal__cta-btn--size-s {
        font-size: clamp(0.68rem, 1.1vw + 0.62rem, 0.78rem) !important;
    }
    .fbm-ps-modal__cta-btn--size-m {
        font-size: clamp(0.74rem, 1.3vw + 0.66rem, 0.86rem) !important;
    }
    .fbm-ps-modal__cta-btn--size-l {
        font-size: clamp(0.78rem, 1.4vw + 0.68rem, 0.92rem) !important;
    }
    .fbm-ps-modal__cta-btn--size-xl {
        font-size: clamp(0.82rem, 1.5vw + 0.7rem, 0.98rem) !important;
    }
    .fbm-ps-modal__cta-btn--size-xxl {
        font-size: clamp(0.85rem, 1.6vw + 0.72rem, 1.02rem) !important;
    }
}

body.fbm-ps-modal-open {
    overflow: hidden;
}

/* ========================================
   PRINT STYLES
   ======================================== */

@media print {
    .fbm-ps-modal {
        display: none !important;
    }

    .fbm-post-slider-wrapper .fbm-slider-arrow,
    .fbm-post-slider-wrapper .fbm-slider-dots {
        display: none !important;
    }
    
    .fbm-post-slider-wrapper .fbm-post-card {
        break-inside: avoid;
        margin-bottom: 20px;
    }
    
    .fbm-post-slider-wrapper .fbm-post-card:hover {
        transform: none;
        box-shadow: var(--slider-card-shadow);
    }
}
