/* ============================================================================
   Mobile and tablet fixes: customer stories (section.cases#customers)
   Load AFTER css/teradix-stories.css. Only max-width media queries, every
   selector scoped to the stories section. Logical properties so the same
   rules hold on a right-to-left page. Desktop (above 1100px) is untouched.
   ============================================================================ */

/* ---- small laptop and tablet landscape (two-column panel, narrow cards):
        the story cards put the logo above the name so nothing is squeezed ---- */
@media (max-width:1100px){
  #customers .cx__rail{grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
  #customers .cx__pick,
  #customers .cx__pick + .cx__pick{grid-template-columns:minmax(0,1fr);gap:12px;padding:16px 16px 18px;text-align:start}
  #customers .cx__logo{width:84px;height:56px}
  #customers .cx__pt{padding-inline:0}
  #customers .cx__pt b{-webkit-line-clamp:3}
  #customers .cx__fig{font-size:24px;padding-top:12px}
  #customers .cx__cue{letter-spacing:.03em}
  /* labels never under 12px */
  #customers .cx__live{font-size:12px}
  #customers .cx__tag{font-size:max(12px,2.5cqw)}
  /* a label pinned in the last third of the drawing is anchored to the drawing's edge instead, so it cannot run off the screen (the position is an inline style, hence !important) */
  #customers .cx__tag[style*="left:7"]{left:auto!important;right:0}
  /* the "Read the full story" link is a 44px target */
  #customers .cxv .cxv__more{min-height:44px}
  #customers .cxv .cxv__more i{width:44px;height:44px}
}

/* ---- tablet portrait (single-column panel): the headline figure and its
        illustration sit side by side instead of a full-width drawing ---- */
@media (max-width:900px){
  #customers .cx__right{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);column-gap:28px;align-items:center}
  #customers .cx__kicker{grid-column:1 / -1;line-height:1.5}
  #customers .cx__metric{margin-top:10px}
  #customers .cx__metric b{font-size:clamp(44px,7.4vw,60px)}
  #customers .cx__proof{margin:0}
  #customers .cs-foot{row-gap:28px}
}

/* ---- phones: story cards become compact full-width rows, figure and
        illustration stack ---- */
@media (max-width:640px){
  #customers .cx__top{gap:12px;flex-wrap:wrap}
  #customers .cx__nav button{width:48px;height:48px}
  #customers .cx__rail{grid-template-columns:minmax(0,1fr);gap:12px}
  #customers .cx__pick,
  #customers .cx__pick + .cx__pick{grid-template-columns:auto minmax(0,1fr) auto;gap:12px 14px;padding:14px 16px 16px}
  #customers .cx__logo{grid-column:1;width:68px;height:46px}
  #customers .cx__pt{grid-column:2 / -1;padding-inline-end:26px}
  #customers .cx__pt b{-webkit-line-clamp:2;font-size:16px}
  #customers .cx__fig{grid-column:1 / 3;grid-row:2;font-size:23px;padding-top:12px;align-self:stretch}
  #customers .cx__cue{grid-column:3;grid-row:2;margin:0;padding-top:12px;align-self:stretch;display:flex;align-items:center;justify-content:flex-end;white-space:nowrap;border-top:1px solid #D5D9F2;font-size:12px;letter-spacing:.04em}
  #customers .cx__cue i{flex:none}
  #customers .cx__pick.on .cx__cue{border-top-color:rgba(169,176,245,.3)}

  #customers .cx__panel{gap:32px;padding-top:26px}
  #customers .cx__filmbar{inset-inline-start:74px;font-size:15px;gap:10px}
  #customers .cx__filmbar i{font-size:12px;padding:5px 7px}
  #customers .cx__film--soon .cx__filmbar{inset-inline-start:18px;bottom:18px}
  #customers .cx__corner{width:26px;height:26px}
  #customers .cxv{margin-top:46px}

  #customers .cx__right{display:block}
  #customers .cx__metric b{font-size:clamp(40px,13.5vw,58px)}
  #customers .cx__metric span{font-size:16px;max-width:none}
  #customers .cx__proof{margin-top:18px;max-width:420px;margin-inline:auto}
}

/* ---- very small phones ---- */
@media (max-width:380px){
  #customers .cx__count span{font-size:14px}
  #customers .cx__pick,
  #customers .cx__pick + .cx__pick{grid-template-columns:auto minmax(0,1fr)}
  #customers .cx__fig{grid-column:1 / -1}
  #customers .cx__cue{grid-column:1 / -1;grid-row:3;border-top:0;padding-top:0;justify-content:flex-start}
  #customers .cx__filmbar i{display:none}
}
