/* ================================================================
   Sync Inn Digital — Sub-Services Why Us Section
   Used on: Sub-Services category pages only. Section 7.

   Layout:
     .sid-swu                    — section wrapper (light bg)
     .sid-swu__inner             — constrained (1400px) + side padding
     .sid-swu__header            — section label + heading + description
     .sid-swu__main-cards        — 3-column grid (top row)
     .sid-swu__main-card         — base main card
     .sid-swu__main-card--light  — light-blue background
     .sid-swu__main-card--gradient — blue gradient background (white text)
     .sid-swu__stat-cards        — 5-column grid (bottom row)
     .sid-swu__stat-card         — grey background stat card
   ================================================================ */

/* ── Section wrapper ─────────────────────────────────────────── */

.sid-swu {
  background-color: var(--sid-light-grayish-blue-bg, #F5F6FA);
  padding-bottom: 110px;
}

/* ── Constrained inner ───────────────────────────────────────── */

.sid-swu__inner {
  max-width: var(--sid-site-width, 1400px);
  margin: 0 auto;
  padding: 0 20px;
}

/* ── Section header ──────────────────────────────────────────── */

.sid-swu__header {
  margin-bottom: 48px;
}

/* ── Main heading ────────────────────────────────────────────── */

.sid-swu__heading {
  font-family: 'Poppins', var(--sid-font-heading, sans-serif);
  font-size: 60px;
  font-weight: 700;
  line-height: 1.1;
  color: var(--sid-black, #000);
  margin: 0 0 24px;
  max-width: 70%;
}

.sid-swu__heading-muted {
  color: #7E7E81;
}

/* ── Description ─────────────────────────────────────────────── */

.sid-swu__desc {
  font-family: 'Nunito', var(--sid-font-body, sans-serif);
  font-size: 20px;
  font-weight: 400;
  line-height: 1.65;
  color: var(--sid-black, #000);
  margin: 0;
  max-width: 50%;
}

/* ── Main card icon — hidden on desktop, shown on mobile ─────── */

.sid-swu__main-card-icon {
  display: none;
}

.sid-swu__main-card-check {
  display: none;
  width: 22px;
  height: 22px;
  fill: var(--sid-white, #fff);
  flex-shrink: 0;
}

/* ── Main cards grid — 3 columns ─────────────────────────────── */

.sid-swu__main-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 24px;
}

/* ── Base main card ──────────────────────────────────────────── */

.sid-swu__main-card {
  border-radius: 30px;
  padding: 40px 36px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 220px;
}

/* ── Light-blue variant ──────────────────────────────────────── */

.sid-swu__main-card--light {
  background-color: var(--sid-light-blue, #E8ECF3);
}

/* ── Gradient variant ────────────────────────────────────────── */

.sid-swu__main-card--gradient {
  background: linear-gradient(135deg, var(--sid-primary-blue, #0047D8) 0%, #32CCFF 100%);
}

/* ── Main card heading ───────────────────────────────────────── */

.sid-swu__main-card-title {
  font-family: 'Poppins', var(--sid-font-heading, sans-serif);
  font-size: 28px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--sid-black, #000);
  margin: 0;
}

.sid-swu__main-card--gradient .sid-swu__main-card-title {
  color: var(--sid-white, #fff);
}

/* ── Main card description ───────────────────────────────────── */

.sid-swu__main-card-desc {
  font-family: 'Nunito', var(--sid-font-body, sans-serif);
  font-size: 18px;
  font-weight: 400;
  line-height: 1.65;
  color: var(--sid-black, #000);
  margin: 0;
}

.sid-swu__main-card--gradient .sid-swu__main-card-desc {
  color: var(--sid-white, #fff);
}

/* ── Stat cards grid — 5 columns ─────────────────────────────── */

.sid-swu__stat-cards {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 24px;
}

/* ── Stat card ───────────────────────────────────────────────── */

.sid-swu__stat-card {
  background: var(--sid-grey, #F0F2F5);
  border-radius: 30px;
  padding: 36px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: center;
}

/* ── Stat value ──────────────────────────────────────────────── */

.sid-swu__stat-value {
  font-family: 'Poppins', var(--sid-font-heading, sans-serif);
  font-size: 44px;
  font-weight: 600;
  line-height: 1;
  color: var(--sid-green, #00C46A);
  display: block;
}

/* ── Stat label / description ────────────────────────────────── */

.sid-swu__stat-desc {
  font-family: 'Nunito', var(--sid-font-body, sans-serif);
  font-size: 18px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--sid-black, #000);
  margin: 0;
}

/* ── Responsive ──────────────────────────────────────────────── */

@media (max-width: 1280px) {
  .sid-swu__heading {
    font-size: 48px;
  }

  .sid-swu__stat-value {
    font-size: 36px;
  }
}

@media (max-width: 1024px) {
  .sid-swu__heading {
    font-size: 36px;
    max-width: 100%;
  }

  .sid-swu__desc {
    max-width: 100%;
  }

  /* Main cards: 2 + 1 layout */
  .sid-swu__main-cards {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Stat cards: 3 + 2 layout */
  .sid-swu__stat-cards {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .sid-swu {
    padding: 60px 0;
  }

  .sid-swu__heading {
    font-size: 30px;
  }

  .sid-swu__main-cards {
    grid-template-columns: 1fr;
  }

  .sid-swu__main-card {
    padding: 32px 28px;
    min-height: unset;
  }

  .sid-swu__main-card-title {
    font-size: 24px;
  }

  /* Stat cards: 3 columns */
  .sid-swu__stat-cards {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ── Mobile main-cards redesign (< 767px) — matches Our Approach style ── */

@media (max-width: 767px) {
  .sid-swu__main-cards {
    counter-reset: swu-main;
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-bottom: 40px;
  }

  .sid-swu__main-card {
    display: grid;
    grid-template-columns: 56px 1fr;
    column-gap: 16px;
    align-items: start;
    padding: 0 0 28px;
    min-height: unset;
    border-radius: 0;
    background: transparent !important;
    counter-increment: swu-main;
    position: relative;
  }

  /* Vertical connector line between cards */
  .sid-swu__main-card:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 27px; /* horizontal centre of the 56px circle */
    top: 56px;  /* bottom edge of the circle */
    bottom: 0;
    width: 2px;
    background: var(--sid-grey, #E8ECF3);
    z-index: 0;
  }

  /* Card ::before no longer used for circle — icon element handles it */
  .sid-swu__main-card::before {
    display: none;
  }

  /* Icon circle */
  .sid-swu__main-card-icon {
    display: flex;
    grid-column: 1;
    grid-row: 1 / span 2;
    align-self: start;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--sid-grey, #F0F2F5);
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
    transition: background 0.4s ease;
  }

  /* Counter number — shown by default inside the circle */
  .sid-swu__main-card-icon::before {
    content: counter(swu-main, decimal-leading-zero);
    font-family: 'Poppins', var(--sid-font-heading, sans-serif);
    font-size: 14px;
    font-weight: 700;
    color: var(--sid-black, #000);
  }

  /* Active: gradient bg, hide counter, show SVG checkmark */
  .sid-swu__main-card.sid-swu--active .sid-swu__main-card-icon {
    background: linear-gradient(135deg, #007EFF 0%, #32CCFF 100%);
  }

  .sid-swu__main-card.sid-swu--active .sid-swu__main-card-icon::before {
    display: none;
  }

  .sid-swu__main-card.sid-swu--active .sid-swu__main-card-check {
    display: block;
  }

  /* Title: right column row 1 */
  .sid-swu__main-card-title {
    grid-column: 2;
    grid-row: 1;
    font-size: 26px;
    font-weight: 500;
    line-height: 1.2;
    color: var(--sid-black, #000) !important;
    margin: 0 0 8px;
    align-self: center;
  }

  /* Description: right column row 2 */
  .sid-swu__main-card-desc {
    grid-column: 2;
    grid-row: 2;
    font-size: 16px;
    font-family: 'Nunito', var(--sid-font-body, sans-serif);
    line-height: 1.6;
    color: var(--sid-black, #000) !important;
    margin: 0;
  }
}

@media (max-width: 480px) {
  .sid-swu__heading {
    font-size: 30px;
    line-height: 30px;
  }

  .sid-swu__desc {
    font-size: 16px;
  }

  /* Stat cards: 2 columns */
  .sid-swu__stat-cards {
    grid-template-columns: repeat(2, 1fr);
  }

  .sid-swu__stat-card {
    padding: 20px;
  }

  .sid-swu__stat-value {
    font-size: 26px;
  }

  .sid-swu__stat-desc {
    font-size: 16px;
  }

  /* Centre last card when total is odd (5th card alone in its row) */
  .sid-swu__stat-card:last-child:nth-child(odd) {
    grid-column: 1 / -1;
    justify-self: center;
    width: calc(50% - 12px);
  }
}
