/* Trade Steps Section */
.s5-trade-steps {
  padding: 90px 0 64px;
}

.s5-steps-container {
  max-width: 1200px;
  margin: 0 auto;
}

/* Top title */
.s5-steps-header {
  margin-bottom: 32px;
  text-align: center;
  opacity: 0;
  transform: translateY(48px);
  animation: fadeInUp 1s ease-out 0.2s forwards;
}

.s5-steps-title {
  max-width: 300px;
  margin: 0 auto 16px;
  font-size: 18px;
  font-weight: 700;
  color: #111827;
}

.s5-title-number {
  font-size: 28px;
  color: #3660fd;
}

.s5-title-highlight {
  color: #3660fd;
}

/* Steps content */
.s5-steps-content {
  display: flex;
  flex-direction: column;
  padding: 0 16px;
  margin: 0 auto 56px;
  max-width: 1280px;
  opacity: 0;
  transform: translateY(48px);
  animation: fadeInUp 1s ease-out 0.3s forwards;
}

/* Step indicators (desktop only) */
.s5-step-indicator {
  display: none;
}

/* Step cards container */
.s5-steps-cards {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
}

/* Individual step card */
.s5-step-card {
  position: relative;
  width: 322px;
  height: 108px;
  perspective: 1000px;
}

/* Front face */
.s5-card-front {
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  width: 322px;
  height: 108px;
  padding: 0 36px;
  background-color: #3660fd;
  border-radius: 10px;
  overflow: hidden;
  backface-visibility: hidden;
  transform-style: preserve-3d;
  transition: transform 0.7s ease-in-out;
}

/* Disable hover effect on mobile */

.s5-card-icon {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  margin-right: 33px;
}

.s5-card-text {
  color: white;
}

.s5-card-step-mobile {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 6px;
}

.s5-card-title {
  font-size: 16px;
  font-weight: 700;
  text-align: left;
  margin: auto 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Back face */
.s5-card-back {
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  width: 322px;
  height: 108px;
  padding: 0 36px;
  border-radius: 10px;
  overflow: hidden;
  backface-visibility: hidden;
  transform-style: preserve-3d;
  transform: rotateY(180deg);
  transition: transform 0.7s ease-in-out;
  box-shadow: 0px 4px 20px 0px rgba(0, 0, 0, 0.25);
  background-size: 120% 120%;
  background-position: center;
  background-repeat: no-repeat;
}

.s5-card-back-1 {
  background-image: url("../img/5-bg-1.png");
}

.s5-card-back-2 {
  background-image: url("../img/5-bg-2.png");
}

.s5-card-back-3 {
  background-image: url("../img/5-bg-3.png");
}

.s5-card-back-text {
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
  width: 100%;
  padding: 0 48px;
  margin: auto;
}

/* Arrow */
.s5-step-arrow {
  margin: 10px 0;
  width: 27px;
  height: 25px;
}

.s5-step-arrow-mobile {
  display: block;
}

.s5-step-arrow-desktop {
  display: none;
}

/* Bottom text and button */
.s5-steps-footer {
  text-align: center;
  opacity: 0;
  transform: translateY(48px);
  animation: fadeInUp 1s ease-out 0.8s forwards;
}

.s5-footer-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 268px;
  height: 48px;
  padding: 0 32px;
  background-color: #000000;
  color: white;
  font-size: 14px;
  font-weight: 700;
  border-radius: 6px;
  text-decoration: none;
  transition: background-color 0.3s ease;
  cursor: pointer;
}

.s5-footer-button:hover {
  background-color: #3660fd;
}

/* Animation */
@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Desktop styles */
@media (min-width: 768px) {
  .s5-trade-steps {
    padding: 180px 0 236px;
  }

  .s5-steps-content {
    margin-bottom: 106px;
  }

  .s5-steps-header {
    margin-bottom: 64px;
  }

  .s5-steps-title {
    max-width: none;
    font-size: 48px;
  }

  .s5-title-number {
    font-size: 96px;
  }

  /* Step indicators */
  .s5-step-indicator {
    display: block;
    position: relative;
    margin-bottom: 48px;
    height: 96px;
  }

  .s5-indicator-line {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background-color: #303030;
    transform: translateY(-50%);
  }

  .s5-indicator-dots {
    display: flex;
    justify-content: space-between;
    height: 100%;
    gap: 98px;
  }

  .s5-indicator-dot-wrapper {
    position: relative;
    display: flex;
    justify-content: center;
    flex: 1;
  }

  .s5-indicator-dot {
    position: absolute;
    top: 50%;
    width: 24px;
    height: 24px;
    background-color: #303030;
    border-radius: 50%;
    transform: translateY(-50%);
  }

  .s5-indicator-label {
    position: absolute;
    top: -15px;
    font-size: 30px;
    font-weight: 700;
    color: #374151;
  }

  /* Step cards */
  .s5-steps-cards {
    flex-direction: row;
  }

  .s5-step-card {
    height: 323px;
  }

  /* PC hover will flip the card */
  .s5-step-card:hover .s5-card-front {
    transform: rotateY(180deg);
  }

  .s5-step-card:hover .s5-card-back {
    transform: rotateY(360deg);
  }

  .s5-card-front {
    flex-direction: column;
    justify-content: flex-start;
    height: 323px;
    padding: 0;
    border-radius: 50px;
  }

  .s5-card-icon {
    width: 125px;
    height: 125px;
    min-width: 80px;
    min-height: 80px;
    margin: 64px 0 40px 0;
  }

  .s5-card-step-mobile {
    display: none;
  }

  .s5-card-title {
    font-size: 20px;
    text-align: center;
  }

  .s5-card-back {
    flex-direction: column;
    justify-content: flex-start;
    height: 323px;
    padding: 0;
    border-radius: 50px;
  }

  .s5-card-back-text {
    font-size: 16px;
    padding: 0 48px;
  }

  /* Arrow */
  .s5-step-arrow {
    margin: 0 24px;
    width: 50px;
    height: 50px;
  }

  .s5-step-arrow-mobile {
    display: none;
  }

  .s5-step-arrow-desktop {
    display: block;
  }

  .s5-footer-button {
    width: 366px;
    height: 64px;
    font-size: 18px;
  }
}
