/* ==========================================================================
   ICM theme: Elementor alignment layer
   Brings pages built with Elementor in line with the theme without editing
   each page. Loaded only when Elementor is active (see functions.php).

   !important is used on purpose: older pages carry per-widget styles and
   inline colours pasted into text. To let a page keep a special style,
   remove the matching rule here, or scope it with :not(.elementor-ID).
   ========================================================================== */

/* 1. Point Elementor's global colours and fonts at the theme tokens.
      Widgets that use "default" or "global" styles pick these up. ------------ */
.elementor {
	--e-global-color-primary: var(--blue);
	--e-global-color-secondary: var(--ink);
	--e-global-color-text: var(--text);
	--e-global-color-accent: var(--red);
	--e-global-typography-primary-font-family: "Plus Jakarta Sans";
	--e-global-typography-primary-font-weight: 700;
	--e-global-typography-secondary-font-family: "Plus Jakarta Sans";
	--e-global-typography-secondary-font-weight: 600;
	--e-global-typography-text-font-family: "Inter";
	--e-global-typography-text-font-weight: 400;
	--e-global-typography-accent-font-family: "Inter";
	--e-global-typography-accent-font-weight: 600;
}

/* Boxed sections line up with the theme's content width. */
.elementor-section.elementor-section-boxed > .elementor-container { max-width: 1216px; }
.e-con { --container-max-width: 1216px; }

/* 2. Text --------------------------------------------------------------------- */
.elementor .elementor-widget-text-editor {
	font-family: var(--f-body) !important;
	color: var(--text) !important;
	font-size: 16.5px;
	line-height: 1.7;
}
/* Colours and fonts pasted into the text follow the theme instead. */
.elementor .elementor-widget-text-editor [style*="color"] { color: inherit !important; }
.elementor .elementor-widget-text-editor [style*="font-family"] { font-family: inherit !important; }
.elementor .elementor-widget-text-editor font { color: inherit !important; font-family: inherit !important; }
.elementor .elementor-widget-text-editor p,
.elementor .elementor-widget-text-editor > .elementor-widget-container > div > div { margin: 0 0 1em; }
.elementor .elementor-widget-text-editor p:last-child { margin-bottom: 0; }
.elementor .elementor-widget-text-editor a,
.elementor .elementor-widget-text-editor a [style*="color"] { color: var(--blue) !important; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(62, 64, 149, .4); }
.elementor .elementor-widget-text-editor a:hover { text-decoration-color: currentColor; }
.elementor .elementor-widget-text-editor ul li::marker { color: var(--red); }

/* Headings, whether typed in a text box or a Heading widget. */
.elementor .elementor-widget-text-editor :is(h1, h2, h3, h4, h5, h6),
.elementor .elementor-widget-text-editor :is(h1, h2, h3, h4, h5, h6) [style*="color"],
.elementor .elementor-heading-title {
	font-family: var(--f-display) !important;
	color: var(--ink) !important;
	letter-spacing: -0.015em;
	line-height: 1.25;
	text-wrap: balance;
}
.elementor .elementor-widget-text-editor h2 { font-size: 30px; margin: 0 0 .6em; }
.elementor .elementor-widget-text-editor h3 { font-size: 24px; margin: 0 0 .6em; }
.elementor .elementor-widget-text-editor h4 { font-size: 20px; margin: 0 0 .5em; }
.elementor .elementor-widget-text-editor :is(h5, h6) { font-size: 22px; font-weight: 800; margin: 8px 0 .6em; }
.elementor .elementor-heading-title { font-weight: 800; }

/* 3. Buttons ------------------------------------------------------------------- */
.elementor .elementor-button {
	background-color: var(--blue) !important;
	color: #fff !important;
	font-family: var(--f-body) !important;
	font-size: 15px !important;
	font-weight: 600 !important;
	line-height: 1.1;
	letter-spacing: 0;
	text-transform: none;
	padding: 14px 22px !important;
	border: 0 !important;
	border-radius: 8px !important;
	transition: background-color .15s, transform .15s;
}
.elementor .elementor-button:hover,
.elementor .elementor-button:focus-visible { background-color: var(--blue-deep) !important; color: #fff !important; transform: translateY(-1px); }
.elementor .elementor-button .elementor-button-text,
.elementor .elementor-button [style*="color"] { color: inherit !important; }

/* 4. Columns styled as cards (columns given a background in Elementor),
      e.g. the course cards on "Our Training Programs". -------------------- */
.elementor .elementor-column[data-settings*="background_background"] > .elementor-element-populated {
	background-color: var(--paper) !important;
	border: 1px solid var(--line) !important;
	border-radius: var(--radius) !important;
	box-shadow: none !important;
	padding: 32px 24px !important;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	gap: 20px;
	transition: border-color .15s, box-shadow .15s, transform .15s !important;
}
.elementor .elementor-column[data-settings*="background_background"]:hover > .elementor-element-populated {
	border-color: var(--blue) !important;
	box-shadow: 0 18px 40px -24px rgba(62, 64, 149, .45) !important;
	transform: translateY(-2px);
}
.elementor .elementor-column[data-settings*="background_background"] .elementor-widget-text-editor > .elementor-widget-container { margin: 0 !important; }
.elementor .elementor-column[data-settings*="background_background"] .elementor-widget-text-editor {
	font-family: var(--f-display) !important;
	font-weight: 700;
	font-size: 18px;
	line-height: 1.35;
	color: var(--ink) !important;
	margin-bottom: 0 !important;
}
.elementor .elementor-column[data-settings*="background_background"] .elementor-widget:not(:last-child) { margin-bottom: 0; }
/* Space between rows of cards */
.elementor .elementor-inner-section:has(.elementor-column[data-settings*="background_background"]) { margin-bottom: 24px; }
@media (max-width: 767px) {
	.elementor .elementor-column[data-settings*="background_background"] > .elementor-element-populated { margin: 0 0 16px !important; }
}

/* Shadows and coloured borders added to plain columns and widgets. */
.elementor .elementor-element-populated { box-shadow: none !important; }

/* 5. Images -------------------------------------------------------------------- */
/* Soft corners by default. Images given their own radius in Elementor
   (e.g. the round facilitator portraits) keep it, as that rule is more specific. */
.elementor .elementor-widget-image img { border-radius: 10px; box-shadow: none; }
.elementor .elementor-widget-image a img { transition: opacity .15s; }
.elementor .elementor-widget-image a:hover img { opacity: .9; }

/* 6. Image gallery (e.g. Photo Gallery): even grid, cropped thumbnails. ---- */
.elementor .elementor-image-gallery .gallery {
	display: grid !important;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 16px;
	margin: 0 !important;
}
.elementor .elementor-image-gallery .gallery > br { display: none; }
.elementor .elementor-image-gallery .gallery-item {
	width: auto !important;
	max-width: none !important;
	margin: 0 !important;
	padding: 0 !important;
	float: none !important;
}
.elementor .elementor-image-gallery .gallery-icon { overflow: hidden; border-radius: 10px; background: var(--blue-tint); }
.elementor .elementor-image-gallery .gallery-item img {
	display: block;
	width: 100% !important;
	height: auto;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	border: 0 !important;
	border-radius: 0 !important;
	transition: transform .4s;
}
.elementor .elementor-image-gallery .gallery-item a:hover img { transform: scale(1.04); }
.elementor .elementor-image-gallery .gallery-caption { font-size: 14px; color: var(--muted); padding: 8px 2px 0; text-align: left; }
@media (max-width: 520px) {
	.elementor .elementor-image-gallery .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
}

/* 7. Dividers and spacers ----------------------------------------------------- */
.elementor .elementor-divider-separator { border-color: var(--line) !important; }

@media (prefers-reduced-motion: reduce) {
	.elementor .elementor-button:hover,
	.elementor .elementor-column[data-settings*="background_background"]:hover > .elementor-element-populated { transform: none; }
	.elementor .elementor-image-gallery .gallery-item a:hover img { transform: none; }
}
