/* =============================================================================
   JL Locations Widget
   Used for: Nationwide Bases / Locations grid section
   ========================================================================== */

/* ── Zero out parent Elementor container padding & gap ─────────────────── */
.e-con:has(> .elementor-widget-jl-locations),
.e-con:has(> .e-con-inner > .elementor-widget-jl-locations) {
	--padding-top: 0 !important;
	--padding-bottom: 0 !important;
	--padding-block-start: 0 !important;
	--padding-block-end: 0 !important;
	--padding-inline-start: 0 !important;
	--padding-inline-end: 0 !important;
	padding: 0 !important;
	margin-top: 0 !important;
	margin-bottom: 0 !important;
	gap: 0 !important;
}

.e-con:has(> .e-con-inner > .elementor-widget-jl-locations) > .e-con-inner {
	padding: 0 !important;
	gap: 0 !important;
	--padding-top: 0 !important;
	--padding-bottom: 0 !important;
	--padding-block-start: 0 !important;
	--padding-block-end: 0 !important;
}

/* ── Section wrapper ───────────────────────────────────────────────────── */
.jl-locations {
	padding-inline: 1.5rem;
	width: 100vw;
	margin-left: calc(50% - 50vw);
}

/* ── Inner content area ────────────────────────────────────────────────── */
.jl-locations__inner {
	max-width: 1226px;
	width: 100%;
	margin-inline: auto;
}

/* ── Header (heading + divider + body text) ────────────────────────────── */
.jl-locations__header {
	text-align: center;
	margin-bottom: 3rem; /* 48px gap before grid */
}

.jl-locations__heading {
	font-family: "Gotham Office", sans-serif;
	font-size: clamp(1.25rem, 2.38vw, 2.25rem);
	font-weight: 400;
	line-height: 1.1;
	letter-spacing: 1px;
	text-transform: uppercase;
	margin: 0 0 2.5rem;
	color: var(--e-global-color-heading, #000);
}

.jl-locations__divider {
	width: var(--jl-locations-divider-width, 128px);
	height: var(--jl-locations-divider-thickness, 2px);
	background: linear-gradient(to right, transparent, var(--jl-locations-divider-color, var(--e-global-color-slate, #4b667c)) 25%, var(--jl-locations-divider-color, var(--e-global-color-slate, #4b667c)) 75%, transparent);
	border: 0;
	outline: 0;
	margin: 0 auto 2.5rem !important;
}

/* Editor-driven gradient style modifiers */
.jl-locations__divider.jl-locations__divider--narrow {
	background: linear-gradient(to right, transparent, var(--jl-locations-divider-color, var(--e-global-color-slate, #4b667c)) 50%, transparent);
}
.jl-locations__divider.jl-locations__divider--wide {
	background: linear-gradient(to right, transparent, var(--jl-locations-divider-color, var(--e-global-color-slate, #4b667c)) 25%, var(--jl-locations-divider-color, var(--e-global-color-slate, #4b667c)) 75%, transparent);
}
.jl-locations__divider.jl-locations__divider--left {
	background: linear-gradient(to right, var(--jl-locations-divider-color, var(--e-global-color-slate, #4b667c)), var(--jl-locations-divider-color, var(--e-global-color-slate, #4b667c)) 60%, transparent);
}

.jl-locations__body {
	font-family: "Gotham Office", sans-serif;
	font-size: clamp(0.875rem, 1.06vw, 1rem);
	font-weight: 400;
	line-height: 1.6;
	color: var(--e-global-color-text, #343333);
	max-width: 800px;
	margin: 0 auto;
}

/* ── Grid (shared) ──────────────────────────────────────────────────────── */
.jl-locations__grid {
	gap: 2.5rem;
	align-items: stretch;
	width: 100%;
}

/* ── Mobile Portrait: always single column ──────────────────────────────── */
@media (max-width: 480px) {
	.jl-locations__grid {
		display: flex;
		flex-wrap: wrap;
		justify-content: center;
	}
	.jl-locations__grid .jl-locations__card {
		flex: 1 1 100%;
	}
}

/* ── Mobile Landscape ───────────────────────────────────────────────────── */
@media (min-width: 481px) and (max-width: 767px) {
	.jl-locations__grid--ml-flex {
		display: flex;
		flex-wrap: wrap;
		justify-content: center;
	}
	.jl-locations__grid--ml-flex.jl-locations__grid--ml-cols-1 .jl-locations__card { flex: 1 1 100%; }
	.jl-locations__grid--ml-flex.jl-locations__grid--ml-cols-2 .jl-locations__card { flex: 1 1 45%; }

	.jl-locations__grid--ml-grid { display: grid; }
	.jl-locations__grid--ml-grid.jl-locations__grid--ml-cols-1 { grid-template-columns: 1fr; }
	.jl-locations__grid--ml-grid.jl-locations__grid--ml-cols-2 { grid-template-columns: repeat(2, 1fr); }
}

/* ── Tablet ─────────────────────────────────────────────────────────────── */
@media (min-width: 768px) and (max-width: 1023px) {
	.jl-locations__grid--tablet-flex {
		display: flex;
		flex-wrap: wrap;
		justify-content: center;
	}
	.jl-locations__grid--tablet-flex.jl-locations__grid--tablet-cols-1 .jl-locations__card { flex: 1 1 100%; }
	.jl-locations__grid--tablet-flex.jl-locations__grid--tablet-cols-2 .jl-locations__card { flex: 1 1 45%; }

	.jl-locations__grid--tablet-grid { display: grid; }
	.jl-locations__grid--tablet-grid.jl-locations__grid--tablet-cols-1 { grid-template-columns: 1fr; }
	.jl-locations__grid--tablet-grid.jl-locations__grid--tablet-cols-2 { grid-template-columns: repeat(2, 1fr); }
}

/* ── Desktop ────────────────────────────────────────────────────────────── */
@media (min-width: 1024px) {
	.jl-locations__grid--desktop-flex {
		display: flex;
		flex-wrap: wrap;
		justify-content: center;
	}
	.jl-locations__grid--desktop-flex.jl-locations__grid--desktop-cols-2 .jl-locations__card { flex: 1 1 45%; }
	.jl-locations__grid--desktop-flex.jl-locations__grid--desktop-cols-3 .jl-locations__card { flex: 1 1 30%; }
	.jl-locations__grid--desktop-flex.jl-locations__grid--desktop-cols-4 .jl-locations__card { flex: 1 1 22%; }

	.jl-locations__grid--desktop-grid { display: grid; }
	.jl-locations__grid--desktop-grid.jl-locations__grid--desktop-cols-2 { grid-template-columns: repeat(2, 1fr); }
	.jl-locations__grid--desktop-grid.jl-locations__grid--desktop-cols-3 { grid-template-columns: repeat(3, 1fr); }
	.jl-locations__grid--desktop-grid.jl-locations__grid--desktop-cols-4 { grid-template-columns: repeat(4, 1fr); }
}

/* ── Center Items mode (override container; cards keep column-width but don't stretch) ── */
.jl-locations__grid--center {
	display: flex !important;
	flex-wrap: wrap;
	justify-content: center;
}
.jl-locations__grid--center > .jl-locations__card {
	flex-grow: 0;
}
@media (min-width: 481px) and (max-width: 767px) {
	.jl-locations__grid--center.jl-locations__grid--ml-cols-1 > .jl-locations__card { flex-basis: 100%; max-width: 100%; }
	.jl-locations__grid--center.jl-locations__grid--ml-cols-2 > .jl-locations__card { flex-basis: calc(50% - 1.25rem); max-width: calc(50% - 1.25rem); }
}
@media (min-width: 768px) and (max-width: 1023px) {
	.jl-locations__grid--center.jl-locations__grid--tablet-cols-1 > .jl-locations__card { flex-basis: 100%; max-width: 100%; }
	.jl-locations__grid--center.jl-locations__grid--tablet-cols-2 > .jl-locations__card { flex-basis: calc(50% - 1.25rem); max-width: calc(50% - 1.25rem); }
}
@media (min-width: 1024px) {
	.jl-locations__grid--center.jl-locations__grid--desktop-cols-2 > .jl-locations__card { flex-basis: calc(50% - 1.25rem); max-width: calc(50% - 1.25rem); }
	.jl-locations__grid--center.jl-locations__grid--desktop-cols-3 > .jl-locations__card { flex-basis: calc(33.333% - 1.667rem); max-width: calc(33.333% - 1.667rem); }
	.jl-locations__grid--center.jl-locations__grid--desktop-cols-4 > .jl-locations__card { flex-basis: calc(25% - 1.875rem); max-width: calc(25% - 1.875rem); }
}

/* ── Card ───────────────────────────────────────────────────────────────── */
.jl-locations__card {
	overflow: hidden;
	border-radius: 8px;
	border: 1px solid #e5e5e5;
	background: var(--jl-loc-card-bg, #ffffff);
	display: flex;
	flex-direction: column;
}

/* ── Linked card (stretched link) ──────────────────────────────────────── */
.jl-locations__card--linked {
	position: relative;
	transition: box-shadow 0.2s ease, transform 0.2s ease;
	cursor: pointer;
}
.jl-locations__card--linked:hover,
.jl-locations__card--linked:focus-within {
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
	transform: translateY(-2px);
}
.jl-locations__card-link {
	position: absolute;
	inset: 0;
	z-index: 1;
	text-indent: -9999px;
	overflow: hidden;
	white-space: nowrap;
}
.jl-locations__card-link:focus-visible {
	outline: 2px solid var(--e-global-color-slate, #4b667c);
	outline-offset: -2px;
}
/* Keep phone/email links clickable above the stretched overlay */
.jl-locations__card--linked .jl-locations__contact-row a {
	position: relative;
	z-index: 2;
}

/* ── Card image ─────────────────────────────────────────────────────────── */
.jl-locations__image-wrap {
	position: relative;
	width: 100%;
	aspect-ratio: 3 / 2;
	overflow: hidden;
	flex-shrink: 0;
	background: #1a1612;
}

.jl-locations__image-wrap img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transform-origin: center center;
}

.jl-locations__image-placeholder {
	width: 100%;
	height: 100%;
	background: #e8e8e8;
}

/* ── Card info ──────────────────────────────────────────────────────────── */
.jl-locations__info {
	padding: 24px;
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	flex: 1;
	background-color: var(--jl-loc-card-bg, #ffffff);
}

/* ── City name ──────────────────────────────────────────────────────────── */
.jl-locations__city {
	font-family: "Gotham Office", sans-serif;
	font-size: 1.25rem;
	font-weight: 400;
	line-height: 1.4;
	letter-spacing: 1px;
	text-transform: uppercase;
	color: var(--e-global-color-slate, #4b667c);
	margin: 0;
}

/* ── Contact rows ───────────────────────────────────────────────────────── */
.jl-locations__contact {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.jl-locations__contact-row {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	font-family: "Gotham Office", sans-serif;
	font-size: 0.875rem;
	line-height: 1.5;
	color: var(--e-global-color-text, #343333);
}

.jl-locations__contact-row a {
	color: inherit;
	text-decoration: none;
}

.jl-locations__contact-row a:hover {
	text-decoration: underline;
}

.jl-locations__contact-icon {
	flex-shrink: 0;
	margin-top: 2px;
	color: var(--e-global-color-slate, #4b667c);
	display: flex;
	align-items: center;
}

/* ── Responsive tweaks ──────────────────────────────────────────────────── */
@media (max-width: 767px) {
	/* Only override horizontal padding — vertical is controlled by the slider */
	.jl-locations {
		padding-inline: 1rem;
	}

	.jl-locations__heading {
		font-size: 1.25rem;
		margin-bottom: 1.5rem;
	}

	.jl-locations__header {
		margin-bottom: 2rem;
	}
}

/* ── "View Base Details" button — Figma node 2118:31500 (button-primary) ── */
.jl-locations__button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	align-self: flex-start;
	margin-top: 0.5rem;
	padding: 12px 24px;
	font-family: "Gotham Office", sans-serif;
	font-size: 16px;
	font-weight: 400;
	line-height: normal;
	letter-spacing: 1px;
	text-transform: uppercase;
	text-align: center;
	text-decoration: none;
	white-space: nowrap;
	color: #ffffff !important;
	background-color: var(--e-global-color-slate, #4b667c);
	border: 1px solid var(--e-global-color-slate, #4b667c);
	border-radius: 8px;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.jl-locations__button:hover,
.jl-locations__button:focus-visible {
	background-color: transparent;
	color: var(--e-global-color-slate, #4b667c) !important;
	text-decoration: none;
}

.jl-locations__button:focus-visible {
	outline: 2px solid var(--e-global-color-slate, #4b667c);
	outline-offset: 2px;
}
