/* AlKhutaa Pro 1.6.0 — canonical site-width adapter.
 * Header and mobile-menu visuals are owned by their dedicated core modules.
 */
body.kh-site-edge-to-edge {
  --kh-site-edge: 0px;
  overflow-x: clip;
}

body.kh-site-edge-to-edge .khutaa-v2-topbar-inner,
body.kh-site-edge-to-edge .khutaa-v2-brand-desktop-new,
body.kh-site-edge-to-edge .khutaa-v2-main-nav-inner,
body.kh-site-edge-to-edge .khutaa-v2-header-latest-inner,
body.kh-site-edge-to-edge .khutaa-news-ticker .khutaa-ticker-shell {
  width: calc(100% - (var(--kh-site-edge, 0px) * 2)) !important;
  max-width: none !important;
  margin-inline: auto !important;
}

body.kh-site-edge-to-edge.home .khutaa-builder-section-front.alk-container,
body.kh-site-edge-to-edge.blog .khutaa-builder-section-front.alk-container,
body.kh-site-edge-to-edge.archive .khutaa-builder-section-front.alk-container,
body.kh-site-edge-to-edge.home .khutaa-builder-section-front.khutaa-section-width-wide,
body.kh-site-edge-to-edge.home .khutaa-builder-section-front.khutaa-section-width-full {
  width: calc(100% - (var(--kh-site-edge, 0px) * 2)) !important;
  max-width: none !important;
  margin-inline: auto !important;
  padding-inline: 0 !important;
}

body.kh-site-edge-to-edge .khutaa-news-ticker.is-full-width,
body.kh-site-edge-to-edge .khutaa-v2-main-nav,
body.kh-site-edge-to-edge .khutaa-v2-header-latest {
  width: 100% !important;
  max-width: none !important;
  margin-inline: 0 !important;
}

/* Preserves the current clean header presentation without a second top strip. */
.khutaa-v2-topbar {
  display: none !important;
}


/* Integrated canonical mobile geometry (1.8.0) */
/* AlKhutaa Pro 1.6.1 — canonical mobile page geometry.
 * This file owns document-width safety, the single-article mobile grid and
 * the mobile footer full-bleed shell. No runtime DOM rewriting is required.
 */

html,
body {
  max-width: 100%;
}

@media (max-width: 782px) {
  html {
    width: 100%;
    overflow-x: clip;
  }

  body.alk-mobile-overflow-repair {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    margin-inline: 0;
    overflow-x: clip;
  }

  body.alk-mobile-overflow-repair :where(
    #page,
    .site,
    .site-wrapper,
    .alk-site,
    .alk-site-wrapper,
    .alk-site-main,
    .site-main,
    #main,
    #primary,
    #content,
    .site-content,
    .content-area,
    .main-content
  ) {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
  }

  /* The article builder and native single-post wrappers share one width. */
  body.single-post.alk-mobile-overflow-repair :where(
    #page,
    .site,
    .site-wrapper,
    .alk-site,
    .alk-site-wrapper,
    .alk-site-main
  ) {
    width: 100% !important;
    margin-inline: 0 !important;
    inset-inline: auto !important;
    transform: none !important;
  }

  body.single-post.alk-mobile-overflow-repair :where(
    main,
    #main,
    #primary,
    #content,
    .site-main,
    .site-content,
    .content-area,
    .main-content,
    .khutaa-article-page,
    .khutaa-article-page__container,
    .khutaa-article-layout,
    .khutaa-article-main,
    .khutaa-article-component,
    article.post,
    article.type-post,
    .single-post-wrapper,
    .post-single,
    .entry-wrapper,
    .post-layout,
    .alk-single-post
  ) {
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  body.single-post.alk-mobile-article-edge :where(
    main#main,
    main.site-main,
    .alk-site-main,
    #content.site-content,
    .site-content,
    .content-area,
    .main-content,
    .khutaa-article-page,
    .khutaa-article-page__container,
    .khutaa-article-layout
  ) {
    width: 100% !important;
    margin-inline: 0 !important;
    padding-inline: 0 !important;
    inset-inline: auto !important;
    transform: none !important;
  }

  body.single-post.alk-mobile-article-edge .khutaa-article-page {
    padding-block: 4px 26px !important;
  }

  body.single-post.alk-mobile-article-edge .khutaa-article-main {
    width: 100% !important;
    margin-inline: 0 !important;
    padding: 10px 8px 24px !important;
    border-inline: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    inset-inline: auto !important;
    transform: none !important;
  }

  body.single-post.alk-mobile-article-edge :where(
    .khutaa-article-main > *,
    .khutaa-article-component > *,
    .khutaa-article-content,
    .khutaa-article-media,
    .khutaa-article-component--media,
    .entry-header,
    .entry-content,
    .post-content,
    .article-content
  ) {
    min-width: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    margin-inline: 0 !important;
    box-sizing: border-box !important;
  }

  body.single-post.alk-mobile-article-edge :where(
    .khutaa-article-media,
    .khutaa-article-component--media,
    .wp-block-image,
    figure
  ) {
    inset-inline: auto !important;
    transform: none !important;
  }

  body.single-post.alk-mobile-article-edge :where(
    img,
    video,
    iframe,
    table,
    .wp-block-image img
  ) {
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Independent article tools wrap inside the article and never require horizontal swiping. */
  body.single-post .alk-article-action-bar {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    margin-inline: 0 !important;
    overflow: visible !important;
    isolation: isolate;
  }

  body.single-post .alk-article-action-bar :where(
    .alk-action-module,
    .alk-article-action-bar__share,
    .alk-article-action-bar__socials,
    .alk-action-font
  ) {
    min-width: 0 !important;
    max-width: 100% !important;
  }

  body.single-post :where(
    .khutaa-article-title,
    .alk-secondary-headline,
    .khutaa-article-breadcrumbs,
    .khutaa-article-content,
    .khutaa-article-content p,
    .khutaa-article-content h1,
    .khutaa-article-content h2,
    .khutaa-article-content h3,
    .khutaa-article-content h4,
    .alk-article__meta,
    .alk-article-meta,
    .alk-share,
    .alk-article-info
  ) {
    min-width: 0 !important;
    max-width: 100% !important;
    overflow-wrap: anywhere;
  }

  /* Footer background reaches both viewport edges while content stays padded. */
  body.alk-mobile-overflow-repair :where(
    footer#alk-footer,
    footer.alk-footer,
    footer.site-footer,
    #footer
  ) {
    position: relative !important;
    width: 100dvw !important;
    max-width: 100dvw !important;
    margin-inline: calc(50% - 50dvw) !important;
    padding-inline: 0 !important;
    border-radius: 0 !important;
    box-sizing: border-box !important;
    overflow-x: clip !important;
  }

  body.alk-mobile-overflow-repair :where(
    footer#alk-footer,
    footer.alk-footer,
    footer.site-footer,
    #footer
  ) .alk-mobile-footer-pro {
    width: 100% !important;
    max-width: 100% !important;
    margin-inline: 0 !important;
    padding-inline: 0 !important;
    border-radius: 0 !important;
    box-sizing: border-box !important;
    overflow-x: clip !important;
  }

  body.alk-mobile-overflow-repair :where(
    footer#alk-footer,
    footer.alk-footer,
    footer.site-footer,
    #footer
  ) :where(
    .alk-container,
    .container,
    .footer-container,
    .footer-inner,
    .alk-footer__inner,
    .footer-widgets
  ) {
    width: 100% !important;
    max-width: 100% !important;
    margin-inline: auto !important;
    box-sizing: border-box !important;
  }
}

@supports not (width: 100dvw) {
  @media (max-width: 782px) {
    body.alk-mobile-overflow-repair :where(
      footer#alk-footer,
      footer.alk-footer,
      footer.site-footer,
      #footer
    ) {
      width: 100vw !important;
      max-width: 100vw !important;
      margin-inline: calc(50% - 50vw) !important;
    }
  }
}

