/*
 * Makes Elementor render the NanjuTech design exactly.
 *
 * Every container imported from the design carries the CSS class "nj" (Advanced > CSS Classes).
 * An "nj" container is laid out by the design's own classes in main.css, so Elementor's
 * container defaults (flex column, 10px padding, 20px gaps, full width) are switched off here.
 * Remove "nj" from a container to hand it back to Elementor's layout controls.
 */
.elementor .e-con.nj{
  --width:auto;
  --padding-top:0px;--padding-right:0px;--padding-bottom:0px;--padding-left:0px;
  --margin-top:0px;--margin-right:0px;--margin-bottom:0px;--margin-left:0px;
  display:block;flex-direction:row;flex-wrap:nowrap;gap:0;
  align-items:normal;align-content:normal;justify-content:normal;
  min-width:auto;max-width:none;transition:none;
}
/* Elementor reserves ::before on containers for its background overlay. */
.elementor .e-con.nj::before{
  display:inline;position:static;left:auto;top:auto;width:auto;height:auto;
  border:0;border-radius:0;opacity:1;mix-blend-mode:normal;transition:none;
}

/*
 * On the live site the wrapper Elementor adds around each widget is taken out of the layout,
 * so the design element inside is the real grid/flex child, exactly as in the original markup.
 */
body:not(.elementor-editor-active) .elementor .e-con.nj{--position:static}
body:not(.elementor-editor-active) .elementor .e-con.nj > .elementor-widget{display:contents}

/* In the editor the wrappers stay as boxes so widgets can be hovered, selected and dragged. */
.elementor-editor-active .elementor .e-con.nj > .elementor-widget{width:auto;max-width:none;margin:0}

/* Keep the sticky header clear of the WordPress toolbar when logged in. */
body.admin-bar #nj-site > header{top:32px}
@media (max-width:782px){body.admin-bar #nj-site > header{top:46px}}
@media (max-width:600px){body.admin-bar #nj-site > header{top:0}}
