/**
 * MIDZ sticky stack — loaded last on purpose.
 * Do not set overflow-x:hidden/clip on html, body, or .aixor-main.
 */

html,
body,
main.aixor-main,
.aixor-main {
  overflow-x: visible !important;
  overflow-y: visible !important;
}

body .feature-sec,
body .feature-sec > .feature-project-lists,
body .feature-sec .feature-project-lists,
body.midz-project-page .midz-project-gallery-stack,
body.midz-project-page .midz-project-gallery-stack-list {
  overflow: visible !important;
}

body .feature-sec .feature-project,
body.midz-project-page .midz-project-gallery-stack-list .midz-project-media-frame {
  position: sticky !important;
}

body .feature-sec .feature-project {
  top: 8px !important;
  height: 98vh !important;
  min-height: 520px !important;
}

body.midz-project-page .midz-project-gallery-stack-list .midz-project-media-frame {
  top: 8px !important;
  height: 98vh !important;
  min-height: 520px !important;
}

body .feature-sec .feature-project:nth-child(1) { z-index: 1 !important; }
body .feature-sec .feature-project:nth-child(2) { z-index: 2 !important; }
body .feature-sec .feature-project:nth-child(3) { z-index: 3 !important; }
body .feature-sec .feature-project:nth-child(4) { z-index: 4 !important; }
body .feature-sec .feature-project:nth-child(5) { z-index: 5 !important; }
body .feature-sec .feature-project:nth-child(6) { z-index: 6 !important; }
body .feature-sec .feature-project:nth-child(7) { z-index: 7 !important; }
body .feature-sec .feature-project:nth-child(8) { z-index: 8 !important; }
body .feature-sec .feature-project:nth-child(9) { z-index: 9 !important; }
body .feature-sec .feature-project:nth-child(10) { z-index: 10 !important; }

body.midz-project-page .midz-project-gallery-stack-list .midz-project-media-frame:nth-child(1) { z-index: 1 !important; }
body.midz-project-page .midz-project-gallery-stack-list .midz-project-media-frame:nth-child(2) { z-index: 2 !important; }
body.midz-project-page .midz-project-gallery-stack-list .midz-project-media-frame:nth-child(3) { z-index: 3 !important; }
body.midz-project-page .midz-project-gallery-stack-list .midz-project-media-frame:nth-child(4) { z-index: 4 !important; }
body.midz-project-page .midz-project-gallery-stack-list .midz-project-media-frame:nth-child(5) { z-index: 5 !important; }
body.midz-project-page .midz-project-gallery-stack-list .midz-project-media-frame:nth-child(6) { z-index: 6 !important; }
body.midz-project-page .midz-project-gallery-stack-list .midz-project-media-frame:nth-child(7) { z-index: 7 !important; }
body.midz-project-page .midz-project-gallery-stack-list .midz-project-media-frame:nth-child(8) { z-index: 8 !important; }
body.midz-project-page .midz-project-gallery-stack-list .midz-project-media-frame:nth-child(9) { z-index: 9 !important; }
body.midz-project-page .midz-project-gallery-stack-list .midz-project-media-frame:nth-child(10) { z-index: 10 !important; }

@media (max-width: 991px) {
  body .feature-sec .feature-project {
    top: 6px !important;
    height: 86vh !important;
    min-height: 420px !important;
  }

  body.midz-project-page .midz-project-gallery-stack-list .midz-project-media-frame {
    top: 6px !important;
    height: 86vh !important;
    min-height: 420px !important;
  }
}

/* Gallery stack — no extra tail space after last card */
body.midz-project-page .midz-project-gallery-stack-list {
  padding-bottom: 0 !important;
  margin-bottom: 0 !important;
}

body.midz-project-page .midz-project-secondary {
  padding-bottom: 28px !important;
}

@media (max-width: 991px) {
  body.midz-project-page .midz-project-gallery-stack-list {
    padding-bottom: 0 !important;
  }

  body.midz-project-page .midz-project-secondary-track {
    margin-inline: auto !important;
  }
}

@media (max-width: 575px) {
  body.midz-project-page .midz-project-gallery-stack-list {
    padding-bottom: 0 !important;
  }

  body.midz-project-page .midz-project-secondary-track {
    width: calc(100% - 24px) !important;
    max-width: calc(100% - 24px) !important;
    margin-inline: auto !important;
    gap: 8px !important;
  }

  body.midz-project-page .midz-project-secondary-track .midz-project-media-frame {
    border-radius: 12px !important;
  }
}

/* Project page: keep document scroll chain intact (no overflow-x lock on html/body).
   Horizontal bleed is contained by section-level rules in midz-overrides.css. */
html:has(body.midz-project-page),
body.midz-project-page {
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: visible !important;
  overflow-y: visible !important;
}
