/* ─── How It Works Carousel ─── */
.hiw-carousel {
  padding: 80px 20px;
  background: #e2e9f0;
}

.hiw-carousel__title {
  text-align: center;
  font-size: 2rem;
  font-weight: 700;
  color: #0c1e3a;
  margin-bottom: 48px;
}

.hiw-carousel__viewport {
  position: relative;
  max-width: 1100px;
  margin: 0 auto;
}

.hiw-carousel__track {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  padding: 8px 4px 16px;
  /* Hide scrollbar */
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.hiw-carousel__track::-webkit-scrollbar {
  display: none;
}

.hiw-carousel__card {
  flex: 0 0 calc(33.333% - 16px);
  min-width: 280px;
  max-width: 350px;
  background: #ffffff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow:
    0 4px 6px -1px rgba(0, 0, 0, 0.05),
    0 10px 15px -3px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-align: center;
  position: relative;
  scroll-snap-align: start;
}

.hiw-carousel__card:hover {
  transform: translateY(-8px);
  box-shadow:
    0 10px 15px -3px rgba(0, 0, 0, 0.05),
    0 20px 25px -5px rgba(0, 0, 0, 0.05),
    0 25px 30px -10px rgba(0, 0, 0, 0.04);
}

.hiw-carousel__card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.hiw-carousel__number {
  position: absolute;
  top: 15px;
  left: 15px;
  width: 40px;
  height: 40px;
  background: #1d3557;
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 700;
  z-index: 1;
}

.hiw-carousel__card h3 {
  padding: 20px 15px;
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: #1d3557;
}

/* ─── Arrow Buttons ─── */
.hiw-carousel__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.95);
  color: #1d3557;
  font-size: 1.6rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transition: all 0.2s ease;
  line-height: 1;
}

.hiw-carousel__arrow:hover {
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transform: translateY(-50%) scale(1.05);
}

.hiw-carousel__arrow:disabled {
  opacity: 0.3;
  cursor: default;
  pointer-events: none;
}

.hiw-carousel__arrow--left {
  left: -16px;
}

.hiw-carousel__arrow--right {
  right: -16px;
}

/* ─── Dot Indicators ─── */
.hiw-carousel__dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
}

.hiw-carousel__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
  background: rgba(29, 53, 87, 0.25);
  cursor: pointer;
  padding: 0;
  transition: all 0.2s ease;
}

.hiw-carousel__dot:hover {
  background: rgba(29, 53, 87, 0.5);
}

.hiw-carousel__dot--active {
  background: #1d3557;
  transform: scale(1.2);
}

/* ─── Dark Variant (splash page) ─── */
.hiw-carousel--dark {
  background: linear-gradient(135deg, #0c1e3a 0%, #1d3557 50%, #2a3f5f 100%);
}

.hiw-carousel--dark .hiw-carousel__title {
  color: #ffffff;
}

.hiw-carousel--dark .hiw-carousel__arrow {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
}

.hiw-carousel--dark .hiw-carousel__arrow:hover {
  background: rgba(255, 255, 255, 0.25);
}

.hiw-carousel--dark .hiw-carousel__dot {
  background: rgba(255, 255, 255, 0.25);
}

.hiw-carousel--dark .hiw-carousel__dot:hover {
  background: rgba(255, 255, 255, 0.5);
}

.hiw-carousel--dark .hiw-carousel__dot--active {
  background: #f9c74f;
}

/* ─── Responsive ─── */
@media (max-width: 1140px) {
  .hiw-carousel__arrow--left {
    left: 8px;
  }

  .hiw-carousel__arrow--right {
    right: 8px;
  }
}

@media (max-width: 768px) {
  .hiw-carousel {
    padding: 60px 20px;
  }

  .hiw-carousel__title {
    font-size: 1.6rem;
    margin-bottom: 32px;
  }

  .hiw-carousel__card {
    flex: 0 0 calc(50% - 12px);
    min-width: 240px;
  }

  .hiw-carousel__card img {
    height: 160px;
  }

  .hiw-carousel__arrow {
    width: 36px;
    height: 36px;
    font-size: 1.3rem;
  }

  .hiw-carousel__arrow--left {
    left: 4px;
  }

  .hiw-carousel__arrow--right {
    right: 4px;
  }
}

@media (max-width: 480px) {
  .hiw-carousel__card {
    flex: 0 0 calc(100% - 8px);
    min-width: 260px;
    max-width: none;
  }

  .hiw-carousel__card img {
    height: 180px;
  }

  .hiw-carousel__card h3 {
    font-size: 1rem;
    padding: 16px 12px;
  }
}
