/**
 * CMM Hero: base styles.
 *
 * Rules on elements that Elementor's kit also styles by tag (button, a,
 * h1-h6) are written as ".cmm-hero .x" so they outrank the kit's
 * ".elementor-kit-N button" (0,1,1). The widget's own typography selectors
 * are "{{WRAPPER}} .cmm-hero .x" (0,3,0) so they still win over these.
 * Values the widget controls are read from custom properties on .cmm-hero.
 * Mobile rules are generated in PHP (Hero::mobile_css) so the media query
 * can follow the site's breakpoint.
 */

/* Swiper core (scoped) ------------------------------------------------ */
/*
 * The rules the hero needs from Swiper 11.2.10's stylesheet, scoped under
 * .cmm-hero so nothing reaches Elementor's own Swiper carousels or any
 * other .swiper on the page. Swiper's bundle CSS is deliberately not
 * loaded. Bullet styling lives in the Dots section below.
 */

.cmm-hero .swiper{margin-left:auto;margin-right:auto;position:relative;overflow:hidden;list-style:none;padding:0;z-index:1;display:block}
.cmm-hero .swiper-wrapper{position:relative;width:100%;height:100%;z-index:1;display:flex;transition-property:transform;transition-timing-function:var(--swiper-wrapper-transition-timing-function,initial);box-sizing:content-box}
.cmm-hero .swiper-android .swiper-slide,.cmm-hero .swiper-ios .swiper-slide,.cmm-hero .swiper-wrapper{transform:translate3d(0px,0,0)}
.cmm-hero .swiper-horizontal{touch-action:pan-y}
.cmm-hero .swiper-slide{flex-shrink:0;width:100%;height:100%;position:relative;transition-property:transform;display:block}
.cmm-hero .swiper-slide-invisible-blank{visibility:hidden}
.cmm-hero .swiper-autoheight,.cmm-hero .swiper-autoheight .swiper-slide{height:auto}
.cmm-hero .swiper-autoheight .swiper-wrapper{align-items:flex-start;transition-property:transform,height}
.cmm-hero .swiper-backface-hidden .swiper-slide{transform:translateZ(0);-webkit-backface-visibility:hidden;backface-visibility:hidden}
.cmm-hero .swiper-button-lock{display:none}
.cmm-hero .swiper-pagination-lock{display:none}
.cmm-hero .swiper .swiper-notification{position:absolute;left:0;top:0;pointer-events:none;opacity:0;z-index:-1000}
.cmm-hero .swiper-fade .swiper-slide{pointer-events:none;transition-property:opacity}
.cmm-hero .swiper-fade .swiper-slide-active{pointer-events:auto}

/* Hero ---------------------------------------------------------------- */

.cmm-hero {
	position: relative;
	width: 100%;
	overflow: hidden;
	border-radius: var(--cmm-hero-radius, 0);
	--cmm-hero-text: var(--cmm-hero-text-light, #fff);
}

.cmm-hero__swiper {
	width: 100%;
	overflow: hidden;
	border-radius: var(--cmm-hero-radius, 0);
	isolation: isolate; /* Safari: clip transformed slides to the radius. */
}

/* Before the slider initializes, only the first slide is visible. */
.cmm-hero:not(.cmm-hero--ready) .cmm-hero__slide:not(:first-child) {
	display: none;
}

.cmm-hero__slide {
	position: relative;
	width: 100%;
	flex-shrink: 0;
	overflow: hidden;
}

.cmm-hero__slide--light {
	--cmm-hero-text: var(--cmm-hero-text-light, #fff);
}

.cmm-hero__slide--dark {
	--cmm-hero-text: var(--cmm-hero-text-dark, #1a1a1a);
}

/* Media --------------------------------------------------------------- */

.cmm-hero__media {
	position: relative;
	display: block;
	width: 100%;
	line-height: 0;
}

.cmm-hero__media picture {
	display: block;
}

/* Optional slide link: a transparent layer over the image. It sits below
   the content box (z-index 2) so the box's buttons remain their own links. */
.cmm-hero .cmm-hero__link {
	position: absolute;
	inset: 0;
	z-index: 1;
	display: block;
	cursor: pointer;
}

.cmm-hero .cmm-hero__link:focus-visible {
	outline: 3px solid #fff;
	outline-offset: -3px;
}

.cmm-hero__img {
	display: block;
	width: 100%;
	height: auto;
	max-width: none;
	margin: 0;
	border: 0;
	object-fit: cover;
}

.cmm-hero--fixed .cmm-hero__img {
	height: var(--cmm-hero-height, 70vh);
}

/* Overlay and content ------------------------------------------------- */

.cmm-hero__overlay {
	position: absolute;
	inset: 0;
	background: var(--cmm-hero-overlay, rgba(0, 0, 0, 0.3));
	pointer-events: none;
}

.cmm-hero__content {
	position: absolute;
	inset: 0;
	z-index: 2;
	display: flex;
	align-items: var(--cmm-hero-valign, center);
	justify-content: flex-start;
	padding: var(--cmm-hero-content-padding, 5%);
	pointer-events: none;
}

.cmm-hero__slide--box-center .cmm-hero__content {
	justify-content: center;
}

.cmm-hero__slide--box-right .cmm-hero__content {
	justify-content: flex-end;
}

.cmm-hero__box {
	width: 100%;
	max-width: var(--cmm-hero-box-width, 560px);
	padding: var(--cmm-hero-box-padding, 0);
	background: var(--cmm-hero-box-bg, transparent);
	border-radius: var(--cmm-hero-box-radius, 0);
	color: var(--cmm-hero-text);
	text-align: left;
	text-shadow: var(--cmm-hero-text-shadow, none);
	pointer-events: auto;
}

/* A content box rendered from an Elementor template: the template owns
   the look, so the box adds no padding, background, or alignment. */
.cmm-hero .cmm-hero__box--template {
	padding: 0;
	background: transparent;
	border-radius: 0;
	text-align: initial;
	line-height: normal;
}

.cmm-hero__slide--box-center .cmm-hero__box {
	text-align: center;
}

.cmm-hero__slide--box-right .cmm-hero__box {
	text-align: right;
}

.cmm-hero .cmm-hero__headline {
	margin: 0 0 var(--cmm-hero-headline-gap, 0.5em);
	padding: 0;
	font-size: clamp(1.75rem, 4vw, 3.25rem);
	line-height: 1.1;
	color: inherit;
}

.cmm-hero .cmm-hero__subheadline {
	margin: 0 0 var(--cmm-hero-subheadline-gap, 1.25em);
	padding: 0;
	font-size: clamp(1rem, 1.8vw, 1.375rem);
	line-height: 1.4;
	color: inherit;
}

.cmm-hero .cmm-hero__body {
	margin: 0 0 var(--cmm-hero-body-gap, 1.25em);
	padding: 0;
	font-size: clamp(0.9375rem, 1.3vw, 1.0625rem);
	line-height: 1.6;
	color: inherit;
}

/* Paragraphs and lists take the body's typography rather than the
   theme's p / li rules, so the widget's Body Typography reaches them. */
.cmm-hero .cmm-hero__body p,
.cmm-hero .cmm-hero__body ul,
.cmm-hero .cmm-hero__body ol,
.cmm-hero .cmm-hero__body li,
.cmm-hero .cmm-hero__body blockquote {
	font-family: inherit;
	font-size: inherit;
	font-weight: inherit;
	line-height: inherit;
	letter-spacing: inherit;
	text-transform: inherit;
	color: inherit;
}

.cmm-hero .cmm-hero__body p,
.cmm-hero .cmm-hero__body ul,
.cmm-hero .cmm-hero__body ol,
.cmm-hero .cmm-hero__body blockquote {
	margin: 0 0 var(--cmm-hero-body-paragraph-gap, 1em);
	padding: 0;
}

.cmm-hero .cmm-hero__body ul,
.cmm-hero .cmm-hero__body ol {
	padding-left: 1.25em;
	list-style-position: outside;
}

.cmm-hero__slide--box-center .cmm-hero__body ul,
.cmm-hero__slide--box-center .cmm-hero__body ol,
.cmm-hero__slide--box-right .cmm-hero__body ul,
.cmm-hero__slide--box-right .cmm-hero__body ol {
	padding-left: 0;
	list-style-position: inside;
}

.cmm-hero .cmm-hero__body > :last-child {
	margin-bottom: 0;
}

.cmm-hero .cmm-hero__body a {
	color: var(--cmm-hero-body-link, inherit);
	text-decoration: underline;
}

.cmm-hero .cmm-hero__headline:last-child,
.cmm-hero .cmm-hero__subheadline:last-child,
.cmm-hero .cmm-hero__body:last-child {
	margin-bottom: 0;
}

/* Buttons ------------------------------------------------------------- */

.cmm-hero__buttons {
	display: flex;
	flex-wrap: wrap;
	gap: var(--cmm-hero-button-gap, 0.75em);
	justify-content: flex-start;
}

.cmm-hero__slide--box-center .cmm-hero__buttons {
	justify-content: center;
}

.cmm-hero__slide--box-right .cmm-hero__buttons {
	justify-content: flex-end;
}

.cmm-hero .cmm-hero__button {
	display: inline-block;
	padding: var(--cmm-hero-button-padding, 0.75em 1.5em);
	border: var(--cmm-hero-button-border, 2px) solid transparent;
	border-radius: var(--cmm-hero-button-radius, 4px);
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	text-shadow: none;
	box-shadow: none;
	transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

.cmm-hero .cmm-hero__button--has-icon {
	display: inline-flex;
	align-items: center;
	gap: var(--cmm-hero-button-icon-gap, 0.5em);
}

.cmm-hero .cmm-hero__button-icon {
	flex: none;
	width: var(--cmm-hero-button-icon-size, 1em);
	height: var(--cmm-hero-button-icon-size, 1em);
}

.cmm-hero .cmm-hero__button--primary {
	background: var(--cmm-hero-btn-primary-bg, #fff);
	border-color: var(--cmm-hero-btn-primary-border, var(--cmm-hero-btn-primary-bg, #fff));
	color: var(--cmm-hero-btn-primary-text, #1a1a1a);
}

.cmm-hero .cmm-hero__button--primary:hover,
.cmm-hero .cmm-hero__button--primary:focus {
	background: var(--cmm-hero-btn-primary-bg-hover, #e6e6e6);
	border-color: var(--cmm-hero-btn-primary-border-hover, var(--cmm-hero-btn-primary-bg-hover, #e6e6e6));
	color: var(--cmm-hero-btn-primary-text-hover, #1a1a1a);
	text-decoration: none;
}

.cmm-hero .cmm-hero__button--secondary {
	background: var(--cmm-hero-btn-secondary-bg, transparent);
	border-color: var(--cmm-hero-btn-secondary-border, currentColor);
	color: var(--cmm-hero-btn-secondary-text, var(--cmm-hero-text));
}

.cmm-hero .cmm-hero__button--secondary:hover,
.cmm-hero .cmm-hero__button--secondary:focus {
	background: var(--cmm-hero-btn-secondary-bg-hover, rgba(255, 255, 255, 0.15));
	border-color: var(--cmm-hero-btn-secondary-border-hover, currentColor);
	color: var(--cmm-hero-btn-secondary-text-hover, var(--cmm-hero-text));
	text-decoration: none;
}

/* Arrows -------------------------------------------------------------- */

/* ".cmm-hero .cmm-hero__arrow" outranks Elementor's ".elementor-kit-N button";
   every property the kit's button styles can set is pinned here. */
.cmm-hero .cmm-hero__arrow {
	position: absolute;
	top: 50%;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	width: var(--cmm-hero-arrow-size, 48px);
	height: var(--cmm-hero-arrow-size, 48px);
	min-width: 0;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--cmm-hero-arrow-bg, rgba(0, 0, 0, 0.35));
	color: var(--cmm-hero-arrow-color, #fff);
	box-shadow: none;
	font-size: 0;
	line-height: 1;
	letter-spacing: 0;
	text-decoration: none;
	text-transform: none;
	cursor: pointer;
	transform: translateY(-50%);
	transition: background-color 0.2s, opacity 0.2s;
}

.cmm-hero .cmm-hero__arrow:hover,
.cmm-hero .cmm-hero__arrow:focus {
	background: var(--cmm-hero-arrow-bg-hover, rgba(0, 0, 0, 0.6));
	color: var(--cmm-hero-arrow-color, #fff);
	border: 0;
	box-shadow: none;
}

.cmm-hero .cmm-hero__arrow:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

.cmm-hero .cmm-hero__arrow svg {
	width: 50%;
	height: 50%;
}

.cmm-hero .cmm-hero__arrow--prev {
	left: var(--cmm-hero-arrow-offset, 16px);
}

.cmm-hero .cmm-hero__arrow--next {
	right: var(--cmm-hero-arrow-offset, 16px);
}

.cmm-hero .cmm-hero__arrow.swiper-button-disabled {
	opacity: 0.35;
	cursor: default;
}

/* Dots ---------------------------------------------------------------- */

.cmm-hero__dots {
	position: absolute;
	right: 0;
	bottom: var(--cmm-hero-dot-offset, 16px);
	left: 0;
	z-index: 2;
	display: flex;
	justify-content: center;
	gap: 8px;
	pointer-events: none;
}

.cmm-hero__dots .swiper-pagination-bullet {
	display: block;
	width: var(--cmm-hero-dot-size, 10px);
	height: var(--cmm-hero-dot-size, 10px);
	margin: 0;
	border-radius: 50%;
	background: var(--cmm-hero-dot-color, rgba(255, 255, 255, 0.5));
	opacity: 1;
	cursor: pointer;
	pointer-events: auto;
	transition: background-color 0.2s;
}

.cmm-hero__dots .swiper-pagination-bullet-active {
	background: var(--cmm-hero-dot-active, #fff);
}

/* Editor notice ------------------------------------------------------- */

.cmm-hero__notice {
	padding: 1em 1.25em;
	background: #fff8e5;
	border: 1px dashed #dba617;
	color: #50575e;
	text-align: center;
}
