/* =============================================================================
   HeilseinInBalance – Kommentar Slider | comment-slider.css
   Design-Palette: Lavender #ae98c5 | Teal #82c0c7 | Body #666 | White #fff
   ============================================================================= */

/* ── 1. CSS-Variablen & Basis ─────────────────────────────────────────────── */

.hsib-comment-slider-wrapper {
    --hsib-primary:       #ae98c5;    /* Lavender – Hauptakzent              */
    --hsib-secondary:     #82c0c7;    /* Teal – Sekundärakzent               */
    --hsib-primary-dark:  #9b83b5;    /* etwas dunkler für Hover             */
    --hsib-secondary-dk:  #6aacb3;    /* Teal dunkler                        */
    --hsib-text:          #666666;    /* Fließtext                           */
    --hsib-heading:       #444444;    /* Überschriften                       */
    --hsib-white:         #ffffff;
    --hsib-bg-light:      #f9f7fd;    /* Sehr helles Lavender                */
    --hsib-border:        rgba(174, 152, 197, 0.18);
    --hsib-shadow-sm:     0 4px 20px rgba(174, 152, 197, 0.14);
    --hsib-shadow-md:     0 8px 36px rgba(174, 152, 197, 0.24);
    --hsib-radius:        18px;
    --hsib-card-gap:      14px;
    --hsib-transition:    0.3s ease;
    --slides-per-view:    3;           /* wird per JS überschrieben          */

    font-family: 'Open Sans', 'Selawik Regular', Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    position: relative;
    padding: 72px 24px 60px;
    background: #faf8fe;
    overflow: hidden;
    box-sizing: border-box;
}

.hsib-comment-slider-wrapper *,
.hsib-comment-slider-wrapper *::before,
.hsib-comment-slider-wrapper *::after {
    box-sizing: border-box;
}

/* ── 2. Dekorative Hintergrund-Kreise – ausgeblendet ─────────────────────── */

.hsib-bg-circle {
    display: none; /* kein Verlauf, einheitlicher Hintergrund */
}

/* ── 3. Header (Titel & Untertitel) ───────────────────────────────────────── */

.hsib-slider-header {
    text-align: center;
    margin-bottom: 52px;
    position: relative;
    z-index: 1;
}

.hsib-slider-title {
    font-family: 'Waterfall', 'Dancing Script', 'Great Vibes', cursive;
    font-size: clamp(34px, 5vw, 52px);
    font-weight: 400;
    color: var(--hsib-primary);
    line-height: 1.2;
    margin: 0 0 14px;
    padding: 0;
    letter-spacing: 0.5px;
}

.hsib-slider-subtitle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 3.5px;
    color: var(--hsib-secondary);
    margin: 0;
    padding: 0;
}

.hsib-subtitle-line {
    flex: 0 0 40px;
    height: 1px;
    background: var(--hsib-secondary);
    opacity: 0.45;
    display: block;
}

/* ── 4. Slider-Outer (enthält Pfeile + Container) ─────────────────────────── */

.hsib-slider-outer {
    display: flex;
    align-items: center;
    gap: 16px;
    max-width: 1220px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* ── 5. Slider-Container (Overflow-Maske) ─────────────────────────────────── */

.hsib-slider-container {
    flex: 1;
    min-width: 0;
    overflow: hidden;          /* Fallback für ältere Browser */
    overflow: clip;            /* Erlaubt overflow-clip-margin */
    overflow-clip-margin: 16px; /* Schatten-Spielraum links/rechts */
    cursor: grab;
    -webkit-tap-highlight-color: transparent;
}

.hsib-slider-container:active {
    cursor: grabbing;
}

/* ── 6. Slider-Track (die verschobene Zeile aus Karten) ──────────────────── */

.hsib-slider-track {
    display: flex;
    /* Transition wird ausschließlich per JS (inline style) gesetzt –
       das verhindert, dass Divi/WordPress-CSS sie überschreibt */
    user-select: none;
    -webkit-user-select: none;
}

/* ── 7. Einzel-Karte (Breite = 100% / slidesPerView) ─────────────────────── */

.hsib-comment-card {
    min-width: calc(100% / var(--slides-per-view));
    max-width: calc(100% / var(--slides-per-view));
    padding: 0 var(--hsib-card-gap);
    flex-shrink: 0;
}

/* Karten-Innenleben */
.hsib-card-inner {
    background: var(--hsib-white);
    border-radius: var(--hsib-radius);
    padding: 36px 28px 28px;
    box-shadow: var(--hsib-shadow-sm);
    border-top: 3px solid var(--hsib-primary);
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    transition:
        transform var(--hsib-transition),
        box-shadow var(--hsib-transition);
    overflow: hidden;
}

/* Dezente Accent-Ecke */
.hsib-card-inner::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 60px;
    height: 60px;
    background: radial-gradient(circle at bottom right, rgba(174, 152, 197, 0.08), transparent 70%);
    border-bottom-right-radius: var(--hsib-radius);
    pointer-events: none;
}

.hsib-card-inner:hover {
    /* kein translateY – würde am overflow:hidden-Rand abgeschnitten */
    box-shadow: var(--hsib-shadow-md);
    border-top-color: var(--hsib-primary-dark);
}

/* ── 8. Anführungszeichen-Icon ────────────────────────────────────────────── */

.hsib-quote-icon {
    color: var(--hsib-primary);
    opacity: 0.22;
    margin-bottom: 10px;
    line-height: 1;
    display: block;
}

/* ── 9. Sterne ────────────────────────────────────────────────────────────── */

.hsib-star-rating {
    display: flex;
    gap: 2px;
    margin-bottom: 16px;
}

.hsib-star {
    color: #f0b429;
    font-size: 17px;
    line-height: 1;
    display: inline-block;
    text-shadow: 0 1px 3px rgba(240, 180, 41, 0.3);
}

/* ── 10. Kommentar-Text ───────────────────────────────────────────────────── */

.hsib-comment-content {
    flex: 1;
    margin-bottom: 22px;
}

.hsib-comment-text {
    font-size: 14.5px;
    line-height: 1.82;
    color: var(--hsib-text);
    font-style: italic;
    margin: 0;
    padding: 0;
    /* Elegante Kursiv-Anführungszeichen */
    quotes: "\201E" "\201C";
}

.hsib-comment-text::before {
    content: open-quote;
    font-size: 1.2em;
    line-height: 0;
    vertical-align: -0.25em;
    opacity: 0.4;
    color: var(--hsib-primary);
    margin-right: 2px;
}

.hsib-comment-text::after {
    content: close-quote;
    font-size: 1.2em;
    line-height: 0;
    vertical-align: -0.25em;
    opacity: 0.4;
    color: var(--hsib-primary);
    margin-left: 2px;
}

/* ── 11. Autor-Footer ─────────────────────────────────────────────────────── */

.hsib-comment-footer {
    display: flex;
    align-items: center;
    gap: 14px;
    padding-top: 18px;
    border-top: 1px solid var(--hsib-border);
    margin-top: auto;
}

.hsib-author-avatar {
    flex-shrink: 0;
}

.hsib-author-avatar img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--hsib-primary);
    display: block;
    box-shadow: 0 2px 8px rgba(174, 152, 197, 0.3);
}

.hsib-author-details {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.hsib-author-name {
    font-weight: 700;
    font-size: 14px;
    color: var(--hsib-heading);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

.hsib-comment-date {
    display: none;
}

.hsib-post-link {
    font-size: 11.5px;
    color: var(--hsib-secondary);
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    transition: color var(--hsib-transition);
}

.hsib-post-link:hover {
    color: var(--hsib-primary);
}

/* ── 12. Pfeil-Buttons ────────────────────────────────────────────────────── */

.hsib-arrow {
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    min-width: 52px;
    border-radius: 50%;
    border: 2px solid var(--hsib-primary);
    background: var(--hsib-white);
    color: var(--hsib-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition:
        background var(--hsib-transition),
        color var(--hsib-transition),
        transform var(--hsib-transition),
        box-shadow var(--hsib-transition);
    box-shadow: 0 2px 12px rgba(174, 152, 197, 0.18);
    z-index: 10;
    outline: none;
    padding: 0;
    line-height: 1;
}

.hsib-arrow:hover {
    background: var(--hsib-primary);
    color: var(--hsib-white);
    transform: scale(1.1);
    box-shadow: 0 6px 22px rgba(174, 152, 197, 0.38);
}

.hsib-arrow:active {
    transform: scale(0.96);
}

.hsib-arrow:focus-visible {
    outline: 2px solid var(--hsib-primary);
    outline-offset: 3px;
}

.hsib-arrow svg {
    width: 22px;
    height: 22px;
    display: block;
    flex-shrink: 0;
}

/* ── 13. Nav-Footer (Dots + Counter) ─────────────────────────────────────── */

.hsib-nav-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    margin-top: 42px;
    position: relative;
    z-index: 1;
}

/* ── 14. Dots ─────────────────────────────────────────────────────────────── */

.hsib-dots {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    max-width: 100%;
}

.hsib-dot {
    width: 9px;
    height: 9px;
    min-width: 9px;
    border-radius: 9px;
    border: none;
    padding: 0;
    cursor: pointer;
    background: rgba(174, 152, 197, 0.28);
    transition:
        width     0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
        background 0.3s ease,
        transform  0.3s ease,
        box-shadow 0.3s ease;
    outline: none;
    flex-shrink: 0;
}

.hsib-dot:hover {
    background: rgba(174, 152, 197, 0.55);
    transform: scale(1.25);
}

.hsib-dot.hsib-dot--active {
    width: 28px;
    background: var(--hsib-primary);
    box-shadow: 0 2px 10px rgba(174, 152, 197, 0.45);
    transform: scale(1);
}

.hsib-dot:focus-visible {
    outline: 2px solid var(--hsib-primary);
    outline-offset: 2px;
}

/* Viele Dots → kleiner darstellen */
.hsib-dots--many .hsib-dot {
    width: 7px;
    height: 7px;
    min-width: 7px;
}

.hsib-dots--many .hsib-dot.hsib-dot--active {
    width: 22px;
}

/* ── 15. Zähler ───────────────────────────────────────────────────────────── */

.hsib-counter {
    font-size: 12px;
    font-weight: 600;
    color: rgba(102, 102, 102, 0.5);
    letter-spacing: 1.5px;
    line-height: 1;
}

.hsib-counter-current {
    color: var(--hsib-primary);
    font-weight: 800;
    font-size: 14px;
}

/* ── 16. Leer-Zustand ─────────────────────────────────────────────────────── */

.hsib-no-comments {
    text-align: center;
    padding: 60px 24px;
    color: var(--hsib-text);
    font-style: italic;
    font-size: 15px;
}

/* ── 17. Responsive ───────────────────────────────────────────────────────── */

@media (max-width: 1100px) {
    .hsib-comment-slider-wrapper {
        padding: 60px 16px 50px;
    }
    .hsib-arrow {
        width: 46px;
        height: 46px;
        min-width: 46px;
    }
    .hsib-arrow svg {
        width: 20px;
        height: 20px;
    }
}

@media (max-width: 991px) {
    /* Tablet: 2 Karten (JS setzt --slides-per-view = 2) */
    .hsib-comment-slider-wrapper {
        padding: 54px 14px 44px;
    }
    .hsib-slider-title {
        font-size: clamp(30px, 6vw, 42px);
    }
    .hsib-slider-outer {
        gap: 12px;
    }
    .hsib-card-inner {
        padding: 28px 22px 22px;
    }
}

@media (max-width: 575px) {
    /* Mobil: 1 Karte (JS setzt --slides-per-view = 1) */
    .hsib-comment-slider-wrapper {
        padding: 44px 10px 36px;
    }
    .hsib-slider-outer {
        gap: 4px;
    }
    .hsib-arrow {
        width: 34px;
        height: 34px;
        min-width: 34px;
    }
    .hsib-arrow svg {
        width: 15px;
        height: 15px;
    }
    .hsib-card-inner {
        padding: 24px 18px 20px;
    }
    .hsib-comment-text {
        font-size: 14px;
        line-height: 1.75;
    }
    .hsib-author-avatar img {
        width: 44px;
        height: 44px;
    }
    .hsib-slider-header {
        margin-bottom: 36px;
    }
    .hsib-nav-footer {
        margin-top: 30px;
    }
}

/* ── 18. Fokus & Barrierefreiheit ─────────────────────────────────────────── */

.hsib-comment-slider-wrapper:focus {
    outline: none;
}

.hsib-comment-slider-wrapper:focus-visible {
    outline: 2px dashed var(--hsib-primary);
    outline-offset: 4px;
}

/* ── 19. Reduced Motion ───────────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
    .hsib-slider-track {
        transition: none !important;
    }
    .hsib-arrow,
    .hsib-dot,
    .hsib-card-inner {
        transition: none !important;
    }
}
