/* ================================================
   Horizontal Scroll Widget — style.css v6.1
   Fixes:
   - Mobiel: card width calc(100vw - 64px) voor peek van volgende card
   - Mobiel: gap tussen cards
   - Mobiel: padding verlaagd
   - Dots: werken correct na JS-verplaatsing naar .hsw-wrapper
================================================ */

/* ── CSS-var fallbacks ── */
.hsw-card {
  --hsw-h:      #ffffff;
  --hsw-t:      rgba(255,255,255,0.65);
  --hsw-badge:  rgba(255,255,255,0.4);
  --hsw-btn:    #ffffff;
  --hsw-btn-bg: rgba(255,255,255,0.15);
}

/* ─────────────────────────────────────────────
   DESKTOP — GSAP pint de wrapper
────────────────────────────────────────────── */
.hsw-wrapper {
  position: relative;
  width: 100%;
}

.hsw-sticky {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
}

.hsw-track {
  display: flex;
  height: 100%;
  will-change: transform;
}

.hsw-card {
  width: 100vw;
  height: 100vh;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 80px;
  position: relative;
  background: transparent;
}

.hsw-card-inner {
  width: 100%;
  max-width: 960px;
  display: grid;
  grid-template-columns: 400px 1fr;
  gap: 60px;
  align-items: center;
}

.hsw-img-right .hsw-card-inner {
  grid-template-columns: 1fr 400px;
}

/* ── Afbeelding desktop ── */
.hsw-card-image {
  width: 400px;
  height: 600px;
  flex-shrink: 0;
  border-radius: 16px;
  overflow: hidden;
  position: relative;
}

.hsw-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  position: absolute;
  inset: 0;
}

/* ── Content ── */
.hsw-card-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hsw-card-badge {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--hsw-badge);
}

.hsw-card-heading {
  font-size: clamp(1.5rem, 2.5vw, 2.8rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--hsw-h);
}

.hsw-card-text {
  font-size: 1rem;
  line-height: 1.75;
  max-width: 44ch;
  margin: 0;
  color: var(--hsw-t);
}

.hsw-card-btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 100px;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  align-self: flex-start;
  transition: opacity 0.2s, transform 0.2s;
  color: var(--hsw-btn);
  background: var(--hsw-btn-bg);
}

.hsw-card-btn:hover {
  opacity: 0.8;
  transform: translateY(-2px);
}

/* ─────────────────────────────────────────────
   DOTS — globaal element
────────────────────────────────────────────── */
.hsw-progress {
  position: absolute;
  bottom: 24px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 8px;
  z-index: 20;
  pointer-events: none;
}

.hsw-progress-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: rgba(255,255,255,0.3);
  transition: background-color 0.3s ease, transform 0.3s ease;
  display: block;
  flex-shrink: 0;
}

.hsw-progress-dot.active {
  background-color: #ffffff;
  transform: scale(1.4);
}

/* ═══════════════════════════════════════════════════════════
   MOBIEL ≤ 768px
   Native CSS scroll-snap — iOS + Android proof
   Dots: via JS verplaatst naar .hsw-wrapper (scrollen niet mee)
═══════════════════════════════════════════════════════════ */
@media (max-width: 768px) {

  .hsw-wrapper {
    height: 100svh !important;
    overflow: hidden;
  }

  .hsw-sticky {
    height: 100svh;
    overflow: hidden;
  }

  /* JS voegt .hsw-mobile-active toe — activeert native scroll */
  .hsw-mobile-active .hsw-sticky {
    overflow-x: scroll;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .hsw-mobile-active .hsw-sticky::-webkit-scrollbar {
    display: none;
  }

  .hsw-mobile-active .hsw-track {
    width: max-content !important;
    height: 100%;
    transform: none !important;
    will-change: auto;
    gap: 16px;          /* ruimte tussen cards */
    padding-right: 16px; /* voorkomt dat laatste card te ver doorscrolt */
  }

  /* Card: smaller dan 100vw zodat volgende card zichtbaar is (peek) */
  .hsw-mobile-active .hsw-card {
    width: calc(100vw - 64px); /* 64 - 16 gap = 48px van volgende card zichtbaar */
    height: 100svh;
    flex-shrink: 0;
    scroll-snap-align: start;
    scroll-snap-stop: always;

    /* Compact padding */
    padding: 20px 16px 56px;

    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    overflow: hidden;
  }

  /* Eén kolom layout */
  .hsw-mobile-active .hsw-card-inner,
  .hsw-mobile-active .hsw-img-right .hsw-card-inner {
    display: flex !important;
    flex-direction: column;
    gap: 10px;
    max-width: 100% !important;
    width: 100%;
    align-items: flex-start;
  }

  /* Afbeelding: altijd bovenaan, breedte 100%, hoogte compact */
  .hsw-mobile-active .hsw-card-image {
    width: 100% !important;
    height: 180px !important;
    order: -1;
    flex-shrink: 0;
    border-radius: 10px;
  }

  /* Tekst compact */
  .hsw-mobile-active .hsw-card-heading {
    font-size: clamp(1.1rem, 5vw, 1.5rem);
    margin: 0;
  }

  .hsw-mobile-active .hsw-card-text {
    font-size: 0.875rem;
    line-height: 1.6;
    max-width: 100%;
  }

  /* Dots: JS verplaatst ze naar .hsw-wrapper, positie blijft hetzelfde */
  .hsw-mobile-active > .hsw-progress {
    position: absolute;
    bottom: 16px;
    left: 0;
    right: 0;
    z-index: 20;
  }
}

/* ═══════════════════════════════════════════════════════════
   Elementor editor — verticaal gestapeld
═══════════════════════════════════════════════════════════ */
.elementor-editor-active .hsw-wrapper {
  height: auto !important;
  overflow: visible !important;
}

.elementor-editor-active .hsw-sticky {
  position: relative !important;
  height: auto !important;
  overflow: visible !important;
}

.elementor-editor-active .hsw-track {
  flex-direction: column !important;
  width: 100% !important;
  height: auto !important;
  transform: none !important;
}

.elementor-editor-active .hsw-card {
  width: 100% !important;
  height: auto !important;
  padding: 40px !important;
}
