/* Team rails (leadership and any other team row). No arrows/dots by request.
   Hook: CSS class "team-leaders" on the row container (any number per page).
   The legacy #team-leaders ID is still supported.
   Desktop (1025px+): a grid of 5 cards per line, wrapping onto new lines, no scroll.
   Tablet/mobile (1024px and below): one Swiper row that slides.
   The 1024px breakpoint must match SLIDER_MQ in smmp-team-carousel.js. */

/* ---------- Desktop: 5 per line, grows downwards ---------- */
:is(.team-leaders, #team-leaders) { display: flex; flex-wrap: wrap; gap: 20px; }
:is(.team-leaders, #team-leaders) > .e-con { flex: 0 0 auto; width: calc((100% - 80px) / 5); }

/* After JS has wrapped the cards (but no Swiper on desktop) */
:is(.team-leaders, #team-leaders)[data-smmp-swiper]:not(.swiper) { display: block; }
:is(.team-leaders, #team-leaders)[data-smmp-swiper]:not(.swiper) > .swiper-wrapper {
  display: flex; flex-wrap: wrap; gap: 20px; width: 100%; transform: none;
}
:is(.team-leaders, #team-leaders)[data-smmp-swiper]:not(.swiper) .swiper-slide {
  flex: 0 0 auto; width: calc((100% - 80px) / 5); height: auto; margin: 0;
}

/* ---------- Tablet and mobile: single sliding row ---------- */
@media (max-width: 1024px) {
  /* pre-JS / no-JS fallback: one row, never a raw scrollbar */
  :is(.team-leaders, #team-leaders) { flex-wrap: nowrap; overflow: hidden; }
  :is(.team-leaders, #team-leaders) > .e-con,
  :is(.team-leaders, #team-leaders).swiper .swiper-slide { width: max(270px, 44%); }
}
@media (max-width: 767px) {
  :is(.team-leaders, #team-leaders) > .e-con,
  :is(.team-leaders, #team-leaders).swiper .swiper-slide { width: max(270px, 86%); }
}

/* once Swiper takes over (tablet/mobile only) */
:is(.team-leaders, #team-leaders).swiper { display: block; overflow: hidden; padding-bottom: 0; }
:is(.team-leaders, #team-leaders).swiper > .swiper-wrapper { display: flex; flex-wrap: nowrap; align-items: stretch; }
:is(.team-leaders, #team-leaders).swiper .swiper-slide { flex: 0 0 auto; height: auto; }
