/*
 * Popa Toiture: long-form text (articles, service pages, simple pages).
 */

.wm-prose {
	box-sizing: border-box;
	max-width: calc(var(--wm-prose) + 2 * var(--wm-gutter));
	margin-inline: auto;
	padding: 80px var(--wm-gutter) 40px;
	font-size: 18px;
	line-height: 1.75;
}

.wm-prose > * {
	margin-block: 0;
}

.wm-prose > * + * {
	margin-top: 28px;
}

.wm-prose > p:first-child,
.wm-prose > .wm-lead {
	font-size: 22px;
	line-height: 1.6;
	font-weight: 500;
	max-width: none;
}

.wm-prose h2 {
	margin-top: 52px;
	font: 800 clamp(34px, 3.6vw, 46px) / 1 var(--wm-font-head);
	text-transform: uppercase;
	scroll-margin-top: calc(var(--wm-admin-bar) + 110px);
}

.wm-prose h3 {
	margin-top: 44px;
	font: 700 clamp(28px, 2.8vw, 34px) / 1 var(--wm-font-head);
	text-transform: uppercase;
}

.wm-prose h2 + *,
.wm-prose h3 + * {
	margin-top: 20px;
}

.wm-prose strong {
	font-weight: 700;
}

/* Lists: square bullets, numbered squares (markers outside the text, so bold words stay inline). */
.wm-prose ul:not([class*="wm-"]),
.wm-prose ol:not([class*="wm-"]) {
	padding: 0;
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.wm-prose ul:not([class*="wm-"]) > li {
	position: relative;
	padding-left: 24px;
}

.wm-prose ul:not([class*="wm-"]) > li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.62em;
	width: 10px;
	height: 10px;
	background: var(--wm-ink);
}

.wm-prose ol:not([class*="wm-"]) {
	gap: 14px;
	counter-reset: wm-ol;
}

.wm-prose ol:not([class*="wm-"]) > li {
	position: relative;
	min-height: 36px;
	padding-left: 52px;
	counter-increment: wm-ol;
}

.wm-prose ol:not([class*="wm-"]) > li::before {
	content: counter(wm-ol);
	position: absolute;
	left: 0;
	top: -2px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	background: var(--wm-ink);
	color: var(--wm-yellow);
	font: 800 20px / 1 var(--wm-font-head);
}

/* Wide figures: images, galleries and videos go past the text column. */
.wm-prose > .alignwide,
.wm-prose > figure.wp-block-image,
.wm-prose > .wp-block-gallery,
.wm-prose > .wm-video--youtube {
	width: min(1000px, 100vw - 2 * var(--wm-gutter));
	max-width: none;
	margin-left: calc(50% - min(500px, 50vw - var(--wm-gutter)));
	margin-top: 44px;
	margin-bottom: 16px;
}

.wm-prose > figure.wp-block-image img {
	display: block;
	width: 100%;
	aspect-ratio: 16 / 9;
	object-fit: cover;
}

.wm-prose figure:not(.wm-testimonial__inner) > figcaption,
.wm-caption {
	display: flex;
	align-items: baseline;
	gap: 12px;
	margin: 14px 0 0;
	font-size: 15px;
	line-height: 1.5;
	text-align: left;
}

.wm-prose figure:not(.wm-testimonial__inner) > figcaption::before,
.wm-caption::before {
	content: "";
	flex: none;
	width: 10px;
	height: 10px;
	background: var(--wm-yellow);
	border: 2px solid var(--wm-ink);
}

/* Space under the article, before "Read next" or the call to action. */
.wm-article {
	padding-bottom: 96px;
}

/* Article footer: tags and share */
.wm-article-footer {
	box-sizing: border-box;
	max-width: calc(var(--wm-prose) + 2 * var(--wm-gutter));
	margin: 32px auto 0;
	padding: 28px var(--wm-gutter) 0;
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: center;
	gap: 20px;
	background: linear-gradient(var(--wm-ink), var(--wm-ink)) var(--wm-gutter) 0 / calc(100% - 2 * var(--wm-gutter)) 2px no-repeat;
}

.wm-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.wm-tags a {
	padding: 6px 10px;
	border: var(--wm-border);
	font: 700 15px / 1 var(--wm-font-head);
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.wm-tags a:hover {
	background: var(--wm-yellow);
}

.wm-tags .wp-block-post-terms__separator {
	display: none;
}

.wm-share {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	font: 700 16px / 1 var(--wm-font-head);
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.wm-share__title {
	margin-right: 6px;
}

.wm-share__link {
	padding: 12px 14px;
	background: var(--wm-ink);
	color: var(--wm-white);
	border: 0;
	font: inherit;
	letter-spacing: inherit;
	text-transform: inherit;
	cursor: pointer;
}

.wm-share__link:hover,
.wm-share__link:focus-visible {
	background: var(--wm-yellow);
	color: var(--wm-ink);
}

.wm-share__link[hidden] {
	display: none;
}

/* Simple pages and service pages */
.wm-page-prose {
	padding-bottom: 120px;
}

.wm-service-prose {
	padding-top: 72px;
	padding-bottom: 0;
}

/* Video */
.wm-video {
	margin: 0;
}

.wm-video__frame {
	position: relative;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: var(--wm-ink);
}

.wm-video--tiktok {
	display: flex;
	flex-direction: column;
	align-items: center;
}

.wm-video--tiktok .wm-video__frame {
	width: 100%;
	max-width: 340px;
	aspect-ratio: 9 / 16;
	border: var(--wm-border);
	box-sizing: border-box;
}

.wm-video--tiktok .wm-caption {
	max-width: 340px;
	align-self: center;
}

.wm-video__play {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	padding: 0;
	border: 0;
	background: var(--wm-ink);
	color: var(--wm-white);
	cursor: pointer;
}

.wm-video__cover {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	opacity: 0.6;
}

.wm-video__provider {
	position: absolute;
	top: 20px;
	left: 20px;
	padding: 6px 10px;
	background: var(--wm-white);
	color: var(--wm-ink);
	font: 700 15px / 1 var(--wm-font-head);
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.wm-video__icon {
	position: absolute;
	left: 50%;
	top: 50%;
	width: 96px;
	height: 96px;
	margin: -48px 0 0 -48px;
	background: var(--wm-yellow);
	transition: transform 0.2s;
}

.wm-video--tiktok .wm-video__icon {
	width: 80px;
	height: 80px;
	margin: -40px 0 0 -40px;
}

.wm-video__icon::after {
	content: "";
	position: absolute;
	left: 50%;
	top: 50%;
	margin: -17px 0 0 -11px;
	border-style: solid;
	border-width: 17px 0 17px 30px;
	border-color: transparent transparent transparent var(--wm-ink);
}

.wm-video__play:hover .wm-video__icon,
.wm-video__play:focus-visible .wm-video__icon {
	transform: scale(1.08);
}

.wm-video__notice {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	padding: 14px 20px;
	background: rgb(14 14 14 / 0.85);
	font: 400 14px / 1.4 var(--wm-font-body);
	text-align: left;
}

.wm-video__iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}
