/* ==========================================================================
   "Locations" page — [owc_locations_directory] output.
   Four-card-per-clinic layout (Contact / Hours / Map / Services), matching
   what the site used before this page's redesign — kept on request. Same
   brand burgundy as the rest of the rebuilt pages; cards get a hairline
   border here (unlike Our Team's borderless rows) since that's the part
   of the old design being deliberately preserved, not reinvented.
   Scoped under .owc-locations-page so it can't leak onto any other page —
   this stylesheet only loads on page ID 42 (see functions.php).
   ========================================================================== */

.owc-locations-page {
	--owc-burgundy: #511439;
	--owc-burgundy-dark: #3d0f2b;
	--owc-ink: #1a1a1a;
	--owc-text: #3a3a3a;
	--owc-text-soft: #767676;
	--owc-hairline: #e7e1e4;
	max-width: 1200px;
	margin: 0 auto;
	padding: 8px 0 64px;
}

.owc-locations-heading {
	margin: 0 0 20px;
	font-size: 3.5rem !important;
	font-weight: 600;
	line-height: 0.98;
	letter-spacing: -0.02em;
	color: var(--owc-ink);
}

@media (max-width: 640px) {
	.owc-locations-heading {
		font-size: 2.25rem !important;
	}
}

.owc-locations-intro {
	max-width: 640px;
	margin: 0 0 48px;
}

.owc-locations-intro p {
	font-size: 1.05em;
	line-height: 1.6;
	color: var(--owc-text);
	margin: 0;
}

/* Full-bleed: breaks out of the page's 1200px centered container to span
   the full viewport width, like the old fullwidth map section did. Width/
   margin are set inline by locations-map.js using document.documentElement
   .clientWidth (not a plain 100vw here — that includes the scrollbar's own
   width in most browsers, which left a few px of horizontal page overflow
   and a permanent horizontal scrollbar). */
.owc-locations-map {
	height: 420px;
	position: relative;
	margin-bottom: 48px;
	border-top: 1px solid var(--owc-hairline);
	border-bottom: 1px solid var(--owc-hairline);
	background: #f2f0f1;
}

.owc-locations-map .leaflet-popup-content strong {
	color: var(--owc-ink);
}

.owc-locations-map .leaflet-popup-content a {
	color: var(--owc-burgundy);
}

/* Leaflet's divIcon ships a white box + border by default, meant for text
   labels — strip it so only the burgundy pin SVG shows. */
.owc-locations-marker {
	background: transparent;
	border: none;
}

/* Fallback only: mutes stock OpenStreetMap's busy, saturated default
   rendering when no Mapbox token is configured (see locations-map.js), so
   the map still looks reasonable rather than breaking. Not applied when
   Mapbox tiles are in use — those are already the clean, modern look. */
.owc-locations-map--filtered .leaflet-tile-pane {
	filter: grayscale(45%) brightness(1.08) contrast(0.92) saturate(65%);
}

@media (max-width: 640px) {
	.owc-locations-map {
		height: 320px;
	}
}

.owc-locations-section {
	padding: 32px 0;
	border-bottom: 1px solid var(--owc-hairline);
}

.owc-locations-section:first-of-type {
	padding-top: 0;
}

.owc-locations-section-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 12px 24px;
	margin: 0 0 20px;
}

.owc-locations-name {
	margin: 0;
	font-size: 1.5rem !important;
	font-weight: 700;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	color: var(--owc-ink);
}

.owc-locations-section-actions {
	display: flex;
	gap: 10px;
	flex-shrink: 0;
}

.owc-locations-action {
	display: inline-block;
	padding: 8px 18px;
	font-size: 0.7em;
	font-weight: 600;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	text-decoration: none;
	border-radius: 999px;
	transition: background-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

/* Secondary action — outlined, quieter than Book Now so the one solid
   button stays the clear primary action in the row. */
.owc-locations-action-team {
	border: 1px solid var(--owc-burgundy);
	color: var(--owc-burgundy);
}

.owc-locations-action-team:hover {
	background-color: var(--owc-burgundy);
	color: #ffffff;
}

.owc-locations-action-book {
	background-color: var(--owc-burgundy);
	color: #ffffff;
}

.owc-locations-action-book:hover {
	background-color: var(--owc-burgundy-dark);
	transform: translateY(-1px);
}

.owc-locations-name a {
	color: inherit;
	text-decoration: none;
}

.owc-locations-name a:hover {
	color: var(--owc-burgundy);
}

.owc-locations-cards {
	display: grid;
	/* Fills the full row width (matching the header row above it, which
	   spans the same width via space-between) — fine for a normal 3-4
	   card row. Sparse rows get capped instead, see --compact below. */
	grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
	gap: 12px;
	/* Uniform row height (grid's default stretch) — the tradeoff is that a
	   row's shorter cards show blank space below their content whenever
	   the tallest one (usually Hours, with 7 day rows) has more; that's
	   accepted here in favour of a clean, aligned row rather than ragged
	   card bottoms. */
	align-items: stretch;
}

/* Sparse rows — Corporate Office / CPS Onsite, added via PHP when a
   location has fewer than 3 cards — cap card width instead of stretching
   1-2 cards across the whole row. */
.owc-locations-cards--compact {
	grid-template-columns: repeat(auto-fit, minmax(210px, 280px));
}

.owc-locations-card {
	padding: 11px 13px;
	border: 1px solid var(--owc-hairline);
	display: flex;
	flex-direction: column;
}

/* Icon centered above the title, not beside it — a side-by-side row kept
   reading as vertically misaligned (text baseline vs. circle center never
   quite matched), and stacking + centering both sidesteps that and matches
   the old page's actual layout. */
.owc-locations-card-head {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	gap: 6px;
	margin: 0 0 10px;
}

.owc-locations-card-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	width: 21px;
	height: 21px;
	border-radius: 50%;
	background: var(--owc-burgundy);
	color: #ffffff;
}

.owc-locations-card-icon svg {
	width: 11px;
	height: 11px;
}

.owc-locations-card-heading {
	margin: 0;
	font-size: 0.66rem !important;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--owc-burgundy);
}

.owc-locations-card p {
	margin: 0 0 5px;
	font-size: 0.8em;
	line-height: 1.35;
	color: var(--owc-text);
}

.owc-locations-card p:last-child {
	margin-bottom: 0;
}

.owc-locations-line-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 15px;
	margin-right: 6px;
	color: var(--owc-burgundy);
	vertical-align: -3px;
}

.owc-locations-line-icon svg {
	width: 14px;
	height: 14px;
}

.owc-locations-card p a {
	color: var(--owc-text);
	text-decoration: none;
}

.owc-locations-card p a:hover {
	color: var(--owc-burgundy);
}

.owc-locations-hours {
	margin: 0;
	padding: 0;
	list-style: none;
}

.owc-locations-hours li {
	display: flex;
	justify-content: space-between;
	gap: 10px;
	padding: 3px 0;
	font-size: 0.8em;
	color: var(--owc-text);
}

.owc-locations-hours li span:first-child {
	color: var(--owc-text-soft);
}

.owc-locations-hours li span:last-child {
	white-space: nowrap;
}

.owc-locations-services-list {
	margin: 0;
	padding: 0;
	list-style: none;
	/* flex-basis: 190px (not the list's actual content height) is the
	   baseline this grows from — so on its own, with no taller sibling to
	   stretch against (a single-column row, or a row with no Hours card),
	   it shows a sensible ~190px default instead of either collapsing to
	   nothing (flex-basis: 0 did this) or ballooning to fit every item
	   (unset height did this, back when Macleod Trail's long list took
	   over the page). flex-grow: 1 then lets it expand to fill any *extra*
	   space the grid hands this card when a sibling like Hours is taller —
	   reaching the true bottom of the card instead of stopping at 190px. */
	flex: 1 1 190px;
	min-height: 0;
	overflow-y: auto;
}

.owc-locations-services-list li {
	padding: 2px 0;
	font-size: 0.8em;
}

.owc-locations-services-list a {
	color: var(--owc-burgundy);
	text-decoration: none;
}

.owc-locations-services-list a:hover {
	text-decoration: underline;
}

.owc-locations-card-map {
	padding: 0;
	overflow: hidden;
	min-height: 160px;
	display: flex;
	flex-direction: column;
}

.owc-locations-card-map .owc-locations-card-head {
	margin: 11px 13px 8px;
}

/* The map "card" is a link to Google Maps (see locations-page.php) — this
   hover treatment (zoom + a revealed label) is what makes that clickable,
   since a plain static image otherwise reads as inert. */
.owc-locations-map-thumb {
	display: block;
	position: relative;
	flex: 1;
	min-height: 112px;
	overflow: hidden;
}

.owc-locations-map-thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.25s ease;
}

.owc-locations-map-thumb::after {
	content: "Open in Google Maps";
	position: absolute;
	inset: auto 0 0 0;
	padding: 8px 12px;
	background: rgba(20, 6, 16, 0.78);
	color: #ffffff;
	font-size: 0.72em;
	font-weight: 600;
	letter-spacing: 0.03em;
	text-align: center;
	opacity: 0;
	transform: translateY(6px);
	transition: opacity 0.2s ease, transform 0.2s ease;
}

.owc-locations-map-thumb:hover::after,
.owc-locations-map-thumb:focus-visible::after {
	opacity: 1;
	transform: translateY(0);
}

.owc-locations-map-thumb:hover img {
	transform: scale(1.04);
}

/* --- breadcrumb, matching the other rebuilt pages' treatment ----------- */

.owc-locations-page .owc-breadcrumb,
.owc-locations-page .owc-breadcrumb a,
.owc-locations-page .owc-breadcrumb span {
	color: var(--owc-text-soft);
	font-size: 0.85em;
}

.owc-locations-page .owc-breadcrumb a:hover {
	color: var(--owc-burgundy);
}

.owc-locations-page .owc-breadcrumb-sep {
	margin: 0 6px;
}
