/* Stage 3: conservative mobile layout safeguards; loaded after theme CSS. */
img, video, iframe { max-width: 100%; }
img { height: auto; }
/* Do not override inline dimensions on image elements that carry reserved layout space. */
@media (max-width: 767px) {
  html, body { max-width: 100%; overflow-x: clip; }
  .container { max-width: 100%; }
  .footer-widgets .col-sm-4 { min-width: 0; }
  .footer-widget img.logo { max-width: 100%; height: auto; }
  .newsletter, .widget-newsletter { max-width: 100%; }
  .newsletter-input { max-width: 100%; }
  table { max-width: 100%; }
  iframe { max-width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* Stage 4: keep long article content and external embeds inside viewport. */
.post-content, .post-content .post-text, .post-content figure, .post-content table { max-width: 100%; }
.post-content img, .post-content video { max-width: 100%; height: auto; }
.post-content iframe { max-width: 100%; }
@media (max-width: 767px) {
  .post-content { overflow-wrap: break-word; }
  .post-content table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
}
