/**
 * FuserTech Slider – Hero frontend styles
 */

.ft-slider {
  --ft-slider-height: 70vh;
  --ft-slider-min-height: 400px;
  position: relative;
  width: 100%;
  min-height: var(--ft-slider-min-height);
  height: var(--ft-slider-height);
  overflow: hidden;
  background: #1a1a1a;
}

.ft-slider__track {
  position: relative;
  width: 100%;
  height: 100%;
}

.ft-slider__slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.6s ease, visibility 0.6s;
  z-index: 0;
}

.ft-slider__slide--active {
  opacity: 1;
  visibility: visible;
  z-index: 1;
}

/* Slide transition: slide */
.ft-slider[data-transition="slide"] .ft-slider__slide {
  transform: translateX(100%);
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease, visibility 0.4s;
}

.ft-slider[data-transition="slide"] .ft-slider__slide--active {
  transform: translateX(0);
}

.ft-slider[data-transition="slide"] .ft-slider__slide--prev {
  transform: translateX(-100%);
}

/* Background image – contain shows full image (no crop); cover fills area (may crop) */
.ft-slider__bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-position: center;
  background-repeat: no-repeat;
}

.ft-slider--bg-contain .ft-slider__bg {
  background-size: contain;
  background-color: #1a1a1a;
}

.ft-slider--bg-cover .ft-slider__bg {
  background-size: cover;
}

.ft-slider__overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #000;
  pointer-events: none;
}

/* Whole slide clickable when link URL is set */
.ft-slider__slide-link {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  display: block;
  text-decoration: none;
  color: inherit;
}

.ft-slider__slide-link:hover {
  text-decoration: none;
  color: inherit;
}

/* Content */
.ft-slider__content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
  height: 100%;
  padding: 2rem 1.5rem;
  box-sizing: border-box;
}

.ft-slider__title {
  margin: 0 0 0.75rem;
  font-size: clamp(1.75rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.2;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  max-width: 800px;
}

.ft-slider__subtitle {
  margin: 0 0 1.5rem;
  font-size: clamp(1rem, 2vw, 1.25rem);
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.95);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
  max-width: 600px;
}

.ft-slider__btn {
  display: inline-block;
  padding: 0.75rem 1.75rem;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid #fff;
  border-radius: 4px;
  text-decoration: none;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  pointer-events: none;
}

.ft-slider__slide-link:hover .ft-slider__btn {
  background: #fff;
  color: #1a1a1a;
  border-color: #fff;
}

/* Arrows */
.ft-slider__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 48px;
  height: 48px;
  padding: 0;
  border: none;
  background: rgba(0, 0, 0, 0.5);
  cursor: pointer;
  border-radius: 50%;
  transition: background 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ft-slider__arrow:hover {
  background: rgba(0, 0, 0, 0.7);
}

.ft-slider__arrow:focus {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.ft-slider__arrow--prev {
  left: 1rem;
}

.ft-slider__arrow--next {
  right: 1rem;
}

.ft-slider__arrow-icon {
  width: 24px;
  height: 24px;
  color: #fff;
  flex-shrink: 0;
}

/* Dots */
.ft-slider__dots {
  position: absolute;
  bottom: 1.5rem;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  justify-content: center;
  gap: 0.5rem;
}

.ft-slider__dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

.ft-slider__dot:hover {
  background: rgba(255, 255, 255, 0.8);
}

.ft-slider__dot--active {
  background: #fff;
  transform: scale(1.2);
}

.ft-slider__dot:focus {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .ft-slider__slide,
  .ft-slider__slide--active,
  .ft-slider[data-transition="slide"] .ft-slider__slide {
    transition-duration: 0.01ms;
  }
}
