/**
 * Clinic Locations
 *
 * Override the custom properties in your theme to match the brand, e.g.
 *   .cl { --cl-primary: #263a7f; }
 */

.cl {
	--cl-primary: #263a7f;
	--cl-primary-contrast: #fff;
	--cl-text: #1f2533;
	--cl-muted: #5b6475;
	--cl-surface: #fff;
	--cl-border: #e2e5ee;
	--cl-radius: 16px;
	--cl-gap: clamp(1.5rem, 3vw, 3rem);
	--cl-max-width: 1280px;

	color: var(--cl-text);
}

.cl *,
.cl *::before,
.cl *::after {
	box-sizing: border-box;
}

.cl-container {
	width: 100%;
	max-width: var(--cl-max-width);
	margin-inline: auto;
	padding: var(--cl-gap) 1rem;
}

.cl-title {
	margin: 0 0 1.5rem;
	color: var(--cl-primary);
	font-size: clamp(2rem, 4vw, 3.25rem);
	line-height: 1.15;
}

.cl-prose > :first-child { margin-top: 0; }
.cl-prose > :last-child { margin-bottom: 0; }
.cl-prose h2,
.cl-prose h3,
.cl-prose h4 {
	color: var(--cl-primary);
	line-height: 1.25;
}

.cl-icon {
	flex-shrink: 0;
	width: 1.25em;
	height: 1.25em;
}

.cl .screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	white-space: nowrap;
}

/* Buttons + links */
.cl-button {
	display: inline-flex;
	align-items: center;
	gap: 0.6em;
	padding: 0.8em 1.6em;
	border: 2px solid var(--cl-primary);
	border-radius: 999px;
	background: var(--cl-primary);
	color: var(--cl-primary-contrast);
	font: inherit;
	font-weight: 600;
	letter-spacing: 0.02em;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.cl-button:hover,
.cl-button:focus-visible {
	background: transparent;
	color: var(--cl-primary);
}

.cl-button--ghost {
	background: transparent;
	color: var(--cl-primary);
}

.cl-button--ghost:hover,
.cl-button--ghost:focus-visible {
	background: var(--cl-primary);
	color: var(--cl-primary-contrast);
}

.cl-button[hidden] { display: none; }

.cl-button__meta {
	font-weight: 400;
	opacity: 0.85;
}

.cl-link {
	display: inline-flex;
	align-items: center;
	gap: 0.4em;
	color: var(--cl-primary);
	font-weight: 600;
}

.cl a:focus-visible,
.cl button:focus-visible {
	outline: 3px solid var(--cl-primary);
	outline-offset: 3px;
}

/* Maps */
.cl-map {
	width: 100%;
	height: 420px;
	border-radius: var(--cl-radius);
	overflow: hidden;
	background: #e9ecf3;
}

.cl-map--archive {
	height: clamp(320px, 55vh, 560px);
	margin-bottom: var(--cl-gap);
}

.cl-map--embed iframe {
	display: block;
	width: 100%;
	height: 100%;
	border: 0;
}

.cl-map-notice {
	padding: 1rem 1.25rem;
	border: 1px dashed var(--cl-border);
	border-radius: var(--cl-radius);
	color: var(--cl-muted);
}

.cl-info {
	display: grid;
	gap: 0.35rem;
	max-width: 260px;
	font-size: 0.95rem;
	line-height: 1.4;
	color: #1f2533;
}

.cl-info__title { font-size: 1.05rem; }
.cl-info__address { color: #5b6475; }

.cl-info__links {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin-top: 0.25rem;
}

.cl-info__link {
	color: #263a7f;
	font-weight: 600;
}

/* Single: intro */
.cl-intro {
	display: grid;
	gap: var(--cl-gap);
	margin-bottom: var(--cl-gap);
}

@media (min-width: 900px) {
	.cl-intro {
		grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
		align-items: start;
	}
}

.cl-details {
	display: grid;
	gap: 1.5rem;
	margin-top: 1.75rem;
}

.cl-address {
	display: grid;
	gap: 0.35rem;
	font-style: normal;
	font-size: 1.125rem;
}

.cl-address__name { font-size: 1.2rem; }

.cl-directions { margin: 0; }

.cl-download__intro {
	margin: 0 0 1rem;
	font-weight: 600;
	font-size: 1.125rem;
}

.cl-featured {
	margin: 0 0 2rem;
}

.cl-featured__img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 1;
	object-fit: cover;
	border-radius: var(--cl-radius);
}

.cl-contact {
	margin-bottom: 2rem;
}

.cl-contact > .cl-icon {
	width: 2.75rem;
	height: 2.75rem;
	color: var(--cl-primary);
	stroke-width: 1.75;
}

.cl-contact p { margin: 0.5rem 0 0; }

.cl-contact__label {
	font-weight: 600;
	font-size: 1.125rem;
}

.cl-contact__value a {
	color: var(--cl-primary);
	font-size: 1.4rem;
	font-weight: 600;
	overflow-wrap: anywhere;
}

.cl-contact--email .cl-contact__value a { font-size: 1.125rem; }

.cl-contact__note {
	color: var(--cl-muted);
	font-size: 0.95rem;
}

/* Single: content sections */
.cl-section {
	display: grid;
	gap: var(--cl-gap);
	align-items: start;
	padding-block: var(--cl-gap);
}

@media (min-width: 900px) {
	.cl-section--image-left,
	.cl-section--image-right {
		grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	}

	.cl-section--image-left .cl-section__media { order: -1; }
}

.cl-section--text-only .cl-section__text { max-width: 75ch; }

.cl-section__text { font-size: 1.1rem; line-height: 1.7; }

.cl-section__media { margin: 0; }

.cl-section__img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: var(--cl-radius);
}

/* Single: gallery */
.cl-gallery { padding-block: var(--cl-gap); }

.cl-gallery__title {
	margin: 0 0 1.5rem;
	color: var(--cl-primary);
	font-size: clamp(1.6rem, 3vw, 2.25rem);
}

.cl-gallery__grid,
.cl-cards {
	display: grid;
	gap: clamp(1rem, 2.5vw, 2rem);
	margin: 0;
	padding: 0;
	list-style: none;
}

.cl-gallery__grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }

.cl-gallery__link {
	display: block;
	border-radius: var(--cl-radius);
	overflow: hidden;
}

.cl-gallery__img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	transition: transform 0.3s ease;
}

.cl-gallery__link:hover .cl-gallery__img { transform: scale(1.03); }

/* Archive */
.cl-archive__header { margin-bottom: 2rem; }
.cl-archive__intro { max-width: 75ch; font-size: 1.1rem; }

.cl-cards { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }

.cl-card {
	display: flex;
	flex-direction: column;
	height: 100%;
	border: 1px solid var(--cl-border);
	border-radius: var(--cl-radius);
	background: var(--cl-surface);
	overflow: hidden;
}

.cl-card__media {
	display: block;
	aspect-ratio: 16 / 10;
	background: #e9ecf3;
}

.cl-card__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.cl-card__placeholder {
	display: grid;
	place-items: center;
	height: 100%;
	color: var(--cl-primary);
}

.cl-card__placeholder .cl-icon { width: 3rem; height: 3rem; opacity: 0.5; }

.cl-card__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 0.75rem;
	padding: 1.5rem;
}

.cl-card__title {
	margin: 0;
	font-size: 1.4rem !important;
	line-height: 1.3;
}

.cl-card__title a {
	color: var(--cl-primary);
	text-decoration: none;
}

.cl-card__title a:hover { text-decoration: underline; }

.cl-card__address {
	color: var(--cl-muted);
	font-style: normal;
}

.cl-card__phone {
	display: flex;
	align-items: center;
	gap: 0.5em;
	margin: 0;
}

.cl-card__phone a { color: inherit; }
.cl-card__phone .cl-icon { color: var(--cl-primary); }

.cl-card__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin-top: auto;
	padding-top: 0.5rem;
}

.cl-card__actions .cl-button { padding: 0.65em 1.25em; font-size: 0.95rem; }

.cl-empty { color: var(--cl-muted); }

@media (prefers-reduced-motion: reduce) {
	.cl-gallery__img,
	.cl-button { transition: none; }
}
