.fps {
  position: relative;
  width: 100vw;
  left: 50%;
  margin-left: -50vw;
  min-height: var(--fps-vh);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 0 38px;
  --fps-side-scale: var(--fps-side-scale-d);
  --fps-active-scale: var(--fps-active-scale-d);
  --fps-activew: var(--fps-slidew);
  --fps-arrow-gap: var(--fps-arrow-gap-d);
}

.fps__bg {
  position: absolute;
  inset: 0;
  background-image: var(--fps-bg);
  background-size: cover;
  background-position: center;
  z-index: 0;
}

.fps__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,var(--fps-overlay));
  z-index: 1;
  pointer-events: none;
}

.fps__bgtext {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: 8px;
  z-index: 4;
  pointer-events: none;
  text-align: center;
  opacity: var(--fps-bgtext-op, 1);
}

.fps__bgtext-line {
  color: var(--fps-bgtext);
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 900;
  letter-spacing: 0.02em;
  line-height: 0.88;
  font-size: clamp(54px, 9vw, 170px);
  text-transform: uppercase;
  white-space: pre-line;
}

.fps__inner {
  position: relative;
  z-index: 5;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.fps__rail {
  position: relative;
  width: 100%;
}

.fps__viewport {
  width: 100%;
  overflow: hidden;
  touch-action: pan-y;
  height: calc(var(--fps-imgmaxh) + 120px);
  display: flex;
  align-items: center;
}

.fps__track {
  display: flex;
  align-items: center;
  will-change: transform;
  transition: transform 0.55s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 0 10px;
}

.fps__slide {
  flex: 0 0 var(--fps-slidew);
  width: var(--fps-slidew);
  max-width: 92vw;
  height: var(--fps-imgmaxh);
  position: relative;
  z-index: 1;
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.fps__slide + .fps__slide {
  margin-left: calc(50vw - var(--fps-slidew));
}

.fps__slide.is-prev,
.fps__slide.is-next {
  z-index: 2;
  opacity: 0.7;
}

.fps__slide.is-active {
  z-index: 3;
  pointer-events: auto;
  opacity: 1;
}

.fps__media {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  text-decoration: none;
}

.fps__img,
.fps__img img,
.fps__media img,
.fps__media .fps__img,
.fps__media .fps__img img,
.fps__slide img,
.fps__slide picture,
.fps__slide picture img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(var(--fps-side-scale)) !important;
  transition: transform 0.55s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 8px;
}

.fps__slide.is-active .fps__img,
.fps__slide.is-active .fps__img img,
.fps__slide.is-active .fps__media img,
.fps__slide.is-active img,
.fps__slide.is-active picture,
.fps__slide.is-active picture img {
  transform: scale(var(--fps-active-scale)) !important;
}

.fps__placeholder {
  width: 100%;
  min-height: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.75;
  background: #f0f0f0;
  border-radius: 8px;
  color: #666;
}

.fps__nav {
  position: absolute;
  z-index: 6;
  background: transparent;
  border: 0;
  color: var(--fps-arrow);
  font-size: var(--fps-arrow-size);
  line-height: 1;
  cursor: pointer;
  padding: 8px;
  top: 50%;
  transform: translateY(-50%);
  transition: opacity 0.3s;
  opacity: 0.6;
}

.fps__nav:hover {
  opacity: 1;
}

.fps__nav svg {
  width: 1em;
  height: 1em;
  display: block;
  stroke-width: 1;
}

.fps__nav--prev {
  left: calc(50% - (var(--fps-activew) / 2) - var(--fps-arrow-gap));
  transform: translate(-100%, -50%);
}

.fps__nav--prev:hover {
  transform: translate(-100%, -50%);
}

.fps__nav--next {
  left: calc(50% + (var(--fps-activew) / 2) + var(--fps-arrow-gap));
  transform: translate(0, -50%);
}

.fps__nav--next svg {
  transform: rotate(180deg);
}

.fps__nav--next:hover {
  transform: translate(0, -50%);
}

.fps__meta {
  margin-top: 10px;
  text-align: center;
}

.fps__desc {
  margin: 0 auto 10px;
  max-width: 680px;
  font-size: 13px;
  line-height: 1.4;
  color: rgba(0, 0, 0, 0.65) !important;
  padding: 0 14px;
}

.fps__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: rgba(0, 0, 0, 0.65) !important;
  text-decoration: none;
  border-bottom: 1px solid rgba(0, 0, 0, 0.25);
  padding-bottom: 2px;
  transition: color 0.3s, border-color 0.3s;
}

.fps__btn:hover {
  color: rgba(0, 0, 0, 0.9);
  border-color: rgba(0, 0, 0, 0.5);
}

.fps__btnicon {
  opacity: 0.75;
}

.fps__dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
}

.fps__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.2);
  border: none;
  cursor: pointer;
  transition: background 0.3s, transform 0.3s;
}

.fps__dot:hover {
  background: rgba(0, 0, 0, 0.4);
}

.fps__dot.is-active {
  background: var(--fps-arrow);
  transform: scale(1.2);
}

/* Mobile styles - arrows close to edge */
@media (max-width: 749px) {
  .fps {
    --fps-side-scale: var(--fps-side-scale-m);
    --fps-active-scale: var(--fps-active-scale-m);
    --fps-activew: var(--fps-slidew-m);
    --fps-arrow-gap: var(--fps-arrow-gap-m);
    min-height: var(--fps-vh-m);
  }

  .fps__bgtext-line {
    white-space: normal;
    font-size: clamp(32px, 12vw, 80px);
  }

  .fps__slide {
    flex-basis: var(--fps-slidew-m);
    width: var(--fps-slidew-m);
    height: var(--fps-imgmaxh-m);
    max-height: calc(var(--fps-vh-m) - 100px);
  }

  .fps__slide + .fps__slide {
    margin-left: calc(50vw - var(--fps-slidew-m));
  }

  .fps__viewport {
    height: calc(var(--fps-imgmaxh-m) + 120px);
    max-height: calc(var(--fps-vh-m) - 80px);
  }

  .fps__nav {
    padding: 6px;
  }

  /* Mobile: arrows close to edge */
  .fps__nav--prev {
    left: var(--fps-arrow-gap-m);
    transform: translateY(-50%);
  }

  .fps__nav--prev:hover {
    transform: translateY(-50%);
  }

  .fps__nav--next {
    left: auto;
    right: var(--fps-arrow-gap-m);
    transform: translateY(-50%);
  }

  .fps__nav--next:hover {
    transform: translateY(-50%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .fps__track,
  .fps__img,
  .fps__slide {
    transition: none;
  }
}
