/**
 * Mobile overflow guardrails
 *
 * Keeps legacy internal layouts inside the visual viewport without disabling
 * the intentional horizontal scrolling of section navigation components.
 */
@media (max-width: 900px) {
  html,
  body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden !important;
  }

  @supports (overflow: clip) {
    html,
    body {
      overflow-x: clip !important;
    }
  }

  body .site-wrapper,
  body .site-wrapper > header,
  body main,
  body .site-footer {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  /* Keep viewport-fixed navigation outside clipped ancestors. Pages that
   * render the shared mobile pin component must leave main unclipped too;
   * otherwise WebKit can repaint that fixed descendant on each scroll frame. */
  body:not(.jci-courses-page):not(.jci-program-type-page):not(.jci-academic-programs-page) main:not(:has([data-jci-mobile-fixed-secondary-nav])),
  body .site-footer {
    overflow-x: hidden !important;
  }

  @supports (overflow: clip) {
    body:not(.jci-courses-page):not(.jci-program-type-page):not(.jci-academic-programs-page) main:not(:has([data-jci-mobile-fixed-secondary-nav])),
    body .site-footer {
      overflow-x: clip !important;
    }
  }

  /* Canonical listing contexts also need visible overflow for their existing
   * floating controls. Other templates opt in only by rendering the shared
   * [data-jci-mobile-fixed-secondary-nav] component above. */
  body:is(.jci-courses-page, .jci-program-type-page, .jci-academic-programs-page) main,
  body main:has([data-jci-mobile-fixed-secondary-nav]) {
    overflow-x: visible;
  }

  body:not(.home):not(.front-page):not(.jci-academic-programs-page):not(.jci-courses-page):not(.jci-program-type-page):not(.jci-subject-area-page):not(.single-program):not(.page-id-41732):not(.page-id-41748) main,
  body:not(.home):not(.front-page):not(.jci-academic-programs-page):not(.jci-courses-page):not(.jci-program-type-page):not(.jci-subject-area-page):not(.single-program):not(.page-id-41732):not(.page-id-41748) main *,
  body:not(.home):not(.front-page):not(.jci-academic-programs-page):not(.jci-courses-page):not(.jci-program-type-page):not(.jci-subject-area-page):not(.single-program):not(.page-id-41732):not(.page-id-41748) footer.site-footer,
  body:not(.home):not(.front-page):not(.jci-academic-programs-page):not(.jci-courses-page):not(.jci-program-type-page):not(.jci-subject-area-page):not(.single-program):not(.page-id-41732):not(.page-id-41748) footer.site-footer * {
    box-sizing: border-box;
  }

  body:not(.home):not(.front-page):not(.jci-academic-programs-page):not(.jci-courses-page):not(.jci-program-type-page):not(.jci-subject-area-page):not(.single-program):not(.page-id-41732):not(.page-id-41748) main > *,
  body:not(.home):not(.front-page):not(.jci-academic-programs-page):not(.jci-courses-page):not(.jci-program-type-page):not(.jci-subject-area-page):not(.single-program):not(.page-id-41732):not(.page-id-41748) main :where(
    .container,
    .container-fluid,
    .container-inner,
    .row,
    [class^="col-"],
    [class*=" col-"],
    .left-side,
    .right-side,
    .inside_two-grid,
    .two-grid-specific-course_inside,
    .grid-container,
    .content,
    .wrap
  ) {
    min-width: 0 !important;
    max-width: 100% !important;
  }

  /* Bootstrap's negative row gutters leak outside several legacy containers. */
  body:not(.home):not(.front-page):not(.jci-academic-programs-page):not(.jci-courses-page):not(.jci-program-type-page):not(.jci-subject-area-page):not(.single-program):not(.page-id-41732):not(.page-id-41748) main .row {
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  body:not(.home):not(.front-page):not(.jci-academic-programs-page):not(.jci-courses-page):not(.jci-program-type-page):not(.jci-subject-area-page):not(.single-program):not(.page-id-41732):not(.page-id-41748) main img,
  body:not(.home):not(.front-page):not(.jci-academic-programs-page):not(.jci-courses-page):not(.jci-program-type-page):not(.jci-subject-area-page):not(.single-program):not(.page-id-41732):not(.page-id-41748) main svg,
  body:not(.home):not(.front-page):not(.jci-academic-programs-page):not(.jci-courses-page):not(.jci-program-type-page):not(.jci-subject-area-page):not(.single-program):not(.page-id-41732):not(.page-id-41748) main video,
  body:not(.home):not(.front-page):not(.jci-academic-programs-page):not(.jci-courses-page):not(.jci-program-type-page):not(.jci-subject-area-page):not(.single-program):not(.page-id-41732):not(.page-id-41748) main iframe,
  body:not(.home):not(.front-page):not(.jci-academic-programs-page):not(.jci-courses-page):not(.jci-program-type-page):not(.jci-subject-area-page):not(.single-program):not(.page-id-41732):not(.page-id-41748) main canvas,
  body:not(.home):not(.front-page):not(.jci-academic-programs-page):not(.jci-courses-page):not(.jci-program-type-page):not(.jci-subject-area-page):not(.single-program):not(.page-id-41732):not(.page-id-41748) main picture,
  body:not(.home):not(.front-page):not(.jci-academic-programs-page):not(.jci-courses-page):not(.jci-program-type-page):not(.jci-subject-area-page):not(.single-program):not(.page-id-41732):not(.page-id-41748) main table {
    max-width: 100% !important;
  }

  body:not(.home):not(.front-page):not(.jci-academic-programs-page):not(.jci-courses-page):not(.jci-program-type-page):not(.jci-subject-area-page):not(.single-program):not(.page-id-41732):not(.page-id-41748) main iframe,
  body:not(.home):not(.front-page):not(.jci-academic-programs-page):not(.jci-courses-page):not(.jci-program-type-page):not(.jci-subject-area-page):not(.single-program):not(.page-id-41732):not(.page-id-41748) main video,
  body:not(.home):not(.front-page):not(.jci-academic-programs-page):not(.jci-courses-page):not(.jci-program-type-page):not(.jci-subject-area-page):not(.single-program):not(.page-id-41732):not(.page-id-41748) main canvas {
    width: 100%;
  }

  body:not(.home):not(.front-page):not(.jci-academic-programs-page):not(.jci-courses-page):not(.jci-program-type-page):not(.jci-subject-area-page):not(.single-program):not(.page-id-41732):not(.page-id-41748) main input,
  body:not(.home):not(.front-page):not(.jci-academic-programs-page):not(.jci-courses-page):not(.jci-program-type-page):not(.jci-subject-area-page):not(.single-program):not(.page-id-41732):not(.page-id-41748) main select,
  body:not(.home):not(.front-page):not(.jci-academic-programs-page):not(.jci-courses-page):not(.jci-program-type-page):not(.jci-subject-area-page):not(.single-program):not(.page-id-41732):not(.page-id-41748) main textarea,
  body:not(.home):not(.front-page):not(.jci-academic-programs-page):not(.jci-courses-page):not(.jci-program-type-page):not(.jci-subject-area-page):not(.single-program):not(.page-id-41732):not(.page-id-41748) main button {
    max-width: 100%;
  }

  body:not(.home):not(.front-page):not(.jci-academic-programs-page):not(.jci-courses-page):not(.jci-program-type-page):not(.jci-subject-area-page):not(.single-program):not(.page-id-41732):not(.page-id-41748) main :where(h1, h2, h3, h4, p, a, li) {
    overflow-wrap: break-word;
    word-break: normal;
  }

  /* Fixed image widths left by the legacy mobile CSS. */
  body:not(.home):not(.front-page):not(.jci-academic-programs-page):not(.jci-courses-page):not(.jci-program-type-page):not(.jci-subject-area-page):not(.single-program):not(.page-id-41732):not(.page-id-41748) main .talent_image,
  body:not(.home):not(.front-page):not(.jci-academic-programs-page):not(.jci-courses-page):not(.jci-program-type-page):not(.jci-subject-area-page):not(.single-program):not(.page-id-41732):not(.page-id-41748) main .talent_image .bgImage,
  body:not(.home):not(.front-page):not(.jci-academic-programs-page):not(.jci-courses-page):not(.jci-program-type-page):not(.jci-subject-area-page):not(.single-program):not(.page-id-41732):not(.page-id-41748) main .container-right-side .bgImage,
  body:not(.home):not(.front-page):not(.jci-academic-programs-page):not(.jci-courses-page):not(.jci-program-type-page):not(.jci-subject-area-page):not(.single-program):not(.page-id-41732):not(.page-id-41748) main .section-image-light,
  body:not(.home):not(.front-page):not(.jci-academic-programs-page):not(.jci-courses-page):not(.jci-program-type-page):not(.jci-subject-area-page):not(.single-program):not(.page-id-41732):not(.page-id-41748) main .two-images .bgImage {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }

  .container-newsletter-red .container-strict-width,
  .container-newsletter-red .container-strict-width .input-email,
  .container-newsletter-red .container-strict-width .container-cta,
  .container-newsletter-red .container-strict-width .container-cta button,
  .search-input,
  .tematica-container.light .right-side .schedule,
  .tematica-container.light .right-side .section-image-light {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  .tematica-container.light .right-side .section-image-light {
    height: auto;
  }
}

