/* ---------- Testimonial slider ----------
   Self-contained: loaded by includes/partials/testimonials.php, so it works
   even if home.css is an older copy. */
.rv-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 1.2rem; margin-bottom: clamp(1.8rem, 3vw, 2.8rem); }
.rv-nav { display: flex; gap: .6rem; }
.rv-btn { width: 3rem; height: 3rem; display: grid; place-items: center; border: 1px solid var(--line, #222838); border-radius: 50%; color: var(--bone, #eceae4); transition: background .25s, color .25s, border-color .25s, transform .25s; }
.rv-btn svg { width: 1.1rem; height: 1.1rem; }
.rv-btn:hover { background: var(--bone, #eceae4); color: var(--ink, #07080d); border-color: var(--bone, #eceae4); }
.rv-btn:active { transform: scale(.94); }

.rv-track { --gap: 1.25rem; display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 2 * var(--gap)) / 3); gap: var(--gap); overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: none; padding-block: .6rem 1rem; margin-block: -.6rem -1rem; }
.rv-track::-webkit-scrollbar { display: none; }
.rv-track:focus-visible { outline: 2px solid var(--xenon, #5b7cff); outline-offset: 6px; border-radius: 12px; }

.rv-card { position: relative; display: flex; flex-direction: column; min-width: 0; scroll-snap-align: start; padding: 1.8rem; border: 1px solid var(--line, #222838); border-radius: 18px; background: var(--ink2, #0d0f17); overflow: hidden; transition: border-color .3s, transform .4s cubic-bezier(.2, .8, .2, 1); }
.rv-card::before { content: ""; position: absolute; right: -3rem; top: -3rem; width: 9rem; height: 9rem; border-radius: 50%; background: radial-gradient(circle, var(--xenon-soft, rgba(91,124,255,.16)), transparent 70%); opacity: 0; transition: opacity .4s; }
.rv-card:hover { border-color: var(--xenon, #5b7cff); transform: translateY(-4px); }
.rv-card:hover::before { opacity: 1; }
.rv-q { position: absolute; right: 1.4rem; top: 1.2rem; width: 2.6rem; height: 2.6rem; color: var(--line2, #2c3550); transition: color .3s, transform .4s; }
.rv-card:hover .rv-q { color: var(--xenon, #5b7cff); transform: rotate(-6deg) scale(1.08); }

.rv-stars { display: flex; gap: .25rem; }
.rv-stars i { width: 1.05rem; height: 1.05rem; background: var(--xenon, #5b7cff); clip-path: polygon(50% 0, 62% 35%, 98% 36%, 69% 57%, 80% 91%, 50% 70%, 20% 91%, 31% 57%, 2% 36%, 38% 35%); }
.rv-stars i.off { background: var(--line2, #2c3550); }
.rv-card blockquote { margin: 1.2rem 0 1.6rem; font-size: 1.04rem; line-height: 1.65; color: var(--bone, #eceae4); text-wrap: pretty; }
.rv-card .who { margin-top: auto; padding-top: 1.3rem; border-top: 1px solid var(--line, #222838); }
.who { display: flex; align-items: center; gap: .9rem; }
.who b { display: block; font-weight: 600; }
.who span { color: var(--mute, #8d94ab); font-size: .9rem; }
.av, .av-img { flex: none; width: 3rem; height: 3rem; border-radius: 50%; }
.av { display: grid; place-items: center; border: 1px solid var(--xenon, #5b7cff); background: var(--xenon-soft, rgba(91,124,255,.16)); font-family: var(--mono); font-size: .85rem; color: var(--xenon, #5b7cff); }
.av-img { object-fit: cover; border: 1px solid var(--line, #222838); }

.rv-bar { height: 3px; margin-top: 1.6rem; border-radius: 3px; background: var(--line, #222838); overflow: hidden; }
.rv-bar span { display: block; height: 100%; width: 50%; border-radius: 3px; background: var(--xenon, #5b7cff); transform-origin: left; transition: margin-left .25s ease-out, width .25s; }

/* stars light up one by one the first time the slider scrolls into view */
.rv.in .rv-stars i { animation: starpop .5s calc(var(--n) * .08s) cubic-bezier(.3, 1.6, .5, 1) backwards; }
@keyframes starpop { from { transform: scale(0) rotate(-40deg); opacity: 0; } }

@media (max-width: 980px) { .rv-track { grid-auto-columns: calc((100% - var(--gap)) / 2); } }
@media (max-width: 620px) { .rv-track { grid-auto-columns: 88%; } .rv-card { padding: 1.5rem; } }
@media (prefers-reduced-motion: reduce) { .rv.in .rv-stars i { animation: none; } .rv-card, .rv-q, .rv-btn, .rv-bar span { transition: none; } }

