/**
 * AmalCure detail & archive templates.
 *
 * Brand colours are defined as tokens on .amc-wrap — see the note below.
 */

/* Brand colours are set explicitly rather than read from Astra's global palette.
   The palette slots on this site are not the brand colours (slot 0 is blue and
   slot 6 is dark), so inheriting them turned the buttons blue and gave the CTA
   and sidebar dark backgrounds. These values are sampled from the logo. */
.amc-wrap {
	--amc-accent: #12A89D;
	--amc-accent-dark: #0E8A81;
	--amc-heading: #1E293B;
	--amc-text: #475569;
	--amc-surface: #FFFFFF;
	--amc-subtle: #F1F5F9;
	--amc-border: rgba(0, 0, 0, 0.09);
	--amc-radius: 10px;
	--amc-shadow: 0 1px 2px rgba(16, 24, 40, 0.05), 0 8px 24px rgba(16, 24, 40, 0.06);

	max-width: var(--ast-normal-container-width, 1200px);
	margin: 0 auto;
	padding: 2.5rem 1.25rem 4rem;
	color: var(--amc-text);
}

.amc-wrap h1,
.amc-wrap h2,
.amc-wrap h3 {
	color: var(--amc-heading);
}

/* ------------------------------------------------------------- breadcrumb */

.amc-breadcrumb {
	font-size: 0.875rem;
	margin-bottom: 1.5rem;
	color: var(--amc-text);
	opacity: 0.85;
}

.amc-breadcrumb a {
	color: inherit;
	text-decoration: none;
}

.amc-breadcrumb a:hover {
	color: var(--amc-accent);
	text-decoration: underline;
}

.amc-breadcrumb span[aria-hidden] {
	margin: 0 0.5rem;
	opacity: 0.5;
}

/* -------------------------------------------------------------------- hero */

.amc-hero {
	display: grid;
	grid-template-columns: minmax(0, 280px) minmax(0, 1fr);
	gap: 2rem;
	align-items: start;
	padding-bottom: 2.5rem;
	margin-bottom: 2.5rem;
	border-bottom: 1px solid var(--amc-border);
}

.amc-hero--wide {
	grid-template-columns: minmax(0, 1fr);
}

.amc-hero__media img {
	width: 100%;
	height: auto;
	display: block;
	border-radius: var(--amc-radius);
	box-shadow: var(--amc-shadow);
	object-fit: cover;
}

.amc-hero__media--banner img {
	max-height: 340px;
	object-fit: cover;
}

.amc-hero__placeholder {
	display: block;
	aspect-ratio: 4 / 3;
	border-radius: var(--amc-radius);
	background:
		linear-gradient(135deg, var(--amc-subtle), rgba(0, 0, 0, 0.04));
}

.amc-hero__title {
	margin: 0 0 0.35rem;
	font-size: clamp(1.75rem, 3.2vw, 2.375rem);
	line-height: 1.25;
}

.amc-hero__lead {
	margin: 0 0 0.25rem;
	font-size: 1.0625rem;
	font-weight: 600;
	color: var(--amc-accent);
}

.amc-hero__sub {
	margin: 0 0 1rem;
	font-size: 0.9375rem;
	opacity: 0.9;
}

.amc-hero__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin-top: 1.5rem;
}

/* ------------------------------------------------------------------- facts */

.amc-facts {
	list-style: none;
	margin: 1.25rem 0 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
	gap: 0.75rem 1.5rem;
}

.amc-facts li {
	margin: 0;
	padding: 0.75rem 1rem;
	background: var(--amc-subtle);
	border-radius: var(--amc-radius);
}

.amc-facts__label {
	display: block;
	font-size: 0.75rem;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	opacity: 0.7;
}

.amc-facts__value {
	display: block;
	font-weight: 600;
	color: var(--amc-heading);
	margin-top: 0.15rem;
}

/* ------------------------------------------------------------------- pills */

.amc-pills,
.amc-filter {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem;
	margin-top: 1.25rem;
}

.amc-filter {
	margin: 0 0 2rem;
}

.amc-filter__label {
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--amc-heading);
	margin-right: 0.25rem;
}

.amc-pill {
	display: inline-block;
	padding: 0.3rem 0.8rem;
	border: 1px solid var(--amc-border);
	border-radius: 999px;
	font-size: 0.8125rem;
	line-height: 1.5;
	text-decoration: none;
	color: var(--amc-heading);
	background: var(--amc-surface);
	transition: all 0.15s ease;
}

.amc-pill:hover {
	border-color: var(--amc-accent);
	color: var(--amc-accent);
}

/* ----------------------------------------------------------------- buttons */

.amc-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.7rem 1.4rem;
	border-radius: var(--amc-radius);
	font-weight: 600;
	font-size: 0.9375rem;
	line-height: 1.4;
	text-decoration: none;
	border: 1px solid transparent;
	transition: all 0.15s ease;
}

.amc-btn--primary {
	background: var(--amc-accent);
	color: #fff;
}

.amc-btn--primary:hover {
	background: var(--amc-accent-dark);
	color: #fff;
}

.amc-btn--ghost {
	border-color: var(--amc-accent);
	color: var(--amc-accent);
	background: transparent;
}

.amc-btn--ghost:hover {
	background: var(--amc-accent);
	color: #fff;
}

/* -------------------------------------------------------------------- body */

.amc-body {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 300px);
	gap: 3rem;
	align-items: start;
}

.amc-block {
	margin-bottom: 2.5rem;
}

.amc-block__title {
	font-size: 1.25rem;
	margin: 0 0 1rem;
	padding-bottom: 0.5rem;
	border-bottom: 2px solid var(--amc-subtle);
}

.amc-prose p {
	margin: 0 0 1rem;
	line-height: 1.75;
}

.amc-prose :last-child {
	margin-bottom: 0;
}

/* ------------------------------------------------------------------- lists */

.amc-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 0.6rem 1.5rem;
}

.amc-list li {
	position: relative;
	margin: 0;
	padding-left: 1.6rem;
	line-height: 1.6;
}

.amc-list li::before {
	position: absolute;
	left: 0;
	top: 0.05em;
	font-size: 0.95em;
	color: var(--amc-accent);
}

.amc-list--check li::before {
	content: "✓";
	font-weight: 700;
}

.amc-list--degree li::before {
	content: "🎓";
}

.amc-list--badge li::before {
	content: "🛡";
}

/* -------------------------------------------------------------------- grid */

.amc-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: 1.5rem;
}

.amc-grid--compact {
	grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
	gap: 1rem;
}

/* post_class() also stamps Astra's own article classes onto the card, and
   `.ast-article-post` carries generous padding — that inset the photo by ~50px
   a side, so it never reached the card edges. Zero it here; the inner padding
   comes from .amc-card__body instead. */
.amc-grid article.amc-card {
	display: flex;
	flex-direction: column;
	padding: 0;
	margin: 0;
	background: var(--amc-surface);
	border: 1px solid var(--amc-border);
	border-radius: var(--amc-radius);
	overflow: hidden;
	box-shadow: none;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.amc-card {
	display: flex;
	flex-direction: column;
	background: var(--amc-surface);
	border: 1px solid var(--amc-border);
	border-radius: var(--amc-radius);
	overflow: hidden;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.amc-card:hover {
	transform: translateY(-2px);
	box-shadow: var(--amc-shadow);
}

/* Fixed-ratio media box so every photo fills the card edge to edge, the way the
   homepage grid does. The selectors are deliberately two classes deep: WordPress
   prints width/height attributes on the <img> and the theme has its own image
   rules, and a single-class selector lost to them — the photos ended up centred
   at their natural size with white gaps either side. */
.amc-card .amc-card__media {
	display: block;
	width: 100%;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	background: var(--amc-subtle);
}

.amc-card .amc-card__media img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	object-position: center top;
}

.amc-card__placeholder {
	display: block;
	aspect-ratio: 4 / 3;
	background: linear-gradient(135deg, var(--amc-subtle), rgba(0, 0, 0, 0.04));
}

/* The body has to grow so `margin-top:auto` on the actions can pin the buttons
   to the bottom of the card. Without the two-class selector this lost to the
   theme and every card ended up with a block of dead space under its buttons. */
.amc-card > .amc-card__body {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	padding: 1rem 1.1rem 1.25rem;
}

.amc-card__title {
	font-size: 1rem;
	margin: 0 0 0.35rem;
	line-height: 1.35;
}

.amc-card__title a {
	color: var(--amc-heading);
	text-decoration: none;
}

.amc-card__title a:hover,
.amc-card__title a:focus {
	color: var(--amc-accent);
}

.amc-card__meta {
	margin: 0 0 0.75rem;
	font-size: 0.8125rem;
	line-height: 1.5;
	opacity: 0.85;
}

/* Card buttons — same shape and colours as the homepage doctor cards. */
.amc-card .amc-card__actions {
	display: flex;
	flex-direction: column;
	gap: 7px;
	margin-top: auto;
	padding-top: 12px;
}

/* "View Details" — the link through to the full profile. */
.amc-card__more {
	display: block;
	text-align: center;
	font-size: 12.5px;
	font-weight: 600;
	padding-top: 2px;
	color: var(--amc-accent);
	text-decoration: none;
}

.amc-card__more::after {
	content: " →";
}

.amc-card__more:hover,
.amc-card__more:focus {
	color: var(--amc-accent-dark);
	text-decoration: underline;
}

.amc-cbtn {
	display: block;
	width: 100%;
	text-align: center;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.25;
	padding: 10px 8px;
	border-radius: 6px;
	text-decoration: none;
	border: 1px solid transparent;
}

.amc-cbtn--book {
	background: #12A89D;
	color: #fff;
}

.amc-cbtn--book:hover,
.amc-cbtn--book:focus {
	background: #0F766E;
	color: #fff;
}

.amc-cbtn--wa {
	background: #fff;
	color: #128C7E;
	border-color: #25D366;
}

.amc-cbtn--wa:hover,
.amc-cbtn--wa:focus {
	background: #25D366;
	color: #fff;
}

/* --------------------------------------------------------------- link card */

.amc-linkcard {
	display: flex;
	align-items: center;
	gap: 1rem;
	padding: 1rem;
	border: 1px solid var(--amc-border);
	border-radius: var(--amc-radius);
	text-decoration: none;
	color: inherit;
	transition: border-color 0.15s ease;
}

.amc-linkcard:hover {
	border-color: var(--amc-accent);
}

.amc-linkcard__media img {
	width: 64px;
	height: 64px;
	object-fit: cover;
	border-radius: 8px;
	display: block;
}

.amc-linkcard__body strong {
	display: block;
	color: var(--amc-heading);
}

.amc-linkcard__body span {
	display: block;
	font-size: 0.8125rem;
	opacity: 0.8;
	margin-top: 0.15rem;
}

/* ------------------------------------------------------------------- aside */

.amc-aside-block {
	position: sticky;
	top: 100px;
	padding: 1.25rem;
	background: var(--amc-subtle);
	border-radius: var(--amc-radius);
}

.amc-minilist {
	list-style: none;
	margin: 0 0 1rem;
	padding: 0;
}

.amc-minilist li + li {
	margin-top: 0.75rem;
	padding-top: 0.75rem;
	border-top: 1px solid var(--amc-border);
}

.amc-minilist a {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	text-decoration: none;
	color: inherit;
}

.amc-minilist img {
	width: 48px;
	height: 48px;
	object-fit: cover;
	border-radius: 50%;
	flex: 0 0 auto;
}

.amc-minilist strong {
	display: block;
	font-size: 0.875rem;
	color: var(--amc-heading);
	line-height: 1.3;
}

.amc-minilist em {
	display: block;
	font-style: normal;
	font-size: 0.75rem;
	opacity: 0.8;
	margin-top: 0.1rem;
}

.amc-minilist a:hover strong {
	color: var(--amc-accent);
}

.amc-aside-link {
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--amc-accent);
	text-decoration: none;
}

/* --------------------------------------------------------------------- CTA */

.amc-cta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 1.5rem;
	margin: 3rem 0 2rem;
	padding: 2rem;
	border-radius: var(--amc-radius);
	background: var(--amc-subtle);
	border: 1px solid var(--amc-border);
}

.amc-cta__text {
	flex: 1 1 320px;
}

.amc-cta__text h2 {
	margin: 0 0 0.4rem;
	font-size: 1.25rem;
}

.amc-cta__text p {
	margin: 0;
	font-size: 0.9375rem;
	line-height: 1.6;
}

.amc-cta__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
}

/* ------------------------------------------------------- notices & archive */

.amc-disclaimer {
	margin: 2rem 0 0;
	padding-top: 1.25rem;
	border-top: 1px solid var(--amc-border);
	font-size: 0.8125rem;
	line-height: 1.65;
	opacity: 0.75;
}

.amc-notice {
	padding: 0.75rem 1rem;
	border-left: 3px solid var(--amc-accent);
	background: var(--amc-subtle);
	border-radius: 0 var(--amc-radius) var(--amc-radius) 0;
	font-size: 0.875rem;
	margin-bottom: 1.5rem;
}

.amc-empty {
	padding: 3rem 1rem;
	text-align: center;
	background: var(--amc-subtle);
	border-radius: var(--amc-radius);
}

.amc-archive__head {
	max-width: 720px;
	margin-bottom: 2rem;
}

.amc-archive__head h1 {
	margin: 0 0 0.6rem;
	font-size: clamp(1.75rem, 3.2vw, 2.375rem);
}

.amc-archive__head p {
	margin: 0;
	line-height: 1.7;
}

.amc-address {
	font-style: normal;
	line-height: 1.7;
}

/* ------------------------------------------------------------------- story */

.amc-story {
	max-width: 760px;
	margin: 0 auto;
}

.amc-story__quote {
	margin: 0 0 1.5rem;
	padding: 2rem;
	border: 0;
	border-left: 4px solid var(--amc-accent);
	background: var(--amc-subtle);
	border-radius: 0 var(--amc-radius) var(--amc-radius) 0;
	font-size: 1.0625rem;
	line-height: 1.8;
}

.amc-story__meta {
	display: flex;
	align-items: center;
	gap: 1rem;
}

.amc-story__avatar img {
	width: 56px;
	height: 56px;
	border-radius: 50%;
	object-fit: cover;
	display: block;
}

.amc-story__meta strong {
	display: block;
	color: var(--amc-heading);
}

.amc-story__meta em {
	display: block;
	font-style: normal;
	font-size: 0.875rem;
	opacity: 0.8;
}

/* -------------------------------------------------------------- responsive */

@media (max-width: 921px) {
	.amc-body {
		grid-template-columns: minmax(0, 1fr);
		gap: 2rem;
	}

	.amc-aside-block {
		position: static;
	}
}

@media (max-width: 600px) {
	.amc-wrap {
		padding: 1.5rem 1rem 3rem;
	}

	.amc-hero {
		grid-template-columns: minmax(0, 1fr);
		gap: 1.25rem;
	}

	.amc-hero__media {
		max-width: 220px;
	}

	.amc-cta {
		padding: 1.5rem;
	}

	.amc-btn {
		flex: 1 1 100%;
	}
}
