/* ============================================================
   Container — shared responsive layout constraint
   Provides 1024px max content width with responsive side padding.
   Import this in any component that uses the .container class.
   ============================================================ */

.container {
  position:   relative;
  width:      100%;
  max-width:  calc(1024px + 160px); /* 1024px content + 80px × 2 */
  padding:    0 80px;
  margin:     0 auto;
  box-sizing: border-box;
}

/* Tablet (≤991px): 60px sides */
@media (max-width: 991px) {
  .container {
    padding: 0 60px;
  }
}

/* Landscape mobile (≤767px): 2rem sides */
@media (max-width: 767px) {
  .container {
    padding: 0 2rem;
  }
}



/* ============================================================
   Wide container — 1360px content + 48px side padding
   Used for full-bleed section content blocks (slider, big cards)
   that need to be wider than the standard 1024px text container.
   ============================================================ */

.container-wide {
  width:      100%;
  max-width:  calc(1384px + 96px);   /* 1384px content + 48px × 2 */
  padding:    0 3rem;                /* 48px sides */
  margin:     0 auto;
  box-sizing: border-box;
}

/* Tablet (≤991px): 16px less than .container (60px → 44px) */
@media (max-width: 991px) {
  .container-wide {
    padding: 0 44px;
  }
}

/* Landscape mobile (≤767px): 16px less than .container (2rem → 1rem) */
@media (max-width: 767px) {
  .container-wide {
    padding: 0 1rem;
  }
}


/* ============================================================
   HybridHowItWorksSection — Flowchart section for the /hybrid page

   Layout:
     Desktop (≥992px): 5 cards in a staggered 3-row flex layout
       with react-archer connector lines.
     Mobile (≤991px): horizontal scroll slider, one card at a time.
   ============================================================ */


/* ---- Section shell ---------------------------------------- */

.hiw-section { background: var(--accent); }


/* ---- Content wrapper (intro → body gap) ------------------- */

.hiw__content {
  display:        flex;
  flex-direction: column;
  gap:            4rem;   /* 64px — intro → flowchart/slider */
}


/* ---- Body wrapper (flowchart/slider → footer gap) --------- */

.hiw__body {
  display:        flex;
  flex-direction: column;
  gap:            4rem;   /* 64px — flowchart/slider → footer */
  width:          100%;
}


/* ---- Section intro ----------------------------------------
   Uses the shared .section-header__text (36px heading→body, 800px cap).
   This section keeps 36px on mobile too (restored below). */


/* ---- Desktop / Mobile toggle ------------------------------ */

.hiw__desktop { display: block; }
.hiw__mobile  { display: none;  }


/* ============================================================
   Desktop staggered flow
   ============================================================ */

.hiw__desktop {
  position: relative;   /* jsplumb SVG lines are positioned within this */
  width:    100%;
}

/* Three-row flex column */
.hiw__flow {
  display:        flex;
  flex-direction: column;
  gap:            4rem;    /* 64px between rows */
  width:          100%;
}

/* Each row: flex with 64px gap, items aligned to their tops */
.hiw__row {
  display:     flex;
  gap:         4rem;       /* 64px */
  align-items: flex-start;
  width:       100%;
}

/* Row 1: Card 1 centered */
.hiw__row--1 { justify-content: center; }

/* Row 3: Cards 4+5 pushed to the right */
.hiw__row--3 { justify-content: flex-end; }


/* ---- Card ------------------------------------------------- */

.hiw__card {
  width:          100%;
  display:        flex;
  flex-direction: column;
  gap:            2rem;    /* 32px */
  background:     var(--card);
  border:         0.5px solid var(--border);
  border-radius:  0.75rem; /* 12px */
  padding:        1.75rem; /* 28px */
  overflow:       hidden;
  position:       relative;
  z-index:        1;       /* sit above the ArcherContainer SVG */
}


/* ---- Card content ----------------------------------------- */

.hiw__card-icon { flex-shrink: 0; }

.hiw__card-content {
  display:        flex;
  flex-direction: column;
  gap:            1.5rem;  /* 24px */
}

.hiw__card-top {
  display:        flex;
  flex-direction: column;
  gap:            0.5rem;  /* 8px */
}

.hiw__card-heading {
  margin:      0;
  font-size:   var(--font-size-lg);
  line-height: var(--line-height-lg);
  font-weight: var(--font-weight-medium);
  color:       var(--foreground);
}

.hiw__card-body {
  margin:      0;
  font-size:   var(--font-size-base);
  line-height: var(--line-height-base);
  font-weight: var(--font-weight-regular);
  color:       var(--foreground);
}

.hiw__card-muted {
  margin:      0;
  font-size:   var(--font-size-base);
  line-height: var(--line-height-base);
  font-weight: var(--font-weight-regular);
  color:       var(--muted-foreground);
}


/* ---- Icon badge (circle with icon inside) ----------------- */

.hiw__icon-badge {
  display:          flex;
  align-items:      center;
  justify-content:  center;
  width:            3.75rem; /* 60px */
  height:           3.75rem;
  border-radius:    var(--radius-full);
  border:           0.5px solid var(--border);
  background:       linear-gradient(to right, #fff 0%, #fff 100%);
  flex-shrink:      0;
  color:            var(--primary);
}


/* ---- Vertical offset wrappers (stagger cards down) -------- */

/* Direct card flex items in a row */
.hiw__row > .hiw__card,
.hiw__offset {
  flex: 0 0 calc(371 / 1024 * 100%);
}

.hiw__offset {
  display: flex;
}

.hiw__offset--3 { padding-top: 8rem;  } /* 128px */
.hiw__offset--4 { padding-top: 10rem; } /* 160px */


/* ============================================================
   Mobile slider
   ============================================================ */

.hiw__slider-track {
  display:                    flex;
  gap:                        0.75rem;
  cursor:                     grab;
  overflow-x:                 auto;
  scroll-snap-type:           x mandatory;
  scrollbar-width:            none;
  padding:                    0 1.5rem 0.5rem;
  scroll-padding-left:        1.5rem;
  -webkit-overflow-scrolling: touch;
}

.hiw__slider-track::-webkit-scrollbar { display: none; }

.hiw__slide {
  flex:              0 0 calc(100% - 3rem);
  max-width:         560px;
  scroll-snap-align: start;
}


/* Make mobile cards fill their slide */
.hiw__mobile .hiw__card {
  width:  100%;
  height: 100%;
}

.hiw__mobile .hiw__card-content { flex: 1; }
.hiw__mobile .hiw__card-muted   { margin-top: auto; }


/* ---- Pagination dots -------------------------------------- */

.hiw__dots {
  display:         flex;
  gap:             0.75rem;  /* 12px */
  align-items:     center;
  justify-content: center;
  margin-top:      2rem;     /* 32px */
}

.hiw__dot {
  width:         10px;
  height:        10px;
  border-radius: var(--radius-full);
  background:    var(--muted);
  flex-shrink:   0;
  transition:    width 0.2s ease, background 0.2s ease;
  border:        none;
  padding:       0;
  cursor:        pointer;
}

.hiw__dot--active {
  width:      2rem;  /* 32px */
  background: var(--primary);
}


/* ============================================================
   Tablet (≤991px)
   ============================================================ */

@media (max-width: 991px) {
  .hiw__desktop { display: none;  }
  .hiw__mobile  { display: block; }

  .hiw__body { gap: 2rem; }

  /* Bleed the slider past the container padding (60px) */
  .hiw__mobile {
    margin-left:  -60px;
    margin-right: -60px;
  }

  .hiw__slider-track {
    padding:             0 44px 0.5rem;
    scroll-padding-left: 44px;
  }

  .hiw__slide {
    flex: 0 0 calc(100% - 88px);
  }
}


/* ============================================================
   Mobile (≤767px)
   ============================================================ */

@media (max-width: 767px) {
  /* Preserve the original 36px heading→body gap (never dropped to 24px). */
  .hiw-section .section-header__text { gap: 2.25rem; }

  /* Bleed matches container padding (2rem) at mobile */
  .hiw__mobile {
    margin-left:  -2rem;
    margin-right: -2rem;
  }

  .hiw__slider-track {
    padding: 0 1rem 0.5rem;
    scroll-padding-left: 1rem;
  }

  .hiw__slide {
    flex: 0 0 calc(100% - 2rem);
  }

}

/* ============================================================
   AvatarGroup — horizontal overlapping avatar strip with fade
   Pass --avatar-bg on the container to match the parent background.
   ============================================================ */

.avatar-group {
  display:   flex;
  height:    60px;
  position:  relative;
  max-width: 100%;
  overflow:  hidden;
}

.avatar-group::after {
  content:        '';
  position:       absolute;
  top:            0;
  right:          0;
  bottom:         0;
  width:          80px;
  background:     linear-gradient(to right, transparent, var(--avatar-bg, var(--card)));
  pointer-events: none;
  z-index:        8;   /* above avatar z-indexes (7 → 1) */
}

.avatar-group__wrap {
  position:      relative;
  flex-shrink:   0;
  width:         60px;
  height:        60px;
  margin-left:   -16px;
  border:        2px solid var(--avatar-bg, var(--card));
  border-radius: var(--radius-full);
  overflow:      hidden;
}

.avatar-group__wrap:first-child { margin-left: 0; }

.avatar-group__img {
  width:      100%;
  height:     100%;
  object-fit: cover;
  display:    block;
}

.avatar-group__fade {
  position:       absolute;
  inset:          0;
  border-radius:  var(--radius-full);
  pointer-events: none;
}

