.wtd-slider {
  --wtd-green-dark: #087039;
  --wtd-green-light: #3eaa46;
  --wtd-green-accent: #60c768;
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 0;
  background: #252525;
  color: #fff;
}

.wtd-slider[data-device="mobile"] {
  display: none;
}

.wtd-slider__picture {
  display: block;
}

.wtd-slider__swiper,
.wtd-slider__slide {
  width: 100%;
  height: auto;
}

.wtd-slider__slide {
  position: relative;
  overflow: hidden;
}

.wtd-slider__image {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 0;
}

.wtd-slider__slide::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  background: rgba(0, 0, 0, .55);
  pointer-events: none;
}

.wtd-slider__content {
  position: absolute;
  z-index: 3;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(14px, 1.5vw, 28px);
  box-sizing: border-box;
  width: 100%;
  padding: 30px 5% 75px;
  color: #fff;
  text-align: center;
  font-family: 'Bai Jamjuree', sans-serif;
}

.wtd-slider__content h2 {
  max-width: 100%;
  margin: 0;
  padding: .15em 0 .2em;
  color: #fff;
  font-family: inherit;
  font-size: clamp(20px, 2.8vw, 40px);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: .01em;

  white-space: nowrap;
}

@supports (-webkit-text-stroke: 1px #fff) {
  .wtd-slider__content h2 {
    color: transparent;
    -webkit-text-stroke: 1.5px #fff;
  }
}

.wtd-slider__content p {
  max-width: 70ch;
  margin: 0;
  font-family: inherit;
  font-size: clamp(13px, 1.2vw, 18px);
  line-height: 1.35;
  }

.wtd-slider__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .65em;
  overflow: hidden;
  padding: .7em 1.35em;
  border: 1px solid rgba(255, 255, 255, .45);
  border-radius: 999px 0 999px 0;
  background: linear-gradient(90deg, var(--wtd-green-dark), var(--wtd-green-light));
  color: #fff !important;
  font-family: 'Bai Jamjuree', sans-serif;
  font-size: clamp(11px, .9vw, 14px);
  font-weight: 700;
  letter-spacing: .03em;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(8, 112, 57, .28);
  transform: translateZ(0);
  transition: transform .3s ease, box-shadow .3s ease, background .3s ease;
}

.wtd-slider__link::before {
  content: '';
  position: absolute;
  top: -80%;
  left: -45%;
  width: 35%;
  height: 260%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .65), transparent);
  transform: rotate(22deg);
  transition: left .65s ease;
}

.wtd-slider__link span {
  position: relative;
  z-index: 1;
}

.wtd-slider__link-arrow {
  display: inline-block;
  transition: transform .3s ease;
}

.wtd-slider__link:hover,
.wtd-slider__link:focus-visible {
  background: linear-gradient(90deg, #065b30, #268534);
  box-shadow: 0 12px 30px rgba(8, 112, 57, .45);
  color: #fff !important;
  transform: translateY(-3px);
}

.wtd-slider__link:hover::before,
.wtd-slider__link:focus-visible::before {
  left: 120%;
}

.wtd-slider__link:hover .wtd-slider__link-arrow,
.wtd-slider__link:focus-visible .wtd-slider__link-arrow {
  transform: translateX(5px);
}

.wtd-slider__link:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.wtd-slider__slide.swiper-slide-active .wtd-slider__content h2 {
  animation: wtd-slider-title-in .9s cubic-bezier(.2, .75, .2, 1) .08s both;
}

.wtd-slider__slide.swiper-slide-active .wtd-slider__content p {
  animation: wtd-slider-copy-in .75s cubic-bezier(.2, .75, .2, 1) .3s both;
}

.wtd-slider__slide.swiper-slide-active .wtd-slider__link {
  animation: wtd-slider-button-in .7s cubic-bezier(.16, 1, .3, 1) .52s both;
}

@keyframes wtd-slider-title-in {
  from {
    opacity: 0;
    filter: blur(8px);
    letter-spacing: .12em;
    transform: translateY(-16px) scale(.97);
  }
  to {
    opacity: 1;
    filter: blur(0);
    letter-spacing: .01em;
    transform: translateY(0) scale(1);
  }
}

@keyframes wtd-slider-copy-in {
  from {
    opacity: 0;
    filter: blur(5px);
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
  }
}

@keyframes wtd-slider-button-in {
  from {
    opacity: 0;
    transform: translateY(20px) scale(.88);
  }
  65% {
    opacity: 1;
    transform: translateY(-3px) scale(1.04);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.wtd-slider__controls {
  position: absolute;
  z-index: 9;
  bottom: 0;
  left: 0;
  display: flex;
  align-items: center;
  box-sizing: border-box;
  width: 75%;
  height: 70px;
}

.wtd-slider__pagination {
  display: flex;
  flex: 0 0 130px;
  align-items: center;
  justify-content: center;
  height: 70px;
}

.wtd-slider__pagination .swiper-pagination-bullet {
  position: relative;
  width: 6px;
  height: 6px;
  margin: 0 8px !important;
  background: #fff;
  opacity: 1;
}

.wtd-slider__pagination .swiper-pagination-bullet::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border: 1px solid var(--wtd-green-accent);
  border-radius: 50%;
  opacity: 0;
  transform: translate(-50%, -50%);
  transition: all .3s ease;
}

.wtd-slider__pagination .swiper-pagination-bullet-active {
  background: var(--wtd-green-accent);
}

.wtd-slider__pagination .swiper-pagination-bullet-active::before {
  width: 14px;
  height: 14px;
  opacity: 1;
}

.wtd-slider__scrollbar {
  position: relative;
  flex: 1 1 auto;
  height: 1px;
  background: #fff;
}

.wtd-slider__scrollbar .swiper-scrollbar-drag {
  height: 3px;
  top: -1px;
  background: var(--wtd-green-accent);
  cursor: pointer;
}

.wtd-slider__navigation {
  display: flex;
  flex: 0 0 140px;
  gap: 10px;
  padding: 0 10px;
  box-sizing: border-box;
}

.wtd-slider__navigation button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 2px solid var(--wtd-green-accent);
  border-radius: 50%;
  background: transparent;
  color: var(--wtd-green-accent);
  font-family: sans-serif;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.wtd-slider__number {
  position: absolute;
  z-index: 10;
  right: clamp(18px, 2.5vw, 50px);
  bottom: clamp(14px, 1.5vw, 28px);
  color: transparent;
  font-family: 'Bai Jamjuree', sans-serif;
  font-size: clamp(58px, 5.2vw, 96px);
  font-weight: 700;
  line-height: .85;
  -webkit-text-stroke: 3px #fff;
  pointer-events: none;
}

.wtd-slider__number::after {
  content: '';
  display: inline-block;
  width: clamp(14px, 1.3vw, 24px);
  height: clamp(14px, 1.3vw, 24px);
  margin-left: 5px;
  background: var(--wtd-green-accent);
}

@media (max-width: 768px) {
  .wtd-slider[data-device="desktop"] {
    display: none;
  }

  .wtd-slider[data-device="mobile"] {
    display: block;
  }

  .wtd-slider__slide {
    display: grid;
    min-height: clamp(270px, 52vh, 480px);
    min-height: clamp(270px, 52svh, 480px);
  }

  .wtd-slider__slide > .wtd-slider__image,
  .wtd-slider__picture {
    position: absolute;
    inset: 0;
  }

  .wtd-slider__image {
    height: 100%;
    object-fit: cover;
    object-position: center;
  }

  .wtd-slider__content {
    position: relative;
    gap: 12px;
    padding: 24px 6% 60px;
    overflow-wrap: anywhere;
  }

  .wtd-slider__content h2 {
    color: #fff;
    font-size: clamp(21px, 5.5vw, 32px);
    line-height: 1.2;
    white-space: normal;
    -webkit-text-stroke: 0;
  }

  .wtd-slider__content p {
    font-size: clamp(14px, 3.8vw, 17px);
    line-height: 1.4;
  }

  .wtd-slider__link {
    min-height: 44px;
    box-sizing: border-box;
    padding: 8px 17px;
    font-size: 14px;
    box-shadow: 0 4px 12px rgba(8, 112, 57, .25);
  }

  .wtd-slider__controls {
    width: 100%;
    height: 48px;
    padding: 0 10px;
    background: linear-gradient(transparent, rgba(0, 0, 0, .35));
  }

  .wtd-slider__pagination {
    flex: 1 1 auto;
    justify-content: flex-start;
    height: 48px;
  }

  .wtd-slider__pagination .swiper-pagination-bullet {
    width: 5px;
    height: 5px;
    margin: 0 6px !important;
  }

  .wtd-slider__scrollbar,
  .wtd-slider__number {
    display: none;
  }

  .wtd-slider__navigation {
    flex: 0 0 auto;
    gap: 8px;
    padding: 0;
  }

  .wtd-slider__navigation button {
    width: 44px;
    height: 44px;
    border-width: 1px;
    font-size: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .wtd-slider__slide.swiper-slide-active .wtd-slider__content h2,
  .wtd-slider__slide.swiper-slide-active .wtd-slider__content p,
  .wtd-slider__slide.swiper-slide-active .wtd-slider__link {
    animation: none;
  }
}
