/* =============================================
   STELLAR REVIEWS v1.3 – Frontend Styles
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,600;1,400&family=DM+Sans:wght@400;500;600&display=swap');

/* ── Default CSS variables (all overridden inline per-instance) ── */
.stellar-carousel-wrap {
    --sr-bg:           #0f0f1a;
    --sr-card:         #16213e;
    --sr-card-border:  #332a1a;
    --sr-review-text:  #e8e4da;
    --sr-quote:        #c9a96e;
    --sr-star-filled:  #c9a96e;
    --sr-star-empty:   #3a3020;
    --sr-name:         #e8e4da;
    --sr-role:         #c9a96e;
    --sr-avatar-bg:    #c9a96e;
    --sr-avatar-txt:   #0f0f1a;
    --sr-divider:      #1e2e40;
    --sr-readmore:     #c9a96e;
    --sr-nav:          #c9a96e;
    --sr-dot:          #c9a96e;
    /* legacy */
    --sr-accent:       #c9a96e;
    --sr-accent2:      #e8c68a;
    --sr-text:         #e8e4da;
    --sr-radius:       18px;
    --sr-shadow:       0 16px 48px rgba(0,0,0,.45);
    --sr-transition:   0.48s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Outer wrap ── */
.stellar-carousel-wrap {
    background: var(--sr-bg);
    border-radius: 26px;
    padding: 52px 36px 36px;
    position: relative;
    overflow: hidden;
    font-family: 'DM Sans', sans-serif;
    margin: 36px auto;
    max-width: 1100px;
}

.stellar-carousel-wrap.stellar-no-bg {
    background: transparent !important;
    background-color: transparent !important;
    box-shadow: none !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
}
.stellar-carousel-wrap.stellar-no-bg::before,
.stellar-carousel-wrap.stellar-no-bg::after { display: none !important; }

/* Decorative blobs — inherit accent from --sr-avatar-bg */
.stellar-carousel-wrap::before,
.stellar-carousel-wrap::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
    z-index: 0;
}
.stellar-carousel-wrap::before {
    width: 360px; height: 360px;
    background: radial-gradient(circle, color-mix(in srgb, var(--sr-avatar-bg) 18%, transparent) 0%, transparent 70%);
    top: -90px; right: -70px;
}
.stellar-carousel-wrap::after {
    width: 280px; height: 280px;
    background: radial-gradient(circle, rgba(102,126,234,.12) 0%, transparent 70%);
    bottom: -70px; left: -50px;
}

/* ── Carousel clip ── */
.stellar-carousel {
    position: relative;
    overflow: hidden;
    z-index: 1;
}

/* ── Track ── */
.stellar-track {
    display: flex;
    align-items: stretch;
    transition: transform var(--sr-transition);
    will-change: transform;
}

/* ── Slides ── */
.stellar-slide {
    flex: 0 0 100%;
    width: 100%;
    padding: 0 8px;
    box-sizing: border-box;
    display: flex;
}
.stellar-carousel-wrap[data-slides="2"] .stellar-slide { flex: 0 0 50%;      width: 50%; }
.stellar-carousel-wrap[data-slides="3"] .stellar-slide { flex: 0 0 33.3333%; width: 33.3333%; }
.stellar-carousel-wrap[data-slides="4"] .stellar-slide { flex: 0 0 25%;      width: 25%; }

/* ── Card ── */
.stellar-card-inner {
    background: var(--sr-card);
    border: 1px solid var(--sr-card-border);
    border-radius: var(--sr-radius);
    padding: 38px 38px 32px;
    position: relative;
    width: 100%;
    box-sizing: border-box;
    box-shadow: var(--sr-shadow);
    transition: background .3s, border-color .3s, transform .3s;
    display: flex;
    flex-direction: column;
}
.stellar-card-inner:hover { transform: translateY(-2px); }

.stellar-carousel-wrap[data-slides="2"] .stellar-card-inner,
.stellar-carousel-wrap[data-slides="3"] .stellar-card-inner,
.stellar-carousel-wrap[data-slides="4"] .stellar-card-inner { padding: 28px 24px 24px; }

/* ── Quote mark ── */
.stellar-quote-mark {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 8rem;
    line-height: 1;
    color: var(--sr-quote);
    opacity: .15;
    position: absolute;
    top: -8px; left: 22px;
    pointer-events: none;
    user-select: none;
    transition: color .3s;
}
.stellar-carousel-wrap[data-slides="2"] .stellar-quote-mark,
.stellar-carousel-wrap[data-slides="3"] .stellar-quote-mark,
.stellar-carousel-wrap[data-slides="4"] .stellar-quote-mark { font-size: 5rem; }

/* ── Stars ── */
.stellar-stars {
    display: flex;
    gap: 3px;
    margin-bottom: 16px;
    position: relative;
    z-index: 1;
    flex-shrink: 0;
}
.stellar-stars .star { font-size: 1.15rem; line-height: 1; transition: color .3s; }
.stellar-stars .star.filled {
    color: var(--sr-star-filled);
    text-shadow: 0 0 10px color-mix(in srgb, var(--sr-star-filled) 50%, transparent);
    animation: starPop .38s ease-out both;
}
.stellar-stars .star.empty { color: var(--sr-star-empty); }

@keyframes starPop {
    0%   { transform:scale(.6); opacity:0 }
    70%  { transform:scale(1.15) }
    100% { transform:scale(1);   opacity:1 }
}

/* ── Review wrap & text ── */
.stellar-review-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
}

.stellar-review-text {
    font-family: 'Playfair Display', Georgia, serif;
    font-style: italic;
    font-size: 1.1rem;
    line-height: 1.72;
    color: var(--sr-review-text);
    margin: 0 0 10px;
    flex: 1;
    transition: color .3s;
}
.stellar-carousel-wrap[data-slides="2"] .stellar-review-text,
.stellar-carousel-wrap[data-slides="3"] .stellar-review-text,
.stellar-carousel-wrap[data-slides="4"] .stellar-review-text { font-size: .95rem; line-height: 1.6; }

.stellar-text-full { display: none; }
.stellar-review-wrap.is-expanded .stellar-text-preview { display: none; }
.stellar-review-wrap.is-expanded .stellar-text-full    { display: inline; }
.stellar-review-wrap.is-expanded .stellar-ellipsis     { display: none; }

/* ── Read More button ── */
.stellar-readmore-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    padding: 4px 0 16px;
    font-family: 'DM Sans', sans-serif;
    font-size: .85rem;
    font-weight: 600;
    color: var(--sr-readmore);
    cursor: pointer;
    letter-spacing: .02em;
    transition: opacity .2s, color .3s;
    flex-shrink: 0;
}
.stellar-readmore-btn:hover { opacity: .7; }
.stellar-readmore-arrow { display: inline-block; transition: transform .25s; }
.stellar-review-wrap.is-expanded .stellar-readmore-arrow { transform: rotate(180deg); }

/* ── Reviewer row ── */
.stellar-reviewer {
    display: flex;
    align-items: center;
    gap: 14px;
    position: relative;
    z-index: 1;
    padding-top: 20px;
    border-top: 1px solid var(--sr-divider);
    margin-top: auto;
    flex-shrink: 0;
    transition: border-color .3s;
}

/* ── Avatar ── */
.stellar-avatar {
    width: 50px; height: 50px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--sr-avatar-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(0,0,0,.2);
    transition: background .3s;
}
.stellar-carousel-wrap[data-slides="3"] .stellar-avatar,
.stellar-carousel-wrap[data-slides="4"] .stellar-avatar { width: 40px; height: 40px; }
.stellar-avatar img { width:100%; height:100%; object-fit:cover; display:block; }

.stellar-initials {
    font-family: 'DM Sans', sans-serif;
    font-weight: 700;
    font-size: .88rem;
    color: var(--sr-avatar-txt);
    letter-spacing: .04em;
    transition: color .3s;
}

/* ── Reviewer info ── */
.stellar-reviewer-info { display:flex; flex-direction:column; gap:2px; }

.stellar-name {
    font-family: 'DM Sans', sans-serif;
    font-weight: 600;
    font-size: .95rem;
    color: var(--sr-name);
    display: block;
    transition: color .3s;
}

.stellar-role {
    font-size: .82rem;
    color: var(--sr-role);
    letter-spacing: .02em;
    transition: color .3s;
}

/* ── Controls ── */
.stellar-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    margin-top: 26px;
    position: relative;
    z-index: 1;
}

/* ── Nav buttons ── */
.stellar-btn-nav {
    width: 44px; height: 44px;
    border-radius: 50%;
    background: transparent;
    border: 1.5px solid var(--sr-nav);
    color: var(--sr-nav);
    font-size: 1.15rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .22s;
    line-height: 1;
}
.stellar-btn-nav:hover {
    background: var(--sr-nav);
    color: var(--sr-bg, #0f0f1a);
    transform: scale(1.08);
    box-shadow: 0 4px 16px rgba(0,0,0,.25);
}
.stellar-btn-nav:focus-visible { outline: 2px solid var(--sr-nav); outline-offset: 3px; }

/* ── Pagination dots ── */
.stellar-dots { display:flex; gap:7px; align-items:center; }
.stellar-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--sr-dot);
    opacity: .28;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: all .28s;
}
.stellar-dot.active {
    opacity: 1;
    width: 26px;
    border-radius: 4px;
    box-shadow: 0 0 8px rgba(0,0,0,.2);
}
.stellar-dot:hover:not(.active) { opacity: .55; }

/* ── Responsive ── */
@media (max-width: 900px) {
    .stellar-carousel-wrap[data-slides="4"] .stellar-slide { flex:0 0 50%; width:50%; }
    .stellar-carousel-wrap[data-slides="3"] .stellar-slide { flex:0 0 50%; width:50%; }
}

@media (max-width: 600px) {
    .stellar-carousel-wrap { padding:32px 16px 26px; border-radius:18px; margin:20px 0; }
    .stellar-carousel-wrap.stellar-no-bg { padding:0; }
    .stellar-carousel-wrap[data-slides="2"] .stellar-slide,
    .stellar-carousel-wrap[data-slides="3"] .stellar-slide,
    .stellar-carousel-wrap[data-slides="4"] .stellar-slide { flex:0 0 100%; width:100%; }
    .stellar-card-inner,
    .stellar-carousel-wrap[data-slides="2"] .stellar-card-inner,
    .stellar-carousel-wrap[data-slides="3"] .stellar-card-inner,
    .stellar-carousel-wrap[data-slides="4"] .stellar-card-inner { padding:26px 20px 22px; }
    .stellar-review-text,
    .stellar-carousel-wrap[data-slides="2"] .stellar-review-text,
    .stellar-carousel-wrap[data-slides="3"] .stellar-review-text,
    .stellar-carousel-wrap[data-slides="4"] .stellar-review-text { font-size:.97rem; }
    .stellar-btn-nav { width:38px; height:38px; font-size:1rem; }
    .stellar-dot.active { width:20px; }
}
