/* Certified restaurants slider (home page).
   Sizes follow the site's one scaling rule: design px at 1280 times --fluid-ratio (a length: one design px) on desktop and tablet,
   plain px on phones. Colours and fonts are the ones the captured Wix sections use. */
.tba-cert {
  --ink: #2f2b36;
  --sans: wfont_de1b71_c784586d5d024719ba9f8124372fe010, wf_c784586d5d024719ba9f81243, orig_montserrat_light, sans-serif;
  --serif: ogg, serif;
  --u: var(--fluid-ratio);
  --gutter: calc(56 * var(--u));
  --gap: calc(12 * var(--u));
  --line: rgba(47, 43, 54, .3);
  /* each picture about 32% larger (2 x 15%) than four in a row inside both gutters; the cut picture on the right
     shows there is more */
  --per-view: 3.2;
  position: relative;
  box-sizing: border-box;
  width: 100%;
  padding: calc(72 * var(--u)) 0 0;   /* the statement section below brings its own top space */
  color: var(--ink);
  font-family: var(--sans);
}
.tba-cert *, .tba-cert *::before, .tba-cert *::after { box-sizing: border-box; }

/* no divider of its own: the full-width rule closing the PURPOSE section above already separates it */
.tba-cert__head { margin: 0 var(--gutter) calc(32 * var(--u)); }
.tba-cert__kicker { margin: 0; font: 400 calc(16 * var(--u))/1.4 var(--sans); letter-spacing: 0; }
.tba-cert__title { margin: 0; font: 400 calc(20 * var(--u))/1.2 var(--sans); }

.tba-cert__stage { position: relative; padding: 0 0 0 var(--gutter); }   /* the half picture runs to the edge */
.tba-cert__viewport { overflow: hidden; touch-action: pan-y; }
.tba-cert__track {
  display: flex;
  gap: var(--gap);
  margin: 0;
  padding: 0;
  list-style: none;
  will-change: transform;
  transition: transform 1100ms cubic-bezier(.45, 0, .2, 1);
}
.tba-cert__track.is-jumping { transition: none; }
.tba-cert__slide {
  flex: 0 0 calc((100% - (var(--per-view) - 1) * var(--gap)) / var(--per-view));
  margin: 0;
}
.tba-cert__slide img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: #ebe8e3;
  user-select: none;
  -webkit-user-drag: none;
}

/* plain chevrons, level with the middle of the pictures: the left one in the gutter, the right one over the half
   picture at the edge */
.tba-cert__arrow {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: calc(40 * var(--u));
  height: calc(40 * var(--u));
  min-width: 32px;
  min-height: 32px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  cursor: pointer;
  transform: translateY(-50%);
  transition: opacity .3s ease, transform .3s ease;
}
.tba-cert__arrow:hover { opacity: .6; }
.tba-cert__arrow--next { color: #fff; filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .45)); }
.tba-cert__arrow:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.tba-cert__arrow svg { width: 70%; height: 70%; }
.tba-cert__arrow--prev { left: calc((var(--gutter) - max(32px, 40 * var(--u))) / 2); }
.tba-cert__arrow--next { right: calc(16 * var(--u)); }


.tba-cert .sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

/* tablet: three pictures */
@media (min-width: 751px) and (max-width: 1000px) { .tba-cert { --per-view: 2.25; --u: calc(var(--fluid-scale) / 936); --gutter: calc(40 * var(--u)); } }

/* phone: one picture with the next one peeking in, arrows over the pictures */
@media (max-width: 750px) {
  .tba-cert { --u: 1px; --gutter: 20px; --gap: 8px; --per-view: 1.1; padding: 40px 0 20px; }
  .tba-cert__head { margin-bottom: 20px; }
  .tba-cert__kicker { font-size: 14px; }
  .tba-cert__title { font-size: 18px; }
  .tba-cert__arrow { width: 36px; height: 36px; }
  .tba-cert__arrow--prev { left: 24px; color: #fff; filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .45)); }
  .tba-cert__arrow--next { right: 8px; }
}

@media (prefers-reduced-motion: reduce) { .tba-cert__track { transition: none; } }

/* The two sections the slider can sit in: one is a wrapping flex column, the other a block. The slider becomes
   their last full-width row either way (nowrap, or the column would wrap it into a second column beside the text). */
section.has-tba-cert { flex-wrap: nowrap; }
/* first row, above the statement, and above the section's own background layer */
section.has-tba-cert > .tba-cert { flex: none; width: 100%; order: -1; z-index: 1; }
