/* template-parts/section/how-it-work.php */
/* ============================================================
   How it works — step sections + Swiper (page template + showcase)
   Uses global tokens from style.css; Swiper init: assets/js/how-it-works.js
============================================================ */

.how-it-work-steps {
  width: 100%;
  margin: 0 auto;
  overflow: hidden;
  padding: 80px 150px;
  box-sizing: border-box;
}

.how-it-work-steps.bg-white {
  background-color: var(--color-white) !important;
}

.how-it-work-steps.bg-gray {
  background-color: var(--color-bg-gray) !important;
}

.step-swiper .swiper-slide img,
.step-swiper .swiper-slide video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.step-header {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto 40px auto;
}

.step-number p {
  font-size: var(--fs-md);
  color: var(--color-text-body-muted);
  margin: 0 0 12px 0;
}

.step-title {
  max-width: 529px;
  height: auto;
}

.step-title,
.step-title p {
  font-family: var(--font-family);
  font-weight: 700;
  font-size: var(--fs-3xl);
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--color-text-dark);
  margin: 0;
}
.step-title span {
  color: var(--color-primary);
}
.how-it-work-steps .text-primary {
  color: var(--color-primary);
}

.step-carousel {
  position: relative;
  width: 100%;
  max-width: 1140px;
  margin: 0 auto 60px auto;
}

.step-swiper {
  width: 100%;
  overflow: hidden;
}

.step-swiper .swiper-slide {
  position: relative;
}

.slide-overlay-box {
  position: absolute;
  bottom: 40px;
  left: 40px;
  background-color: rgba(255, 255, 255, 0.95);
  padding: 40px 30px;
  /* max-width: 300px; */
  max-width: 280px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  z-index: 2;
}

.slide-overlay-box .overlay-icon {
  margin-bottom: 24px;
}

.slide-overlay-box p {
  font-size: var(--fs-md);
  line-height: 1.6;
  color: var(--color-text-dark);
  margin: 0;
}

.step-descriptions {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  display: flex;
  /* 	gap: 100px; */
  gap: 64px;
}

.step-descriptions p,
.step-descriptions__col {
  flex: 1;
  font-size: var(--fs-md);
  line-height: 1.6;
  color: var(--color-text-gray);
  margin: 0;
}

.step-controls {
  position: static;
}

.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--color-border-light);
  background-color: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--color-text-gray);
  z-index: 10;
  transition:
    border-color 0.2s ease,
    color 0.2s ease,
    background-color 0.2s ease;
}

.overlay-icon img {
  width: 32px !important;
  height: 32px !important;
  display: block;
}

.slider-btn:hover {
  border-color: var(--color-text-dark);
  color: var(--color-text-dark);
  background-color: var(--color-white);
}

.prev-btn {
  left: -74px;
}

.next-btn {
  right: -74px;
}

.step-pagination {
  display: none !important;
}

@media (max-width: 1024px) {
  .how-it-work-steps {
    padding: 60px 120px;
    min-height: 896px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 48px;
  }

  .step-swiper .swiper-slide {
    width: 784px;
    height: 400px;
  }

  .step-header,
  .step-carousel {
    margin-bottom: 0 !important;
  }

  .step-title,
  .step-title p {
    font-size: 40px;
  }

  .step-controls {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin-top: 32px;
  }

  .slider-btn {
    position: static;
    transform: none;
  }

  .step-pagination {
    display: flex !important;
    justify-content: center;
    align-items: center;
    gap: 8px;
    position: static !important;
    width: auto !important;
  }

  .step-swiper .swiper-pagination-bullet {
    width: 6px !important;
    height: 6px !important;
    background-color: var(--color-border-light) !important;
    opacity: 1 !important;
    margin: 0 !important;
  }

  .step-swiper .swiper-pagination-bullet-active {
    width: 20px !important;
    border-radius: 4px !important;
    background-color: var(--color-text-gray) !important;
  }

  .slide-overlay-box {
    width: 279px;
    min-height: 120px;
    top: 129px;
    left: 54px;
    bottom: auto;
    padding: 30px;
  }

  .slide-overlay-box .overlay-icon {
    margin-bottom: 0;
  }

  .slide-overlay-box p {
    font-size: var(--fs-md);
    line-height: 1.6;
  }

  .step-descriptions {
    flex-direction: column;
    gap: 8px;
    margin-top: 0;
  }
}

@media (max-width: 768px) {
  .how-it-work-steps {
    padding: 48px 20px !important;
    gap: 32px;
    min-height: 0;
    height: auto;
  }

  .step-title,
  .step-title p {
    font-size: 32px;
    line-height: 1.2;
  }

  .step-swiper .swiper-slide {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 100%;
    height: auto;
  }

  .slide-overlay-box {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    bottom: auto !important;
    right: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    padding: 24px !important;
    box-sizing: border-box;
    box-shadow: none !important;
  }

  .slide-overlay-box p {
    font-weight: 500;
    font-size: 15px;
    line-height: 1.4;
    color: var(--color-text-dark);
    width: 100% !important;
    white-space: normal !important;
    text-align: left;
  }

  .slide-overlay-box p br {
    display: none !important;
  }

  .slide-overlay-box .overlay-icon {
    display: none !important;
  }

  .step-carousel .step-controls {
    margin-top: 24px !important;
    padding: 0;
  }

  .slider-btn {
    width: 44px;
    height: 44px;
  }

  .step-descriptions {
    gap: 8px;
  }

  .step-descriptions p,
  .step-descriptions__col {
    font-size: 15px;
  }

  .step-swiper .swiper-slide .slide-overlay-box.box-mobile-gray {
    background-color: var(--color-bg-gray) !important;
  }

  .step-swiper .swiper-slide .slide-overlay-box.box-mobile-white {
    background-color: var(--color-white) !important;
  }
}
