/* Kalam Aflam | shared mobile QA / v1.9.14
 * Scoped, non-destructive corrections derived from the published components.
 * Keep approved desktop design, ad placements, colors and editorial crop rules.
 */
@media (max-width: 820px) {
  /* Header navigation must be usable with touch, without expanding the page. */
  body.kads-unified-site:not(.page-id-18366) .kads-context-hero .kads-hero-nav {
    min-width: 0 !important;
    max-width: 100% !important;
    overscroll-behavior-inline: contain;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
  }
  body.kads-unified-site:not(.page-id-18366) .kads-context-hero .kads-hero-nav > a {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 0 0 auto !important;
    min-height: 44px !important;
    scroll-snap-align: start;
  }
  body.kads-unified-site:not(.page-id-18366) .kads-context-hero .kads-hero-search button {
    min-height: 44px !important;
    width: 44px !important;
    flex: 0 0 44px !important;
    touch-action: manipulation;
  }
  /* The site uses an editorial reading column. Let nested media shrink, and
     keep unusually wide user-supplied tables/source code scrollable locally. */
  body.kads-unified-site :is(.cm_post_page_lay_wrap, .kace-reading-body, .kads-shell, .ka-info-page) :is(pre, .wp-block-preformatted, .wp-block-code) {
    display: block;
    max-width: 100% !important;
    overflow-x: auto !important;
    overscroll-behavior-x: contain;
  }
  body.kads-unified-site :is(.cm_post_page_lay_wrap, .kace-reading-body, .kads-shell, .ka-info-page) :is(.wp-block-table, table) {
    max-width: 100% !important;
    overflow-x: auto !important;
  }
  body.kads-unified-site :is(.cm_post_page_lay_wrap, .kace-reading-body, .kads-shell, .ka-info-page) :is(img, video, iframe) {
    max-inline-size: 100% !important;
  }
  body.kads-unified-site :is(.kads-shell, .kace-reading-layout, .kace-reading-body, .kads-post-copy, .ka-info-page) {
    min-width: 0 !important;
  }
}
@media (max-width: 620px) {
  /* The shared header uses a 2-column RTL grid; never allow the wordmark or
     search control to force a third implicit column on a 375/390px phone. */
  body.kads-unified-site:not(.page-id-18366) .kads-context-hero .kads-hero-brand {
    min-width: 0 !important;
    max-width: 100% !important;
  }
  body.kads-unified-site:not(.page-id-18366) .kads-context-hero .kads-hero-search {
    min-width: 0 !important;
  }
  /* Preserve image proportions, visible faces, and original captions: no
     object-fit:cover override or poster crop is introduced here. */
  body.single-post.kace-cinema-edition .kace-reading-body :is(figure.wp-block-image, figure.wp-block-video) {
    max-width: 100% !important;
  }
}
