/* Na Mira da Mídia — mobile overflow guard */
@media (max-width: 782px) {
  html {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
  }

  body.single-post.nmm-mobile-fix-active {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow-x: hidden !important;
  }

  /* Containers comuns de temas/editoriais. Escopo restrito a matéria individual. */
  body.single-post.nmm-mobile-fix-active #page,
  body.single-post.nmm-mobile-fix-active .site,
  body.single-post.nmm-mobile-fix-active .site-content,
  body.single-post.nmm-mobile-fix-active .content-area,
  body.single-post.nmm-mobile-fix-active .site-main,
  body.single-post.nmm-mobile-fix-active main,
  body.single-post.nmm-mobile-fix-active article,
  body.single-post.nmm-mobile-fix-active .post,
  body.single-post.nmm-mobile-fix-active .single-post,
  body.single-post.nmm-mobile-fix-active .single-post-content,
  body.single-post.nmm-mobile-fix-active .post-content,
  body.single-post.nmm-mobile-fix-active .entry-content,
  body.single-post.nmm-mobile-fix-active .entry-wrapper,
  body.single-post.nmm-mobile-fix-active .post-wrapper,
  body.single-post.nmm-mobile-fix-active .article-content,
  body.single-post.nmm-mobile-fix-active .td-main-content-wrap,
  body.single-post.nmm-mobile-fix-active .td-container,
  body.single-post.nmm-mobile-fix-active .td-pb-row,
  body.single-post.nmm-mobile-fix-active .td-pb-span8,
  body.single-post.nmm-mobile-fix-active .td-pb-span12 {
    box-sizing: border-box !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  /* A matéria não pode ultrapassar a viewport nem ficar deslocada. */
  body.single-post.nmm-mobile-fix-active article,
  body.single-post.nmm-mobile-fix-active .single-post-content,
  body.single-post.nmm-mobile-fix-active .post-content,
  body.single-post.nmm-mobile-fix-active .entry-content,
  body.single-post.nmm-mobile-fix-active .article-content {
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    left: auto !important;
    right: auto !important;
    transform: none !important;
  }

  /* Texto: largura real do celular e quebra normal. */
  body.single-post.nmm-mobile-fix-active article h1,
  body.single-post.nmm-mobile-fix-active article h2,
  body.single-post.nmm-mobile-fix-active article h3,
  body.single-post.nmm-mobile-fix-active article h4,
  body.single-post.nmm-mobile-fix-active article p,
  body.single-post.nmm-mobile-fix-active article li,
  body.single-post.nmm-mobile-fix-active article blockquote,
  body.single-post.nmm-mobile-fix-active .entry-content h1,
  body.single-post.nmm-mobile-fix-active .entry-content h2,
  body.single-post.nmm-mobile-fix-active .entry-content h3,
  body.single-post.nmm-mobile-fix-active .entry-content p,
  body.single-post.nmm-mobile-fix-active .post-content p {
    box-sizing: border-box !important;
    max-width: 100% !important;
    min-width: 0 !important;
    white-space: normal !important;
    word-break: normal !important;
    overflow-wrap: break-word !important;
  }

  /* Imagens, figuras, vídeos e embeds nunca passam da tela. */
  body.single-post.nmm-mobile-fix-active article img,
  body.single-post.nmm-mobile-fix-active article figure,
  body.single-post.nmm-mobile-fix-active article picture,
  body.single-post.nmm-mobile-fix-active article video,
  body.single-post.nmm-mobile-fix-active article iframe,
  body.single-post.nmm-mobile-fix-active article embed,
  body.single-post.nmm-mobile-fix-active article object,
  body.single-post.nmm-mobile-fix-active .entry-content img,
  body.single-post.nmm-mobile-fix-active .post-content img {
    box-sizing: border-box !important;
    max-width: 100% !important;
  }

  body.single-post.nmm-mobile-fix-active article img,
  body.single-post.nmm-mobile-fix-active .entry-content img,
  body.single-post.nmm-mobile-fix-active .post-content img {
    height: auto !important;
  }

  body.single-post.nmm-mobile-fix-active article figure,
  body.single-post.nmm-mobile-fix-active .entry-content figure,
  body.single-post.nmm-mobile-fix-active .post-content figure {
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  /* Gutenberg/alinhamentos amplos não podem sair da viewport no mobile. */
  body.single-post.nmm-mobile-fix-active .alignwide,
  body.single-post.nmm-mobile-fix-active .alignfull,
  body.single-post.nmm-mobile-fix-active .wp-block-image,
  body.single-post.nmm-mobile-fix-active .wp-block-gallery,
  body.single-post.nmm-mobile-fix-active .wp-block-embed,
  body.single-post.nmm-mobile-fix-active .wp-block-group {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    transform: none !important;
  }

  /* Tabelas podem rolar internamente sem alargar a página toda. */
  body.single-post.nmm-mobile-fix-active .wp-block-table,
  body.single-post.nmm-mobile-fix-active .entry-content table,
  body.single-post.nmm-mobile-fix-active .post-content table {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
  }
}
