/**
 * Modules
 *
 * body.page-template-template-modules
 * template-modules.php
 */

/**
 * Base
 */

:root {
	--spacing-x: clamp(30px, calc(80 / 1280 * 100dvw), 80px);
	--spacing-y: clamp(60px, calc(72 / 1280 * 100dvw), 72px);
}

body {
	font-size: clamp(16px, calc(20 / 1280 * 100dvw), 20px) !important;

	&.mce-content-body {
		margin: 2em 1em;
	}
}

h1, .h1,
h2, .h2,
h3, .h3,
h4, .h4,
h5, .h5,
h6, .h6 {

	.has-white-color & {
		color: inherit !important;
	}
}

h1, .h1 {
	font-size: clamp(24px, calc(48 / 1280 * 100dvw), 48px);
	letter-spacing: -0.4px !important;
}

h2, .h2 {
	font-size: clamp(24px, calc(40 / 1280 * 100dvw), 40px);
}

p {
	margin-block-end: 1.3em;
}

:first-child {
	margin-top: 0;
}

:last-child {
	margin-bottom: 0;
}

/**
 * Elementor
 */

.elementor-location-footer {

	& :first-child {
		margin-top: 0 !important;
	}
}

/**
 * Gravity Forms
 */

form legend,
form label,
.gform_wrapper.gravity-theme input:not(.button),
.gform_wrapper.gravity-theme select,
.gform_wrapper.gravity-theme textarea {
	font-size: 16px !important;
}

input[type=date],
input[type=email],
input[type=number],
input[type=password],
input[type=search],
input[type=tel],
input[type=text],
input[type=url],
select,
textarea {
	background-color: #EFF3F5;
	border-color: transparent;
	border-radius: 0;
}

textarea {
	display: block;
}

.gform_wrapper {
	background-color: white;
	border-top: 6px solid var(--color-green-2);
	color: var(--color-text-2);
	padding: 32px;

	& h2,
	& h3 {
		color: var(--color-blue-2);
		font-size: clamp(24px, calc(28 / 1280 * 100dvw), 28px);
	}
}

.gform_footer {
	margin-top: 32px !important;
	padding-bottom: 0 !important;
	padding-top: 0 !important;
	position: relative;
}

.gform_button {
	padding-left: calc(16px + 1.3em + 12px); /** Match padding-right */
	padding-right: calc(16px + 1.3em + 12px); /** For spinner */
	border-color: var(--color-green-2);
	font-size: 20px !important;
	font-weight: 700 !important;
	line-height: 1.3 !important;
	margin-bottom: 0 !important;
	white-space: wrap;
}

.gform_ajax_spinner {
	filter: contrast(4) invert(0);
	position: absolute;
	right: 12px;
	top: 50%;
	transform: translateY(-50%);
	width: 1.3em !important;
	z-index: 1;
}

/**
 * Background
 */

.has-background {
	padding-bottom: var(--spacing-y);
	padding-top: var(--spacing-y);
}

.has-dark-background-color {
	background-color: var(--color-grey-1);
	background-color: rgb(98 104 96 / 1); /** #626860 */
}

.has-light-background-color {
	background-color: rgb(247 249 250 / 1); /** #f7f9fa */

	& + & {
		margin-top: calc(-1 * var(--spacing-y));
	}
}

.has-white-background-color {

	& + & {
		margin-top: calc(-1 * var(--spacing-y));
	}
}

.has-text-color {}

.has-white-color {
	color: white;
}

/**
 * Editor Formats
 */

:has(> .button) {
	margin-top: 1.3em;
}

.button {
	border-radius: 6px;
	padding-bottom: 13px;
	padding-top: 13px;
	color: white !important;
	text-decoration: none !important;

	&:hover {
		color: white !important;
	}

	.has-white-color .module__text & {
		border: 1px solid currentColor;
		background-color: transparent !important;

		&:hover {
			background-color: rgb(0 0 0 / 0.08) !important;
		}
	}

	.mce-content-body & {
		display: inline-block;
		background-color: var(--color-green-2);
		padding: 15px 30px;
	}

	.mce-content-body &[data-mce-selected] {
		background-color: #bfe6ff !important;
		border-radius: 6px;
		box-shadow: none;
		color: black !important;
		margin-left: 0;
		padding: 15px 30px;
	}
}

.eyebrow {
	color: #999E99;
	font-size: clamp(14px, calc(16 / 1280 * 100dvw), 16px);
	font-weight: 700;
	letter-spacing: 0.8px;
	text-transform: uppercase;

	.has-white-color & {
		color: inherit;
		opacity: 0.72;
	}

	& svg {

		&:where(:not(:last-child)) {
			margin-bottom: 0.6em;
		}
	}
}

.small {
	color: #999E99;
	font-size: 16px;

	.has-white-color & {
		color: inherit;
	}
}

/**
 * Slick
 */

.slick-list {}

.slick-track {
	display: flex !important;
}

.slick-slide {
	float: none !important;
}

.slick-arrow {
	background-color: white !important;
	aspect-ratio: 1 / 1;
	border-radius: 50%;
	height: auto;
	width: clamp(48px, calc(56 / 1280 * 100dvw), 56px);
	z-index: 1;

	.has-light-background-color & {
		background-color: white !important;
	}

	.has-white-background-color & {
		background-color: #f7f9fa !important;
	}

	.module-gallery-carousel &,
	.module-testimonials-carousel & {
		box-shadow: 0 4px 8px 0 rgb(0 0 0 / 0.24);
	}

	&:focus {
		outline: none;
		top: 50%;
	}

	&:focus-visible {
		outline: 2px auto Highlight;
		outline: 2px auto -webkit-focus-ring-color;
		outline-offset: 2px;
	}
}

.slick-prev {
	left: clamp(15px, calc(40 / 1280 * 100dvw), 40px);
}

.slick-next {
	right: clamp(15px, calc(40 / 1280 * 100dvw), 40px);
}

.slick-prev-icon,
.slick-next-icon {
	background: no-repeat 50% 50%;
	background-size: 100%;
	height: 100%;
	margin-left: 0 !important;
	opacity: 1 !important;
	transition: opacity 0.2s;
	width: 100%;

	&::before {
		display: none;
	}

	.slick-arrow:hover & {
		opacity: 0.8 !important;
	}

	.slick-disabled &,
	.slick-disabled:hover & {
		opacity: 0.32 !important;
	}
}

.slick-prev-icon {
	background-image: url('assets/images/slick-prev.svg');
}

.slick-next-icon {
	background-image: url('assets/images/slick-next.svg');
}

/**
 * Carousel Card Content
 */

.carousel-card-content {
	background: repeat-x 0 0;
	/* background-image: radial-gradient(circle closest-side, #4b9ed9 100%, transparent); */
	/* background-size: 100% 3px; */
	/* linear-gradient(90deg,#4b9ed9 50%, #0000 0) calc(var(--s)/2) 0/calc(2*var(--s)) 100%; */
	/* background-image: url("data:image/svg+xml,%3csvg width='100%25' height='3px' xmlns='http://www.w3.org/2000/svg'%3e%3crect width='100%25' height='100%25' fill='none' stroke='%230000001F' stroke-width='6' stroke-dasharray='3%2c 6' stroke-dashoffset='0' stroke-linecap='butt'/%3e%3c/svg%3e"); */
	border-top: 3px dotted rgb(0 0 0 / 0.12);
	padding-top: 24px;
	padding-right: 12px;
}

.carousel-card-content__image {
	width: 40px;
}

.carousel-card-content__heading {
	color: inherit !important;
	font-size: 20px;
	margin-bottom: 0.3em;
}

/**
 * Carousel Card Testimonial
 */

.carousel-card-testimonial {
	text-align: center;

	@media (min-width: 900px) {
		padding-bottom: 20px;
		padding-top: 20px;
	}
}

.carousel-card-testimonial__heading {}

.carousel-card-testimonial__quote {
	font-size: clamp(18px, calc(28 / 1280 * 100dvw), 28px);
	font-style: italic;
	max-width: 800px;
	margin-left: auto;
	margin-right: auto;
}

.carousel-card-testimonial__cite {
	font-size: 16px;
	font-style: normal;
	margin-top: 1.3em;

	& cite {
		font-style: inherit;
	}
}

/**
 * Modules
 */

.modules-header {
	box-shadow: 0 4px 24px 0 rgb(0 0 0 / 0.12);
	padding-bottom: 10px;
	padding-top: 10px;
	position: relative;
	z-index: 2;

	& img[src$="logo-base.svg"] {
		margin-bottom: -7px;
	}

	& .elementor-section.elementor-top-section {
		padding: 0 !important;
	}

	& .elementor-section .elementor-container {
		gap: 20px 10px;
		max-width: 1240px;
		width: calc(100% - 2 * var(--spacing-x)) !important;

		@media (max-width: 599px) {
			align-items: center;
			flex-direction: column;
		}
	}

	& .elementor-column {
		width: auto !important;
	}

	& .elementor-column-gap-default>.elementor-column>.elementor-element-populated {
		margin-left: -10px;
	}
}

.modules-header__contact {
	flex-grow: 1;
	line-height: 1.5;
	text-align: right;
	white-space: nowrap;

	@media (max-width: 599px) {
		text-align: center;
	}

	&.elementor-column {
		align-items: center;
		justify-content: flex-end;
	}

	& p {
		margin-bottom: 0;
	}
}

/**
 * Module
 */

.module {

	& > * {
		margin-left: auto;
		margin-right: auto;
		max-width: 1240px;
		width: calc(100% - 2 * var(--spacing-x));
	}
}

.module__columns {
	--columns: 2;
	--columns-gap-x: var(--spacing-x);
	--columns-gap-y: 40px;
	--columns-gap: var(--columns-gap-y) var(--columns-gap-x);

	display: flex;
	flex-direction: column;
	gap: var(--columns-gap);
	width: 100%;

	@media (min-width: 900px) {
		flex-direction: row;
	}

	& > * {
		width: 100%;

		@media (min-width: 900px) {
			width: calc((100% - (max(1, (var(--columns) - 1)) * var(--columns-gap-x))) / var(--columns));
		}
	}
}

.module__text {

	.module__columns & {

		@media (min-width: 900px) {
			padding-bottom: 40px;
			padding-top: 40px;
		}

		& > * {

			@media (min-width: 900px) {
				max-width: 512px;
			}
		}
	}
}

/**
 * Module Content
 */

.module-content {}

.module-content-carousel {}

.module-content-carousel__text {

	&:not(:last-child) {

		& .small {

			&:last-child {
				margin-bottom: calc(-1 * (0.5 * (1.3em + clamp(40px, calc(56 / 1280 * 100dvw), 56px))));
			}
		}
	}
}

.module-content-carousel__cards {
	display: flex;
	gap: 24px;
	overflow-x: auto;

	&:where(:not(:first-child)) {
		margin-top: 40px;
	}

	&.slick-slider {
		margin-top: calc(-1 * (0.5 * clamp(40px, calc(56 / 1280 * 100dvw), 56px)));
		overflow: visible;
		padding-top: calc(48px + clamp(40px, calc(56 / 1280 * 100dvw), 56px));
	}

	& .slick-list,
	& .slick-track {

		@media (min-width: 1280px) {
			min-width: calc(100% + ((100dvw - min(100%, 1240px)) / 2));
		}
	}

	& .slick-list {
		margin-left: -12px;
		margin-right: -12px;

		@media (min-width: 1280px) {
			margin-right: calc(-1 * ((100dvw - min(100%, 1240px)) / 2));
		}
	}

	& .slick-track {}

	& .slick-slide {
		margin-left: 12px;
		margin-right: 12px;
	}

	& .slick-prev,
	& .slick-next {
		position: absolute;
		top: 0;
		right: 0;
		left: auto;
		transform: translateY(0);
	}

	& .slick-prev {
		transform: translateY(0) translateX(-100%) translateX(-16px);
	}

	& .slick-slide {

		/* @media (min-width: 1600px) { */
		@media (min-width: 1578px) {
			min-width: 320px;
			width: 320px;
		}
	}
}

.module-content-carousel__card {
	flex-shrink: 0;
	margin-bottom: -2px; /** For focus ring */
	padding-bottom: 2px; /** For focus ring */
	padding-right: 12px;
	width: 100%;

	@media (min-width: 480px) {
		width: calc((100% - 1 * 8px) / 2);
	}

	@media (min-width: 960px) {
		width: calc((100% - 2 * 8px) / 3);
	}

	@media (min-width: 1280px) {
		width: calc((100% - 3 * 8px) / 4);
	}

	/* @media (min-width: 1600px) { */
	@media (min-width: 1578px) {
		min-width: 320px;
		width: 320px;
	}
}

/**
 * Module Form
 */

.module-form {}

.module-form__inner {
	display: flex;
	gap: 80px;
}

.module-form__columns {

	& .module-form__text {
		padding-bottom: 0;
		padding-top: 0;
	}
}

.module-form__text {}

.module-form__form {
	align-self: flex-start;
	box-shadow: 0 4px 24px 0 rgb(0 0 0 / 0.12);
}

/**
 * Module Gallery Carousel
 */

.module-gallery-carousel {

	&:where(.has-background:has(.module__text > p:first-child)) {
		padding-top: 24px;
	}
}

.module-gallery-carousel__inner {

	& .gallery {
		display: flex;
		gap: 8px;
		margin-left: calc(-1 * ((100dvw - min(100%, 1240px)) / 2));
		margin-right: calc(-1 * ((100dvw - min(100%, 1240px)) / 2));
		overflow-x: auto;

		&:where(:not(:first-child)) {
			margin-top: 24px;
		}
	}

	& .gallery-item {
		flex-shrink: 0;
		margin-bottom: 0;
		position: relative;
		width: 100%;

		@media (min-width: 640px) {
			width: calc((100% - 1 * 8px) / 2);
		}

		@media (min-width: 960px) {
			width: calc((100% - 2 * 8px) / 3);
		}

		@media (min-width: 1440px) {
			width: calc((100% - 3 * 8px) / 4);
		}
	}

	& .gallery-icon {
		height: 100%;

		& a,
		& img {
			display: block;
			height: 100%;
		}

		& img {
			aspect-ratio: 16 / 10;
			object-fit: cover;
		}
	}

	& .gallery-caption {
		background-color: rgb(255 255 255 / 0.80);
		bottom: 0;
		display: none;
		left: 0;
		position: absolute;
		width: 100%;
	}

	& .slick-list {
		margin-left: -8px;
	}

	& .slick-slide {
		margin-left: 8px;
	}
}

/**
 * Module Hero
 */

.module-hero {
	--offset-bottom: 90px;

	font-size: clamp(16px, calc(22 / 1280 * 100dvw), 22px);
	margin-bottom: var(--offset-bottom);
	position: relative;
	z-index: 1;

	&.has-background {

		@media (min-width: 900px) {
			padding-top: 106px;
		}
	}
}

.module-hero__inner {}

.module-hero__background-image {
	max-width: none;

	@media (max-width: 899px) {
		aspect-ratio: 16 / 10;
		margin-bottom: var(--spacing-y);
		margin-top: calc(-1 * var(--spacing-y));
		width: 100%;
	}

	@media (min-width: 900px) {
		height: 100%;
		padding-left: min(
			calc(0.5 * var(--spacing-x) + (0.5 * 580px)),
			calc(0.5 * (50% - 0.5 * var(--spacing-x)))
		);
		position: absolute;
		right: 0;
		top: 0;
		width: 50dvw;
		z-index: -1;
	}

	& img {
		display: block;
		height: 100%;
		object-fit: cover;
		width: 100%;
	}
}

.module-hero__form {
	align-self: flex-start;
	box-shadow: 0 4px 24px 0 rgb(0 0 0 / 0.12);
	margin-bottom: calc(-1 * var(--offset-bottom));
	position: relative;
	z-index: 2;

	.module-hero__columns:last-child & {
		margin-bottom: calc(-1 * (var(--spacing-y) + var(--offset-bottom)));
	}
}

.module-hero__rating {
	align-items: flex-end;
	background-color: white;
	color: var(--color-grey-2);
	display: flex;
	font-size: 16px;
	height: 90px;
	margin-bottom: calc(-1 * (var(--spacing-y) + var(--offset-bottom)));
	position: relative;
	z-index: 1;

	&::before {
		background-color: white;
		content: '';
		display: block;
		height: 100%;
		position: absolute;
		top: 0;
		width: 100%;
		z-index: -1;
	}
}

/**
 * Module Image
 */

.module-image {}

.module-image__inner {}

.module-image__columns {

	@media (min-width: 900px) {
		flex-direction: row-reverse;
	}
}

.module-image__image {

	& img {
		aspect-ratio: 1 / 1;
		display: block;
		object-fit: cover;
		border-radius: 6px;
	}
}

/**
 * Module Testimonials Carousel
 */

.module-testimonials-carousel {
	position: relative;
	z-index: 1;

	&::before {
		background-repeat: no-repeat;
		background-position: 50% 0;
		background-image: url('assets/images/module-testimonials-carousel.svg');
		content: '';
		height: 100%;
		left: 0;
		opacity: 0.08;
		position: absolute;
		top: 0;
		width: 100%;
		z-index: -1;
	}
}

.module-testimonials-carousel__cards {
	display: flex;
	margin-left: calc(-1 * ((100dvw - min(100%, 1240px)) / 2));
	margin-right: calc(-1 * ((100dvw - min(100%, 1240px)) / 2));
	overflow-x: auto;

	&:where(:not(:first-child)) {
		margin-top: 24px;
	}

	& .slick-track {
		align-items: center;
	}

	& .slick-slide {
		padding-left: calc(2 * clamp(15px, calc(40 / 1280 * 100dvw), 40px) + clamp(48px, calc(56 / 1280 * 100dvw), 56px)); /** Match slick arrow width */
		padding-right: calc(2 * clamp(15px, calc(40 / 1280 * 100dvw), 40px) + clamp(48px, calc(56 / 1280 * 100dvw), 56px)); /** Match slick arrow width */
	}
}

.module-testimonials-carousel__card {
	flex-shrink: 0;
	width: 100%;
}
