/**
 * Conditions page
 * Bright Horizons Psychiatry
 */

/* ——— Hero ——— */
.bhp-conditions-hero {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	background:
		radial-gradient(ellipse 70% 55% at 50% 0%, rgba(75, 190, 221, 0.14), transparent 58%),
		radial-gradient(ellipse 50% 45% at 0% 100%, rgba(1, 58, 101, 0.07), transparent 55%),
		radial-gradient(ellipse 45% 40% at 100% 80%, rgba(1, 58, 101, 0.05), transparent 50%),
		var(--bhp-primary-light);
	color: var(--bhp-ink);
}

.bhp-conditions-hero__inner {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: clamp(1rem, 2.5vh, 1.5rem);
	width: 100%;
	max-width: 44rem;
	margin-inline: auto;
	padding-top: clamp(3rem, 8vw, 5.5rem);
	padding-bottom: clamp(3rem, 8vw, 5.5rem);
	text-align: center;
	animation: bhp-conditions-hero-rise 0.85s var(--bhp-ease-out) both;
}

.bhp-conditions-hero__title {
	margin: 0;
	font-size: clamp(2.15rem, 4.6vw, 3.25rem);
	font-weight: var(--bhp-fw-bold);
	letter-spacing: var(--bhp-ls-tight);
	line-height: 1.1;
	color: var(--bhp-primary-dark);
	text-wrap: balance;
}

.bhp-conditions-hero__text {
	margin: 0;
	max-width: 38rem;
	font-size: clamp(1rem, 1.4vw, 1.125rem);
	font-weight: var(--bhp-fw-medium);
	line-height: var(--bhp-lh-relaxed);
	color: var(--bhp-ink-muted);
	text-wrap: pretty;
}

.bhp-conditions-hero__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: var(--bhp-space-3);
	margin-top: var(--bhp-space-2);
}

.bhp-conditions-hero__actions .bhp-btn {
	margin: 0;
	border-radius: var(--bhp-btn-radius);
	box-shadow: none;
}

.bhp-conditions-hero__actions .bhp-btn--outline:hover,
.bhp-conditions-hero__actions .bhp-btn--outline:focus-visible {
	background-color: var(--bhp-primary-dark);
	border-color: var(--bhp-primary-dark);
	color: var(--bhp-white);
}

/* ——— Scope clarity ——— */
.bhp-conditions-scope {
	padding-top: var(--bhp-section-y);
	padding-bottom: var(--bhp-section-y);
	background-color: var(--bhp-white);
	color: var(--bhp-ink);
}

.bhp-conditions-scope__header {
	max-width: 40rem;
	margin-bottom: clamp(2rem, 4vw, 3.25rem);
}

.bhp-conditions-scope__title {
	margin: 0;
	font-size: clamp(1.85rem, 3.4vw, 2.65rem);
	font-weight: var(--bhp-fw-bold);
	letter-spacing: var(--bhp-ls-tight);
	line-height: var(--bhp-lh-tight);
	color: var(--bhp-primary-dark);
	text-wrap: balance;
}

.bhp-conditions-scope__grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: clamp(2.5rem, 5vw, 4rem);
	align-items: start;
}

@media (min-width: 900px) {
	.bhp-conditions-scope__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: clamp(3rem, 6vw, 5.5rem);
	}
}

.bhp-conditions-scope__col {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: var(--bhp-space-5);
	min-width: 0;
}

.bhp-conditions-scope__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 2.5rem;
	height: 2.5rem;
	font-size: 0.95rem;
	line-height: 1;
}

.bhp-conditions-scope__col--treat .bhp-conditions-scope__icon {
	border-radius: var(--bhp-radius-full);
	background-color: var(--bhp-primary);
	color: var(--bhp-white);
}

.bhp-conditions-scope__col--refer .bhp-conditions-scope__icon {
	background: transparent;
	color: var(--bhp-ink-subtle);
	font-size: 1.15rem;
}

.bhp-conditions-scope__col-title {
	margin: 0;
	font-size: clamp(1.2rem, 2vw, 1.45rem);
	font-weight: var(--bhp-fw-bold);
	letter-spacing: var(--bhp-ls-tight);
	line-height: var(--bhp-lh-snug);
	text-wrap: balance;
}

.bhp-conditions-scope__col--treat .bhp-conditions-scope__col-title {
	color: var(--bhp-primary);
}

.bhp-conditions-scope__col--refer .bhp-conditions-scope__col-title {
	color: var(--bhp-ink-muted);
}

.bhp-conditions-scope__list {
	display: flex;
	flex-direction: column;
	gap: 0;
	width: 100%;
	margin: 0;
	padding: 0;
	list-style: none;
}

.bhp-conditions-scope__list > li {
	margin: 0;
	padding: var(--bhp-space-4) 0;
	border-bottom: 1px solid var(--bhp-border);
	font-size: var(--bhp-fs-base);
	font-weight: var(--bhp-fw-medium);
	letter-spacing: var(--bhp-ls-tight);
	line-height: var(--bhp-lh-snug);
}

.bhp-conditions-scope__list > li:last-child {
	border-bottom: none;
	padding-bottom: 0;
}

.bhp-conditions-scope__col--treat .bhp-conditions-scope__list > li {
	color: var(--bhp-ink);
	border-bottom-color: rgba(1, 58, 101, 0.12);
}

.bhp-conditions-scope__col--refer .bhp-conditions-scope__list > li {
	color: var(--bhp-ink-muted);
	border-bottom-color: var(--bhp-border);
}

.bhp-conditions-scope__note {
	margin: var(--bhp-space-2) 0 0;
	font-size: var(--bhp-fs-sm);
	font-weight: var(--bhp-fw-medium);
	line-height: var(--bhp-lh-relaxed);
	letter-spacing: var(--bhp-ls-tight);
	color: var(--bhp-ink-subtle);
	text-wrap: pretty;
}

/* ——— Five condition cards ——— */
.bhp-conditions-cards {
	padding-top: var(--bhp-section-y);
	padding-bottom: var(--bhp-section-y);
	background-color: var(--bhp-surface-soft);
	color: var(--bhp-ink);
}

.bhp-conditions-cards__header {
	max-width: 36rem;
	margin-bottom: clamp(1.75rem, 3.5vw, 2.75rem);
}

.bhp-conditions-cards__title {
	margin: 0;
	font-size: clamp(1.85rem, 3.4vw, 2.65rem);
	font-weight: var(--bhp-fw-bold);
	letter-spacing: var(--bhp-ls-tight);
	line-height: var(--bhp-lh-tight);
	color: var(--bhp-primary-dark);
	text-wrap: balance;
}

.bhp-conditions-cards__grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: clamp(1rem, 2vw, 1.5rem);
	margin: 0;
	padding: 0;
	list-style: none;
}

@media (min-width: 700px) {
	.bhp-conditions-cards__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (min-width: 1100px) {
	.bhp-conditions-cards__grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

.bhp-conditions-cards__grid > li {
	margin: 0;
	min-width: 0;
	height: 100%;
}

.bhp-conditions-cards__card {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: var(--bhp-space-5);
	height: 100%;
	padding: clamp(1.35rem, 2.5vw, 1.85rem);
	background-color: var(--bhp-white);
	border: 1px solid var(--bhp-border);
	border-radius: var(--bhp-btn-radius);
	text-decoration: none;
	color: inherit;
	box-shadow: none;
	transition:
		transform var(--bhp-transition),
		box-shadow var(--bhp-transition),
		border-color var(--bhp-transition);
}

.bhp-conditions-cards__card:hover,
.bhp-conditions-cards__card:focus-visible {
	transform: translateY(-3px);
	box-shadow: var(--bhp-shadow-soft);
	border-color: var(--bhp-border-strong);
	color: inherit;
	outline: none;
}

.bhp-conditions-cards__card:focus-visible {
	outline: 2px solid var(--bhp-primary);
	outline-offset: 3px;
}

.bhp-conditions-cards__body {
	display: flex;
	flex-direction: column;
	gap: 0;
	flex: 1 1 auto;
	min-width: 0;
}

.bhp-conditions-cards__card-title {
	margin: 0 0 var(--bhp-space-8);
	font-size: clamp(1.15rem, 1.8vw, 1.35rem);
	font-weight: var(--bhp-fw-bold);
	letter-spacing: var(--bhp-ls-tight);
	line-height: var(--bhp-lh-snug);
	color: var(--bhp-primary-dark);
	text-wrap: balance;
}

.bhp-conditions-cards__card-text {
	margin: 0;
	font-size: var(--bhp-fs-sm);
	font-weight: var(--bhp-fw-medium);
	line-height: var(--bhp-lh-relaxed);
	letter-spacing: var(--bhp-ls-tight);
	color: var(--bhp-ink-muted);
	text-wrap: pretty;
}

.bhp-conditions-cards__link {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	margin-top: auto;
	font-size: var(--bhp-fs-sm);
	font-weight: var(--bhp-fw-semibold);
	letter-spacing: var(--bhp-ls-tight);
	line-height: 1.3;
	color: var(--bhp-primary);
	transition: color var(--bhp-transition), gap var(--bhp-transition);
}

.bhp-conditions-cards__card:hover .bhp-conditions-cards__link,
.bhp-conditions-cards__card:focus-visible .bhp-conditions-cards__link {
	color: var(--bhp-primary-dark);
	gap: 0.55rem;
}

/* ——— Arrival routing ——— */
.bhp-conditions-arrive {
	padding-top: var(--bhp-section-y);
	padding-bottom: var(--bhp-section-y);
	background-color: var(--bhp-midnight);
	color: var(--bhp-white);
}

.bhp-conditions-arrive__header {
	max-width: 40rem;
	margin-bottom: clamp(2rem, 4vw, 3.25rem);
}

.bhp-conditions-arrive__title {
	margin: 0;
	font-size: clamp(1.85rem, 3.4vw, 2.65rem);
	font-weight: var(--bhp-fw-bold);
	letter-spacing: var(--bhp-ls-tight);
	line-height: var(--bhp-lh-tight);
	color: var(--bhp-white);
	text-wrap: balance;
}

.bhp-conditions-arrive__panels {
	display: grid;
	grid-template-columns: 1fr;
	gap: clamp(2rem, 4vw, 3rem);
	margin: 0;
	padding: 0;
	list-style: none;
}

@media (min-width: 992px) {
	.bhp-conditions-arrive__panels {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: clamp(3rem, 6vw, 5rem);
	}
}

.bhp-conditions-arrive__panel {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: var(--bhp-space-4);
	min-width: 0;
	margin: 0;
	padding: 0;
	border-top: 1px solid rgba(255, 255, 255, 0.16);
	padding-top: clamp(1.75rem, 3vw, 2.25rem);
}

.bhp-conditions-arrive__panel:first-child {
	border-top: 0;
	padding-top: 0;
}

.bhp-conditions-arrive__panel:last-child {
	padding-bottom: 0;
}

@media (min-width: 992px) {
	.bhp-conditions-arrive__panel {
		padding: 0;
		border-top: 0;
		border-left: 1px solid rgba(255, 255, 255, 0.16);
		padding-left: clamp(1.75rem, 3.5vw, 2.75rem);
	}

	.bhp-conditions-arrive__panel:first-child {
		padding-left: 0;
		border-left: 0;
	}

	.bhp-conditions-arrive__panel:last-child {
		padding-right: 0;
	}
}

.bhp-conditions-arrive__num {
	display: block;
	margin: 0 0 6rem;
	font-size: clamp(2.5rem, 4.5vw, 3.5rem);
	font-weight: var(--bhp-fw-bold);
	letter-spacing: var(--bhp-ls-tight);
	line-height: 1;
	color: rgba(255, 255, 255, 0.28);
}

.bhp-conditions-arrive__panel-title {
	margin: 0;
	font-size: clamp(1.15rem, 1.8vw, 1.35rem);
	font-weight: var(--bhp-fw-bold);
	letter-spacing: var(--bhp-ls-tight);
	line-height: var(--bhp-lh-snug);
	color: var(--bhp-white);
	text-wrap: balance;
}

.bhp-conditions-arrive__panel-text {
	margin: 0;
	flex: 1 1 auto;
	font-size: var(--bhp-fs-sm);
	font-weight: var(--bhp-fw-medium);
	line-height: var(--bhp-lh-relaxed);
	letter-spacing: var(--bhp-ls-tight);
	color: rgba(255, 255, 255, 0.78);
	text-wrap: pretty;
}

/* ——— Treatment matching table ——— */
.bhp-conditions-match {
	padding-top: var(--bhp-section-y);
	padding-bottom: var(--bhp-section-y);
	background-color: var(--bhp-white);
	color: var(--bhp-ink);
	scroll-margin-top: calc(var(--bhp-header-height) + 1rem);
}

.bhp-conditions-match__header {
	max-width: 42rem;
	margin-bottom: clamp(1.75rem, 3.5vw, 2.75rem);
}

.bhp-conditions-match__title {
	margin: 0 0 var(--bhp-space-4);
	font-size: clamp(1.85rem, 3.4vw, 2.65rem);
	font-weight: var(--bhp-fw-bold);
	letter-spacing: var(--bhp-ls-tight);
	line-height: var(--bhp-lh-tight);
	color: var(--bhp-primary-dark);
	text-wrap: balance;
}

.bhp-conditions-match__intro {
	margin: 0;
	font-size: var(--bhp-fs-base);
	font-weight: var(--bhp-fw-medium);
	line-height: var(--bhp-lh-relaxed);
	letter-spacing: var(--bhp-ls-tight);
	color: var(--bhp-ink-muted);
	text-wrap: pretty;
}

.bhp-conditions-match__table-wrap {
	width: 100%;
}

.bhp-conditions-match__table {
	width: 100%;
	border-collapse: collapse;
	table-layout: fixed;
}

.bhp-conditions-match__table th,
.bhp-conditions-match__table td {
	padding: clamp(0.85rem, 1.6vw, 1.1rem) clamp(0.55rem, 1.2vw, 0.9rem);
	text-align: left;
	vertical-align: top;
	font-size: clamp(0.8125rem, 1.1vw, 0.9375rem);
	font-weight: var(--bhp-fw-medium);
	letter-spacing: var(--bhp-ls-tight);
	line-height: var(--bhp-lh-snug);
	border: 0;
}

.bhp-conditions-match__table thead th {
	font-weight: var(--bhp-fw-semibold);
	color: var(--bhp-primary-dark);
	background-color: var(--bhp-primary-light);
	border-bottom: 1px solid rgba(1, 58, 101, 0.12);
}

.bhp-conditions-match__table tbody th {
	font-weight: var(--bhp-fw-semibold);
	color: var(--bhp-ink);
}

.bhp-conditions-match__table tbody td {
	color: var(--bhp-ink-muted);
}

.bhp-conditions-match__table tbody tr:nth-child(odd) th,
.bhp-conditions-match__table tbody tr:nth-child(odd) td {
	background-color: var(--bhp-white);
}

.bhp-conditions-match__table tbody tr:nth-child(even) th,
.bhp-conditions-match__table tbody tr:nth-child(even) td {
	background-color: var(--bhp-primary-light);
}

.bhp-conditions-match__note {
	margin: clamp(1.25rem, 2.5vw, 1.75rem) 0 0;
	max-width: 42rem;
	font-size: var(--bhp-fs-sm);
	font-weight: var(--bhp-fw-medium);
	line-height: var(--bhp-lh-relaxed);
	letter-spacing: var(--bhp-ls-tight);
	color: var(--bhp-ink-subtle);
	text-wrap: pretty;
}

@media (max-width: 899px) {
	.bhp-conditions-match__table {
		table-layout: auto;
	}

	.bhp-conditions-match__table thead {
		position: absolute;
		width: 1px;
		height: 1px;
		padding: 0;
		margin: -1px;
		overflow: hidden;
		clip: rect(0, 0, 0, 0);
		white-space: nowrap;
		border: 0;
	}

	.bhp-conditions-match__table,
	.bhp-conditions-match__table tbody,
	.bhp-conditions-match__table tr,
	.bhp-conditions-match__table th,
	.bhp-conditions-match__table td {
		display: block;
		width: 100%;
	}

	.bhp-conditions-match__table tbody {
		display: flex;
		flex-direction: column;
		gap: var(--bhp-space-4);
	}

	.bhp-conditions-match__table tbody tr {
		margin: 0;
		padding: clamp(1.15rem, 3vw, 1.35rem);
		border: 1px solid var(--bhp-border);
		border-radius: var(--bhp-btn-radius);
		background-color: var(--bhp-white);
	}

	.bhp-conditions-match__table tbody tr:nth-child(even) {
		background-color: var(--bhp-primary-light);
		border-color: rgba(1, 58, 101, 0.12);
	}

	.bhp-conditions-match__table tbody tr:nth-child(odd) th,
	.bhp-conditions-match__table tbody tr:nth-child(odd) td,
	.bhp-conditions-match__table tbody tr:nth-child(even) th,
	.bhp-conditions-match__table tbody tr:nth-child(even) td {
		background-color: transparent;
	}

	.bhp-conditions-match__table tbody th {
		margin: 0 0 var(--bhp-space-3);
		padding: 0 0 var(--bhp-space-3);
		border-bottom: 1px solid rgba(1, 58, 101, 0.12);
		font-size: var(--bhp-fs-base);
		color: var(--bhp-primary-dark);
	}

	.bhp-conditions-match__table tbody td {
		display: grid;
		grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
		gap: var(--bhp-space-3);
		align-items: start;
		margin: 0;
		padding: var(--bhp-space-3) 0;
		border-bottom: 1px solid rgba(1, 58, 101, 0.08);
		font-size: var(--bhp-fs-sm);
	}

	.bhp-conditions-match__table tbody td:last-child {
		padding-bottom: 0;
		border-bottom: 0;
	}

	.bhp-conditions-match__table tbody td::before {
		content: attr(data-label);
		font-weight: var(--bhp-fw-semibold);
		color: var(--bhp-ink);
	}
}

/* ——— FAQ ——— */
.bhp-conditions-faq {
	padding-top: var(--bhp-section-y);
	padding-bottom: var(--bhp-section-y);
	background-color: var(--bhp-primary-light);
	color: var(--bhp-ink);
}

.bhp-conditions-faq__inner {
	display: grid;
	grid-template-columns: 1fr;
	gap: clamp(1.75rem, 4vw, 3rem);
	align-items: start;
}

@media (min-width: 900px) {
	.bhp-conditions-faq__inner {
		grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
		gap: clamp(2.5rem, 5vw, 4.5rem);
	}
}

.bhp-conditions-faq__header {
	margin: 0;
}

@media (min-width: 900px) {
	.bhp-conditions-faq__header {
		position: sticky;
		top: calc(var(--bhp-space-8) + 4.5rem);
	}
}

.bhp-conditions-faq__title {
	margin: 0;
	max-width: 16rem;
	font-size: clamp(1.85rem, 3.4vw, 2.65rem);
	font-weight: var(--bhp-fw-bold);
	letter-spacing: var(--bhp-ls-tight);
	line-height: var(--bhp-lh-tight);
	color: var(--bhp-primary-dark);
	text-wrap: balance;
}

.bhp-conditions-faq__list {
	display: flex;
	flex-direction: column;
	width: 100%;
	min-width: 0;
	margin: 0;
}

.bhp-conditions-faq__list .bhp-faq-item {
	border-bottom-color: rgba(1, 58, 101, 0.14);
}

.bhp-conditions-faq__list .bhp-faq-item:last-child {
	border-bottom: 1px solid rgba(1, 58, 101, 0.14);
}

.bhp-conditions-page-content {
	padding-top: var(--bhp-section-y-sm);
	padding-bottom: var(--bhp-section-y);
}

@keyframes bhp-conditions-hero-rise {
	from {
		opacity: 0;
		transform: translateY(1.15rem);
	}

	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@media (prefers-reduced-motion: reduce) {
	.bhp-conditions-hero__inner {
		animation: none;
	}

	.bhp-conditions-cards__card {
		transition: none;
	}

	.bhp-conditions-cards__card:hover,
	.bhp-conditions-cards__card:focus-visible {
		transform: none;
	}

	.bhp-conditions-cards__link {
		transition: none;
	}
}

@media (max-width: 575px) {
	.bhp-conditions-hero__actions {
		flex-direction: column;
		width: 100%;
	}

	.bhp-conditions-hero__actions .bhp-btn {
		width: 100%;
	}
}
