/* Responsive overrides for the Sapiens site (home + blog posts).
   Desktop layout stays inline on each element; these rules only take over
   below the breakpoints. Selectors match on inline-style property names so
   no extra markup is needed, plus a few rs-* hooks for specific cards. */

@media (max-width: 980px) {
  [style*="repeat(4"] { grid-template-columns: repeat(2, 1fr) !important; }
  [style*="repeat(3"] { grid-template-columns: repeat(2, 1fr) !important; }
  [style*="1fr 1fr 1fr"] { grid-template-columns: repeat(2, 1fr) !important; }
}

@media (max-width: 760px) {
  [style*="grid-template-columns"] { grid-template-columns: 1fr !important; }

  [data-screen-label] { padding-left: 18px !important; padding-right: 18px !important; }

  [data-screen-label="Nav"] { padding: 11px 14px !important; gap: 8px !important; }
  [data-screen-label="Nav"] > div {
    flex-wrap: nowrap !important;
    justify-content: flex-start !important;
    max-width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  [data-screen-label="Nav"] > div::-webkit-scrollbar { display: none; }

  h1 { font-size: 34px !important; line-height: 1.1 !important; }
  h2 { font-size: 26px !important; line-height: 1.2 !important; }

  .rs-quizcard { padding: 22px !important; }
  .rs-quizq { font-size: 22px !important; }
  .rs-postcard {
    flex: 1 0 78vw !important;
    box-sizing: border-box;
    padding: 24px !important;
  }

  [data-screen-label="Artigo"] p { font-size: 16.5px !important; }
  [data-screen-label="CTA do artigo"] > div { padding: 24px !important; }
  [data-screen-label="Cabecalho do artigo"] { padding-top: 64px !important; padding-bottom: 52px !important; }
}

@media (max-width: 420px) {
  h1 { font-size: 29px !important; }
  h2 { font-size: 23px !important; }
}
