/* =========================================
   Testimonials Slider Widget — Styles v1.1
   ========================================= */

.tsw-testimonials-widget {
    position: relative;
    width: 100%;
}

/* ---- Track wrapper: clips overflow ---- */
.tsw-track-wrapper {
    overflow: hidden;
    width: 100%;
}

/* ---- Track: flex row, JS drives transform ---- */
.tsw-track {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: stretch;
    will-change: transform;
    /* transition is set by JS */
}

/* ---- Slide: width + margin set entirely by JS, no padding here ---- */
.tsw-slide {
    flex-shrink: 0;
    flex-grow: 0;
    box-sizing: border-box;
    padding: 0;
}

/* ---- Card ---- */
.tsw-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 28px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.07);
    border: 1px solid #f0f0f0;
    display: flex;
    flex-direction: column;
    height: 100%;
    box-sizing: border-box;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.tsw-card:hover {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.11);
    transform: translateY(-2px);
}

/* ---- Stars ---- */
.tsw-stars {
    display: flex;
    flex-direction: row;
    gap: 2px;
    margin-bottom: 14px;
}

.tsw-star {
    font-size: 18px;
    line-height: 1;
}

.tsw-star.filled {
    color: #f59e0b;
}

.tsw-star.empty {
    color: #d1d5db;
}

/* ---- Review Text ---- */
.tsw-review-text {
    font-size: 14.5px;
    line-height: 1.65;
    color: #374151;
    margin: 0 0 24px 0;
    flex: 1;
}

/* ---- Author ---- */
.tsw-author {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: auto;
}

.tsw-avatar {
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #1a56db;
    flex-shrink: 0;
}

.tsw-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.tsw-avatar-initial {
    color: #ffffff;
    font-size: 18px;
    font-weight: 600;
    line-height: 1;
    text-transform: uppercase;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.tsw-author-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.tsw-author-name {
    font-size: 14px;
    font-weight: 600;
    color: #111827;
    line-height: 1.3;
}

.tsw-author-location {
    font-size: 13px;
    color: #9ca3af;
    line-height: 1.3;
}

/* =========================================
   Navigation Arrows
   — Bottom-left desktop, centered mobile
   ========================================= */

.tsw-arrows-wrap {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    justify-content: flex-start;
    margin-top: 24px;
}

.tsw-arrow-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    cursor: pointer;
    color: #374151;
    transition: background-color 0.18s ease, border-color 0.18s ease,
                box-shadow 0.18s ease, transform 0.15s ease;
    outline: none;
    flex-shrink: 0;
    box-shadow: 0 1px 6px rgba(0,0,0,0.06);
    padding: 0;
    -webkit-appearance: none;
    appearance: none;
}

.tsw-arrow-btn:hover {
    background-color: #f3f4f6;
    border-color: #d1d5db;
    box-shadow: 0 2px 10px rgba(0,0,0,0.10);
    transform: scale(1.06);
}

.tsw-arrow-btn:active {
    transform: scale(0.97);
}

.tsw-arrow-btn:focus-visible {
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.35);
}

.tsw-arrow-btn.tsw-disabled {
    opacity: 0.38;
    pointer-events: none;
}

.tsw-arrow-btn svg {
    width: 16px;
    height: 16px;
    display: block;
    stroke: currentColor;
    fill: none;
    pointer-events: none;
}

/* =========================================
   Responsive
   ========================================= */

@media (max-width: 767px) {
    /* Center arrows on mobile */
    .tsw-arrows-wrap {
        justify-content: center;
    }

    .tsw-card {
        padding: 20px 18px;
    }

    .tsw-review-text {
        font-size: 14px;
    }
}

@media (max-width: 1024px) and (min-width: 768px) {
    .tsw-card {
        padding: 24px;
    }
}
