/* ---------- Elementor parity ----------
   Pages built in Elementor (page-elementor.php) reuse the theme's own section
   classes — .section, .shell, .section-head, .kc-hero, .culture-card and the
   rest — so home4.css and home4-pages.css lay them out exactly as the
   hand-built templates did.

   This file only covers what those stylesheets cannot reach: Elementor's own
   container defaults, and the few places where an Elementor wrapper sits
   between a theme class and the element it styles.

   It deliberately does NOT restyle headings or paragraphs. Elementor's
   `.elementor-heading-title` is a single class (0,1,0); the theme's rules are
   tag-scoped — `.kc-hero h1`, `.culture-card h3` (0,1,1) — so the theme already
   wins. Adding rules here would only override the design we are preserving.

   Loaded by inc/elementor.php after home4-pages.css. */

/* ---- Containers ----
   Elementor containers arrive with padding, a gap and a boxed width. The theme
   classes on them supply all three, so the defaults are zeroed. */
.km-elementor-main .e-con,
.km-elementor-main .e-con-inner{
	--padding-top:0;--padding-right:0;--padding-bottom:0;--padding-left:0;
	--row-gap:0px;--column-gap:0px;
	--width:100%;
}

.km-elementor-main .elementor-widget:not(:last-child){margin-block-end:0}

/* .shell is the page gutter. */
.km-elementor-main .e-con.shell{--width:min(1240px,calc(100% - 48px));margin-inline:auto}

/* Theme grids: Elementor containers are flex by default, and its `display` is
   set through a custom property, so each class the theme lays out as a grid has
   to say so here. The columns and gaps still come from the theme. */
.km-elementor-main .e-con.kc-tiles,
.km-elementor-main .e-con.word-grid,
.km-elementor-main .e-con.post-grid,
.km-elementor-main .e-con.culture-grid,
.km-elementor-main .e-con.story-grid,
.km-elementor-main .e-con.news-grid,
.km-elementor-main .e-con.about-grid,
.km-elementor-main .e-con.stats,
.km-elementor-main .e-con.ct-grid,
.km-elementor-main .e-con.ct-cards,
.km-elementor-main .e-con.ct-card,
.km-elementor-main .e-con.ct-topics,
.km-elementor-main .e-con.ct-faq-grid,
.km-elementor-main .e-con.ct-maps-grid,
.km-elementor-main .e-con.cm-ways,
.km-elementor-main .e-con.cm-wall,
.km-elementor-main .e-con.cm-stats,
.km-elementor-main .e-con.voice-grid,
.km-elementor-main .e-con.pillar-grid,
.km-elementor-main .e-con.team-grid,
.km-elementor-main .e-con.ab-hero-grid,
.km-elementor-main .e-con.ab-meaning-grid{display:grid}

/* The photo wall's tiles are images that must fill their grid cell. */
.km-elementor-main .cm-wall>.elementor-widget-image,
.km-elementor-main .cm-wall>.elementor-widget-image figure,
.km-elementor-main .cm-wall>.elementor-widget-image .elementor-image{height:100%}
.km-elementor-main .cm-wall>.elementor-widget-image img{width:100%;height:100%;object-fit:cover}

/* The pillar cards keep the theme's cover image above their copy. */
.km-elementor-main .pillar-card>.elementor-widget-image img{width:100%;object-fit:cover}

/* Cards the theme stacks and left-aligns. */
.km-elementor-main .e-con.way-card,
.km-elementor-main .e-con.word-tile,
.km-elementor-main .e-con.culture-body{align-items:flex-start}

/* Theme rows. */
.km-elementor-main .e-con.section-head{flex-direction:row;align-items:flex-end;justify-content:space-between;--row-gap:30px;--column-gap:30px}
.km-elementor-main .e-con.section-head>*{width:auto}
.km-elementor-main .e-con.hero-actions{flex-direction:row;flex-wrap:wrap;--row-gap:14px;--column-gap:14px}

/* ---- Buttons ----
   The theme's .button styles the <a>; Elementor's CSS-class control puts custom
   classes on the widget wrapper, so the styling is carried through to the
   anchor here. Every value is copied from .button in home4.css. */
.km-elementor-main .elementor-widget-button .elementor-button{
	display:inline-flex;align-items:center;justify-content:center;
	min-height:50px;padding:0 24px;border:0;border-radius:0;background:none;
	font-family:inherit;font-size:.8rem;font-weight:800;line-height:1;
	text-transform:uppercase;letter-spacing:.08em;transition:.2s;
}
.km-elementor-main .elementor-widget-button .elementor-button-content-wrapper{gap:10px}
.km-elementor-main .btn-primary .elementor-button{background:var(--red);color:#fff}
.km-elementor-main .btn-primary .elementor-button:hover{background:#e53b48}
.km-elementor-main .btn-ghost .elementor-button{border:1px solid rgba(255,255,255,.65);color:#fff}
.km-elementor-main .btn-ghost .elementor-button:hover{background:rgba(255,255,255,.12)}
.km-elementor-main .btn-outline .elementor-button{border:1px solid currentColor;color:var(--ink)}
/* .inline-link — the underlined caps link that closes a card or a block. It is
   a Button widget now, so the theme's look is carried to the anchor, and the
   margins that position it go on the widget wrapper. */
.km-elementor-main .btn-inline .elementor-button{min-height:0;padding:0 0 5px;border:0;border-bottom:2px solid var(--red);border-radius:0;background:none;color:var(--ink);font-size:.78rem;font-weight:800;text-transform:uppercase;letter-spacing:.08em}
.km-elementor-main .btn-inline .elementor-button:hover{background:none;color:var(--ink)}
.km-elementor-main .btn-inline{margin-top:auto;align-self:flex-start}
.km-elementor-main .about-copy .btn-inline{margin-top:24px}

/* ---- Cards ----
   .culture-card in the theme is <a><img><span class="culture-shade"><div>.
   The Elementor stand-in is a link container holding an Image widget and a
   .culture-body container. The picture keeps the theme's cover fit and its
   hover zoom; the shade becomes a pseudo-element, because a real element would
   be caught by the theme's `.culture-card > div` rule and pushed into the
   text's position.

   Paint order: image (0), shade (1), text (2). */
.km-elementor-main .culture-card>.elementor-widget-image{position:absolute;inset:0;z-index:0;margin:0}
.km-elementor-main .culture-card>.elementor-widget-image figure,
.km-elementor-main .culture-card>.elementor-widget-image .elementor-image{height:100%;margin:0;line-height:0}
.km-elementor-main .culture-card>.elementor-widget-image img{width:100%;height:100%;object-fit:cover;transition:.5s}
.km-elementor-main .culture-card:hover>.elementor-widget-image img{transform:scale(1.045)}

.km-elementor-main .e-con.culture-card:after{
	content:'';position:absolute;inset:0;z-index:1;
	background:linear-gradient(0deg,rgba(0,0,0,.92),rgba(0,0,0,.05) 70%);
}

.km-elementor-main .culture-card>.culture-body{z-index:2}

/* ---- Cards whose theme rule targets `> div` ----
   .pillar-card > div is the copy block: flex:1 and 24px of padding. An image
   widget is also a direct child div, so it would be padded and stretched too —
   which is what put a white margin round the pillar pictures. */
.km-elementor-main .pillar-card>.elementor-widget-image,
.km-elementor-main .ct-card>.elementor-widget-image{flex:0 0 auto;padding:0}

/* ---- The About collage ----
   The theme stacks two <img>s: a poster, and a square inset pinned to the
   bottom-left. Elementor wraps each in a widget, so `img + img` never matches
   and both pictures fell into a plain column. These rules put them back. */
.km-elementor-main .e-con.ab-collage{flex-direction:row;justify-content:flex-end;position:relative}
.km-elementor-main .ab-collage .elementor-widget-image figure,
.km-elementor-main .ab-collage .elementor-widget-image .elementor-image{margin:0;line-height:0}

.km-elementor-main .ab-collage>.ab-collage__poster img{
	width:100%;max-width:520px;height:auto;aspect-ratio:4/3;
	object-fit:cover;object-position:50% 20%;border-radius:4px;
	box-shadow:0 30px 60px rgba(0,71,160,.2);
}

.km-elementor-main .ab-collage>.elementor-widget-image+.elementor-widget-image{position:absolute;left:0;bottom:0;width:46%;z-index:1}
.km-elementor-main .ab-collage>.elementor-widget-image+.elementor-widget-image img{
	width:100%;aspect-ratio:1;object-fit:cover;
	border:8px solid #fff;box-shadow:0 20px 40px rgba(4,16,35,.2);
}

/* ---- Buttons on light sections ----
   The About and Events heroes sit on a pale background, where the theme
   re-colours .button.ghost. Without this the ghost button stayed white on
   white and read as missing. */
.km-elementor-main .ab-hero .btn-ghost .elementor-button,
.km-elementor-main .ev-hero .btn-ghost .elementor-button{border-color:#9fb6d6;color:var(--blue)}
.km-elementor-main .ab-hero .btn-ghost .elementor-button:hover,
.km-elementor-main .ev-hero .btn-ghost .elementor-button:hover{background:var(--blue);border-color:var(--blue);color:#fff}

/* ---- The join band ----
   `.community-inner > div > p` expects the paragraph to be a grandchild of the
   band; behind an Elementor widget wrapper it is one level deeper. */
.km-elementor-main .community-inner .community-copy p{color:#e0e5ec;max-width:520px}

/* ---- Images elsewhere ---- */
.km-elementor-main .elementor-widget-image figure,
.km-elementor-main .elementor-widget-image .elementor-image{margin:0}

@media(max-width:980px){
	.km-elementor-main .e-con.ab-collage{justify-content:flex-start;padding-left:120px}
	.km-elementor-main .ab-collage>.ab-collage__poster img{max-width:560px}
}

@media(max-width:600px){
	.km-elementor-main .e-con.ab-collage{padding-left:60px}
	.km-elementor-main .ab-collage>.ab-collage__poster img{width:100%}
}

@media(max-width:760px){
	.km-elementor-main .e-con.shell{--width:calc(100% - 32px)}
	.km-elementor-main .e-con.section-head{align-items:flex-start}
}

/* ---------- About page ----------
   The home page's sections are theme widgets now (inc/widgets/) and need
   nothing here. */

/* The About band's figures sit across the full width of its grid. */
.km-elementor-main .about-section .e-con.stats{grid-column:1/3}
.km-elementor-main .e-con.about-heading,
.km-elementor-main .e-con.about-copy{align-items:flex-start}

@media(max-width:760px){
	.km-elementor-main .about-section .e-con.stats{grid-column:auto}
}

/* ---------- Margins Elementor zeroes ----------
   A container arrives with `--margin-top:0px` and `margin-block-start:var(
   --margin-top)`. That is the same property as the theme's `margin-top`, at the
   same specificity, declared later — so every margin the theme puts on a
   section is lost. Each one the conversion relies on is restored here, through
   Elementor's own custom properties, with the theme's value. */
.km-elementor-main .e-con.section-head{--margin-bottom:38px}
.km-elementor-main .e-con.stats{--margin-top:20px}
.km-elementor-main .e-con.partners{--margin-top:64px}
.km-elementor-main .e-con.cm-stats{--margin-top:-70px}
