/* Clients page «ویدیو توصیه مشتری» — Figma 693:2904. Quote panel on the left, a deck of video cards on the right:
   the front card is 300×400 and the next two sit behind it at 79% and 60% (Figma 237×316 and 180×240). */
.wp-block-post-content > .scico-video-testimonials { margin-block-start: 0; }

.scico-video-testimonials { --vt-card-w: 300px; --vt-card-h: 400px; box-sizing: border-box; margin-block-start: 0; padding: 8px 96px 104px; background: #fff; }
.scico-video-testimonials__inner { display: flex; width: min(100%, var(--video-testimonials-contentWidth, 1248px)); flex-direction: column; gap: 40px; margin-inline: auto; }
.scico-video-testimonials__heading { margin: 0; color: var(--video-testimonials-headingColor, #000); font-size: var(--video-testimonials-headingSize, 32px); font-weight: var(--video-testimonials-headingWeight, 800); line-height: 1.45; text-align: right; }

/* RTL row: «قبلی» on the right, the stage, «بعدی» on the left — like Figma's arrows. */
.scico-video-testimonials__carousel { display: flex; align-items: center; justify-content: center; gap: 40px; }
.scico-video-testimonials__nav { display: flex; width: 48px; height: 48px; flex: 0 0 48px; align-items: center; justify-content: center; padding: 0; border: 0; border-radius: 50%; background: transparent; cursor: pointer; transition: background-color 200ms ease, opacity 200ms ease; }
.scico-video-testimonials__nav img { display: block; transition: filter 200ms ease; }
/* Figma's chevron points down: turned to «>» on the right button and «<» on the left one. */
.scico-video-testimonials__nav--previous img { transform: rotate(-90deg); }
.scico-video-testimonials__nav--next img { transform: rotate(90deg); }
.scico-video-testimonials__nav:focus-visible { outline: 2px solid #4c504a; outline-offset: 2px; }
.scico-video-testimonials__nav:disabled { cursor: default; opacity: .35; }
.scico-video-testimonials.is-single .scico-video-testimonials__nav { visibility: hidden; }

.scico-video-testimonials__stage { display: flex; flex: 0 1 1031px; min-width: 0; flex-direction: row-reverse; align-items: center; }

/* Quote panel: only the current testimonial's panel is shown. */
.scico-video-testimonials__panels { display: grid; flex: 1 1 auto; min-width: 0; }
.scico-video-testimonials__panel { display: flex; box-sizing: border-box; min-height: calc(var(--vt-card-h) * .7825); flex-direction: column; justify-content: center; gap: 32px; margin: 0; padding: 48px 56px; border-radius: 8px; background: var(--video-testimonials-panelBackground, #f3efe5); text-align: right; }
.scico-video-testimonials__panel[hidden] { display: none; }
/* Only a switch animates the panel in; the first panel is visible without waiting for an animation. */
.scico-video-testimonials__panel.is-entering { animation: scico-vt-panel-in 450ms ease both; }
.scico-video-testimonials__author { display: flex; flex-direction: column; gap: 8px; }
.scico-video-testimonials__name,
.scico-video-testimonials__position { margin: 0; }
.scico-video-testimonials__name { color: var(--video-testimonials-nameColor, #000); font-size: var(--video-testimonials-nameSize, 22px); font-weight: var(--video-testimonials-nameWeight, 800); line-height: 1.45; }
.scico-video-testimonials__position { color: var(--video-testimonials-positionColor, #767676); font-size: var(--video-testimonials-positionSize, 16px); font-weight: var(--video-testimonials-positionWeight, 500); line-height: 1.6; }
.scico-video-testimonials__quote { margin: 0; padding: 0; border: 0; }
.scico-video-testimonials__quote p { margin: 0; color: var(--video-testimonials-quoteColor, #000); font-size: var(--video-testimonials-quoteSize, 22px); font-weight: var(--video-testimonials-quoteWeight, 500); line-height: 1.7; overflow-wrap: anywhere; }

/* Deck: cards share the front card's box and step back with translate + scale (physical px, so RTL does not mirror it). */
.scico-video-testimonials__deck { position: relative; flex: 0 0 auto; width: calc(var(--vt-card-w) * 4 / 3); height: var(--vt-card-h); }
.scico-video-testimonials__card { position: absolute; top: 0; left: 0; width: var(--vt-card-w); height: var(--vt-card-h); overflow: hidden; border-radius: 8px; background: #2c2e2b; transform-origin: 50% 50%; transition: transform 600ms cubic-bezier(.2, .7, .2, 1), opacity 450ms ease; }
.scico-video-testimonials__cover { position: absolute; inset: 0; display: block; width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: 50% 20%; transition: transform 700ms cubic-bezier(.2, .7, .2, 1); }
/* Figma: clear → 80% black on the front card; the cards behind start darker at the top (24% and 40%). */
.scico-video-testimonials__card::before,
.scico-video-testimonials__card::after { position: absolute; inset: 0; content: ""; pointer-events: none; }
.scico-video-testimonials__card::after { background: linear-gradient(182deg, rgb(0 0 0 / 0) 1.36%, rgb(0 0 0 / 80%) 98.64%); }
.scico-video-testimonials__card::before { z-index: 1; background: linear-gradient(182deg, rgb(0 0 0 / 40%) 1.36%, rgb(0 0 0 / 0) 98.64%); opacity: 0; transition: opacity 450ms ease; }
.scico-video-testimonials__card[data-offset="0"] { z-index: 3; }
.scico-video-testimonials__card[data-offset="1"] { z-index: 2; transform: translateX(27.1667%) scale(.79); cursor: pointer; }
.scico-video-testimonials__card[data-offset="1"]::before { opacity: .6; }
.scico-video-testimonials__card[data-offset="2"] { z-index: 1; transform: translateX(53.3333%) scale(.6); cursor: pointer; }
.scico-video-testimonials__card[data-offset="2"]::before { opacity: 1; }
.scico-video-testimonials__card[data-offset="hidden"] { z-index: 0; opacity: 0; transform: translateX(53.3333%) scale(.5); pointer-events: none; }
.scico-video-testimonials__card[data-offset="prev"] { z-index: 4; opacity: 0; transform: translateX(-18%) scale(1.02); pointer-events: none; }

.scico-video-testimonials__play { position: absolute; inset: 0; z-index: 2; display: flex; align-items: center; justify-content: center; border-radius: 8px; }
.scico-video-testimonials__play img { display: block; transition: transform 250ms ease; }
.scico-video-testimonials__card:not([data-offset="0"]) .scico-video-testimonials__play { pointer-events: none; }
.scico-video-testimonials__play:focus-visible { outline: 3px solid #fff; outline-offset: -6px; }

@media (hover: hover) {
	.scico-video-testimonials__nav:not(:disabled):hover { background: #f3efe5; }
	.scico-video-testimonials__nav:not(:disabled):hover img { filter: brightness(.55); }
	.scico-video-testimonials__card[data-offset="0"]:hover .scico-video-testimonials__cover { transform: scale(1.04); }
	.scico-video-testimonials__card[data-offset="0"]:hover .scico-video-testimonials__play img { transform: scale(1.1); }
	.scico-video-testimonials__card[data-offset="1"]:hover { transform: translateX(31%) scale(.8); }
	.scico-video-testimonials__card[data-offset="2"]:hover { transform: translateX(57%) scale(.61); }
}

@keyframes scico-vt-panel-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Player dialog. */
:root:has(.scico-video-testimonials__dialog[open]) { overflow: hidden; }
.scico-video-testimonials__dialog { width: min(960px, 92vw); max-width: none; max-height: none; padding: 0; overflow: visible; border: 0; background: transparent; color: #fff; }
.scico-video-testimonials__dialog::backdrop { background: rgb(14 15 13 / 86%); }
.scico-video-testimonials__player { display: flex; justify-content: center; }
.scico-video-testimonials__player iframe { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 8px; background: #000; }
/* The video keeps its own shape (portrait or landscape) inside the viewport; the minimum covers the moment before its size is known. */
.scico-video-testimonials__player video { display: block; width: auto; height: auto; min-width: min(100%, 480px); min-height: 270px; max-width: 100%; max-height: 82vh; border-radius: 8px; background: #000; }
.scico-video-testimonials__player video:focus { outline: none; }
.scico-video-testimonials__player video:focus-visible { outline: 2px solid rgb(255 255 255 / 70%); outline-offset: 3px; }
.scico-video-testimonials__close { position: absolute; top: -52px; right: 0; display: flex; width: 40px; height: 40px; align-items: center; justify-content: center; padding: 0; border: 1px solid rgb(255 255 255 / 40%); border-radius: 50%; background: rgb(255 255 255 / 10%); color: #fff; font-size: 26px; line-height: 1; cursor: pointer; }
.scico-video-testimonials__close:hover { background: rgb(255 255 255 / 22%); }
.scico-video-testimonials__close:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* Editor notice when no testimonial has a video. */
.scico-video-testimonials__empty { margin: 0; padding: 24px; border: 1px dashed #c8c8c8; border-radius: 8px; background: #fafafa; color: #4c504a; text-align: right; direction: rtl; }

@media (prefers-reduced-motion: reduce) {
	.scico-video-testimonials__card,
	.scico-video-testimonials__card::before,
	.scico-video-testimonials__cover,
	.scico-video-testimonials__play img,
	.scico-video-testimonials__nav { transition: none; }
	.scico-video-testimonials__panel.is-entering { animation: none; }
}

@media (max-width: 1100px) {
	.scico-video-testimonials { --vt-card-w: 255px; --vt-card-h: 340px; padding: 0 32px 88px; }
	.scico-video-testimonials__heading { font-size: min(var(--video-testimonials-headingSize, 32px), 28px); }
	.scico-video-testimonials__carousel { gap: 16px; }
	.scico-video-testimonials__panel { gap: 24px; padding: 36px 40px; }
	.scico-video-testimonials__quote p { font-size: min(var(--video-testimonials-quoteSize, 22px), 20px); }
}

/* Stacked: the deck on top, the panel under it, the arrows below. */
@media (max-width: 860px) {
	.scico-video-testimonials__carousel { flex-wrap: wrap; gap: 20px 24px; }
	.scico-video-testimonials__stage { order: -1; flex: 1 1 100%; flex-direction: column-reverse; align-items: stretch; gap: 20px; }
	.scico-video-testimonials__deck { align-self: center; transform: translateX(calc(var(--vt-card-w) / 6)); }
	.scico-video-testimonials__panel { min-height: 0; }
}

@media (max-width: 600px) {
	.scico-video-testimonials { --vt-card-w: 216px; --vt-card-h: 288px; padding: 0 16px 64px; }
	.scico-video-testimonials__inner { gap: 28px; }
	.scico-video-testimonials__heading { font-size: min(var(--video-testimonials-headingSize, 32px), 24px); }
	/* No room to centre the front card alone: centre the whole deck. Play icon keeps Figma's third of the card. */
	.scico-video-testimonials__deck { transform: none; }
	.scico-video-testimonials__play img { width: 72px; height: 72px; }
	.scico-video-testimonials__panel { gap: 18px; padding: 24px 20px; }
	.scico-video-testimonials__name { font-size: min(var(--video-testimonials-nameSize, 22px), 18px); }
	.scico-video-testimonials__position { font-size: min(var(--video-testimonials-positionSize, 16px), 14px); }
	.scico-video-testimonials__quote p { font-size: min(var(--video-testimonials-quoteSize, 22px), 17px); }
	.scico-video-testimonials__close { top: -48px; }
}

/* Phones: the player is a dark bottom sheet (shape, handle and motion from dialog.scico-sheet in style.css). */
@media (max-width: 767px) {
	.scico-video-testimonials__dialog { padding: 60px 12px calc(16px + env(safe-area-inset-bottom)); background: #1b1f19; }
	.scico-video-testimonials__dialog::backdrop { background: rgb(14 15 13 / 72%); }
	.scico-video-testimonials__close { top: 12px; right: auto; left: 12px; }
	.scico-video-testimonials__player video { width: 100%; min-width: 0; min-height: 200px; max-height: calc(100dvh - 140px); object-fit: contain; }
}
