/* ==========================================================================
   Elementor bridge: lets Elementor containers and widgets use the theme's
   layout classes (section, wrap, grid, btn-row ...) without changing the design.
   Scoped to containers that carry those classes; it does not restyle Elementor
   widgets in general. Spacing is applied through Elementor's own CSS variables,
   so the padding / margin / gap controls in the editor still override it.
   ========================================================================== */

/* Containers that mirror theme wrappers start without Elementor's default gaps */
.e-con.ibt-tight{
  --gap:0px;--row-gap:0px;--column-gap:0px;
  --padding-top:0px;--padding-right:0px;--padding-bottom:0px;--padding-left:0px;
  --kit-widget-spacing:0px;
}
.e-con.section{
  --padding-top:var(--ibt-section-y);--padding-bottom:var(--ibt-section-y);
  --padding-left:0px;--padding-right:0px;
  width:100%;max-width:none;
}
.e-con.section--tight{--padding-top:clamp(44px,5vw,68px);--padding-bottom:clamp(44px,5vw,68px);}
.e-con.wrap{
  --padding-left:var(--gutter);--padding-right:var(--gutter);
  width:100%;max-width:var(--wrap);margin-inline:auto;
}
.e-con.wrap-narrow .wrap{max-width:var(--wrap-narrow);}

/* Theme layouts keep their own display rules (Elementor sets display through a variable). Block first, then grids, so a container with both classes (wrap + grid) stays a grid. */
.e-con.hero-home__art,
.e-con.hero-home__frame,
.e-con.hero-home__copy,
.e-con.section-head,
.e-con.challenges__outro,
.e-con.career-band__copy,
.e-con.intro-note,
.e-con.footer-col,
.e-con.footer-about-wrap,
.e-con.section,
.e-con.wrap{display:block;}
.e-con.grid,
.e-con.hero-home__grid,
.e-con.split-head,
.e-con.career-band,
.e-con.footer-grid{display:grid;}
.e-con.btn-row{display:flex;flex-direction:row;flex-wrap:wrap;gap:14px;}
.e-con.btn-row--center{justify-content:center;}

/* Elementor widget wrappers must not add width or spacing inside theme layouts */
.e-con.ibt-tight > .elementor-widget{width:100%;max-width:100%;}
.e-con.ibt-tight.btn-row > .elementor-widget{width:auto;}
.e-con.ibt-tight > .elementor-widget:not(:last-child){margin-block-end:0;}
.e-con.ibt-tight > .elementor-widget > .elementor-widget-container{margin:0;padding:0;}

/* Headings rendered by the Ibtivia Heading widget keep the theme's typography preset */
.elementor-widget-ibtivia-heading .elementor-heading-title{font-family:var(--font-head);font-weight:600;}
/* Elementor's base rule (.elementor-heading-title{line-height:1;margin:0}) outranks the theme's heading classes by load order; restate the theme values */
.elementor-widget-ibtivia-heading :is(h1,h2,h3,h4,h5).elementor-heading-title{line-height:1.12;}
.elementor-widget-ibtivia-heading .elementor-heading-title.h-display{line-height:1.04;}
.elementor-widget-ibtivia-heading .elementor-heading-title.h-section{line-height:1.1;}
.elementor-widget-ibtivia-heading .elementor-heading-title.h1{line-height:1.08;}
.elementor-widget-ibtivia-heading .elementor-heading-title.h2{line-height:1.12;}
.elementor-widget-ibtivia-heading .elementor-heading-title.eyebrow{margin-bottom:16px;}
.elementor-widget-ibtivia-heading .elementor-heading-title.hero-home__title{margin:6px 0 0;}
.elementor-widget-ibtivia-heading .elementor-heading-title.intro-note__title{margin-bottom:8px;}

/* Images that the theme styles by class */
.hero-home__frame .elementor-widget-image{position:static;}
.elementor-widget-image.career-band__art img{width:100%;height:auto;max-width:100%;aspect-ratio:16/10;object-fit:cover;border-radius:var(--r);background:#fff;}

/* Scroll-fade must never hide content inside the Elementor editor */
.elementor-editor-active [data-reveal],
.elementor-editor-active .reveal-ready [data-reveal]:not(.is-visible){opacity:1;transition:none;}

.e-con.ibt-tight .elementor-widget-text-editor p:last-child{margin-bottom:0;}

/* Headings on dark theme sections stay light (Elementor's default heading colour is the dark Primary global) */
.section--navy .elementor-widget-ibtivia-heading .elementor-heading-title,
.section--deep .elementor-widget-ibtivia-heading .elementor-heading-title,
.on-dark .elementor-widget-ibtivia-heading .elementor-heading-title,
.site-footer .elementor-widget-ibtivia-heading .elementor-heading-title{color:#fff;}
.section--navy .elementor-widget-text-editor,
.section--deep .elementor-widget-text-editor{color:var(--on-dark-muted);}
.section--navy .eyebrow.elementor-heading-title,.section--deep .eyebrow.elementor-heading-title{color:var(--sky);}
.section--navy .text-hl,.section--deep .text-hl{color:var(--sky);}

/* The theme clips decorative background graphics at the section edge; Elementor containers default to visible overflow */
.e-con.section,.e-con.hero-home,.e-con.site-footer{overflow:hidden;overflow:clip;}

/* Theme paddings that Elementor containers would otherwise zero out (set through Elementor's variables, so editor controls still override) */
.e-con.hero-home{--padding-top:clamp(36px,5vw,72px);}
.e-con.site-footer{--padding-top:clamp(56px,6vw,80px);--padding-bottom:0px;}
.e-con.intro-note{--padding-top:24px;--padding-bottom:24px;--padding-left:28px;--padding-right:28px;}
.e-con.footer-col{--padding-top:28px;--padding-bottom:28px;--padding-left:26px;--padding-right:26px;}
.e-con.challenges__outro{--margin-top:clamp(44px,5vw,64px);}

/* The hero artwork: the Image widget puts its class on the wrapper, so restate the theme's .hero-home__img rule for it */
.hero-home__frame .elementor-widget-image img{position:absolute;left:50%;top:50%;width:auto;height:104%;max-width:none;transform:translate(-50%,-50%);}
.e-con.hero-home__frame{position:relative;overflow:hidden;}
.e-con.hero-home__art,.e-con.hero-home__copy{align-self:center;}

/* Spacing utilities the theme puts on containers */
.e-con.hero-home__cta{--margin-top:32px;}
.e-con.mt-5{--margin-top:clamp(40px,5vw,64px);}
.e-con.mt-4{--margin-top:40px;}
.e-con.mt-3{--margin-top:26px;}

/* Elementor uses ::before for background overlays; keep the theme's decorative graphic positioned from the bottom-left */
.e-con.section::before{content:"";}
.e-con.section--deep::before{top:auto;width:min(560px,70%);height:320px;}
/* Theme margins on layout containers, through Elementor's variables */
.e-con.split-head{--margin-bottom:clamp(32px,4.5vw,60px);}
.e-con.section-head{--margin-bottom:clamp(34px,4vw,56px);max-width:780px;}
.e-con.section-head--center{--margin-left:auto;--margin-right:auto;text-align:center;}
.e-con.wrap.wrap-narrow{max-width:var(--wrap-narrow);}
/* Grid gaps from the theme (Elementor controls gaps through variables) */
.e-con.hero-home__grid{--gap:clamp(28px,5vw,80px);--row-gap:clamp(28px,5vw,80px);--column-gap:clamp(28px,5vw,80px);}
.e-con.split-head{--gap:clamp(20px,5vw,72px);--row-gap:clamp(20px,5vw,72px);--column-gap:clamp(20px,5vw,72px);}
.e-con.career-band{--gap:clamp(24px,5vw,72px);--row-gap:clamp(24px,5vw,72px);--column-gap:clamp(24px,5vw,72px);}
.e-con.footer-grid{--gap:14px;--row-gap:14px;--column-gap:14px;}
.e-con.challenges__outro{--text-align:center;}
.elementor-widget-ibtivia-heading p.elementor-heading-title{line-height:inherit;}
@media (max-width:640px){
  .e-con.hero-home__cta{--flex-direction:column;flex-direction:column;}
  .e-con.hero-home__cta > .elementor-widget{width:100%;}
}
/* Footer brand card fills its grid cell (button stays at the bottom) */
.e-con.footer-about-wrap,
.e-con.footer-about-wrap > .elementor-widget,
.e-con.footer-about-wrap > .elementor-widget > .elementor-widget-container,
.e-con.footer-about-wrap .footer-about{height:100%;}
