/* ═══════════════════════════════════════════════════════════════
   alsumait-said v1.5.2 — home-page testimonies (dsc-quotes)
   Loads only where the content carries dsc-quotes (page 101).

   1.4.0 — the section becomes a «speech bubble» component, identical in
   meaning on both sizes: a paper-coloured bubble carries the photograph
   and the words, a tail drops from it to the SPEAKER, who stands on the
   green ground below with a numbered badge.

     desktop  the bubbles are a deck: GSAP pins the section and the cards
              are dealt with the scroll — no arrows at all. The deck is as
              tall as its tallest testimony, so the section never jumps.
     phone    no pinning (it would hijack the scroll): a native scroll-snap
              rail, one bubble at 84% of the width so the next one peeks.

   Everything degrades. Without JS — or without GSAP — the markup keeps its
   own columns and the pre-1.4 rules below still render a readable section;
   quotes.js only then upgrades it and adds .dsq-on to the section.
   ═══════════════════════════════════════════════════════════════ */

.dsc-quotes{
  --dsq-serif:"Instrument Serif",Georgia,"Times New Roman",serif;
  --dsq-line:rgba(255,255,255,.22);
  --dsq-soft:#cfe4de;
  --dsq-photo:clamp(200px,19vw,272px);
  /* the bubble */
  --dsq-paper:#fbfaf7;
  --dsq-ink:#0d2b27;
  --dsq-accent:#0f6b5e;
  --dsq-muted:#5c7c76;
  --dsq-radius:24px;
}

/* the theme's blockGap would leave a band against the neighbouring full-bleed sections */
.dsc-quotes{margin-block-start:0!important;margin-block-end:0!important}

/* paddings in step with the record / articles sections, not xx-large */
section.dsc-quotes{padding-top:clamp(56px,6.5vw,92px)!important;padding-bottom:clamp(56px,6.5vw,92px)!important}
.dsc-quotes>.wp-block-query{margin-block-start:34px!important}

/* header row */
.dsc-quotes .dsq-head{align-items:flex-end}
.dsc-quotes .dsq-lab{font-size:11px;letter-spacing:.18em;text-transform:uppercase;font-weight:600;margin:0}
.dsc-quotes .dsq-head h2{margin:10px 0 0;text-wrap:balance}
.dsc-quotes .dsq-head .wp-block-button__link{white-space:nowrap}

/* ── the rail (still the scroll container on the phone) ── */
.dsc-quotes .dsq-grid{display:flex!important;grid-template-columns:none!important;flex-wrap:nowrap;
  gap:0!important;overflow-x:auto;overscroll-behavior-x:contain;scroll-snap-type:x mandatory;
  -webkit-overflow-scrolling:touch;scrollbar-width:none;margin:0;padding:0;list-style:none;
  min-width:0;max-width:100%;outline:none}
.dsc-quotes .dsq-grid::-webkit-scrollbar{display:none}
.dsc-quotes .dsq-grid>li{flex:0 0 100%;width:100%;min-width:0;scroll-snap-align:start;margin:0;padding:0}

/* ── pre-1.4 fallback (no JS): the old two-column card ── */
.dsc-quotes .dsq-card{height:100%}
.dsc-quotes .dsq-cols{gap:clamp(28px,4vw,64px)!important;margin-block:0;align-items:center;justify-content:space-between}
.dsc-quotes .dsq-cols>.wp-block-column{min-width:0}
.dsc-quotes .dsq-cols>.wp-block-column:first-child{flex:1 1 0!important;max-width:60ch}
.dsc-quotes .dsq-cols>.wp-block-column:last-child{flex:0 0 var(--dsq-photo)!important;width:var(--dsq-photo);max-width:var(--dsq-photo)}
.dsc-quotes .wp-block-post-featured-image{margin:0;width:100%}
.dsc-quotes .wp-block-post-featured-image a{display:block;height:100%}
.dsc-quotes .wp-block-post-featured-image img{display:block;width:100%;height:100%;object-fit:cover}

/* the testimony itself */
.dsc-quotes .dsq-q{margin:0}
.dsc-quotes .dsq-q>*{margin:0}
.dsc-quotes .dsq-q>*+*{margin-top:.55em}
.dsc-quotes .dsq-q p{font-family:var(--dsq-serif);font-size:clamp(21px,1.85vw,28px);line-height:1.3;
  letter-spacing:-.006em;text-wrap:pretty}
.dsc-quotes .dsq-q p:first-child::before{content:"\201C";}
.dsc-quotes .dsq-q p:last-child::after{content:"\201D";}
.dsc-quotes .dsq-q p[dir="rtl"],.dsc-quotes .dsq-q .has-text-align-right{font-family:"Amiri",var(--dsq-serif);line-height:1.55}

.dsc-quotes .dsq-who{margin:22px 0 0;padding-top:14px;border-top:1px solid var(--dsq-line);
  font-family:var(--wp--preset--font-family--body,inherit);font-weight:700;font-size:16px;line-height:1.3}
.dsc-quotes .dsq-who a{text-decoration:none;color:inherit}
.dsc-quotes .dsq-role{margin:5px 0 0;font-size:13.5px;line-height:1.5;max-width:52ch;color:var(--dsq-soft)!important}
.dsc-quotes .dsq-role p{margin:0}
.dsc-quotes .wp-block-query-no-results p{opacity:.8}

/* ═══════════════════════════════════════════════════════════════
   1.4 — the bubble. Everything below applies only once quotes.js has
   restructured each card and added .dsq-on to the section.
   ═══════════════════════════════════════════════════════════════ */

.dsc-quotes.dsq-on .dsq-cols{display:block!important;gap:0!important}
.dsc-quotes.dsq-on .dsq-card{height:auto}

/* the bubble itself */
.dsq-on .dsq-bub{position:relative;background:var(--dsq-paper);color:var(--dsq-ink);
  border-radius:var(--dsq-radius);padding:14px;display:flex;gap:30px;align-items:stretch;
  box-shadow:0 24px 54px rgba(0,0,0,.26)}
.dsq-on .dsq-bub .wp-block-post-featured-image{flex:0 0 clamp(150px,15vw,200px);align-self:stretch;
  border-radius:16px;overflow:hidden;background:#e6efec;margin:0;min-height:230px}
.dsq-on .dsq-bub .wp-block-post-featured-image img{width:100%;height:100%;object-fit:cover;object-position:50% 20%;
  border-radius:16px}
.dsq-on .dsq-bub .dsq-q{flex:1 1 auto;min-width:0;padding:22px 14px 22px 0;align-self:center}
.dsq-on .dsq-bub .dsq-q p{color:var(--dsq-ink);font-size:clamp(20px,1.75vw,26px)}

/* a testimony with no photograph — the bubble is words only, still a bubble */
.dsq-on .dsq-bub.is-noimg .dsq-q{padding:26px 24px}

/* the tail, and the numbered badge it drops onto */
.dsq-on .dsq-tail{position:absolute;bottom:-11px;left:56px;width:26px;height:26px;background:var(--dsq-paper);
  transform:rotate(45deg);border-radius:5px;z-index:0}
.dsq-on .dsq-badge{position:absolute;bottom:-52px;left:44px;width:48px;height:48px;border-radius:50%;
  background:var(--wp--preset--color--primary-alt,#9fd8cb);color:#0b2d29;display:flex;align-items:center;
  justify-content:center;font-size:12.5px;font-weight:700;letter-spacing:.02em;z-index:2;
  box-shadow:0 8px 18px rgba(0,0,0,.22);font-variant-numeric:tabular-nums}

/* the speaker — outside the bubble, on the green */
.dsq-on .dsq-sig{margin:64px 0 0;padding:0 0 0 108px}
.dsq-on .dsq-sig .dsq-who{margin:0;padding:0;border-top:0;font-size:17px}
.dsq-on .dsq-sig .dsq-role{margin:4px 0 0;font-size:13.5px;max-width:58ch}

/* ── desktop: the deck (GSAP pins and deals it) ── */
/* ScrollTrigger's pin-spacer stands in for the section while it is pinned; it
   must be as wide as the section was, or the constrained layout caps it to the
   content column and the pinned section overflows the page sideways. */
.dsq-spacer{max-width:none!important;width:auto!important}
/* The padding-less wrapper that is pinned in the section's place. ScrollTrigger
   stamps the width it measured onto it — and it measures while the wrapper is
   already inside a not-yet-full-width spacer, so that number is too small.
   The wrapper is always exactly its spacer's width, so say so and be done. */
.dsq-pinwrap{display:block;width:100%!important;max-width:none!important}

@media(min-width:901px){
  .dsq-on.dsq-pin .dsq-grid{display:block!important;position:relative;overflow:visible;
    scroll-snap-type:none;min-height:var(--dsq-h,420px)}
  .dsq-on.dsq-pin .dsq-grid>li{position:absolute;inset:0 0 auto 0;width:100%;
    will-change:transform,opacity;transform-origin:50% 0}
  .dsq-on.dsq-pin .dsq-hint{margin:78px 0 0;font-size:11px;letter-spacing:.16em;text-transform:uppercase;
    color:var(--dsq-soft);display:flex;align-items:center;gap:9px;transition:opacity .2s ease}
  .dsq-on.dsq-pin .dsq-hint i{font-style:normal;animation:dsq-bob 1.7s ease-in-out infinite}
  @keyframes dsq-bob{0%,100%{transform:translateY(0)}50%{transform:translateY(4px)}}
}

/* ── phone: one bubble, the next one peeking ── */
@media(max-width:900px){
  section.dsc-quotes{padding-top:40px!important;padding-bottom:40px!important;overflow:hidden}
  section.dsc-quotes>.wp-block-query{margin-block-start:20px!important}
  section.dsc-quotes .dsq-head{flex-direction:column;align-items:flex-start;gap:6px}
  section.dsc-quotes .dsq-head h2{font-size:26px!important;letter-spacing:-.01em}

  .dsq-on .dsq-grid{gap:14px!important;padding:4px 0 6px;overflow:visible;overflow-x:auto}
  .dsq-on .dsq-grid>li{flex:0 0 84%;width:84%;scroll-snap-align:center}
  .dsq-on .dsq-grid>li:last-child{margin-inline-end:16%}

  .dsq-on .dsq-bub{display:block;padding:12px;border-radius:26px;box-shadow:0 16px 34px rgba(0,0,0,.24)}
  .dsq-on .dsq-bub .wp-block-post-featured-image{width:100%;aspect-ratio:1/1;border-radius:18px}
  .dsq-on .dsq-bub .dsq-q{padding:16px 10px 14px;text-align:center}
  .dsq-on .dsq-bub .dsq-q p{font-size:18px!important;line-height:1.42}
  /* a long testimony is unreadable centred — it goes back to a normal column */
  .dsq-on .dsq-bub.is-long .dsq-q{text-align:start;padding:16px 14px 14px}
  .dsq-on .dsq-bub.is-long .dsq-q p{font-size:16.5px!important;line-height:1.5}
  .dsq-on .dsq-bub.is-noimg .dsq-q{padding:26px 16px}

  .dsq-on .dsq-tail{left:50%;margin-left:-13px}
  .dsq-on .dsq-badge{left:50%;margin-left:-24px;bottom:-46px;width:44px;height:44px;font-size:12px}
  .dsq-on .dsq-sig{margin-top:58px;padding:0 6px;text-align:center}
  .dsq-on .dsq-sig .dsq-who{font-size:15.5px}
  .dsq-on .dsq-sig .dsq-role{font-size:12.5px;max-width:none}
}

/* the dots (phone) — injected by quotes.js */
.dsq-on .dsq-dots{display:flex;gap:6px;justify-content:center;margin:20px 0 0}
.dsq-on .dsq-dots button{width:7px;height:7px;padding:0;border:0;border-radius:99px;cursor:pointer;
  background:rgba(255,255,255,.4);transition:width .25s ease,background .25s ease}
.dsq-on .dsq-dots button[aria-current="true"]{background:#fff;width:22px}

/* keep the old arrow bar out of the way once 1.4 is on */
.dsq-on .dsq-nav{display:none}

@media(prefers-reduced-motion:reduce){
  .dsq-on.dsq-pin .dsq-hint i{animation:none}
}

/* ── 1.4.6 · contrast tokens + type floors + tap targets (work order 1.11 / 1.12 / 1.13) ──
   The section sat on the theme primary (#00786F): the eyebrow (#92D8D8) read 3.33:1 and the
   soft excerpt 4.04:1. On #00635C the same inks pass: mint 4.82, #cfe4de 5.38, white 7.1. */
.dsc-quotes.has-primary-background-color{background-color:#00635C!important}
.dsc-quotes .dsq-lab{color:#8FE3DA!important;font-size:14px}
.dsq-on .dsq-badge{font-size:14px}
.dsq-on.dsq-pin .dsq-hint{font-size:14px}
/* the pagination dots keep their 7px look but get a 44px hit area */
.dsq-on .dsq-dots{gap:0}
.dsq-on .dsq-dots button{width:44px;height:44px;background:transparent;position:relative}
.dsq-on .dsq-dots button::before{content:"";position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);
  width:7px;height:7px;border-radius:99px;background:rgba(255,255,255,.4);transition:width .25s ease,background .25s ease}
.dsq-on .dsq-dots button[aria-current="true"]{width:44px;background:transparent}
.dsq-on .dsq-dots button[aria-current="true"]::before{background:#fff;width:22px}


/* ═══════════════════════════════════════════════════════════════
   1.5.0 — WORK-ORDER-home-mobile §3.5 / §3.6: no pinning anywhere.
   quotes.js rebuilds each card (.dsq-card2: .dsq-fig · .dsq-q · .dsq-sig2
   with the «i / N» counter) and adds .dsq-v2 to the section; everything
   here is inert without it. The 1.4.x .dsq-on rules above are unused now.
   ═══════════════════════════════════════════════════════════════ */
.dsc-quotes.dsq-v2{overflow:visible!important}
/* rtl.css (≤900px) mirrors the old rail and its cards with scaleX(-1); the grid is no rail now, and the
   deck sets its own inline transform on a covered card — the mirror would show it flipped (1.5.1) */
html[dir="rtl"] .dsc-quotes.dsq-v2 .dsq-grid{direction:rtl;transform:none!important}
html[dir="rtl"] .dsc-quotes.dsq-v2 .dsq-grid>li{direction:rtl;transform:none}
.dsc-quotes.dsq-v2 .dsq-grid{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:20px!important;
	overflow:visible!important;scroll-snap-type:none!important;padding:0;margin:0;min-height:0}
.dsc-quotes.dsq-v2 .dsq-grid>li{flex:none!important;width:auto!important;min-width:0;margin:0;padding:0;position:relative}
.dsc-quotes.dsq-v2 .dsq-grid>li:first-child{grid-column:1/-1}
.dsc-quotes.dsq-v2 .dsq-cols{display:block!important;gap:0!important;margin:0;height:100%}
.dsc-quotes.dsq-v2 .dsq-card{height:100%}
.dsc-quotes.dsq-v2 .dsq-nav,.dsc-quotes.dsq-v2 .dsq-dots,.dsc-quotes.dsq-v2 .dsq-hint{display:none!important}

/* the card */
.dsq-v2 .dsq-card2{position:relative;box-sizing:border-box;height:100%;background:#fff;color:#0d2b27;border-radius:20px;
	padding:24px;display:grid;grid-template-columns:46px minmax(0,1fr);grid-template-areas:"q q" "fig sig";
	column-gap:14px;row-gap:18px;align-content:start;box-shadow:0 10px 30px rgba(0,0,0,.18)}
.dsq-v2 .dsq-card2.is-noimg{grid-template-columns:minmax(0,1fr);grid-template-areas:"q" "sig"}
.dsq-v2 .dsq-fig{grid-area:fig;width:46px;height:46px;border-radius:50%;overflow:hidden;background:#e6efec;align-self:center}
.dsq-v2 .dsq-fig .wp-block-post-featured-image{margin:0;width:100%;height:100%}
.dsq-v2 .dsq-fig .wp-block-post-featured-image a{display:block;height:100%}
.dsq-v2 .dsq-fig img{display:block;width:100%;height:100%;object-fit:cover;object-position:50% 20%;border-radius:50%}
.dsq-v2 .dsq-q{grid-area:q;margin:0;min-width:0}
.dsq-v2 .dsq-q>*{margin:0}
.dsq-v2 .dsq-q>*+*{margin-top:.5em}
.dsq-v2 .dsq-q p{color:#0d2b27;font-size:17px;line-height:1.55;letter-spacing:0;text-wrap:pretty}
.dsq-v2 .dsq-sig2{grid-area:sig;display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"who n" "role role";
	column-gap:12px;row-gap:3px;align-items:baseline;min-width:0}
.dsq-v2 .dsq-sig2 .dsq-who{grid-area:who;margin:0;padding:0;border:0;font-size:15px!important;line-height:1.35;font-weight:700;color:#0d2b27!important}
.dsq-v2 .dsq-sig2 .dsq-who a{color:inherit!important;text-decoration:none}
.dsq-v2 .dsq-sig2 .dsq-role{grid-area:role;margin:0;font-size:15px;line-height:1.45;color:#5c7c76!important;max-width:none;
	display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.dsq-v2 .dsq-sig2 .dsq-role p{margin:0}
.dsq-v2 .dsq-n{grid-area:n;font-size:14px;line-height:1;color:#5c7c76;font-variant-numeric:tabular-nums;white-space:nowrap;
	direction:ltr;unicode-bidi:isolate}

/* ── §3.6 desktop: the lead card (the first testimony) ── */
@media(min-width:782px){
	.dsq-v2 .dsq-grid>li:first-child .dsq-card2{grid-template-columns:150px minmax(0,1fr);grid-template-areas:"fig q" "fig sig";
		column-gap:36px;row-gap:22px;padding:40px 44px;align-items:start}
	.dsq-v2 .dsq-grid>li:first-child .dsq-card2.is-noimg{grid-template-columns:minmax(0,1fr);grid-template-areas:"q" "sig"}
	.dsq-v2 .dsq-grid>li:first-child .dsq-fig{width:150px;height:150px;align-self:start}
	.dsq-v2 .dsq-grid>li:first-child .dsq-q{max-width:810px}
	.dsq-v2 .dsq-grid>li:first-child .dsq-q p{font-size:26px;line-height:1.5}
	.dsq-v2 .dsq-grid>li:first-child .dsq-sig2{max-width:810px}
	.dsq-v2 .dsq-grid>li:first-child .dsq-sig2 .dsq-who{font-size:17px!important}
	.dsq-v2 .dsq-grid>li:first-child .dsq-sig2 .dsq-role{-webkit-line-clamp:3}
}
@media(min-width:782px) and (max-width:1023px){
	.dsc-quotes.dsq-v2 .dsq-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}

/* ── §3.5 phone: the deck — the cards stack under a 12px step ── */
@media(max-width:781px){
	section.dsc-quotes.dsq-v2{padding-top:40px!important;padding-bottom:40px!important}
	.dsc-quotes.dsq-v2 .dsq-grid{display:block!important;grid-template-columns:none!important;padding:0 0 8px}
	.dsc-quotes.dsq-v2 .dsq-grid>li{margin:0 0 14px}
	.dsc-quotes.dsq-v2 .dsq-grid>li:last-child{margin-bottom:0}
	.dsq-v2 .dsq-card2{height:auto;padding:22px 20px 20px;border-radius:20px;box-shadow:0 -6px 22px rgba(0,0,0,.22);
		transform-origin:50% 0;grid-template-columns:56px minmax(0,1fr);column-gap:12px;row-gap:16px;
		will-change:transform,filter}
	.dsq-v2 .dsq-fig{width:56px;height:56px}
	.dsq-v2 .dsq-q p{font-size:18px;line-height:1.5}
	/* five lines, like real playing cards */
	.dsq-v2 .dsq-q{display:-webkit-box;-webkit-line-clamp:5;-webkit-box-orient:vertical;overflow:hidden}
	.dsq-v2 .dsq-q>*+*{margin-top:0}
	.dsq-v2 .dsq-sig2 .dsq-role{-webkit-line-clamp:2}
}
@media(max-width:781px) and (prefers-reduced-motion:no-preference){
	.dsc-quotes.dsq-v2 .dsq-grid>li{position:-webkit-sticky;position:sticky;
		top:calc(var(--dsm-top,0px) + 56px + 10px + var(--i,0) * 12px)}
}
