/* ==================== Hero slideshow (theme-parts/section/slider.blade.php) ====================
   Every slide sits in a fixed-height frame and the image is cropped to fill it (object-fit: cover),
   so mixed image shapes never make the page jump. Height, width, pagination and mobile layout
   come from the store's slideshow settings; content position, colour and overlay are per slide. */

.ss-slideshow {
  --ss-h: clamp(320px, 40vw, 600px);
  position: relative;
  overflow: hidden;
}

.ss-slideshow.ss-h-small { --ss-h: clamp(240px, 30vw, 440px); }
.ss-slideshow.ss-h-medium { --ss-h: clamp(320px, 40vw, 600px); }
.ss-slideshow.ss-h-large { --ss-h: clamp(420px, 56vw, 800px); }

.ss-slideshow.ss-boxed {
  margin-top: 24px;
  padding: 0;
}

.ss-slideshow.ss-boxed .ss-slide-media { border-radius: 14px; }

.ss-slideshow .ss-slide { position: relative; }

.ss-slideshow .ss-slide-media {
  position: relative;
  height: var(--ss-h);
  overflow: hidden;
  background: #eef0f3;
}

.ss-slideshow.ss-h-adapt .ss-slide-media {
  height: auto;
  aspect-ratio: var(--ss-ratio, 16 / 7);
  max-height: 85vh;
}

.ss-slideshow .ss-slide-media picture { display: block; height: 100%; }

.ss-slideshow .ss-slide-media img.banner-bg {
  display: block;
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* "Show full image": nothing is cut off; a blurred, softened copy of the picture fills the rest of the frame. */
.ss-slideshow .ss-fit-contain .ss-slide-media img.banner-bg,
.ss-slideshow .ss-fit-auto.is-contained .ss-slide-media img.banner-bg {
  object-fit: contain;
}

/* Leave room for the on-image indicator so it never sits over the picture. */
.ss-slideshow.ss-ctrl-image .ss-fit-contain .ss-slide-media img.banner-bg,
.ss-slideshow.ss-ctrl-image .ss-fit-auto.is-contained .ss-slide-media img.banner-bg { box-sizing: border-box; padding: 16px 0 54px; }

/* "Auto" slides stay invisible until the script has chosen crop or full image, so the cropped
   version never flashes; the delayed animation reveals them anyway if the script never runs. */
.ss-slideshow .ss-fit-auto:not(.is-fit) .ss-slide-media img.banner-bg { opacity: 0; animation: ss-reveal 0s 1.5s forwards; }
.ss-slideshow .ss-fit-auto .ss-slide-media img.banner-bg { transition: opacity 0.25s ease; }
@keyframes ss-reveal { to { opacity: 1; } }

.ss-slideshow .ss-slide-backdrop {
  position: absolute;
  inset: -40px;
  background-color: #eef0f3;
  background-position: center;
  background-size: cover;
  filter: blur(28px) saturate(1.15) brightness(0.9);
  transform: scale(1.08);
}

.ss-slideshow .ss-slide-overlay {
  z-index: 1;
  position: absolute;
  inset: 0;
  background: #000;
  pointer-events: none;
}

/* ---------- content box ---------- */
.ss-slideshow .ss-slide-content {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  padding: clamp(24px, 5vw, 72px) clamp(20px, 7vw, 110px);
  pointer-events: none;
}

.ss-slideshow .ss-slide-box { max-width: 620px; }
.ss-slideshow .ss-slide-btn { pointer-events: auto; }

.ss-pos-top-left, .ss-pos-top-center, .ss-pos-top-right { align-items: flex-start; }
.ss-pos-middle-left, .ss-pos-middle-center, .ss-pos-middle-right { align-items: center; }
.ss-pos-bottom-left, .ss-pos-bottom-center, .ss-pos-bottom-right { align-items: flex-end; }
.ss-pos-top-left, .ss-pos-middle-left, .ss-pos-bottom-left { justify-content: flex-start; text-align: start; }
.ss-pos-top-center, .ss-pos-middle-center, .ss-pos-bottom-center { justify-content: center; text-align: center; }
.ss-pos-top-right, .ss-pos-middle-right, .ss-pos-bottom-right { justify-content: flex-end; text-align: end; }

.ss-slideshow .ss-slide-heading {
  margin: 0 0 12px;
  font-size: clamp(1.6rem, 3.4vw, 3.4rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: inherit;
}

.ss-slideshow .ss-slide-subheading {
  margin: 0 0 22px;
  font-size: clamp(0.95rem, 1.3vw, 1.2rem);
  line-height: 1.5;
  color: inherit;
  opacity: 0.92;
}

.ss-slideshow .ss-slide-btn {
  padding: 12px 30px;
  border-radius: 999px;
  font-weight: 600;
  background: var(--bs-primary);
  border: 1px solid var(--bs-primary);
  color: #fff;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ss-slideshow .ss-slide-btn:hover {
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
}

.ss-slideshow .ss-text-light .ss-slide-content { color: #fff; text-shadow: 0 1px 12px rgba(0, 0, 0, 0.25); }
.ss-slideshow .ss-text-dark .ss-slide-content { color: #111418; }

/* Whole-slide link when the slide has no button. */
.ss-slideshow .ss-slide-link {
  position: absolute;
  inset: 0;
  z-index: 2;
}

/* ---------- controls (arrows · bars/dots/counter · pause) ---------- */
.ss-slideshow { --ss-mh: var(--ss-h); }

.ss-slideshow .ss-arrow,
.ss-slideshow .ss-pause {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 50%;
  cursor: pointer;
  transition: opacity 0.25s ease, transform 0.25s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.ss-slideshow .ss-arrow { width: 46px; height: 46px; font-size: 15px; }
.ss-slideshow .ss-pause { width: 34px; height: 34px; font-size: 11px; }
.ss-slideshow .ss-pause.d-none,
.ss-slideshow .ss-pager.d-none { display: none; }
.ss-slideshow.ss-arrows-hidden .ss-arrow { display: none; }

.ss-slideshow .ss-arrow:focus-visible,
.ss-slideshow .ss-pause:focus-visible,
.ss-slideshow .ss-bar:focus-visible,
.ss-slideshow .ss-dot:focus-visible {
  outline: 2px solid var(--bs-primary);
  outline-offset: 3px;
}

.ss-slideshow .ss-pager { display: flex; align-items: center; gap: 8px; }

/* Progress bars: the active bar fills over the rotation time and freezes while paused. */
.ss-slideshow .ss-bar {
  position: relative;
  width: 34px;
  height: 20px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.ss-slideshow .ss-bar::before,
.ss-slideshow .ss-bar-fill {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  height: 3px;
  margin-top: -1.5px;
  border-radius: 3px;
}

.ss-slideshow .ss-bar::before { right: 0; background: var(--ss-track); }
.ss-slideshow .ss-bar-fill { width: 0; background: var(--ss-fill); }
.ss-slideshow .ss-bar.done .ss-bar-fill,
.ss-slideshow:not(.ss-autoplay) .ss-bar.active .ss-bar-fill { width: 100%; }
.ss-slideshow.ss-autoplay .ss-bar.active .ss-bar-fill { animation: ss-bar-fill var(--ss-speed, 5s) linear forwards; }
.ss-slideshow.is-paused .ss-bar.active .ss-bar-fill { animation-play-state: paused; }

@keyframes ss-bar-fill {
  from { width: 0; }
  to { width: 100%; }
}

.ss-slideshow .ss-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: var(--ss-track);
  cursor: pointer;
  transition: width 0.3s ease, background 0.3s ease;
}

.ss-slideshow .ss-dot.active { width: 24px; background: var(--ss-fill); }

.ss-slideshow .ss-counter {
  min-width: 44px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-align: center;
  color: var(--ss-fill);
}

/* On the image: a frame over the picture area; arrows at the sides, indicator + pause along the bottom. */
.ss-slideshow.ss-ctrl-image { --ss-track: rgba(255, 255, 255, 0.45); --ss-fill: #fff; }

.ss-slideshow.ss-ctrl-image .ss-slideshow-controls {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: var(--ss-mh);
  z-index: 5;
  pointer-events: none;
}

.ss-slideshow.ss-ctrl-image .ss-slideshow-controls > * { pointer-events: auto; }

.ss-slideshow.ss-ctrl-image .ss-arrow {
  position: absolute;
  top: 50%;
  margin-top: -23px;
  border: 0;
  background: rgba(255, 255, 255, 0.82);
  color: #111418;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.16);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.ss-slideshow.ss-ctrl-image .ss-prev { left: 22px; }
.ss-slideshow.ss-ctrl-image .ss-next { right: 22px; }
.ss-slideshow.ss-ctrl-image .ss-arrow:hover { background: #fff; transform: scale(1.06); }

.ss-slideshow.ss-ctrl-image.ss-arrows-hover .ss-prev { opacity: 0; transform: translateX(-8px); }
.ss-slideshow.ss-ctrl-image.ss-arrows-hover .ss-next { opacity: 0; transform: translateX(8px); }
.ss-slideshow.ss-ctrl-image.ss-arrows-hover:hover .ss-arrow,
.ss-slideshow.ss-ctrl-image.ss-arrows-hover:focus-within .ss-arrow { opacity: 1; transform: none; }
.ss-slideshow.ss-ctrl-image.ss-arrows-hover:hover .ss-arrow:hover { transform: scale(1.06); }

.ss-slideshow.ss-ctrl-image .ss-pager {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(17, 20, 24, 0.28);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.ss-slideshow.ss-ctrl-image .ss-pause {
  position: absolute;
  bottom: 18px;
  right: 22px;
  border: 0;
  background: rgba(17, 20, 24, 0.28);
  color: #fff;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.ss-slideshow.ss-ctrl-image .ss-pause:hover { background: rgba(17, 20, 24, 0.5); }

/* Keep bottom-aligned slide text clear of the indicator. */
.ss-slideshow.ss-ctrl-image .ss-slide-content { padding-bottom: calc(clamp(24px, 5vw, 72px) + 34px); }

/* Below the image: a slim centred bar. */
.ss-slideshow.ss-ctrl-below { --ss-track: rgba(17, 20, 24, 0.16); --ss-fill: var(--bs-primary); }

.ss-slideshow.ss-ctrl-below .ss-slideshow-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 14px 16px;
}

.ss-slideshow.ss-ctrl-below .ss-arrow,
.ss-slideshow.ss-ctrl-below .ss-pause {
  width: 36px;
  height: 36px;
  font-size: 12px;
  border: 1px solid rgba(17, 20, 24, 0.14);
  background: #fff;
  color: #1f2328;
}

.ss-slideshow.ss-ctrl-below .ss-arrow:hover,
.ss-slideshow.ss-ctrl-below .ss-pause:hover {
  background: var(--bs-primary);
  border-color: var(--bs-primary);
  color: #fff;
}

.ss-slideshow.ss-ctrl-below .ss-pause { margin-inline-start: 6px; }

[dir="rtl"] .ss-slideshow .ss-arrow i { transform: scaleX(-1); }

/* Touch screens have no hover: "on hover" arrows give way to swiping. */
@media (hover: none) {
  .ss-slideshow.ss-ctrl-image.ss-arrows-hover .ss-arrow { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .ss-slideshow .ss-arrow,
  .ss-slideshow .ss-dot { transition: none; }
}

/* ---------- mobile ---------- */
@media (max-width: 767.98px) {
  .ss-slideshow.ss-h-small { --ss-h: 240px; }
  .ss-slideshow.ss-h-medium { --ss-h: 340px; }
  .ss-slideshow.ss-h-large { --ss-h: 480px; }

  .ss-slideshow.ss-boxed { margin-top: 12px; padding: 0 12px; }
  .ss-slideshow.ss-boxed .ss-slide-media { border-radius: 10px; }

  .ss-slideshow .ss-slide-content { padding: 20px; }

  /* "Text below the image": content drops under the picture, so the image stays clean. */
  .ss-slideshow.ss-m-below .ss-slide-content {
    position: static;
    justify-content: center;
    align-items: flex-start;
    text-align: center;
    padding: 18px 16px 4px;
    color: #111418;
    text-shadow: none;
  }

  .ss-slideshow.ss-m-below .ss-slide-overlay { display: none; }
  .ss-slideshow.ss-m-below .ss-slide-link { bottom: auto; height: var(--ss-h); }
  .ss-slideshow.ss-m-below.ss-h-adapt .ss-slide-link { height: auto; bottom: 0; }

  .ss-slideshow .ss-slide-subheading { margin-bottom: 16px; }
  .ss-slideshow .ss-slide-btn { padding: 10px 24px; }
  .ss-slideshow.ss-ctrl-below .ss-slideshow-controls { padding: 12px; gap: 10px; }
  .ss-slideshow.ss-ctrl-below .ss-arrow, .ss-slideshow.ss-ctrl-below .ss-pause { width: 32px; height: 32px; }
  .ss-slideshow.ss-ctrl-image .ss-arrow { width: 36px; height: 36px; margin-top: -18px; font-size: 12px; }
  .ss-slideshow.ss-ctrl-image .ss-prev { left: 10px; }
  .ss-slideshow.ss-ctrl-image .ss-next { right: 10px; }
  .ss-slideshow.ss-ctrl-image .ss-pager { bottom: 12px; padding: 2px 10px; }
  .ss-slideshow.ss-ctrl-image .ss-pause { bottom: 12px; right: 10px; width: 30px; height: 30px; }
  .ss-slideshow.ss-ctrl-image .ss-bar { width: 26px; }
  .ss-slideshow.ss-boxed.ss-ctrl-image .ss-slideshow-controls { left: 12px; right: 12px; }
  .ss-slideshow.ss-ctrl-image .ss-fit-contain .ss-slide-media img.banner-bg,
  .ss-slideshow.ss-ctrl-image .ss-fit-auto.is-contained .ss-slide-media img.banner-bg { padding: 10px 0 42px; }
}

/* ---------- "Who we are" image: always shown whole, capped in height so tall uploads stay tidy ---------- */
section img.ss-whoweare-img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 480px;
  margin-inline: auto;
  object-fit: contain;
}

@media (max-width: 767.98px) {
  section img.ss-whoweare-img { max-height: 360px; }
}
