/* ==========================================================
   MOODY — ELEMENTOR BRIDGE
   Neutral compatibility layer for Elementor-managed pages.
   The visual design belongs to Elementor / page-scoped HTML-CSS-JS.
   ========================================================== */

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 0;
  overflow-x: clip;
}

body *,
body *::before,
body *::after {
  box-sizing: border-box;
}

/* Theme wrapper: structural only, never visual. */
.mx-page-main {
  width: 100%;
  max-width: none !important;
  min-width: 0;
  min-height: 50vh;
  margin: 0 !important;
  padding: 0 !important;
  overflow: visible;
}

.mx-page-main > .elementor {
  width: 100%;
  max-width: none;
  min-width: 0;
}

/* Elementor HTML widgets often contain their own full-width composition. */
.elementor-widget-html,
.elementor-widget-html > .elementor-widget-container {
  min-width: 0;
  max-width: 100%;
}

.elementor-widget-html > .elementor-widget-container {
  overflow: visible;
}

/* Prevent intrinsic media dimensions from escaping their real parent only.
   No forced height/object-fit here: page CSS remains authoritative. */
.elementor img,
.elementor video,
.elementor iframe,
.elementor svg {
  max-width: 100%;
}

/* WordPress / Elementor wrappers must not add page-level spacing. */
body.elementor-page .site-main,
body.elementor-page .mx-page-main {
  margin: 0 !important;
  padding: 0 !important;
  max-width: none !important;
}

/* The current global shell is rendered independently from page design. */
.moodyp-header,
.moodyp-footer {
  width: 100%;
  max-width: 100%;
}

.moodyp-header img.custom-logo,
.moodyp-footer img.custom-logo,
.moodyp-footer-white-logo {
  height: auto;
  object-fit: contain;
}

/* Fail-safe only: the global shell's own inline CSS remains authoritative. */
.moodyp-header img.custom-logo {
  max-width: 175px;
  max-height: 58px;
}

@media (max-width: 1180px) {
  .moodyp-header img.custom-logo {
    max-width: 145px;
    max-height: 52px;
  }
}

@media (max-width: 720px) {
  body {
    overflow-x: hidden;
  }

  .moodyp-header img.custom-logo {
    max-width: 128px;
    max-height: 46px;
  }
}
