/*
 * Promotion block. Loaded only on pages that use it. Mobile first; desktop from 900px.
 * Source: the builder's ".promo" CSS and "BESTMATES promotion" section.
 *
 * Colours come from variables so each look can skin the card:
 *   --promo-bg --promo-ink --promo-tag-bg --promo-tag-ink --promo-tick --promo-btn --promo-btn-ink
 * BestMates is different: it keeps its OWN brand (green, lime, logo) in every
 * look, so its hex values are fixed here on purpose. They're BestMates' colours,
 * not the clinic's.
 */

.promotion {
	--promo-bg: var(--surface);
	--promo-ink: var(--ink);
	--promo-tag-bg: color-mix(in srgb, var(--brand) 10%, var(--surface));
	--promo-tag-ink: var(--brand);
	--promo-tick: var(--accent);
	--promo-btn: var(--primary);
	--promo-btn-ink: var(--on-primary);
	padding: 40px 0;
}

/* Two promotions in a row: one gap between them, not two. */
.promotion + .promotion { padding-top: 0; }

.promotion__card {
	position: relative;
	display: grid;
	overflow: hidden;
	border-radius: var(--card-r);
	background: var(--promo-bg);
	color: var(--promo-ink);
}

.promotion__media { min-height: 190px; background: var(--tint); }
.promotion__img { width: 100%; height: 100%; object-fit: cover; }

.promotion__copy { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding: 24px 22px 28px; }

.promotion__tag {
	padding: 5px 12px;
	border-radius: var(--btn-r);
	background: var(--promo-tag-bg);
	color: var(--promo-tag-ink);
	font-size: 13px;
	font-weight: 700;
}

.promotion__title { margin: 0; font-size: 1.8rem; line-height: 1.1; }
.promotion__text { max-width: 46ch; margin: 0; opacity: 0.9; }

.promotion__points { display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; font-size: 15px; font-weight: 500; }
.promotion__points li { display: flex; align-items: flex-start; gap: 9px; }
.promotion__points .ico { margin-top: 2px; color: var(--promo-tick); stroke-width: 2.4; }

.promotion__buttons { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 4px; }
.promotion__button { margin-top: 4px; background: var(--promo-btn); color: var(--promo-btn-ink); }
.promotion__buttons .promotion__button { margin-top: 0; }
.promotion__small { font-size: 12.5px; opacity: 0.75; }
.promotion__small p { margin: 0 0 6px; }
.promotion__small p:last-child { margin-bottom: 0; }
.promotion__small a { color: inherit; text-decoration: underline; }

/* On its own, just below the card. */
.promotion__small--below { margin-top: 14px; padding-inline: 4px; color: var(--muted); opacity: 1; }

/* ---------- Look C: an outlined card, the image on the right ---------- */

.look-c .promotion__card { border: 1px solid var(--line); }

/* ---------- Look F: a warm, pastel card ---------- */

.look-f .promotion {
	--promo-bg: color-mix(in srgb, var(--accent-2) 30%, var(--surface));
	--promo-tag-bg: var(--brand);
	--promo-tag-ink: var(--on-brand);
	--promo-tick: var(--brand);
	--promo-btn: var(--brand);
	--promo-btn-ink: var(--on-brand);
}

/* ---------- The clinic gradient (block field "Use the clinic gradient", your own offer only) ---------- */

.promotion.promotion--grad {
	--promo-bg: var(--grad);
	--promo-ink: var(--grad-ink);
	--promo-tag-bg: color-mix(in srgb, var(--grad-ink) 18%, transparent);
	--promo-tag-ink: var(--grad-ink);
	--promo-tick: var(--grad-ink);
	--promo-btn: var(--grad-btn);
	--promo-btn-ink: var(--grad-on-btn);
}

.promotion--grad .promotion__text { opacity: 1; }

/* ---------- Card border and shadow (block fields Card border and Card shadow) ---------- */
/* No class = the look's own. These beat the look's and BestMates' border by being more specific. */

.promotion--bdr-none   { --promo-border: 0; }
.promotion--bdr-line   { --promo-border: 1px solid var(--line); }
.promotion--bdr-brand  { --promo-border: 4px solid var(--brand); }
.promotion--bdr-accent { --promo-border: 4px solid var(--accent); }
.promotion--bdr-ink    { --promo-border: 4px solid var(--ink); }

.promotion--shd-soft      { --promo-shadow: 0 12px 28px -14px color-mix(in srgb, var(--ink) 55%, transparent); }
.promotion--shd-lift      { --promo-shadow: 0 34px 64px -26px color-mix(in srgb, var(--ink) 70%, transparent); }
.promotion--shd-hard      { --promo-shadow: 10px 10px 0 var(--ink); }
.promotion--shd-brand-3d  { --promo-shadow: 10px 10px 0 var(--brand); }
.promotion--shd-accent-3d { --promo-shadow: 10px 10px 0 var(--accent); }
.promotion--shd-glow      { --promo-shadow: 0 0 0 6px color-mix(in srgb, var(--brand) 14%, transparent), 0 26px 64px -22px color-mix(in srgb, var(--brand) 60%, transparent); }

.promotion:is([class*="promotion--bdr-"]) .promotion__card { border: var(--promo-border); }
.promotion:is([class*="promotion--shd-"]) .promotion__card { box-shadow: var(--promo-shadow); }

/* ---------- BestMates: its own brand in every look (kept last so it wins) ---------- */

/* ".promotion.promotion--bestmates" is as specific as ".look-f .promotion" and comes later, so BestMates always wins. */
.promotion.promotion--bestmates {
	--bm-green: #145a1e;
	--bm-lime: #d5dc50;
	--promo-bg: var(--bm-green);
	--promo-ink: #fff;
	--promo-tag-bg: var(--bm-lime);
	--promo-tag-ink: var(--bm-green);
	--promo-tick: var(--bm-lime);
	--promo-btn: var(--bm-lime);
	--promo-btn-ink: var(--bm-green);
}

.promotion--bestmates .promotion__card { border: 1px solid var(--bm-green); }
.promotion--bestmates .promotion__text { opacity: 1; color: rgb(255 255 255 / 0.92); }
.promotion--bestmates .promotion__points { color: rgb(255 255 255 / 0.92); }
.promotion--bestmates .promotion__small { color: rgb(255 255 255 / 0.78); opacity: 1; }
.promotion--bestmates .promotion__button { border-color: var(--bm-lime); }
.promotion--bestmates .promotion__button:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
body.btn-shadow-hard .promotion--bestmates .button { border-color: #0b2e10; box-shadow: 3px 3px 0 #0b2e10; }

/* The photo is a transparent cut-out, so it sits straight on BestMates green. */
.promotion__media--bestmates { position: relative; min-height: 220px; overflow: hidden; background: var(--bm-green); }
/* On a phone the panel takes the photo's own shape, so it shows at full width, not squeezed into a short strip. */
@media (max-width: 899px) {
	.promotion__media--bestmates { aspect-ratio: 1411 / 1115; min-height: 0; }
}
/* The picture is centred, with even space round it, so it never touches the card's edges. */
.promotion__media--bestmates { --bm-pad: 20px; }
.promotion__media--bestmates img { position: absolute; inset: var(--bm-pad); width: calc(100% - 2 * var(--bm-pad)); height: calc(100% - 2 * var(--bm-pad)); object-fit: contain; object-position: center; }

.promotion--bestmates .promotion__title { line-height: 1; }
.promotion__logo { display: block; width: min(320px, 80%); height: auto; }

/* ---------- Desktop ---------- */

@media (min-width: 900px) {
	.promotion { padding: 56px 0; }

	.promotion__card { grid-template-columns: 1fr 1.1fr; min-height: 360px; }
	.promotion__card--text { grid-template-columns: 1fr; min-height: 0; }

	.promotion__copy { justify-content: center; padding: 40px 44px; }
	.promotion__media--bestmates { --bm-pad: 36px; }
	.promotion__title { font-size: 2.3rem; }

	/* Look C puts the image on the right; look F (and BestMates) keep it on the left. */
	.look-c .promotion:not(.promotion--bestmates) .promotion__media { order: 2; }
}
