/* Nordic Spark 5.14 — single authoritative compact layout.
 * Replaces v5.8–v5.13 mobile height/visibility emergency patches.
 * The source mobile design is provided by source.css through 1199px.
 * These safeguards run from CSS even when Elementor JS, ResizeObserver,
 * IntersectionObserver or third-party optimizers do not load. */

/* Keep plugin widgets in the document flow. The fixed chat is exceptional. */
.ens4-widget[data-ens4]{box-sizing:border-box;width:100%;max-width:100%;min-width:0}
.ens4-widget[data-ens4] *, .ens4-widget[data-ens4] *::before,.ens4-widget[data-ens4] *::after {box-sizing:border-box}
.ens4-widget[data-ens4] :is(img,svg){max-width:100%}
.ens4-widget[data-ens4] :is(h1,h2,h3,p,a,li){overflow-wrap:break-word}

@media (max-width:1199px) {
  /* DO NOT let a desktop-only tree occupy space on tablets. */
  html body .ens4-widget[data-ens4]:not(.ens4-footer):not(.ens4-chat) {
    display:block!important;position:relative!important;
    height:auto!important;min-height:0!important;max-height:none!important;
    overflow:visible!important;opacity:1!important;visibility:visible!important;
    content-visibility:visible!important;
  }
  html body .ens4-widget[data-ens4]:not(.ens4-footer):not(.ens4-chat) > .ens4-desktop {
    display:none!important;height:0!important;min-height:0!important;max-height:0!important;
    margin:0!important;padding:0!important;overflow:hidden!important;
  }
  html body .ens4-widget[data-ens4]:not(.ens4-footer):not(.ens4-chat) > .ens4-mobile,
  html body .ens4-widget[data-ens4]:not(.ens4-footer):not(.ens4-chat) > .ens4-mobile > .mobile-site {
    display:block!important;position:relative!important;float:none!important;
    height:auto!important;min-height:0!important;max-height:none!important;
    width:100%!important;max-width:100%!important;
    margin:0!important;padding:0!important;
    opacity:1!important;visibility:visible!important;content-visibility:visible!important;
  }
  html body .ens4-widget[data-ens4] > .ens4-mobile > .mobile-site{
    min-height:0!important;background:#efefef;overflow:visible!important;
  }
  /* Preserve ordinary section flow, not Wix absolute screen heights. */
  html body .ens4-widget .ens4-mobile :is(.m-hero,.m-services,.m-about,.m-feature-panel,.m-blue-banner,.m-faq,.m-contact) {
    position:relative;top:auto;bottom:auto;left:auto;right:auto;
    max-width:100%;height:auto;min-height:0;overflow-wrap:break-word;
    opacity:1!important;visibility:visible!important;
  }
  html body .ens4-widget .ens4-mobile :is(.reveal,[data-motion-enter]){
    opacity:1!important;visibility:visible!important;
    transform:none!important;animation:none!important;
  }
  /* Do not accidentally inherit a paused Wix or Elementor appearance. */
  html body .elementor-widget[class*="elementor-widget-ens4_"]:not(.elementor-widget-ens4_chat),
  html body .elementor-widget[class*="elementor-widget-ens4_"]:not(.elementor-widget-ens4_chat) > .elementor-widget-container{
    display:block!important;height:auto!important;min-height:0!important;max-height:none!important;
    opacity:1!important;visibility:visible!important;content-visibility:visible!important;
  }
  html body .elementor-element.elementor-invisible:has(.ens4-widget){
    opacity:1!important;visibility:visible!important;animation:none!important;
  }
  /* Elementor sections containing only Nordic Spark widgets are not spacer sections. */
  html body .e-con:has(> .elementor-widget[class*="elementor-widget-ens4_"]),
  html body .e-con:has(> .elementor-element > .elementor-widget[class*="elementor-widget-ens4_"]){
    min-height:0!important;max-height:none!important;height:auto!important;
    --gap:0px!important;gap:0!important;
    padding-block:0!important;margin-block:0!important;
    align-items:stretch!important;
  }
  html body .e-con > .elementor-widget[class*="elementor-widget-ens4_"]{
    min-height:0!important;margin-block:0!important;flex:0 0 auto!important;
  }
  /* Normal page header is one 78px row; the visible header itself is fixed. */
  html body .ens4-widget.ens4-navbar,
  html body .ens4-widget.ens4-navbar > .ens4-mobile,
  html body .ens4-widget.ens4-navbar > .ens4-mobile > .mobile-site{
    height:78px!important;min-height:78px!important;max-height:78px!important;
  }
  html body .ens4-widget.ens4-navbar .mobile-site .m-header{
    position:fixed!important;left:0!important;right:0!important;
    top:var(--wp-admin--admin-bar--height,0px)!important;
    width:100%!important;height:78px!important;
    z-index:3500!important;display:flex!important;align-items:center!important;
    justify-content:space-between!important;padding:10px clamp(16px,4vw,40px)!important;
    background:#efefef!important;
  }
  html body .ens4-widget.ens4-navbar .m-logo{min-width:0;max-width:70%;height:56px;display:flex;align-items:center}
  html body .ens4-widget.ens4-navbar .m-logo img{width:auto!important;max-width:100%!important;height:auto!important;max-height:56px!important;object-fit:contain!important}
  html body .ens4-widget.ens4-navbar .m-nav{
    position:absolute!important;top:100%!important;left:0!important;right:0!important;
    z-index:3501!important;max-height:calc(100dvh - 78px - var(--wp-admin--admin-bar--height,0px));
    overflow-y:auto!important;
  }
  html body .ens4-widget.ens4-navbar .m-nav.open{display:flex!important;opacity:1!important;visibility:visible!important;pointer-events:auto!important}
  /* Hero owns its actual visible height; a full-page transparent spacer is invalid. */
  html body .ens4-widget.ens4-hero .ens4-mobile .m-hero{
    display:flex!important;align-items:center!important;
    min-height:clamp(510px,75svh,740px)!important;height:auto!important;
    width:100%!important;padding:clamp(55px,8vw,95px) clamp(22px,6vw,70px)!important;
    background-color:#082b4d!important;
    background-image:linear-gradient(105deg,rgba(0,27,49,.84),rgba(1,35,66,.38)),var(--hero-image)!important;
    background-size:cover!important;background-position:center!important;background-repeat:no-repeat!important;
    color:#fff!important;
  }
  .ens4-widget.ens4-hero .m-hero-content{position:relative;z-index:1;width:100%;max-width:620px;min-width:0}
  .ens4-widget.ens4-hero .m-hero h1{font-size:clamp(29px,5vw,48px)!important;line-height:1.16!important;color:white!important}
  .ens4-widget.ens4-hero .m-hero p{font-size:clamp(15px,1.8vw,18px);line-height:1.7;color:white!important}
  /* Each service card must grow with copy. */
  html body .ens4-widget.ens4-services .m-services{padding:46px clamp(18px,5vw,58px) 62px!important;}
  html body .ens4-widget.ens4-services .m-services-grid{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:16px!important;width:100%;min-width:0;}
  html body .ens4-widget.ens4-services .m-service{height:auto!important;min-height:200px!important;width:100%;min-width:0;max-width:100%;padding:24px 20px!important}
  /* Fully visible, fitted About image; not an intrinsically huge portrait. */
  html body .ens4-widget.ens4-about .m-about{padding:25px clamp(18px,5vw,60px) 58px!important;}
  html body .ens4-widget.ens4-about .m-about-content{min-width:0;max-width:1130px;margin-inline:auto;gap:26px;}
  html body .ens4-widget.ens4-about .m-about-image{
    position:relative!important;display:flex!important;justify-content:center;align-items:center;
    height:360px!important;min-height:0!important;max-height:none!important;
    width:100%!important;max-width:100%!important;overflow:hidden!important;
  }
  html body .ens4-widget.ens4-about .m-about-image img{
    display:block!important;width:100%!important;height:100%!important;
    max-height:100%!important;max-width:100%!important;
    object-fit:contain!important;object-position:center!important;
  }
  .ens4-widget.ens4-about .m-about-text{min-width:0}
  .ens4-widget.ens4-about .m-about-text h2{font-size:clamp(28px,4vw,44px)!important;line-height:1.18!important;margin:0 0 20px!important}
  /* Benefits section is zero-height on desktop only (overlay); uncollapse on mobile. */
  html body .ens4-widget.ens4-benefits,
  html body .ens4-widget.ens4-benefits > .ens4-mobile,
  html body .ens4-widget.ens4-benefits > .ens4-mobile > .mobile-site{
    display:block!important;height:auto!important;min-height:0!important;max-height:none!important;
  }
  .ens4-widget .m-feature-panel{clip-path:none!important;border-radius:10px;}
  .ens4-widget .m-blue-banner{clip-path:none!important;border-radius:10px;}
  html body .ens4-widget.ens4-faq .m-faq{padding:45px clamp(18px,5vw,60px) 65px!important}
  html body .ens4-widget.ens4-faq .m-faq-banner{min-width:0;margin:0;padding:28px 22px 25px!important;border-radius:10px;}
  html body .ens4-widget.ens4-faq .m-faq-banner > h2{margin:0 0 24px!important;font-size:clamp(26px,3.5vw,40px)!important;line-height:1.2!important}
  html body .ens4-widget.ens4-faq .m-faq-photos{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:14px!important;max-width:100%;}
  html body .ens4-widget.ens4-faq .m-faq-photos img{
    display:block!important;width:100%!important;height:250px!important;max-height:none!important;object-fit:contain!important;
  }
  html body .ens4-widget.ens4-contact .ns-mobile-contact{
    display:block!important;width:100%!important;max-width:100%;height:auto!important;padding:42px clamp(18px,5vw,60px) 64px!important;
  }
  /* Unlike other sections, footer and chat DO render desktop HTML at all sizes. */
  html body .ens4-widget.ens4-footer > .ens4-desktop{display:block!important;height:auto!important;max-height:none!important;width:100%!important;zoom:1!important;}
  html body .ens4-widget.ens4-footer{height:auto!important;max-height:none!important;}
  html body .ens4-widget.ens4-chat,
  html body .ens4-widget.ens4-chat > .ens4-desktop,
  html body .elementor-widget.elementor-widget-ens4_chat,
  html body .elementor-widget.elementor-widget-ens4_chat > .elementor-widget-container{
    height:0!important;min-height:0!important;max-height:0!important;margin:0!important;padding:0!important;
  }
}
@media (max-width:640px) {
  html body .ens4-widget.ens4-hero .m-hero{min-height:550px!important;padding:60px 22px!important}
  .ens4-widget.ens4-hero .m-hero h1{font-size:clamp(28px,8vw,39px)!important}
  html body .ens4-widget.ens4-services .m-services-grid{grid-template-columns:minmax(0,1fr)!important}
  html body .ens4-widget.ens4-services .m-service{min-height:185px!important}
  html body .ens4-widget.ens4-about .m-about-content{display:flex!important;flex-direction:column!important}
  html body .ens4-widget.ens4-about .m-about-image{height:min(360px,100vw)!important}
  html body .ens4-widget.ens4-about .m-about-text h2{font-size:clamp(28px,7.5vw,38px)!important}
  html body .ens4-widget.ens4-faq .m-faq-photos{grid-template-columns:1fr!important}
  html body .ens4-widget.ens4-faq .m-faq-photos img{height:235px!important}
  .ens4-widget .ns-footer-grid{grid-template-columns:1fr!important}
}
@media (min-width:641px) and (max-width:1199px){
  html body .ens4-widget.ens4-services .m-service:last-child:nth-child(odd){grid-column:1 / -1;width:min(100%,calc(50% - 8px))!important;justify-self:center}
  html body .ens4-widget.ens4-about .m-about-content{display:grid!important;grid-template-columns:minmax(0,.44fr) minmax(0,.56fr);align-items:center;gap:clamp(20px,3vw,48px)}
  html body .ens4-widget.ens4-about .m-about-image{height:clamp(310px,39vw,425px)!important}
  .ens4-widget.ens4-footer .ns-footer-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
/* Elementor desktop windows can preview a narrow widget without changing
 * the browser width. JS adds ens5-safe-mobile; normal published pages do
 * not need this class. These rules are intentionally small and scoped. */
.ens4-widget.ens5-safe-mobile:not(.ens4-footer):not(.ens4-chat)>.ens4-desktop{display:none!important;}
.ens4-widget.ens5-safe-mobile:not(.ens4-footer):not(.ens4-chat)>.ens4-mobile,
.ens4-widget.ens5-safe-mobile:not(.ens4-footer):not(.ens4-chat)>.ens4-mobile>.mobile-site{display:block!important;min-height:0!important;height:auto!important;opacity:1!important;visibility:visible!important}
.ens4-widget.ens5-safe-mobile.ens4-navbar >.ens4-mobile>.mobile-site{height:78px!important}
.ens4-widget.ens5-safe-mobile.ens4-benefits{height:auto!important}
@media (min-width:1200px){
 .ens4-widget.ens5-safe-desktop:not(.ens4-footer):not(.ens4-chat)>.ens4-mobile{display:none!important}
 .ens4-widget.ens5-safe-desktop:not(.ens4-footer):not(.ens4-chat)>.ens4-desktop{display:block!important}
}

/* v5.12 icon picker skin retained; without its old responsive rules. */
/* EL Nordic Spark v5.12 — Restore visible mobile/tablet content and replace icons.
   Scoped to ENS widgets; never alter unrelated Elementor widgets. */
.ens4-widget .ens512-service-icon{display:flex;align-items:center;justify-content:center;color:#00b853;line-height:1;pointer-events:none}
.ens4-widget .ens512-service-icon .ens512-fa-icon{display:flex;align-items:center;justify-content:center;width:100%;height:100%;color:inherit}
.ens4-widget .ens512-service-icon :is(svg,i,img){display:block;max-width:100%;max-height:100%;object-fit:contain;color:inherit}
.ens4-widget .ens512-service-icon .ens512-icon-image{width:100%;height:100%;object-fit:contain}
.ens4-widget.ens4-services .ens4-style-service-card>.ens512-service-icon{
  position:absolute!important;left:50%!important;top:18px!important;transform:translateX(-50%)!important;
  width:65px!important;height:67px!important;z-index:25!important;
}
.ens4-widget.ens4-services .ens4-style-service-card:has(>.ens512-service-icon) [data-testid^="svgRoot-"]{opacity:0!important;visibility:hidden!important}
.ens4-widget.ens4-services .ens4-style-service-card>.ens512-service-icon :is(i,svg){width:56px;height:56px;font-size:56px;fill:currentColor}
.ens4-widget.ens4-services .m-service>.ens512-service-icon{
  display:flex!important;position:relative;top:auto;left:auto;
  width:58px;height:58px;margin:0 auto 14px;transform:none;
}
.ens4-widget.ens4-services .m-service>.ens512-service-icon :is(svg,i){width:54px;height:54px;font-size:54px;fill:currentColor}
.ens4-widget.ens4-services .m-service:has(>.ens512-service-icon)>.m-service-icon{display:none!important}
.ens4-widget .ens512-replaced-icon .ens512-fa-icon,.ens4-widget .ens512-nav-icon .ens512-fa-icon{display:inline-flex;align-items:center;justify-content:center;width:100%;height:100%}
.ens4-widget .ens512-replaced-icon :is(svg,img,i){width:22px;height:22px;max-width:100%;max-height:100%;font-size:22px;object-fit:contain;fill:currentColor}
.ens4-widget.ens4-navbar .ens512-nav-icon{display:flex;align-items:center;justify-content:center;width:32px;height:34px;color:inherit;line-height:1}
.ens4-widget.ens4-navbar .ens512-nav-icon :is(svg,img,i){display:block;width:29px;height:29px;max-width:100%;max-height:100%;font-size:28px;object-fit:contain;fill:currentColor}


.ens4-widget .ens512-replaced-inline{display:inline-flex;align-items:center;justify-content:center;vertical-align:middle;max-width:100%;line-height:1;color:inherit}
.ens4-widget .ens512-replaced-inline :is(svg,i,img){display:inline-block;width:22px;height:22px;max-width:100%;max-height:100%;font-size:22px;object-fit:contain;fill:currentColor;color:inherit}
.ens4-widget.ens4-chat .ens512-chat-sparkle :is(svg,i,img){width:23px;height:23px;font-size:21px}
/* Navbar reservation: more specific than the blanket auto-height fallback.
 * Without this the fixed header overlays the hero and the widget measures 0px. */
@media (max-width:1199px){
 html body .ens4-widget[data-ens4="navbar"]:not(.ens4-footer):not(.ens4-chat),
 html body .ens4-widget[data-ens4="navbar"]:not(.ens4-footer):not(.ens4-chat) > .ens4-mobile,
 html body .ens4-widget[data-ens4="navbar"]:not(.ens4-footer):not(.ens4-chat) > .ens4-mobile > .mobile-site {
    display:block!important;height:78px!important;min-height:78px!important;max-height:78px!important;
 }
}

/* Responsive visibility switches set on imported Elementor wrappers should not
 * accidentally remove a Nordic Spark section when viewport mode changes. */
@media(max-width:767px){
 html body .elementor-element.elementor-hidden-mobile:has(.ens4-widget[data-ens4]),
 html body .elementor-widget[class*="elementor-widget-ens4_"].elementor-hidden-mobile {display:block!important;visibility:visible!important}
}
@media(min-width:768px) and (max-width:1199px){
 html body .elementor-element.elementor-hidden-tablet:has(.ens4-widget[data-ens4]),
 html body .elementor-widget[class*="elementor-widget-ens4_"].elementor-hidden-tablet {display:block!important;visibility:visible!important}
}
