/*
 * RGYM Apparatuur Slider
 * 1. Basis en kleuren
 * 2. Intro en merkpositie
 * 3. Merklogo's
 * 4. Actieknoppen
 * 5. Slider
 * 6. Animaties en responsive gedrag
 */

/* 1. Basis en kleuren ------------------------------------------------------ */

.rgym-showcase,
.rgym-showcase *,
.rgym-showcase *::before,
.rgym-showcase *::after {
  box-sizing: border-box;
}

.rgym-showcase {
  --rgym-brand: #005b3b;
  --rgym-brand-dark: #003f2b;
  --rgym-brand-soft: #edf5f1;
  --rgym-heading: #153f30;
  --rgym-body: #60766b;
  --rgym-border: #bed0c6;
  --rgym-white: #ffffff;
  --rgym-focus: rgba(97, 191, 130, 0.52);
  --rgym-slide-x: 72%;
  --rgym-enter-x: 54%;

  container-type: inline-size;
  display: block;
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 0;
  overflow-x: clip;
  overflow-y: visible;
  color: var(--rgym-heading);
  background: var(--rgym-white);
  font-family: 'Syne', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  line-height: 1.5;
}

.rgym-showcase :is(h1, h2, h3, h4, h5, h6, p, figure) {
  margin-top: 0;
}

.rgym-showcase img {
  display: block;
  max-width: 100%;
}

.rgym-showcase a {
  color: inherit;
  text-decoration: none;
}

.rgym-showcase__layout {
  display: grid;
  grid-template-columns: minmax(0, 0.76fr) minmax(0, 1.44fr);
  align-items: end;
  width: 100%;
  min-width: 0;
  gap: clamp(34px, 5cqw, 88px);
}

/* 2. Intro en merkpositie ------------------------------------------------ */

.rgym-showcase__intro {
  display: flex;
  min-width: 0;
  min-height: clamp(500px, 43cqw, 690px);
  flex-direction: column;
  justify-content: space-between;
  margin: 0;
  padding: 0;
}

.rgym-showcase__intro-top {
  min-width: 0;
}

.rgym-slider-kicker {
  display: block;
  margin: 0 0 12px;
  color: var(--rgym-brand);
  font-size: clamp(12px, 0.85cqw, 14px);
  font-weight: 800;
  line-height: 1.3;
}

.rgym-word {
  display: inline-flex;
  align-items: baseline;
  white-space: nowrap;
}

.rgym-word__r {
  display: inline-block;
  transform: scaleX(-1);
  transform-origin: center;
}

/* 3. Merklogo's ---------------------------------------------------------- */

.rgym-showcase__logos {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(0, 0.78fr) minmax(0, 1.12fr);
  align-items: center;
  width: 100%;
  max-width: 560px;
  gap: clamp(16px, 2.1cqw, 30px);
  margin-top: 0;
}

.rgym-showcase__logo {
  display: flex;
  min-width: 0;
  height: clamp(48px, 4.2cqw, 66px);
  align-items: center;
  justify-content: flex-start;
}

.rgym-showcase__logo img {
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: contain;
  object-position: left center;
  opacity: 0.96;
}

.rgym-showcase__logo--gym80 img {
  transform: scale(1.08);
  transform-origin: left center;
}

.rgym-showcase__logo--life-fitness img {
  transform: scale(1.03);
  transform-origin: left center;
}

/* 4. Actieknoppen -------------------------------------------------------- */

.rgym-showcase__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 14px;
  margin-top: clamp(36px, 5cqw, 68px);
}

.rgym-showcase .rgym-showcase__button {
  display: inline-flex;
  width: auto;
  min-width: 176px;
  min-height: 54px;
  max-width: none;
  align-items: center;
  justify-content: center;
  align-self: stretch;
  gap: 10px;
  padding: 15px 26px;
  border: 2px solid transparent;
  border-radius: 10px;
  outline: 0;
  appearance: none;
  -webkit-appearance: none;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.1;
  text-align: center;
  text-decoration: none !important;
  text-shadow: none !important;
  white-space: nowrap;
  background-image: none !important;
  box-shadow: none;
  -webkit-tap-highlight-color: transparent;
  transition:
    color 180ms ease,
    background-color 180ms ease,
    border-color 180ms ease,
    transform 180ms ease;
}

/*
 * Elementor/thema's voegen geregeld globale hoverlagen toe aan links via
 * ::before en ::after. Die horen binnen deze shortcode nooit zichtbaar te zijn.
 */
.rgym-showcase .rgym-showcase__button::before,
.rgym-showcase .rgym-showcase__button::after,
.rgym-showcase .rgym-showcase__button:hover::before,
.rgym-showcase .rgym-showcase__button:hover::after,
.rgym-showcase .rgym-showcase__button:focus::before,
.rgym-showcase .rgym-showcase__button:focus::after,
.rgym-showcase .rgym-showcase__button:active::before,
.rgym-showcase .rgym-showcase__button:active::after {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  content: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  background: none !important;
  background-color: transparent !important;
  background-image: none !important;
  border: 0 !important;
  box-shadow: none !important;
  transform: none !important;
}

.rgym-showcase .rgym-showcase__button-label,
.rgym-showcase .rgym-showcase__button-arrow {
  position: relative;
  z-index: 1;
  color: inherit !important;
  text-decoration: none !important;
}

.rgym-showcase .rgym-showcase__button-arrow {
  display: inline-block;
  font-size: 18px;
  font-weight: 400;
  line-height: 1;
  transition: transform 180ms ease;
}

.rgym-showcase .rgym-showcase__button:hover .rgym-showcase__button-arrow,
.rgym-showcase .rgym-showcase__button:focus-visible .rgym-showcase__button-arrow {
  transform: translateX(3px);
}

/* Primaire CTA: groen vlak met altijd witte inhoud. */
.rgym-showcase a.rgym-showcase__button.rgym-btn--primary,
.rgym-showcase a.rgym-showcase__button.rgym-btn--primary:link,
.rgym-showcase a.rgym-showcase__button.rgym-btn--primary:visited {
  border-color: var(--rgym-brand) !important;
  color: var(--rgym-white) !important;
  background: var(--rgym-brand) !important;
  background-color: var(--rgym-brand) !important;
  background-image: none !important;
}

.rgym-showcase a.rgym-showcase__button.rgym-btn--primary:hover,
.rgym-showcase a.rgym-showcase__button.rgym-btn--primary:focus,
.rgym-showcase a.rgym-showcase__button.rgym-btn--primary:focus-visible,
.rgym-showcase a.rgym-showcase__button.rgym-btn--primary:active {
  border-color: var(--rgym-brand-dark) !important;
  color: var(--rgym-white) !important;
  background: var(--rgym-brand-dark) !important;
  background-color: var(--rgym-brand-dark) !important;
  background-image: none !important;
}

/* Secundaire CTA: wit met groene lijn, lichte groene hover. */
.rgym-showcase a.rgym-showcase__button.rgym-btn--secondary,
.rgym-showcase a.rgym-showcase__button.rgym-btn--secondary:link,
.rgym-showcase a.rgym-showcase__button.rgym-btn--secondary:visited {
  border-color: var(--rgym-brand) !important;
  color: var(--rgym-brand-dark) !important;
  background: var(--rgym-white) !important;
  background-color: var(--rgym-white) !important;
  background-image: none !important;
}

.rgym-showcase a.rgym-showcase__button.rgym-btn--secondary:hover,
.rgym-showcase a.rgym-showcase__button.rgym-btn--secondary:focus,
.rgym-showcase a.rgym-showcase__button.rgym-btn--secondary:focus-visible,
.rgym-showcase a.rgym-showcase__button.rgym-btn--secondary:active {
  border-color: var(--rgym-brand) !important;
  color: var(--rgym-brand-dark) !important;
  background: var(--rgym-brand-soft) !important;
  background-color: var(--rgym-brand-soft) !important;
  background-image: none !important;
}

/* 5. Slider -------------------------------------------------------------- */

.rgym-apparaten-slider {
  align-self: end;
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 0;
  overflow: visible;
}

.rgym-slider-card {
  position: relative;
  width: 100%;
  min-width: 0;
  min-height: clamp(520px, 44cqw, 720px);
  margin: 0;
  padding: 0;
  overflow: visible;
  background: transparent;
  isolation: isolate;
}

.rgym-slider-copy {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 8;
  width: min(31%, 340px);
  min-width: 0;
  padding: 20px 22px 22px;
  border-radius: 12px;
  color: var(--rgym-heading);
  background: var(--rgym-white) !important;
  background-color: var(--rgym-white) !important;
  background-image: none !important;
  box-shadow: none;
  pointer-events: none;
}

.rgym-slider-title {
  margin: 0;
  color: var(--rgym-heading);
  font-size: clamp(28px, 2.55cqw, 42px);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: -0.05em;
  text-wrap: balance;
}

.rgym-slider-text {
  display: -webkit-box;
  width: 100%;
  margin: 18px 0 0;
  overflow: hidden;
  color: var(--rgym-body);
  font-size: clamp(13px, 1cqw, 16px);
  font-weight: 500;
  line-height: 1.6;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 5;
}

.rgym-slider-title,
.rgym-slider-text {
  transition: opacity 240ms ease, transform 240ms ease, filter 240ms ease;
}

.rgym-slider-copy.is-changing .rgym-slider-title,
.rgym-slider-copy.is-changing .rgym-slider-text {
  opacity: 0;
  filter: blur(3px);
  transform: translate3d(0, 6px, 0);
}

.rgym-slider-stage {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  min-width: 0;
  overflow: visible;
  pointer-events: none;
}

.rgym-slider-img {
  position: absolute;
  top: 54%;
  right: 0;
  width: auto;
  max-width: 72%;
  max-height: 92%;
  object-fit: contain;
  backface-visibility: hidden;
  transform-origin: center;
  transform-style: preserve-3d;
  will-change: transform, opacity, filter;
}

.rgym-slider-img.is-current {
  z-index: 5;
  opacity: 1;
  filter: grayscale(1) contrast(1.04) saturate(0.9);
  transform: translate3d(0, -50%, 0);
}

.rgym-slider-img.is-prev-ghost {
  z-index: 3;
  opacity: 0.11;
  filter: blur(7px) grayscale(1) saturate(0) contrast(0.95);
  transform: translate3d(calc(var(--rgym-slide-x) * -1), -50%, 0) scale(0.78);
}

.rgym-slider-img.is-next-ghost {
  z-index: 3;
  opacity: 0.06;
  filter: blur(9px) grayscale(1) saturate(0) contrast(0.95);
  transform: translate3d(var(--rgym-slide-x), -50%, 0) scale(0.78);
}

.rgym-slider-img.is-enter-next {
  z-index: 6;
  opacity: 0;
  filter: blur(18px) grayscale(1) saturate(0);
  transform: translate3d(var(--rgym-enter-x), -50%, 0);
  animation: rgym-enter-next 900ms cubic-bezier(0.16, 0.84, 0.18, 1) forwards;
}

.rgym-slider-img.is-enter-prev {
  z-index: 6;
  opacity: 0.15;
  filter: blur(10px) grayscale(1) saturate(0);
  transform: translate3d(calc(var(--rgym-slide-x) * -1), -50%, 0) scale(0.78);
  animation: rgym-enter-prev 900ms cubic-bezier(0.16, 0.84, 0.18, 1) forwards;
}

.rgym-slider-img.is-leave-next {
  z-index: 4;
  animation: rgym-leave-next 760ms cubic-bezier(0.28, 0.04, 0.18, 1) forwards;
}

.rgym-slider-img.is-leave-prev {
  z-index: 4;
  animation: rgym-leave-prev 760ms cubic-bezier(0.28, 0.04, 0.18, 1) forwards;
}

.rgym-slider-controls {
  position: absolute;
  bottom: 0;
  left: 0;
  z-index: 12;
  display: flex;
  align-items: center;
  gap: 10px;
}

.rgym-showcase .rgym-slider-controls .rgym-slider-arrow {
  position: relative !important;
  isolation: isolate !important;
  display: grid !important;
  width: 42px !important;
  height: 42px !important;
  min-width: 42px !important;
  min-height: 42px !important;
  place-items: center !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 999px !important;
  outline: 0 !important;
  overflow: hidden !important;
  color: #ffffff !important;
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  text-decoration: none !important;
  cursor: pointer !important;
  user-select: none !important;
  -webkit-user-select: none !important;
  -webkit-tap-highlight-color: transparent !important;
  transform: none !important;
}

.rgym-showcase .rgym-slider-controls .rgym-slider-arrow:hover,
.rgym-showcase .rgym-slider-controls .rgym-slider-arrow:focus,
.rgym-showcase .rgym-slider-controls .rgym-slider-arrow:focus-visible,
.rgym-showcase .rgym-slider-controls .rgym-slider-arrow:active {
  outline: 0 !important;
  color: #ffffff !important;
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  border: 0 !important;
  box-shadow: none !important;
  transform: none !important;
}

.rgym-showcase .rgym-slider-controls .rgym-slider-arrow::before,
.rgym-showcase .rgym-slider-controls .rgym-slider-arrow::after {
  display: none !important;
  content: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  background: none !important;
  background-image: none !important;
  border: 0 !important;
  box-shadow: none !important;
}

.rgym-showcase .rgym-slider-controls .rgym-slider-arrow-surface,
.rgym-showcase .rgym-slider-controls .rgym-slider-arrow:hover .rgym-slider-arrow-surface,
.rgym-showcase .rgym-slider-controls .rgym-slider-arrow:focus .rgym-slider-arrow-surface,
.rgym-showcase .rgym-slider-controls .rgym-slider-arrow:focus-visible .rgym-slider-arrow-surface,
.rgym-showcase .rgym-slider-controls .rgym-slider-arrow:active .rgym-slider-arrow-surface {
  position: absolute !important;
  inset: 0 !important;
  z-index: 1 !important;
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  border: 0 !important;
  border-radius: 999px !important;
  outline: 0 !important;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: none !important;
  background: #005b3b !important;
  background-color: #005b3b !important;
  background-image: none !important;
  box-shadow: none !important;
  transform: none !important;
}

.rgym-showcase .rgym-slider-controls .rgym-slider-arrow svg {
  position: relative !important;
  z-index: 2 !important;
  width: 19px !important;
  height: 19px !important;
  margin: 0 !important;
  padding: 0 !important;
  fill: none !important;
  color: #ffffff !important;
  stroke: #ffffff !important;
  stroke-width: 2.6 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
  pointer-events: none !important;
}

.rgym-showcase .rgym-slider-controls .rgym-slider-arrow[aria-disabled="true"] {
  opacity: 0.45 !important;
  cursor: default !important;
}

/* Alleen de slidercontainer zelf behoudt een focusmarkering voor toetsenbordgebruik. */
.rgym-apparaten-slider:focus-visible {
  outline: 3px solid var(--rgym-focus);
  outline-offset: 4px;
}

.rgym-apparaten-slider.is-single .rgym-slider-controls {
  display: none;
}

.rgym-slider-empty {
  width: 100%;
  margin: 0;
  padding: 18px 20px;
  border: 1px solid #bed0c6;
  border-radius: 8px;
  color: #153f30;
  background: #ffffff;
  font-family: 'Syne', system-ui, sans-serif;
}

/* 6. Animaties en responsive gedrag ------------------------------------- */

@keyframes rgym-enter-next {
  0% {
    opacity: 0;
    filter: blur(18px) grayscale(1) saturate(0);
    transform: translate3d(var(--rgym-enter-x), -50%, 0);
  }

  72% {
    opacity: 1;
    filter: blur(2px) grayscale(1) saturate(0.55);
    transform: translate3d(-1.5%, -50%, 0);
  }

  100% {
    opacity: 1;
    filter: blur(0) grayscale(1) contrast(1.04) saturate(0.9);
    transform: translate3d(0, -50%, 0);
  }
}

@keyframes rgym-enter-prev {
  0% {
    opacity: 0.15;
    filter: blur(10px) grayscale(1) saturate(0);
    transform: translate3d(calc(var(--rgym-slide-x) * -1), -50%, 0) scale(0.78);
  }

  72% {
    opacity: 1;
    filter: blur(2px) grayscale(1) saturate(0.55);
    transform: translate3d(1.5%, -50%, 0) scale(1);
  }

  100% {
    opacity: 1;
    filter: blur(0) grayscale(1) contrast(1.04) saturate(0.9);
    transform: translate3d(0, -50%, 0) scale(1);
  }
}

@keyframes rgym-leave-next {
  0% {
    opacity: 1;
    filter: blur(0) grayscale(1);
    transform: translate3d(0, -50%, 0) scale(1);
  }

  100% {
    opacity: 0.11;
    filter: blur(7px) grayscale(1) saturate(0);
    transform: translate3d(calc(var(--rgym-slide-x) * -1), -50%, 0) scale(0.78);
  }
}

@keyframes rgym-leave-prev {
  0% {
    opacity: 1;
    filter: blur(0) grayscale(1);
    transform: translate3d(0, -50%, 0);
  }

  100% {
    opacity: 0;
    filter: blur(14px) grayscale(1) saturate(0);
    transform: translate3d(var(--rgym-enter-x), -50%, 0);
  }
}

@container (max-width: 980px) {
  .rgym-showcase__layout {
    grid-template-columns: 1fr;
    gap: clamp(48px, 8cqw, 78px);
  }

  .rgym-showcase__intro {
    min-height: 0;
  }

  .rgym-showcase__logos {
    max-width: 640px;
  }

  .rgym-showcase__actions {
    margin-top: 36px;
  }

  .rgym-slider-card {
    min-height: clamp(540px, 72cqw, 700px);
  }

  .rgym-slider-copy {
    width: min(34%, 340px);
    padding: 18px 20px 20px;
  }

  .rgym-slider-title {
    font-size: clamp(27px, 4.3cqw, 38px);
  }

  .rgym-slider-text {
    font-size: clamp(13px, 2cqw, 16px);
  }
}

@container (max-width: 680px) {
  .rgym-showcase__layout {
    gap: 54px;
  }

  .rgym-showcase__logos {
    grid-template-columns: minmax(0, 1.16fr) minmax(0, 0.82fr) minmax(0, 1.12fr);
    gap: 10px;
    margin-top: 0;
  }

  .rgym-showcase__logo {
    height: clamp(38px, 12cqw, 50px);
  }

  .rgym-showcase__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .rgym-showcase__button {
    width: 100%;
  }

  .rgym-slider-card {
    min-height: 620px;
  }

  .rgym-slider-copy {
    position: relative;
    width: 100%;
    min-height: 180px;
    max-width: none;
    padding: 18px 18px 20px;
  }

  .rgym-slider-title {
    font-size: clamp(27px, 8cqw, 36px);
  }

  .rgym-slider-text {
    max-height: 120px;
    font-size: clamp(13px, 4cqw, 16px);
    -webkit-line-clamp: 4;
  }

  .rgym-slider-stage {
    top: 170px;
    bottom: 58px;
  }

  .rgym-slider-img {
    top: 52%;
    right: 50%;
    width: auto;
    max-width: 92%;
    max-height: 90%;
  }

  .rgym-slider-img.is-current {
    transform: translate3d(50%, -50%, 0);
  }

  .rgym-slider-img.is-prev-ghost,
  .rgym-slider-img.is-next-ghost {
    display: none;
  }

  .rgym-slider-img.is-enter-next,
  .rgym-slider-img.is-enter-prev {
    right: 50%;
    transform: translate3d(50%, -50%, 0);
    animation: rgym-mobile-center-enter 720ms cubic-bezier(0.22, 0.72, 0.18, 1) forwards;
  }

  .rgym-slider-img.is-leave-next,
  .rgym-slider-img.is-leave-prev {
    right: 50%;
    animation: rgym-mobile-center-leave 620ms cubic-bezier(0.32, 0.02, 0.22, 1) forwards;
  }

  .rgym-slider-controls {
    right: 0;
    left: auto;
  }
}

@keyframes rgym-mobile-center-enter {
  0% {
    opacity: 0;
    filter: blur(18px) grayscale(1) saturate(0);
    transform: translate3d(50%, -50%, 0);
  }

  100% {
    opacity: 1;
    filter: blur(0) grayscale(1) contrast(1.04) saturate(0.9);
    transform: translate3d(50%, -50%, 0);
  }
}

@keyframes rgym-mobile-center-leave {
  0% {
    opacity: 1;
    filter: blur(0) grayscale(1);
    transform: translate3d(50%, -50%, 0);
  }

  100% {
    opacity: 0;
    filter: blur(12px) grayscale(1) saturate(0);
    transform: translate3d(50%, -50%, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .rgym-showcase *,
  .rgym-showcase *::before,
  .rgym-showcase *::after {
    scroll-behavior: auto !important;
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }
}
