/* swipe.css for seoconsultant.com.my
   On phones (768px and below), rows of cards become a sideways swipe row:
   one card at a time, the next one peeking in, dots underneath (dots come from /js/swipe.js).
   Desktop is untouched.
   Load in <head> so cards never jump from stacked to swipe after the page shows:
     <link rel="stylesheet" href="/css/swipe.css">
   Covers the card rows already on the site; add data-swipe to any other row of boxes. */

@media (max-width: 768px) {
  .plans, .ranges, .cases, .guides, .factors, .models, .warns, .grid-3, [data-swipe] {
    display: flex !important;
    flex-wrap: nowrap !important;
    grid-template-columns: none !important;
    gap: 12px !important;
    max-width: none !important;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    scroll-padding: 0 16px;
    scrollbar-width: none;
    /* run edge to edge, so the next card visibly peeks in */
    margin-left: -16px !important;
    margin-right: -16px !important;
    padding: 4px 16px 6px !important;
    /* room for the dots, reserved here so nothing jumps when they appear */
    margin-bottom: 34px !important;
  }
  .plans::-webkit-scrollbar, .ranges::-webkit-scrollbar, .cases::-webkit-scrollbar,
  .guides::-webkit-scrollbar, .factors::-webkit-scrollbar, .models::-webkit-scrollbar,
  .warns::-webkit-scrollbar, .grid-3::-webkit-scrollbar, [data-swipe]::-webkit-scrollbar { display: none; }

  .plans > *, .ranges > *, .cases > *, .guides > *, .factors > *, .models > *,
  .warns > *, .grid-3 > *, [data-swipe] > * {
    flex: 0 0 84% !important;
    max-width: 84% !important;
    margin: 0 !important;
    scroll-snap-align: start;
  }
  /* text-only boxes (top border only) get a light card so each slide reads as one box */
  .factors > *, .warns > * {
    background: #fff;
    border: 1px solid #E5E5E5 !important;
    border-top: 2px solid #222 !important;
    padding: 20px !important;
  }

  .sw-dots { display: flex; justify-content: center; align-items: center; gap: 6px; height: 24px; margin: -30px 0 6px; }
  .sw-dots span { width: 7px; height: 7px; border-radius: 4px; background: #d4d4d4; cursor: pointer; transition: width .25s ease, background-color .25s ease; }
  .sw-dots span.on { width: 20px; background: #E63946; }
  .sec-dark .sw-dots span { background: rgba(255,255,255,.3); }
  .sec-dark .sw-dots span.on { background: #E63946; }
  .sw-count { font-size: 12px; color: #888; font-weight: 600; letter-spacing: .04em; }
}
@media (min-width: 769px) { .sw-dots { display: none; } }
@media (prefers-reduced-motion: reduce) { .sw-dots span { transition: none; } }