/**
 * Location Card widget — About Locations (.about-location is-about-v2).
 * Loaded only when the widget is present (Elementor on-demand).
 *
 * Target breakpoints (Webflow):
 *  - Desktop >991: 3-col, height 25rem, title 24px
 *  - ≤991: taller 30rem, title 36px (Elementor tablet ≤1024 approximates)
 *  - ≤479 about-v2: 17.5rem, image 60%, content column centered (Elementor mobile ≤767)
 *
 * Grid columns stay on the Elementor Grid Container (project: 3 / 2 / 1).
 */

/* Stretch to grid cell. */
.elementor-widget-jdw-ee-location-card {
	height: 100%;
	width: 100%;
}

.elementor-widget-jdw-ee-location-card > .jdw-ee-location-card {
	width: 100%;
	height: 100%;
}

.jdw-ee-location-card {
	box-sizing: border-box;
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	align-items: flex-start;
	overflow: hidden;
	/* Defaults also set via Style controls; keep fallbacks for editor/cache. */
	min-height: 25rem;
	height: 25rem;
	padding: 2rem;
	/* Transparent so photo shows; dark fallback while image loads. */
	background-color: #161616;
	color: #fff;
	/*
	 * Target .about-location._1st.black.is-top-border-1:
	 * top + bottom + right silver; left only on outer / mobile full box.
	 * Shared grid seams (avoid double 2px between cells).
	 */
	border-style: solid;
	border-color: #c7c6c4;
	border-width: 1px 1px 1px 0;
}

/* First column of each row: restore left edge (3-col desktop). */
.e-con.e-grid > .elementor-element:nth-child(3n + 1) .jdw-ee-location-card {
	border-left-width: 1px;
}

/* Full-card image layer (target .about-location-image-wrap). */
.jdw-ee-location-card {
	/* Style controls may override via custom properties. */
	--jdw-ee-loc-hover-scale: 1.05;
	--jdw-ee-loc-hover-duration: 0.5s;
}

.jdw-ee-location-card__media {
	position: absolute;
	inset: 0;
	z-index: 0;
	display: block;
	width: 100%;
	height: 100%;
	max-width: 100%;
	/* Clip zoomed image (target scales wrap inside overflow:hidden card). */
	overflow: hidden;
	text-decoration: none;
	color: inherit;
}

/*
 * Absolute fill inside .media — theme `img { height: auto; max-width: 100% }`
 * otherwise collapses object-fit cover. Pin to media box only (not the card),
 * so mobile 60% image band stays clipped.
 *
 * Hover zoom: target scales .about-location-image-wrap; we scale the img inside
 * the overflow-hidden media shell (same visual). Desktop only ≥992.
 * transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
 */
.jdw-ee-location-card__media .jdw-ee-location-card__image {
	position: absolute;
	top: 0;
	left: 0;
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	max-height: 100%;
	object-fit: cover;
	object-position: center;
	border: 0;
	transform: scale(1);
	transition: transform var(--jdw-ee-loc-hover-duration) cubic-bezier(0.25, 0.46, 0.45, 0.94);
	will-change: transform;
}

@media (min-width: 992px) {
	.jdw-ee-location-card:hover .jdw-ee-location-card__image,
	.jdw-ee-location-card:focus-within .jdw-ee-location-card__image {
		transform: scale(var(--jdw-ee-loc-hover-scale));
	}
}

/* Content over image (target .about-location-content-wrapper). */
.jdw-ee-location-card__body {
	position: relative;
	z-index: 2;
	display: flex;
	flex-flow: row nowrap;
	justify-content: space-between;
	align-items: flex-end;
	width: 100%;
	max-width: 100%;
	/* Target wrapper has no gap; spacing lives on .content. */
	gap: 0;
}

.jdw-ee-location-card__content {
	position: relative;
	z-index: 3;
	display: flex;
	flex-flow: column nowrap;
	justify-content: flex-end;
	align-items: flex-start;
	flex: 0 1 auto;
	min-width: 0;
	gap: 1rem;
	width: 100%;
	max-width: fit-content;
	box-sizing: border-box;
}

.jdw-ee-location-card__title {
	margin: 0;
	color: #fff;
	font-family: "Suisse Intl", Arial, sans-serif;
	font-size: 24px;
	font-weight: 700;
	line-height: 32px;
	letter-spacing: -0.03em;
}

.jdw-ee-location-card__address {
	width: 100%;
	color: #c7c6c4;
	font-family: "Suisse Intl", Arial, sans-serif;
	font-size: 16px;
	line-height: 1.4;
}

.jdw-ee-location-card__address p {
	margin: 0;
	text-wrap: balance;
}

.jdw-ee-location-card__address strong,
.jdw-ee-location-card__address b {
	color: #f65e1e;
	font-weight: 700;
}

/* Target .div-block-7.view-button-about { align-self: center } — keep end on desktop row. */
.jdw-ee-location-card__action {
	flex: 0 0 auto;
	align-self: flex-end;
}

.jdw-ee-location-card__button {
	box-sizing: border-box;
	display: inline-flex;
	justify-content: center;
	align-items: flex-start;
	padding: 16px 24px;
	border: 2px solid #f65e1e;
	border-radius: 0;
	background-color: #f65e1e;
	color: #fff;
	font-family: "Suisse Intl", Arial, sans-serif;
	font-size: 18px;
	font-weight: 700;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
	cursor: pointer;
	transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease;
	max-width: 100%;
}

.jdw-ee-location-card__button:hover,
.jdw-ee-location-card__button:focus {
	background-color: #b84c16;
	border-color: #b84c16;
	color: #fff;
	text-decoration: none;
	outline: none;
}

.jdw-ee-location-card__button:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 2px;
}

.jdw-ee-location-card__button-label {
	display: inline-block;
}

/*
 * Tablet (Elementor ≤1024; target medium ≤991):
 * taller card; display-xs → 36px / line-height stays 32.
 * 2-col grid seams via odd children.
 */
@media (max-width: 1024px) {
	.jdw-ee-location-card {
		min-height: 30rem;
		height: 30rem;
		padding-left: 2rem;
		padding-right: 2rem;
		border-left-width: 0;
	}

	.e-con.e-grid > .elementor-element:nth-child(3n + 1) .jdw-ee-location-card {
		border-left-width: 0;
	}

	.e-con.e-grid > .elementor-element:nth-child(2n + 1) .jdw-ee-location-card {
		border-left-width: 1px;
	}

	/* Target .display-xs at ≤991. */
	.jdw-ee-location-card__title {
		font-size: 36px;
		line-height: 32px;
		letter-spacing: -0.03em;
	}
}

/*
 * Mobile (Elementor ≤767; target about-v2 polish also at ≤479):
 * stack/center content; image ~60% height; keep desktop button size (target does).
 */
@media (max-width: 767px) {
	.jdw-ee-location-card {
		min-height: 17.5rem;
		height: 17.5rem;
		padding: 2.5rem 1.25rem 1.5rem;
		/* single column: full box border */
		border-width: 1px;
	}

	.e-con.e-grid > .elementor-element:nth-child(n) .jdw-ee-location-card {
		border-left-width: 1px;
	}

	.jdw-ee-location-card__media {
		height: 60%;
		/* top band like target .about-location-image-wrap.is-about-v2 */
		bottom: auto;
	}

	/* Target .about-location-content-wrapper.is-about-v2 { height: 10rem } */
	.jdw-ee-location-card__body {
		flex-flow: column nowrap;
		justify-content: space-between;
		align-items: center;
		height: 10rem;
		min-height: 10rem;
		gap: 1rem;
	}

	/* Target .about-location-content.is-about — center stack. */
	.jdw-ee-location-card__content {
		justify-content: center;
		align-items: center;
		text-align: center;
		max-width: fit-content;
		gap: 0.5rem;
	}

	.jdw-ee-location-card__title {
		text-align: center;
		font-size: 20px;
		line-height: 32px;
		letter-spacing: -0.03em;
	}

	.jdw-ee-location-card__address,
	.jdw-ee-location-card__address p {
		text-align: center;
		/* Target .paragraph.is-small ≈ 0.625rem on phone. */
		font-size: 10px;
	}

	.jdw-ee-location-card__action {
		align-self: center;
	}

	/* Target keeps .button-main 16×24 / 18px on phone for this block. */
	.jdw-ee-location-card__button {
		padding: 16px 24px;
		font-size: 18px;
		line-height: 1.2;
	}
}
