/* ============================================================
   JD Testimonials Widget — Frontend Styles v1.1.0
   ============================================================ */


/* ── Wrapper (slider mode) ───────────────────────────────── */

.jd-tst-wrapper {
    position: relative;
    width: 100%;
    --jd-tst-center-scale: 1.08;
}

.jd-tst-swiper {
    overflow: hidden;
    width: 100%;
}


/* ── Grid mode ───────────────────────────────────────────── */

.jd-tst-grid {
    display: grid;
    width: 100%;
}


/* ── Slide ───────────────────────────────────────────────── */

.jd-tst-slide {
    height: auto;
    display: flex;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                opacity 0.4s ease;
}


/* ── Center mode scaling ─────────────────────────────────── */

.jd-tst-centered .swiper-slide {
    opacity: 0.65;
    transform: scale(0.92);
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                opacity 0.5s ease;
}

.jd-tst-centered .swiper-slide.jd-tst-slide--center,
.jd-tst-centered .swiper-slide-active {
    opacity: 1;
    transform: scale(var(--jd-tst-center-scale, 1.08));
    z-index: 2;
}


/* ── Card ────────────────────────────────────────────────── */

.jd-tst-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
    height: 100%;
    width: 100%;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.jd-tst-card:hover {
    transform: translateY(-3px);
}


/* ── Glass mode ──────────────────────────────────────────── */

.jd-tst-card--glass {
    border: 1px solid rgba(255,255,255,0.1);
}


/* ── Plain mode ──────────────────────────────────────────── */

.jd-tst-card--plain {
    border: 1px solid rgba(255,255,255,0.06);
}


/* ── Quote icon ──────────────────────────────────────────── */

.jd-tst-quote-icon {
    position: absolute;
    top: 16px;
    right: 16px;
    pointer-events: none;
    opacity: 0.6;
    line-height: 1;
}

.jd-tst-quote-icon svg {
    display: block;
}


/* ── Header (avatar + meta) ──────────────────────────────── */

.jd-tst-header {
    display: flex;
    align-items: center;
    gap: 12px;
}


/* ── Avatar ──────────────────────────────────────────────── */

.jd-tst-avatar {
    flex-shrink: 0;
    object-fit: cover;
    display: block;
}


/* ── Meta (name, designation, subtitle) ──────────────────── */

.jd-tst-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

/* Reset heading margins when used as name/designation/subtitle tags */
.jd-tst-name,
.jd-tst-designation,
.jd-tst-subtitle {
    margin: 0;
    padding: 0;
}

.jd-tst-name {
    font-weight: 600;
    line-height: 1.3;
}

.jd-tst-designation {
    font-size: 0.85em;
    line-height: 1.3;
    display: block;
}

.jd-tst-subtitle {
    font-size: 0.8em;
    line-height: 1.3;
    display: block;
}


/* ── Stars ───────────────────────────────────────────────── */

.jd-tst-stars {
    letter-spacing: 2px;
    line-height: 1;
}


/* ── Content ─────────────────────────────────────────────── */

.jd-tst-content {
    line-height: 1.6;
    flex: 1;
    margin: 0;
    padding: 0;
}

/* ── Sleek overlay scrollbar — hidden until hover ─────────── */

.jd-tst-content {
    scrollbar-width: none;        /* Firefox: hide by default */
    -ms-overflow-style: none;     /* IE/Edge: hide by default */
}

.jd-tst-content::-webkit-scrollbar {
    width: 0;                     /* Webkit: hide by default   */
}

/* On card hover → reveal a razor-thin overlay scrollbar */
.jd-tst-card:hover .jd-tst-content {
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.18) transparent;
}

.jd-tst-card:hover .jd-tst-content::-webkit-scrollbar {
    width: 3px;
}

.jd-tst-card:hover .jd-tst-content::-webkit-scrollbar-track {
    background: transparent;
}

.jd-tst-card:hover .jd-tst-content::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.18);
    border-radius: 99px;
    transition: background 0.3s ease;
}

.jd-tst-card:hover .jd-tst-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.35);
}


/* ════════════════════════════════════════════════════════════
   NAVIGATION — Arrows
   ════════════════════════════════════════════════════════════ */

.jd-tst-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
    padding: 0;
    line-height: 0;
}

.jd-tst-arrow svg {
    display: block;
    stroke: currentColor;
}

.jd-tst-arrow--prev {
    left: -16px;
}

.jd-tst-arrow--next {
    right: -16px;
}

@media (max-width: 767px) {
    .jd-tst-arrow--prev { left: 4px; }
    .jd-tst-arrow--next { right: 4px; }
}


/* ════════════════════════════════════════════════════════════
   NAVIGATION — Dots
   ════════════════════════════════════════════════════════════ */

.jd-tst-pagination {
    text-align: center;
    position: relative !important;
    bottom: auto !important;
}

.jd-tst-pagination .swiper-pagination-bullet {
    opacity: 1;
    transition: background 0.25s ease, transform 0.25s ease;
}

.jd-tst-pagination .swiper-pagination-bullet-active {
    transform: scale(1.3);
}


/* ════════════════════════════════════════════════════════════
   SWIPER SLIDE HEIGHT FIX
   Forces equal-height slides so cards stretch uniformly.
   ════════════════════════════════════════════════════════════ */

.jd-tst-swiper .swiper-wrapper {
    align-items: stretch;
}

.jd-tst-swiper .swiper-slide {
    height: auto;
}


/* ════════════════════════════════════════════════════════════
   CENTER MODE — Extra padding so scaled slide doesn't clip
   ════════════════════════════════════════════════════════════ */

.jd-tst-centered .jd-tst-swiper {
    padding: 20px 0;
}
