/**
 * Consulmar v25 — scroll mobile real, sem alterar o layout.
 *
 * O problema era a própria .vc_row.intro continuar com overflow-x:auto no
 * style.css legado. Isso transformava toda a primeira secção num scroller e
 * fazia a roda/gesto ficar preso nessa row. Nesta folha:
 * - html é o único scroll root vertical;
 * - body/main permanecem no fluxo normal;
 * - a row .intro nunca faz scroll;
 * - apenas o rail das imagens pode deslocar-se no eixo X.
 */
@media (max-width: 1024px) {
  html:not(.csm-overlay-open):not(.mm-open) {
    width: 100% !important;
    height: auto !important;
    min-height: 100% !important;
    max-height: none !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    position: static !important;
    overscroll-behavior-x: none !important;
    overscroll-behavior-y: auto !important;
    touch-action: pan-y !important;
    -webkit-overflow-scrolling: touch !important;
  }

  body:not(.csm-overlay-open):not(.mm-open) {
    width: auto !important;
    height: auto !important;
    min-height: 100% !important;
    max-height: none !important;
    overflow: visible !important;
    position: static !important;
    inset: auto !important;
    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    left: auto !important;
    overscroll-behavior: auto !important;
    touch-action: pan-y !important;
    -webkit-overflow-scrolling: auto !important;
  }

  html.disableScroll:not(.csm-overlay-open):not(.mm-open) {
    height: auto !important;
    max-height: none !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    position: static !important;
  }

  body.disableScroll:not(.csm-overlay-open):not(.mm-open) {
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    position: static !important;
  }

  #main,
  main,
  main.site-main,
  .site-content,
  .entry-content,
  .page-content {
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    overscroll-behavior-y: auto !important;
    touch-action: pan-y !important;
  }

  /* A row inteira deixa definitivamente de ser um scroller. */
  .vc_row.intro,
  .vc_row.intro > .wpb_column,
  .vc_row.intro > .vc_column_container,
  .vc_row.intro > .vc_column_container > .vc_column-inner,
  .vc_row.intro > .vc_column_container > .vc_column-inner > .wpb_wrapper {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
    overscroll-behavior: auto !important;
    touch-action: pan-y !important;
  }

  .vc_row.intro {
    overflow-x: visible !important;
    overflow-y: visible !important;
    scrollbar-width: none !important;
  }

  .vc_row.intro::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
  }

  /* Só este wrapper é o rail horizontal das imagens. */
  .vc_row.intro .intro-img-col > .vc_column-inner > .wpb_wrapper {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    overscroll-behavior-x: contain !important;
    overscroll-behavior-y: auto !important;
    touch-action: pan-x pan-y !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
  }

  .vc_row.intro .intro-img-col > .vc_column-inner > .wpb_wrapper::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
  }

  /* Outras galerias continuam horizontais, mas nunca criam scroll no eixo Y. */
  .vc_row.galeria > .wpb_column > .vc_column-inner > .wpb_wrapper,
  .vc_row.galeria1 > .wpb_column > .vc_column-inner > .wpb_wrapper,
  .galeriaImagensWrapper,
  .galeria1ImagensWrapper,
  .qs-rail {
    overflow-x: auto !important;
    overflow-y: hidden !important;
    overscroll-behavior-x: contain !important;
    overscroll-behavior-y: auto !important;
    touch-action: pan-x pan-y !important;
    -webkit-overflow-scrolling: touch !important;
  }

  /* Overlays são a única exceção legítima ao scroll do documento. */
  html.csm-overlay-open,
  body.csm-overlay-open,
  html.mm-open,
  body.mm-open {
    overflow: hidden !important;
    touch-action: none !important;
  }

  .csm-overlay.is-open .csm-menu-scroll,
  .csm-overlay.is-open .csm-search-shell,
  #siteMobileMenu.is-open .mobile-menu {
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior: contain !important;
    touch-action: pan-y !important;
    -webkit-overflow-scrolling: touch !important;
  }
}
