/*!
 * Home page (index.html), phones and tablets only (below 992px). Desktop is not affected.
 * - the header bar runs edge to edge (its background and bottom line no longer stop 24px short of the screen)
 * - the tabs panel loses its frame: no border, no running light, no background and no inner padding
 * - sections alternate, starting with the first: Work, Templates and Awards sit on a light see-through band,
 *   Products and Labs don't
 * - each section (Work, Products, Templates, Labs, Awards) is one horizontal row of cards that slides
 *   sideways, with the next card peeking in at the edge so it's clear there is more
 * - the bottom tab bar sits above the cards
 *
 * © 2026 Mohammad Azad
 */
@media (max-width: 991.98px) {

  /* ---------------------------------------------------------------- header: full width bar */
  body > .container-xxl > header {
    margin-inline: -1.5rem;        /* the container's px-4 */
    padding-inline: 1.5rem;        /* content stays where it was, the bar reaches both edges */
  }

  /* ---------------------------------------------------------------- tabs panel: no frame */
  .al-fui-tabs > canvas { display: none !important; }            /* the light that runs round the frame (tab-glow.js) */
  .al-fui-tabs-body {
    background: transparent !important;
    -webkit-backdrop-filter: none !important; backdrop-filter: none !important;
    clip-path: none !important;                                   /* the chamfered corners and the notch for the tab bar */
    --al-border: 0px !important;
  }
  .al-fui-tabs-body::before, .al-fui-tabs-body::after { display: none !important; }  /* the border line */
  .al-fui-tabs-body > .tab-pane > .px-4,
  .al-fui-tabs-body > .tab-pane > section.px-4 { padding-left: 0 !important; padding-right: 0 !important; }

  /* ---------------------------------------------------------------- sections: alternating bands */
  /* every section gets the same breathing room; every other one, from the first (Work, Templates, Awards), sits on a light,
     see-through band that runs edge to edge. The bands separate the sections, so the divider lines go. */
  .al-fui-tabs-body > .tab-pane {
    margin-inline: -1.5rem; padding: 1.75rem 1.5rem .25rem !important;
  }
  #pills-my-work, #pills-templates, #pills-awards {
    background: rgba(var(--bs-primary-rgb), .09);
    border-block: 1px solid rgba(var(--bs-primary-rgb), .18);
  }
  .al-fui-tabs-body > hr, .al-fui-tabs-body > .tab-pane hr { display: none; }
  /* Awards is the last band and the Tools & platforms divider sits right under it: one line, not two */
  #pills-awards { border-bottom: 0; }

  /* "Tools & platforms" strip under the sections: a divider line above it, the same as the band edges */
  .marquee[data-hero="marquee"] {
    margin-inline: -1.5rem; padding-inline: 1.5rem;
    border-top: 1px solid rgba(var(--bs-primary-rgb), .18);
    padding-top: 1.5rem !important; margin-top: 0 !important;
  }

  /* ---------------------------------------------------------------- sections: one sliding row each */
  .al-fui-tabs-body > .tab-pane .row {
    --bs-gutter-x: 0; --bs-gutter-y: 0;
    display: flex; flex-wrap: nowrap; gap: 12px;
    overflow-x: auto; overflow-y: hidden;
    scroll-snap-type: x mandatory; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch;
    /* run to the screen edges, so the next card peeks in from the side */
    margin-inline: -1.5rem; padding-inline: 1.5rem; scroll-padding-inline: 1.5rem;
    padding-bottom: 6px;
    scrollbar-width: none;
  }
  .al-fui-tabs-body > .tab-pane .row::-webkit-scrollbar { display: none; }
  .al-fui-tabs-body > .tab-pane .row > * {
    /* phones: the card fills the row but 14px, so about 26px of the next card shows at the right edge */
    flex: 0 0 calc(100% - 14px); width: calc(100% - 14px); max-width: calc(100% - 14px);
    margin-top: 0 !important; padding: 0 !important;
    scroll-snap-align: start;
  }

  /* in a slider card the extra tag chips (Figma, UX Lead…) crowd the title; the desktop grid still shows them */
  .al-fui-tabs-body > .tab-pane .row > * > a > .position-absolute.bottom-0 > .d-sm-inline-flex { display: none !important; }

  /* ---------------------------------------------------------------- bottom tab bar above the cards */
  .mobile-bottom-nav { z-index: 1040 !important; }
}

/* tablets: a wider card, still with the next one peeking in */
@media (min-width: 576px) and (max-width: 991.98px) {
  .al-fui-tabs-body > .tab-pane .row > * { flex-basis: 70%; width: 70%; max-width: 70%; }
}
