/*
 * What theme.json cannot express: the header bar, shadows and glows, and the
 * block styles registered in functions.php. Pages carry no title in the page
 * template (they are full-width sections, as they were in Divi), so the first
 * section of a page sits directly under the header.
 */

:root {
	--laotai-shadow-button: 0 12px 20px -8px rgba(114, 1, 0, 0.75);
	--laotai-shadow-card: 0 18px 40px -18px rgba(10, 10, 10, 0.35);
	--laotai-wave-height: clamp(40px, 7vw, 110px);
}

/* ---- header ---------------------------------------------------------------- */

/*
 * The bar stays put while the page scrolls, as the Divi header did. position:
 * sticky is on the template part wrapper, not on the <header> inside it: a
 * sticky element only travels within its own parent, and that parent is just
 * as tall as the header itself.
 */
.laotai-header-wrap {
	position: sticky;
	top: 0;
	z-index: 100;
}

.admin-bar .laotai-header-wrap {
	top: var(--wp-admin--admin-bar--height, 0);
}

.laotai-header {
	background: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--white);
}

.laotai-header__inner {
	max-width: var(--wp--style--global--wide-size);
	margin-inline: auto;
	padding: 0.5rem var(--wp--preset--spacing--40);
	gap: 0.25rem 2rem;
}

.laotai-topbar {
	gap: 0.25rem 1rem;
	font-size: var(--wp--preset--font-size--small);
	font-weight: 700;
}

.laotai-header a {
	color: inherit;
}

.laotai-topbar__phone a + a {
	margin-left: 0.25rem;
}

.laotai-topbar__phone::before,
.laotai-topbar__email::before {
	content: "";
	display: inline-block;
	width: 0.9em;
	height: 0.9em;
	margin-right: 0.35em;
	vertical-align: -0.1em;
	background: currentColor;
	-webkit-mask: var(--laotai-icon) center / contain no-repeat;
	mask: var(--laotai-icon) center / contain no-repeat;
}

.laotai-topbar__phone {
	--laotai-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6.6 10.8a15.1 15.1 0 0 0 6.6 6.6l2.2-2.2a1 1 0 0 1 1-.25 11.4 11.4 0 0 0 3.6.57 1 1 0 0 1 1 1V20a1 1 0 0 1-1 1A17 17 0 0 1 3 4a1 1 0 0 1 1-1h3.5a1 1 0 0 1 1 1c0 1.25.2 2.45.57 3.57a1 1 0 0 1-.25 1z'/%3E%3C/svg%3E");
}

.laotai-topbar__email {
	--laotai-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M2 5h20v14H2zm2 2v.5l8 5 8-5V7zm0 2.85V17h16V9.85l-8 5z'/%3E%3C/svg%3E");
}

.laotai-nav a {
	text-decoration: underline;
	text-underline-offset: 0.2em;
}

.laotai-nav .wp-block-navigation__responsive-container.is-menu-open {
	background: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--white);
}

.laotai-social.wp-block-social-links .wp-social-link {
	color: inherit;
}

/* ---- footer ---------------------------------------------------------------- */

.laotai-footer {
	background: var(--wp--preset--color--footer);
	padding: 1rem max(var(--wp--preset--spacing--40), calc((100% - var(--wp--style--global--wide-size)) / 2));
	color: var(--wp--preset--color--accent);
}

/* ---- main ------------------------------------------------------------------ */

.laotai-main {
	margin-block: 0;
	padding-inline: 0;
}

.laotai-main > .wp-block-post-content > .alignfull:first-child {
	margin-top: 0;
}

/* ---- headings and text ----------------------------------------------------- */

:where(h1, h2, h3, h4) {
	text-shadow: 0 0.08em 0.35em rgba(10, 10, 10, 0.3);
}

.is-style-glow {
	color: var(--wp--preset--color--white);
	text-shadow: 0 0 0.35em rgba(255, 255, 255, 0.55), 0 0.08em 0.4em rgba(0, 0, 0, 0.5);
}

/* The giant pale "MUAYTHAI" behind the first section of the home page. */
.wp-block-heading.is-style-watermark {
	font-size: clamp(4rem, 17vw, 15rem);
	line-height: 0.9;
	letter-spacing: 0.08em;
	color: var(--wp--preset--color--white);
	text-shadow: 0 0 60px rgba(10, 10, 10, 0.12);
	overflow-wrap: anywhere;
}

/* Small spaced label above a heading, with the orange rule under it. */
p.is-style-eyebrow {
	font-family: var(--wp--preset--font-family--oswald);
	font-size: 0.75rem;
	font-style: italic;
	text-transform: uppercase;
	letter-spacing: 0.4em;
	margin-bottom: 0.25rem;
}

p.is-style-eyebrow::after {
	content: "";
	display: block;
	width: 4.5rem;
	height: 2px;
	margin-top: 0.6rem;
	background: var(--wp--preset--color--accent);
}

p.is-style-eyebrow.has-text-align-center::after {
	margin-inline: auto;
}

p.is-style-eyebrow.has-text-align-right::after {
	margin-left: auto;
}

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

.wp-element-button,
.wp-block-button__link {
	box-shadow: var(--laotai-shadow-button);
	transition: background-color 0.2s ease, transform 0.2s ease;
}

.wp-block-button__link::after {
	content: " →";
}

.wp-block-button__link:hover {
	transform: translateY(-1px);
}

.wp-block-button.is-style-underline .wp-block-button__link {
	background: transparent;
	color: inherit;
	box-shadow: none;
	border-radius: 0;
	padding-inline: 0.5em;
	border-bottom: 2px solid var(--wp--preset--color--accent);
}

.wp-block-button.is-style-light .wp-block-button__link {
	background: var(--wp--preset--color--white);
	color: var(--wp--preset--color--accent);
	box-shadow: var(--laotai-shadow-card);
}

/* ---- sections -------------------------------------------------------------- */

/* Also used as a plain class on columns, which have no block styles of their own. */
.wp-block-group.is-style-card,
.wp-block-column.is-style-card {
	background: var(--wp--preset--color--white);
	color: var(--wp--preset--color--ink);
	box-shadow: var(--laotai-shadow-card);
	padding: var(--wp--preset--spacing--40);
}

/*
 * Curved lower edge, as the Divi section dividers. The curve is filled with
 * --laotai-wave-color (the background of the next section, white by default),
 * so it can be matched per block with a custom CSS variable if needed.
 */
.is-style-wave-bottom {
	position: relative;
	padding-bottom: calc(var(--laotai-wave-height) + var(--wp--preset--spacing--40)) !important;
}

.is-style-wave-bottom::after {
	content: "";
	position: absolute;
	z-index: 1;
	left: 0;
	right: 0;
	bottom: -1px;
	height: var(--laotai-wave-height);
	background: var(--laotai-wave-color, var(--wp--preset--color--white));
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 120' preserveAspectRatio='none'%3E%3Cpath d='M0 120V96C360 150 1000 60 1440 0v120z'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 120' preserveAspectRatio='none'%3E%3Cpath d='M0 120V96C360 150 1000 60 1440 0v120z'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
	pointer-events: none;
}

/* ---- images ---------------------------------------------------------------- */

.wp-block-image.is-style-corner-top-left img {
	border-top-left-radius: clamp(40px, 6vw, 90px);
	box-shadow: var(--laotai-shadow-card);
}

.wp-block-image.is-style-corner-bottom-right img {
	border-bottom-right-radius: clamp(40px, 6vw, 90px);
	box-shadow: var(--laotai-shadow-card);
}

/* ---- embeds ---------------------------------------------------------------- */

.laotai-map iframe {
	display: block;
	width: 100%;
	min-height: 420px;
	border: 0;
}

/* ---- page helpers (custom classes set on blocks) ----------------------------- */

/* The curve below a section takes the colour of the section that follows. */
.laotai-wave-to-primary {
	--laotai-wave-color: var(--wp--preset--color--primary);
}

.laotai-wave-to-navy {
	--laotai-wave-color: var(--wp--preset--color--navy);
}

.laotai-wave-to-mist {
	--laotai-wave-color: var(--wp--preset--color--mist);
}

/* Round badge with an icon, above the feature columns. Put on an empty paragraph. */
.laotai-icon {
	width: 56px;
	height: 56px;
	margin-inline: auto !important;
	border-radius: 50%;
	background: var(--wp--preset--color--primary);
	position: relative;
}

.laotai-icon::after {
	content: "";
	position: absolute;
	inset: 16px;
	background: var(--wp--preset--color--white);
	-webkit-mask: var(--laotai-icon) center / contain no-repeat;
	mask: var(--laotai-icon) center / contain no-repeat;
}

.laotai-icon--user {
	--laotai-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='7' r='4.5'/%3E%3Cpath d='M3 22c0-5 4-8 9-8s9 3 9 8z'/%3E%3C/svg%3E");
}

.laotai-icon--users {
	--laotai-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='8.5' cy='8' r='3.5'/%3E%3Ccircle cx='17' cy='9' r='3'/%3E%3Cpath d='M1 21c0-4 3.3-6.5 7.5-6.5S16 17 16 21zm15.5 0c0-2.2-.7-4-2-5.3.8-.3 1.6-.5 2.5-.5 3.5 0 6 2 6 5.8z'/%3E%3C/svg%3E");
}

.laotai-icon--phone {
	--laotai-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6.6 10.8a15.1 15.1 0 0 0 6.6 6.6l2.2-2.2a1 1 0 0 1 1-.25 11.4 11.4 0 0 0 3.6.57 1 1 0 0 1 1 1V20a1 1 0 0 1-1 1A17 17 0 0 1 3 4a1 1 0 0 1 1-1h3.5a1 1 0 0 1 1 1c0 1.25.2 2.45.57 3.57a1 1 0 0 1-.25 1z'/%3E%3C/svg%3E");
}

/* The pale boxer next to "там, де закінчується дія...", decorative only. */
.laotai-faded img {
	opacity: 0.35;
}

@media (max-width: 781px) {
	.laotai-faded {
		display: none;
	}

	/*
	 * Fingers, not pointers. Every link in the top bar was 16px tall, so the
	 * phone number — the one thing a visitor on a phone actually taps — had to
	 * be aimed at. The padding is vertical only, so nothing shifts sideways,
	 * and the bar's own padding is trimmed to keep the sticky header from
	 * eating the screen in return.
	 */
	.laotai-header__inner {
		padding-block: 0.15rem;
	}

	/*
	 * The negative margin is the point: the padding grows the area a finger can
	 * hit to 42px, the margin takes the same amount back out of the layout, so
	 * the bar keeps its height (96px at 414px wide, against 93px when the links
	 * were 16px tall and had to be aimed at). Without it the sticky header grew
	 * to 120px and ate a sixth of the screen on every page.
	 */
	.laotai-topbar__phone a,
	.laotai-topbar__email a {
		display: inline-block;
		padding-block: 0.6rem;
		margin-block: -0.45rem;
	}

	.laotai-social .wp-block-social-link-anchor {
		padding: 0.5rem;
		margin-block: -0.4rem;
	}

	.laotai-nav .wp-block-navigation-item__content {
		padding-block: 0.5rem;
	}
}

/* Round markers, as the Divi blurb icons in "Наші направлення". */
.laotai-list-dots {
	list-style: none;
	padding-left: 0;
}

.laotai-list-dots li {
	position: relative;
	padding-left: 2rem;
	margin-block: 0.75rem;
	font-weight: 700;
}

.laotai-list-dots li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.2em;
	width: 0.9em;
	height: 0.9em;
	border: 2px solid currentColor;
	border-radius: 50%;
	box-shadow: inset 0 0 0 3px var(--wp--preset--color--primary), inset 0 0 0 10px currentColor;
}

/* Hero: three joined panels, as the Divi header card. */
.laotai-hero__columns {
	box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.6);
}

.laotai-hero__photo,
.laotai-hero__photo img {
	height: 100%;
	margin: 0;
}

.laotai-hero__panel {
	display: flex;
	flex-direction: column;
	justify-content: center;
}

/* Feature columns: the middle card sits lower, as in the original. */
@media (min-width: 782px) {
	.laotai-features > .is-style-card {
		margin-top: var(--wp--preset--spacing--40);
	}
}

.laotai-feature h5,
.laotai-feature h6 {
	margin-block: 0.4rem;
}

/* Cards on the red "Тренування діти" section. */
.laotai-cards > .is-style-card h5 {
	margin-block: 0.6rem;
}

/* Rows of "Що ви отримуєте": every second row slightly darker. */
.laotai-rows > .wp-block-columns {
	margin: 0;
	padding: var(--wp--preset--spacing--30) var(--wp--preset--spacing--40);
}

.laotai-rows > .wp-block-columns:nth-child(even) {
	background: rgba(0, 0, 0, 0.12);
}

.laotai-check::before {
	content: "✓";
	display: block;
	font-size: 1.75rem;
	line-height: 1;
	margin-bottom: 0.5rem;
}

.laotai-program {
	margin-bottom: var(--wp--preset--spacing--40);
}
