/* ARCHIMETRICA 345 — adaptive project filters without horizontal scrolling.
   Up to the main 980px adaptive breakpoint the filter strip never scrolls.
   It stays in one 4-column row while there is room; the narrow mobile layout
   remains the approved 2x2 grid. */

@media (max-width:980px){
  .project-filter-row-221{
    width:100%!important;
    max-width:100%!important;
    box-sizing:border-box!important;
    overflow:visible!important;
    overflow-x:visible!important;
    overflow-y:visible!important;
    overscroll-behavior:initial!important;
    -webkit-overflow-scrolling:auto!important;
  }

  .project-filter-row-221 .project-scope-switch,
  .project-scope-switch{
    min-width:0!important;
    max-width:100%!important;
    overflow:visible!important;
    overflow-x:visible!important;
    overflow-y:visible!important;
    overscroll-behavior:initial!important;
    scroll-snap-type:none!important;
    scrollbar-width:none!important;
    -ms-overflow-style:none!important;
    -webkit-overflow-scrolling:auto!important;
  }

  .project-filter-row-221 .project-scope-switch::-webkit-scrollbar,
  .project-scope-switch::-webkit-scrollbar{
    display:none!important;
    width:0!important;
    height:0!important;
  }
}

/* Tablet / compact desktop: keep all four filters visible in one equal row. */
@media (min-width:761px) and (max-width:980px){
  .project-filter-row-221{
    display:grid!important;
    grid-template-columns:auto minmax(0,1fr)!important;
    align-items:center!important;
    gap:clamp(12px,2vw,22px)!important;
    padding-inline:clamp(16px,2.6vw,28px)!important;
  }

  .project-filter-row-221 .project-grid-toolbar{
    display:flex!important;
    width:auto!important;
    min-width:0!important;
    margin:0!important;
    padding:0!important;
  }

  .project-filter-row-221 .project-scope-switch{
    display:grid!important;
    grid-template-columns:repeat(4,minmax(0,1fr))!important;
    gap:clamp(10px,1.8vw,24px)!important;
    width:100%!important;
    min-width:0!important;
    margin:0!important;
    padding:0!important;
    white-space:normal!important;
  }

  .project-filter-row-221 .project-scope-button{
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
    min-height:44px!important;
    padding:0 6px!important;
    justify-content:center!important;
    text-align:center!important;
    white-space:nowrap!important;
    overflow:visible!important;
  }
}

/* Narrow mobile: approved two-buttons-per-row composition. */
@media (max-width:760px){
  .project-filter-row-221 .project-grid-toolbar{
    display:none!important;
  }

  .project-filter-row-221{
    display:block!important;
    width:100%!important;
    padding-inline:0!important;
    overflow:visible!important;
  }

  .project-filter-row-221 .project-scope-switch,
  .project-scope-switch{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:10px!important;
    width:100%!important;
    max-width:100%!important;
    height:auto!important;
    min-height:0!important;
    margin:0!important;
    padding:0!important;
    overflow:visible!important;
    white-space:normal!important;
    border:none!important;
    border-radius:0!important;
    background:none!important;
    box-shadow:none!important;
    backdrop-filter:none!important;
    -webkit-backdrop-filter:none!important;
  }

  .project-filter-row-221 .project-scope-button,
  .project-scope-button{
    width:100%!important;
    min-width:0!important;
    min-height:46px!important;
    height:auto!important;
    padding:12px 10px!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    text-align:center!important;
    white-space:normal!important;
    line-height:1.1!important;
  }
}
