/*
 * Noor Core — compatibility layer.
 * Makes Astra wrappers and Elementor containers/widgets "transparent" so the
 * approved design system (variables → pages.css) renders exactly as before.
 * Loaded after Astra, Elementor and the design system.
 */

/* ---------- Astra wrappers: full-bleed, no padding ---------- */
body.noor-site .site-content > .ast-container,
body.noor-site #content > .ast-container {
  max-width: none;
  width: 100%;
  padding: 0;
  margin: 0;
  display: block;
}
body.noor-site .site-content,
body.noor-site #primary,
body.noor-site .site-main {
  margin: 0;
  padding: 0;
  width: 100%;
  max-width: none;
  border: 0;
  background: none;
}
body.noor-site.ast-separate-container,
body.noor-site {
  background-color: var(--paper);
}

/* ---------- Elementor containers marked noor-raw: neutral boxes ---------- */
.e-con.noor-raw {
  --display: block;
  --flex-direction: initial;
  --flex-wrap: initial;
  --justify-content: initial;
  --align-items: initial;
  --gap: 0px;
  --row-gap: 0px;
  --column-gap: 0px;
  --widgets-spacing: 0px;
  --widgets-spacing-row: 0px;
  --widgets-spacing-column: 0px;
  --padding-top: 0px;
  --padding-bottom: 0px;
  --padding-left: 0px;
  --padding-right: 0px;
  --padding-block-start: 0px;
  --padding-block-end: 0px;
  --padding-inline-start: 0px;
  --padding-inline-end: 0px;
  --margin-top: 0px;
  --margin-bottom: 0px;
  --margin-left: 0px;
  --margin-right: 0px;
  --margin-block-start: 0px;
  --margin-block-end: 0px;
  --margin-inline-start: 0px;
  --margin-inline-end: 0px;
  --width: auto;
  --min-height: 0px;
  --content-width: none;
  --container-max-width: none;
  --border-radius: 0;
  --overflow: visible;
  --text-align: initial;
}
/* Elementor writes per-element vars like
   ".elementor-125 .elementor-element.elementor-element-abc{--display:flex}"
   (specificity 0,3,0); this must win over those. */
.elementor .e-con.noor-raw.noor-raw.noor-raw {
  --display: block;
  --flex-direction: initial;
  --flex-wrap: initial;
  --gap: 0px;
  --row-gap: 0px;
  --column-gap: 0px;
  --padding-top: 0px;
  --padding-bottom: 0px;
  --padding-left: 0px;
  --padding-right: 0px;
  --margin-top: 0px;
  --margin-bottom: 0px;
  --margin-left: 0px;
  --margin-right: 0px;
  --width: auto;
  --min-height: 0px;
  --widgets-spacing: 0px;
  --widgets-spacing-row: 0px;
  --widgets-spacing-column: 0px;
}
/* Low-specificity defaults; design-system class rules override them. */
:where(.e-con.noor-raw) {
  display: block;
  padding: 0;
  margin: 0;
  gap: 0;
  min-height: 0;
  max-width: none;
  width: auto;
  text-align: inherit;
}
:where(.e-con.noor-raw)::before,
:where(.e-con.noor-raw)::after {
  content: none;
}

/* Widget wrappers vanish from layout: their HTML behaves as direct children. */
.noor-raw > .elementor-element.elementor-widget,
.noor-raw > .elementor-element.elementor-widget > .elementor-widget-container,
.elementor-location-header .elementor-widget-shortcode,
.elementor-location-header .elementor-widget-shortcode > .elementor-widget-container,
.elementor-location-header .elementor-shortcode,
.elementor-location-footer .elementor-widget-shortcode,
.elementor-location-footer .elementor-widget-shortcode > .elementor-widget-container,
.elementor-location-footer .elementor-shortcode,
.noor-raw .elementor-shortcode,
.noor-raw .elementor-widget-template > .elementor-widget-container,
.noor-raw .elementor-template {
  display: contents;
}
.noor-raw .elementor-widget-text-editor,
.noor-raw .elementor-widget-html {
  color: inherit;
  font: inherit;
}

/* ---------- Elementor's global img rule beats the logo sizes ---------- */
.elementor img.brand-logo { height: auto; }
.elementor img.brand-logo--header { height: 140px; }
.elementor img.brand-logo--footer { height: 112px; }
.elementor img.brand-logo--contact { height: 94px; }
@media (max-width: 575.98px) {
  .elementor img.brand-logo--header { height: 112px; }
  .elementor img.brand-logo--footer { height: 94px; }
}
.elementor .stage-card .stage-image img,
.elementor .hero__media img,
.elementor .blog-card__media img {
  height: 100%;
}

/* Elementor resets figure margins inside widgets (specificity 0,4,1). */
.elementor .elementor-widget.elementor-widget-shortcode .article-hero__inner figure.article-hero__media {
  margin: 1.35rem 0 0;
}
.elementor .elementor-widget.elementor-widget-shortcode .article-content figure {
  margin: 0 0 1em;
}

/* ---------- Astra form/button defaults must not leak ---------- */
body.noor-site .faq-header,
body.noor-site .navbar-toggler,
body.noor-site .subject-item {
  box-shadow: none;
  text-transform: none;
  letter-spacing: normal;
}
body.noor-site a:focus { outline: revert; }

/* Live site's Customizer "Additional CSS" (stored per theme, so it is not
   carried over by a theme switch). */
.brand-logo.brand-logo--header {
  max-height: 78px !important;
}
.site-navbar,
.site-navbar .container-main {
  min-height: auto !important;
}

/* Astra extras that did not exist on the legacy theme. */
#ast-scroll-top {
  display: none !important;
}

/* Theme Builder header/footer wrappers: no extra spacing. */
.elementor-location-header,
.elementor-location-footer {
  margin: 0;
  padding: 0;
}

/* Article body: subheadings and links (SEO copy update, 1.0.7) */
.article-content h2 {
  font-size: clamp(1.15rem, 2vw, 1.35rem);
  font-weight: 800;
  line-height: 1.5;
  color: var(--teal-deep);
  margin: 1.75rem 0 0.75rem;
}
.article-content a {
  color: var(--teal);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.article-content a:hover,
.article-content a:focus-visible {
  color: var(--teal-deep);
}
