.rfs3 {
  --rfs3-gap: clamp(0.55rem, 1.8vw, 1.5rem);
  --rfs3-card-radius: 0.85rem;
  --rfs3-accent: var(--wp--preset--color--primary, var(--wp--preset--color--accent, var(--wp--preset--color--contrast, #111827)));
  --rfs3-accent-text: var(--wp--preset--color--base, #fff);
  --rfs3-surface: var(--wp--preset--color--base, #fff);
  --rfs3-muted: var(--wp--preset--color--contrast-2, #667085);
  max-width: 1200px;
  margin: 2.5rem 0;
  color: var(--rfs3-accent);
}

.rfs3__carousel--mobile {
  display: none;
}

.rfs3__viewport {
  overflow: hidden;
  border-radius: var(--rfs3-card-radius);
  outline: none;
  touch-action: pan-y;
}

.rfs3__viewport:focus-visible {
  box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--rfs3-accent);
}

.rfs3__track {
  display: flex;
  transform: translate3d(0, 0, 0);
  transition: transform 420ms cubic-bezier(.22, .61, .36, 1);
  will-change: transform;
}

.rfs3__slide {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--rfs3-gap);
  flex: 0 0 100%;
  min-width: 0;
}

.rfs3__card {
  min-width: 0;
  text-align: left;
}

.rfs3__image-button {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  overflow: hidden;
  border-radius: var(--rfs3-card-radius);
  background: #eef1f5;
  aspect-ratio: 4 / 3;
  cursor: pointer;
  isolation: isolate;
}

.rfs3__image-button img {
  position: relative;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 280ms ease;
}

.rfs3__image-button::after {
  position: absolute;
  z-index: 1;
  inset: 0;
  background: rgb(0 0 0 / 23%);
  content: "";
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease;
}

.rfs3__image-button:hover img,
.rfs3__image-button:focus-visible img {
  transform: scale(1.04);
}

.rfs3__image-button:hover::after,
.rfs3__image-button:focus-visible::after {
  opacity: 1;
}

.rfs3__image-button:focus-visible {
  outline: 3px solid var(--rfs3-accent);
  outline-offset: 3px;
}

.rfs3__service-title {
  position: absolute;
  z-index: 2;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 1.5rem 0.8rem 0.75rem;
  overflow-wrap: anywhere;
  background: linear-gradient(to top, rgb(0 0 0 / 70%), transparent);
  color: #fff;
  font-size: clamp(0.72rem, 2.2vw, 1rem);
  font-weight: 650;
  line-height: 1.3;
  text-align: left;
  text-shadow: 0 1px 2px rgb(0 0 0 / 60%);
  pointer-events: none;
}

.rfs3__controls {
  display: grid;
  grid-template-columns: 2.75rem 1fr 2.75rem;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1rem;
}

.rfs3__button,
.rfs3__dot {
  border: 0;
  background: transparent;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.rfs3__button {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid #d0d5dd;
  border-radius: 0.9rem;
  background: var(--rfs3-surface);
  border: 1px solid color-mix(in srgb, var(--rfs3-accent) 26%, transparent);
  background: color-mix(in srgb, var(--rfs3-accent) 9%, var(--rfs3-surface));
  color: var(--rfs3-accent);
  font-size: 1.25rem;
  box-shadow: 0 3px 10px rgb(16 24 40 / 8%);
  transition: transform 180ms ease, background-color 180ms ease, border-color 180ms ease, color 180ms ease, box-shadow 180ms ease;
}

.rfs3__button:hover {
  border-color: var(--rfs3-accent);
  background: var(--rfs3-accent);
  color: var(--rfs3-accent-text);
  box-shadow: 0 8px 18px rgb(16 24 40 / 18%);
  box-shadow: 0 8px 18px color-mix(in srgb, var(--rfs3-accent) 28%, transparent);
  transform: translateY(-2px);
}

.rfs3__button:active {
  transform: translateY(0) scale(0.96);
}

.rfs3__button:focus-visible,
.rfs3__dot:focus-visible {
  outline: 3px solid #84adff;
  outline-offset: 3px;
}

.rfs3__dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
}

.rfs3__dot {
  width: 0.7rem;
  height: 0.7rem;
  padding: 0;
  border-radius: 999px;
  background: rgb(255 255 255 / 76%);
  box-shadow: 0 1px 4px rgb(16 24 40 / 34%), inset 0 0 0 1px rgb(16 24 40 / 18%);
  transition: transform 180ms ease, background-color 180ms ease, box-shadow 180ms ease;
}

.rfs3__dot:hover,
.rfs3__dot.is-active {
  background: #fff;
  box-shadow: 0 2px 7px rgb(16 24 40 / 38%), inset 0 0 0 1px rgb(16 24 40 / 24%);
  transform: scale(1.18);
}

.rfs3__lightbox[hidden] {
  display: none;
}

.rfs3__lightbox {
  position: fixed !important;
  z-index: 2147483647 !important;
  inset: 0 !important;
  display: grid;
  place-items: center;
  padding: clamp(1rem, 4vw, 3rem);
  background: rgb(0 0 0 / 88%);
  cursor: zoom-out;
  touch-action: none;
}

.rfs3__lightbox-image {
  position: relative;
  z-index: 1;
  display: block;
  max-width: min(1200px, 100%);
  max-height: calc(100vh - 2rem);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 0.35rem;
  box-shadow: 0 18px 60px rgb(0 0 0 / 45%);
  cursor: default;
}

.rfs3__lightbox-close {
  position: absolute;
  z-index: 2;
  top: max(1rem, env(safe-area-inset-top));
  right: max(1rem, env(safe-area-inset-right));
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 2.75rem;
  height: 2.75rem;
  padding: 0 0.9rem;
  border: 1px solid #fff;
  border-radius: 999px;
  background: #fff;
  color: #111827;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.rfs3__lightbox-close span:first-child {
  font-size: 1.65rem;
  font-weight: 400;
}

.rfs3__lightbox-close:hover,
.rfs3__lightbox-close:focus-visible {
  background: #111827;
  color: #fff;
}

.rfs3__lightbox-close:focus-visible {
  outline: 3px solid #84adff;
  outline-offset: 3px;
}

.rfs3-empty {
  padding: 1rem;
  border-left: 4px solid #d0d5dd;
  background: #f7f8fa;
}

html.rfs3-lightbox-open,
body.rfs3-lightbox-open {
  overflow: hidden !important;
  height: 100%;
}

@media (max-width: 420px) {
  .rfs3 {
    --rfs3-gap: 0.45rem;
    margin: 1.5rem 0;
  }

  .rfs3__controls {
    grid-template-columns: 2.5rem 1fr 2.5rem;
    margin-top: 0.75rem;
  }

  .rfs3__button {
    width: 2.5rem;
    height: 2.5rem;
  }

  .rfs3__service-title {
    padding: 1.1rem 0.5rem 0.45rem;
    font-size: 0.7rem;
  }
}

@media (max-width: 767px) {
  .rfs3__carousel--desktop {
    display: none;
  }

  .rfs3__carousel--mobile {
    display: block;
    position: relative;
  }

  .rfs3__carousel--mobile .rfs3__slide {
    grid-template-columns: minmax(0, 1fr);
  }

  .rfs3__carousel--mobile .rfs3__service-title {
    padding: 1.5rem 0.9rem 0.8rem;
    font-size: 1rem;
  }

  .rfs3__carousel--mobile .rfs3__controls {
    position: relative;
    z-index: 10;
    grid-template-columns: 3.25rem 1fr 3.25rem;
    margin-top: 1rem;
  }

  .rfs3__carousel--mobile .rfs3__button {
    width: 3.25rem;
    height: 3.25rem;
    border-color: #98a2b3;
    background: var(--rfs3-surface);
    border-color: color-mix(in srgb, var(--rfs3-accent) 34%, transparent);
    background: color-mix(in srgb, var(--rfs3-accent) 8%, var(--rfs3-surface));
    box-shadow: 0 3px 10px rgb(16 24 40 / 14%);
  }

  .rfs3__carousel--mobile .rfs3__button:hover {
    background: var(--rfs3-accent);
  }
}

@media (prefers-reduced-motion: reduce) {
  .rfs3__track,
  .rfs3__image-button img,
  .rfs3__button,
  .rfs3__dot {
    transition-duration: 0.01ms;
  }
}
