/*
 * M307.1 — Mobile horizontal-overflow hotfix.
 * Live M307 screenshots show the full-bleed hero wrapper shifted to the right.
 * M307 combined left:50% with margin-left:-50vw. Use the standard centered
 * breakout margin instead; it accounts for a centered, constrained theme
 * content column without adding a second positional offset.
 */
@media (max-width: 767px) {
  html,
  body {
    max-width: 100% !important;
    overflow-x: clip !important;
  }

  body.shk-managed-home-active .shk-home-section-hero {
    position: relative !important;
    left: auto !important;
    right: auto !important;
    transform: none !important;
    width: 100vw !important;
    max-width: 100vw !important;
    min-width: 0 !important;
    margin-left: calc(50% - 50vw) !important;
    margin-right: calc(50% - 50vw) !important;
    box-sizing: border-box !important;
  }

  /* The hero is already inside the corrected full-viewport wrapper.
     Remove its second breakout offset to prevent nested horizontal shifts. */
  body.shk-managed-home-active #shikshan-homepage .shk-m243-hero {
    left: auto !important;
    right: auto !important;
    transform: none !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    box-sizing: border-box !important;
  }

  /* Prevent nested theme wrappers and grids from imposing a wider minimum. */
  body.shk-managed-home-active #shikshan-homepage,
  body.shk-managed-home-active #shikshan-homepage .shk-m243-home,
  body.shk-managed-home-active #shikshan-homepage .shk-m243-hero-inner,
  body.shk-managed-home-active #shikshan-homepage .shk-m243-portals,
  body.shk-managed-home-active #shikshan-homepage .shk-home-section,
  body.shk-managed-home-active #shikshan-homepage .shk-home-section-inner,
  body.shk-managed-home-active #shikshan-homepage .shk-home-section-content {
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  body.shk-managed-home-active #shikshan-homepage .shk-m243-hero-inner,
  body.shk-managed-home-active #shikshan-homepage .shk-m302-feature-rail,
  body.shk-managed-home-active #shikshan-homepage .shk-m243-actions {
    width: 100% !important;
  }

  /* Keep the header in normal flow and fill the corrected wrapper. */
  body.shk-managed-home-active .shk-home-section-hero .shk-public-header,
  body.shk-managed-home-active #shikshan-homepage .shk-public-header {
    position: relative !important;
    left: auto !important;
    right: auto !important;
    transform: none !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    box-sizing: border-box !important;
  }

  /* Avoid fixed-width child content creating a hidden horizontal canvas. */
  body.shk-managed-home-active #shikshan-homepage img,
  body.shk-managed-home-active #shikshan-homepage svg,
  body.shk-managed-home-active #shikshan-homepage video,
  body.shk-managed-home-active #shikshan-homepage iframe {
    max-width: 100% !important;
  }
}
