/**
 * WittySprout — страници „история“ (от 0.10.0).
 *
 * Зарежда се само там, където се ползва: на шаблона „Свободно оформление
 * (цяла ширина)“ или когато съдържанието има стил is-style-ws-* (виж
 * inc/story.php). Същият файл влиза и в редактора, затова:
 *   - всичко, което пипа подредбата (цяла ширина, решетка, позиции), е под
 *     .ws-canvas и важи само на сайта;
 *   - шрифтовете, цветовете и декорациите важат и в редактора, за да вижда
 *     Илияна горе-долу същото, което ще излезе.
 *
 * Цветовете са само от Brand Book-а („mini-brand-book-Witty_Sprout.jpg“):
 *   #1F4922 тъмнозелено · #369244 зелено (в бук-а грешно #446C7A, Илияна
 *   потвърди #369244) · #F5C242 жълто · #AA6F29 кафяво · #6B3F26 тъмнокафяво ·
 *   #FFF0E2 кремаво.
 * Иконите (листенце, луна, лъчи) са преоцветени в същите цветове. Четката зад
 * цитата е светлозелена (#E9EEDA) — по желание на Илияна, същият цвят като
 * лентата с бюлетина на началната страница.
 * Снимките и илюстрациите са съдържание и остават каквито са.
 */

/* =========================================================================
   1. Шрифтове и променливи
   ========================================================================= */

/* Playpen Sans 600 — заглавията от визуализацията. SIL OFL 1.1, локални файлове,
   за да не отива IP адресът на посетителя към Google.
   От 0.15.0 кирилицата е в отделен файл (20 KB) — браузърът го тегли само
   когато на страницата има кирилица, т.е. само на българската версия. */
@font-face {
	font-family: "Playpen Sans";
	font-style: normal;
	font-weight: 600;
	font-display: swap;
	src: url("../fonts/playpen-sans-600.woff2") format("woff2");
	unicode-range: U+0000-03FF, U+0500-10FFFF;
}

@font-face {
	font-family: "Playpen Sans";
	font-style: normal;
	font-weight: 600;
	font-display: swap;
	src: url("../fonts/playpen-sans-600-cyrillic.woff") format("woff");
	unicode-range: U+0400-04FF, U+2116;
}

/* Ръкописният шрифт на темата. На сайта е обявен и в inc/enqueue.php — тук е
   нужен заради редактора, където онзи ред не се зарежда.
   ylee няма кирилица — българските букви се изписват с Playpen Sans (0.15.0). */
@font-face {
	font-family: "ylee MHIM";
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url("../fonts/ylee-script.woff") format("woff");
	unicode-range: U+0000-03FF, U+0500-10FFFF;
}

@font-face {
	font-family: "ylee MHIM";
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url("../fonts/playpen-sans-600-cyrillic.woff") format("woff");
	unicode-range: U+0400-04FF, U+2116;
}

:root {
	/* Brand Book — нищо извън шестте цвята. */
	--ws-brand-green-dark: #1F4922;
	--ws-brand-green: #369244;
	--ws-brand-yellow: #F5C242;
	--ws-brand-cream: #FFF0E2;

	--ws-story-ink: var(--ws-brand-green-dark);    /* заглавия, пунктир, бутон */
	--ws-story-text: var(--ws-brand-green-dark);   /* основен текст */
	--ws-story-soft: var(--ws-brand-green);        /* надзаглавие */
	--ws-story-leaf: var(--ws-brand-green);        /* листенцата по пътеката */

	--ws-font-hand: "Playpen Sans", "Nunito", "Segoe UI", system-ui, sans-serif;
	--ws-story-pad: clamp(16px, 4vw, 32px);
	--ws-story-gap: clamp(3.5rem, 8vw, 7rem);

	/* Секциите „текстът обтича снимката“ (0.11.1): най-голяма ширина на
	   секцията, поле за пунктира от едната страна и разстояние между секциите. */
	--ws-story-measure: 1280px;
	--ws-story-zone: clamp(84px, 14vw, 340px);
	--ws-story-section-gap: clamp(3.5rem, 7vw, 7rem);
}

/* =========================================================================
   2. Шаблонът „Свободно оформление (цяла ширина)“
   Блоковете на първо ниво стоят в ширината на сайта (1180 px); „Пълна
   ширина“ (alignfull) излиза до ръба. Обикновен текст сам по себе си е в
   тясната колона за четене.
   ========================================================================= */

/* От 0.11.1 страницата ползва цялата ширина на екрана (до 1920 px) с поле
   отстрани, както на визуализациите — а не 1180 px в средата. Header-ът и
   футърът са в същата ширина (main.css, т. 11). */
.ws-canvas {
	--ws-shell: var(--ws-shell-wide, 1920px);
	--ws-story-pad: var(--ws-gutter-wide, clamp(16px, 4.5vw, 88px));

	overflow-x: clip;
}

.ws-canvas__content > *,
.ws-canvas :is(.is-style-ws-story-path, .is-style-ws-story-path > .wp-block-group__inner-container) > :not(.ws-story-path__svg, .wp-block-group__inner-container),
.ws-canvas :is(.is-style-ws-story-closing, .is-style-ws-story-closing > .wp-block-group__inner-container) > :not(.wp-block-image:last-child, .wp-block-group__inner-container) {
	max-width: var(--ws-shell, 1180px);
	margin-inline: auto;
	padding-inline: var(--ws-story-pad);
}

/* Класическите теми (без theme.json) получават от WordPress допълнителна
   обвивка .wp-block-group__inner-container във всяка група. Тук тя не бива да
   има собствена кутия — секциите трябва да се държат като преки деца на
   пътеката и на финала. Затова селекторите по-долу покриват и двата строежа. */
.ws-canvas :is(.is-style-ws-story-path, .is-style-ws-story-closing) > .wp-block-group__inner-container {
	display: contents;
}

.ws-canvas__content > :where(p, h2, h3, h4, ul, ol, blockquote) {
	max-width: var(--ws-shell-narrow, 760px);
}

.ws-canvas__content > .alignwide,
.ws-canvas :is(.is-style-ws-story-path, .is-style-ws-story-path > .wp-block-group__inner-container) > .alignwide {
	max-width: calc(var(--ws-shell, 1180px) + 160px);
}

.ws-canvas__content > .alignfull,
.ws-canvas :is(.is-style-ws-story-path, .is-style-ws-story-path > .wp-block-group__inner-container) > .alignfull {
	max-width: none;
	padding-inline: 0;
}

.ws-canvas__content > * {
	margin-block: 0;
}

.ws-canvas__content > * + * {
	margin-top: clamp(1rem, 2vw, 1.5rem);
}

.ws-canvas__content > :last-child:not(.alignfull) {
	margin-bottom: var(--ws-space, 4rem);
}

.ws-canvas figure {
	margin: 0;
}

.ws-canvas figure img {
	width: 100%;
	height: auto;
}

/* =========================================================================
   3. Типография на историята (важи и в редактора)
   ========================================================================= */

.is-style-ws-hand,
.is-style-ws-hand-leaf {
	font-family: var(--ws-font-hand);
	font-weight: 600;
	letter-spacing: -0.005em;
	line-height: 1.14;
	color: var(--ws-story-ink);
	text-wrap: balance;
}

h1.is-style-ws-hand,
h1.is-style-ws-hand-leaf {
	font-size: clamp(2.5rem, 5vw, 4.25rem);
	line-height: 1.06;
}

h2.is-style-ws-hand,
h2.is-style-ws-hand-leaf {
	font-size: clamp(1.7rem, 2.6vw, 2.25rem);
}

h3.is-style-ws-hand,
h3.is-style-ws-hand-leaf {
	font-size: clamp(1.3rem, 1.9vw, 1.6rem);
}

/* Листенцето след заглавието — иконата на Илияна. */
.is-style-ws-hand-leaf::after {
	content: "";
	display: inline-block;
	width: 0.56em;
	height: 0.64em;
	margin-left: 0.3em;
	vertical-align: 0;
	background: url("../img/story/icon-leaf.webp") center / contain no-repeat;
}

/* Надзаглавие: „OUR STORY“ */
p.is-style-ws-eyebrow {
	margin: 0 0 0.75rem;
	font-family: var(--ws-font-body, "Nunito Sans", sans-serif);
	font-size: 0.8rem;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: 0.34em;
	text-transform: uppercase;
	color: var(--ws-story-soft);
}

/* Текстът в секциите */
.is-style-ws-story-hero,
.is-style-ws-story-row,
.is-style-ws-story-section,
.is-style-ws-story-closing {
	color: var(--ws-story-text);
}

.is-style-ws-story-row p,
.is-style-ws-story-section p,
.is-style-ws-story-hero p,
.is-style-ws-story-closing p {
	margin: 0 0 0.8em;
	font-size: 1.02rem;
	line-height: 1.62;
	color: var(--ws-story-text);
}

.is-style-ws-story-hero p {
	font-size: clamp(1.02rem, 1.25vw, 1.12rem);
	max-width: 34em;
}

.is-style-ws-story-row p:last-child,
.is-style-ws-story-section p:last-child,
.is-style-ws-story-hero p:last-child,
.is-style-ws-story-closing p:last-child {
	margin-bottom: 0;
}

.is-style-ws-story-row strong,
.is-style-ws-story-section strong,
.is-style-ws-story-hero strong,
.is-style-ws-story-closing strong {
	font-weight: 700;
	color: var(--ws-story-ink);
}

.is-style-ws-story-row :is(h2, h3),
.is-style-ws-story-section :is(h2, h3),
.is-style-ws-story-closing :is(h2, h3) {
	margin: 0 0 0.6em;
}

.is-style-ws-story-hero h1 {
	margin: 0 0 0.45em;
}

/* =========================================================================
   4. Декорации (важат и в редактора)
   ========================================================================= */

/* --- Икона до заглавие (луната) ------------------------------------------ */
.wp-block-group.is-style-ws-icon-heading {
	display: flex;
	flex-wrap: nowrap;
	align-items: center;
	gap: 0.55rem;
	margin: 0 0 0.6em;
}

.is-style-ws-icon-heading > .wp-block-image {
	flex: 0 0 auto;
	width: clamp(50px, 4.8vw, 68px);
	margin: 0;
}

.is-style-ws-icon-heading > .wp-block-image img {
	width: 100%;
	height: auto;
}

.is-style-ws-icon-heading > :is(h1, h2, h3, h4) {
	margin: 0 !important;
}

/* --- Цитат с четка --------------------------------------------------------- */
p.is-style-ws-brush {
	position: relative;
	margin: 1.5em 0;
	padding: 1.15em 1.9em 1.25em;
	background: url("../img/story/brush-green.webp") center / 100% 100% no-repeat;
	font-family: var(--ws-font-hand);
	font-size: clamp(1.06rem, 1.45vw, 1.22rem);
	font-weight: 600;
	line-height: 1.4;
	text-align: center;
	text-wrap: balance;
	color: var(--ws-story-ink);
}

/* Жълтите лъчи от иконите на Илияна — в горния ляв ъгъл на цитата. */
p.is-style-ws-brush::before {
	content: "";
	position: absolute;
	left: -0.85em;
	top: -1.35em;
	width: 1.45em;
	height: 1.9em;
	background: url("../img/story/icon-spark.webp") center / contain no-repeat;
	pointer-events: none;
}

/* --- Ръкописна бележка ----------------------------------------------------- */
p.is-style-ws-note,
p.is-style-ws-note-margin {
	position: relative;
	max-width: 9.5em;
	margin: 0 auto 1.2rem;
	padding-bottom: 1.45em;
	font-family: "ylee MHIM", "Segoe Script", "Bradley Hand", cursive;
	font-size: clamp(1.45rem, 2.1vw, 1.8rem);
	font-weight: 400;
	line-height: 1.12;
	text-align: left;
	text-wrap: balance;
	color: var(--ws-story-ink);
	transform: rotate(-9deg);
	transform-origin: 50% 50%;
}

p.is-style-ws-note::after,
p.is-style-ws-note-margin::after {
	content: "";
	position: absolute;
	left: 42%;
	bottom: 0;
	width: 0.9em;
	height: 1em;
	background: url("../img/story/icon-leaf.webp") center / contain no-repeat;
	transform: rotate(10deg);
}

/* --- Бутон ----------------------------------------------------------------- */
.wp-block-button.is-style-ws-pill .wp-block-button__link {
	display: inline-flex;
	align-items: center;
	gap: 0.5em;
	padding: 0.95em 1.9em;
	border: 0;
	border-radius: 999px;
	background: var(--ws-story-ink);
	color: var(--ws-brand-cream);
	font-family: var(--ws-font-display, "Nunito", sans-serif);
	font-size: 1rem;
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none;
	box-shadow: 0 12px 24px -16px rgba(31, 73, 34, 0.7);
	transition: background 0.16s ease, transform 0.16s ease;
}

.wp-block-button.is-style-ws-pill .wp-block-button__link:hover,
.wp-block-button.is-style-ws-pill .wp-block-button__link:focus-visible {
	background: var(--ws-story-ink);
	color: var(--ws-brand-cream);
	transform: translateY(-1px);
	box-shadow: 0 16px 28px -16px rgba(31, 73, 34, 0.85);
}

.is-style-ws-story-closing .wp-block-buttons {
	margin-top: 1.6rem;
}

/* =========================================================================
   5. Подредба на сайта (само .ws-canvas)
   ========================================================================= */

/* --- Начало: текст вляво, снимка до десния ръб --------------------------- */
.ws-canvas .wp-block-columns.is-style-ws-story-hero {
	--ws-hero-side: max(var(--ws-story-pad), calc((100% - var(--ws-shell, 1180px)) / 2 + var(--ws-story-pad)));
	display: grid;
	grid-template-columns: var(--ws-hero-side) minmax(0, 35fr) minmax(0, 6fr) minmax(0, 59fr);
	align-items: center;
	gap: 0;
	margin: 0 0 clamp(2.5rem, 6vw, 5rem);
	padding: 0;
}

.ws-canvas .is-style-ws-story-hero > .wp-block-column {
	min-width: 0;
}

.ws-canvas .is-style-ws-story-hero > .wp-block-column:first-child {
	grid-column: 2 / 4;
	grid-row: 1;
	position: relative;
	z-index: 2;
	padding: clamp(1.5rem, 3vw, 2.5rem) clamp(1rem, 2vw, 2rem) clamp(1.5rem, 3vw, 2.5rem) 0;
}

.ws-canvas .is-style-ws-story-hero > .wp-block-column:last-child {
	grid-column: 3 / 5;
	grid-row: 1;
	position: relative;
	z-index: 1;
}

.ws-canvas .is-style-ws-story-hero > .wp-block-column:last-child img {
	display: block;
	width: 100%;
	height: auto;
}

/* --- Пунктирната пътека ---------------------------------------------------- */
.ws-canvas .wp-block-group.is-style-ws-story-path {
	position: relative;
}

.ws-canvas :is(.is-style-ws-story-path, .is-style-ws-story-path > .wp-block-group__inner-container) > :not(.ws-story-path__svg, .wp-block-group__inner-container) {
	position: relative;
	z-index: 1;
}

.ws-story-path__svg {
	position: absolute;
	top: 0;
	left: 0;
	z-index: 0;
	overflow: visible;
	pointer-events: none;
}

/* --- Секция: текст и снимка един до друг ---------------------------------- */
.ws-canvas .wp-block-columns.is-style-ws-story-row {
	gap: clamp(2.5rem, 6vw, 5.5rem);
	margin-top: 0;
	margin-bottom: var(--ws-story-gap);
}

.ws-canvas .is-style-ws-story-row > .wp-block-column {
	position: relative;
	min-width: 0;
}

.ws-canvas .is-style-ws-story-row .wp-block-image {
	margin: 0;
}

.ws-canvas .is-style-ws-story-row .wp-block-image img {
	display: block;
	width: 100%;
	height: auto;
	margin-inline: auto;
}

/* Дългият текст върви покрай снимката: колоната със снимката „залепва“ под
   header-а, докато се чете съответната секция. При кратък текст няма ефект. */
@media (min-width: 782px) {
	.ws-canvas .is-style-ws-story-row > .wp-block-column:has(> .wp-block-image) {
		position: sticky;
		top: calc(var(--ws-story-sticky, 104px));
		align-self: flex-start;
	}

	.admin-bar .ws-canvas .is-style-ws-story-row > .wp-block-column:has(> .wp-block-image) {
		top: calc(var(--ws-story-sticky, 104px) + 32px);
	}
}

/* Луната виси вляво от заглавието, в празното между снимката и текста —
   както във визуализацията. Така заглавието остава подравнено с текста. */
@media (min-width: 1024px) {
	.ws-canvas .is-style-ws-story-row .is-style-ws-icon-heading {
		margin-left: calc(-1 * (clamp(50px, 4.8vw, 68px) + 0.55rem));
	}
}

/* Бележката в полето — вляво от снимката, леко върху прозрачния ѝ ъгъл. */
@media (min-width: 1100px) {
	.ws-canvas .wp-block-column:has(> p.is-style-ws-note-margin) {
		padding-left: clamp(4rem, 7vw, 6.5rem);
	}

	.ws-canvas .is-style-ws-story-row p.is-style-ws-note-margin {
		position: absolute;
		left: clamp(-4.5rem, calc((var(--ws-shell, 1180px) - 100vw) / 2), 0rem);
		top: 2%;
		z-index: 2;
		width: 8.6em;
		max-width: none;
		margin: 0;
		font-size: clamp(1.4rem, 1.8vw, 1.7rem);
	}
}

/* --- Секция: снимката отстрани, текстът я обтича (от 0.11.0) --------------
   Заглавие, текст и снимка с подравняване „вляво“ или „вдясно“. Текстът
   минава покрай снимката и продължава под нея в цялата ширина — секцията е
   по-ниска от две равни колони, а редът е по-широк. Коя страна е снимката, се
   сменя от лентата на блока (Align).

   От 0.11.1 секциите се редуват — първата е долепена вляво, втората вдясно и
   т.н. — така заедно покриват страницата от край до край, а от свободната
   страна на всяка остава широко поле, през което минава пунктирът с големи
   меки завои. Секция с бележка в полето оставя място и за бележката. */
.ws-canvas :is(.is-style-ws-story-path, .is-style-ws-story-path > .wp-block-group__inner-container) > .wp-block-group.is-style-ws-story-section {
	--ws-note-room: 0px;

	display: flow-root;
	box-sizing: border-box;
	width: min(var(--ws-story-measure), calc(100% - 2 * var(--ws-story-pad) - var(--ws-story-zone) - var(--ws-note-room)));
	max-width: none;
	padding-inline: 0;
	margin: 0 auto var(--ws-story-section-gap) calc(var(--ws-story-pad) + var(--ws-note-room));
}

.ws-canvas :is(.is-style-ws-story-path, .is-style-ws-story-path > .wp-block-group__inner-container) > .wp-block-group.is-style-ws-story-section:nth-child(even of .is-style-ws-story-section) {
	margin-left: auto;
	margin-right: var(--ws-story-pad);
}

.ws-canvas :is(.is-style-ws-story-path, .is-style-ws-story-path > .wp-block-group__inner-container) > .wp-block-group.is-style-ws-story-section:has(p.is-style-ws-note-margin) {
	--ws-note-room: clamp(0px, 13vw - 60px, 190px);
}

.ws-canvas .is-style-ws-story-section p:not(.is-style-ws-brush, .is-style-ws-note, .is-style-ws-note-margin) {
	font-size: clamp(1.02rem, 0.8rem + 0.3vw, 1.16rem);
}

/* Снимката вляво/вдясно. В класическа тема (без theme.json) WordPress
   обвива снимка с подравняване в още един div:
     <div class="wp-block-image"><figure class="alignright size-full">…
   (wp_restore_image_outer_container), а в редактора и в блоковите теми е
   <figure class="wp-block-image alignright">. Правилата покриват и двата
   строежа — в 0.11.0–0.11.2 покриваха само втория и на сайта снимките
   излизаха в естествения си размер. */
.ws-canvas .is-style-ws-story-section .wp-block-image:has(> .alignleft, > .alignright) {
	margin: 0;
}

.ws-canvas .is-style-ws-story-section :is(.wp-block-image.alignleft, .wp-block-image.alignright, .wp-block-image > .alignleft, .wp-block-image > .alignright) {
	display: block;
	/* 0.11.2: по-малки снимки — повече текст до тях, по-къса страница. */
	width: clamp(220px, 31%, 400px);
	max-width: none;
	margin-top: 0.15rem;
	margin-bottom: 1.1rem;
}

.ws-canvas .is-style-ws-story-section :is(.wp-block-image.alignright, .wp-block-image > .alignright) {
	float: right;
	margin-left: clamp(1.5rem, 3.2vw, 3rem);
	margin-right: 0;
}

.ws-canvas .is-style-ws-story-section :is(.wp-block-image.alignleft, .wp-block-image > .alignleft) {
	float: left;
	margin-right: clamp(1.5rem, 3.2vw, 3rem);
	margin-left: 0;
}

.ws-canvas .is-style-ws-story-section .wp-block-image img {
	display: block;
	width: 100%;
	height: auto;
}

/* Цитатът с четка застава до снимката, а не под нея — иначе четката би
   минала зад снимката. */
.ws-canvas .is-style-ws-story-section p.is-style-ws-brush {
	display: flow-root;
}

/* Луната стои точно до заглавието — след последната дума (или пред първата,
   ако в редактора иконата е преди заглавието), а не в края на реда. На
   телефон иконата остава вдясно на реда до заглавието. */
@media (min-width: 782px) {
	.ws-canvas .is-style-ws-story-section .wp-block-group.is-style-ws-icon-heading {
		display: block;
		text-wrap: balance;
	}

	.ws-canvas .is-style-ws-story-section .is-style-ws-icon-heading > :is(h1, h2, h3, h4) {
		display: inline;
	}

	.ws-canvas .is-style-ws-story-section .is-style-ws-icon-heading > .wp-block-image {
		display: inline-block;
		width: clamp(46px, 4.2vw, 60px);
		margin: 0 0.3em;
		vertical-align: -0.28em;
	}

	/* Иконата след заглавието не заема място в реда — така никога не остава сама
	   на нов ред, а при нужда леко излиза в полето вдясно. */
	.ws-canvas .is-style-ws-story-section .is-style-ws-icon-heading > :is(h1, h2, h3, h4) + .wp-block-image {
		margin-right: calc(-1 * clamp(46px, 4.2vw, 60px));
	}
}

/* Бележката в полето — вляво от секцията, леко върху ъгъла на снимката. */
.ws-canvas .is-style-ws-story-section p.is-style-ws-note-margin {
	margin: 0 0 1rem;
}

@media (min-width: 1360px) {
	.ws-canvas .is-style-ws-story-section p.is-style-ws-note-margin {
		position: absolute;
		top: 0.75rem;
		right: calc(100% - 1.25rem);
		z-index: 2;
		width: 7.4em;
		max-width: none;
		margin: 0;
		font-size: clamp(1.4rem, 1.75vw, 1.65rem);
	}
}

/* --- Финал: пейзажът с героя отдолу --------------------------------------- */
.ws-canvas .wp-block-group.is-style-ws-story-closing {
	position: relative;
	margin: 0;
	/* Картината е 2000 × 472 (23,6 % от ширината). Текстът свършва над
	   хълмовете; героят и планините остават видими под него. */
	padding: clamp(0.5rem, 2vw, 1.5rem) 0 13.5%;
}

.ws-canvas :is(.is-style-ws-story-closing, .is-style-ws-story-closing > .wp-block-group__inner-container) > .wp-block-image:last-child {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 0;
	margin: 0;
	pointer-events: none;
}

.ws-canvas :is(.is-style-ws-story-closing, .is-style-ws-story-closing > .wp-block-group__inner-container) > .wp-block-image:last-child img {
	display: block;
	width: 100%;
	height: auto;
}

.ws-canvas :is(.is-style-ws-story-closing, .is-style-ws-story-closing > .wp-block-group__inner-container) > :not(.wp-block-image:last-child, .wp-block-group__inner-container) {
	position: relative;
	z-index: 1;
}

.ws-canvas :is(.is-style-ws-story-closing, .is-style-ws-story-closing > .wp-block-group__inner-container) > .wp-block-columns {
	gap: clamp(1.5rem, 4vw, 3.5rem);
	margin-bottom: 0;
}

.ws-canvas .is-style-ws-story-closing p.is-style-ws-note {
	margin-top: clamp(0rem, 2vw, 1.5rem);
	margin-left: 0;
}

/* =========================================================================
   6. Телефон и таблет (колоните се редят една под друга под 782 px)
   ========================================================================= */

@media (max-width: 781px) {
	.ws-story-path__svg {
		display: none;
	}

	.ws-canvas .wp-block-columns.is-style-ws-story-hero {
		grid-template-columns: var(--ws-story-pad) minmax(0, 1fr) var(--ws-story-pad);
	}

	.ws-canvas .is-style-ws-story-hero > .wp-block-column:first-child {
		grid-column: 2 / 3;
		grid-row: 1;
		padding: 1.25rem 0 0.75rem;
	}

	.ws-canvas .is-style-ws-story-hero > .wp-block-column:last-child {
		grid-column: 1 / 4;
		grid-row: 2;
	}

	/* Снимката винаги над текста, независимо от коя страна е на десктоп. */
	.ws-canvas .is-style-ws-story-row > .wp-block-column:has(> .wp-block-image):last-child {
		order: -1;
	}

	.ws-canvas .wp-block-columns.is-style-ws-story-row {
		gap: 1.5rem;
	}

	.ws-canvas .is-style-ws-story-row .wp-block-image img {
		max-width: 440px;
	}

	.ws-canvas :is(.is-style-ws-story-path, .is-style-ws-story-path > .wp-block-group__inner-container) > .wp-block-group.is-style-ws-story-section,
	.ws-canvas :is(.is-style-ws-story-path, .is-style-ws-story-path > .wp-block-group__inner-container) > .wp-block-group.is-style-ws-story-section:nth-child(even of .is-style-ws-story-section) {
		width: auto;
		max-width: var(--ws-shell, 1180px);
		padding-inline: var(--ws-story-pad);
		margin: 0 auto clamp(2.75rem, 10vw, 3.5rem);
	}

	.ws-canvas .is-style-ws-story-section :is(.wp-block-image.alignleft, .wp-block-image.alignright, .wp-block-image > .alignleft, .wp-block-image > .alignright) {
		float: none;
		width: auto;
		max-width: 440px;
		margin: 0 auto 1.25rem;
	}

	.ws-canvas .wp-block-group.is-style-ws-story-closing {
		padding-bottom: 27%;
	}

	.ws-canvas .is-style-ws-story-closing .wp-block-column:empty {
		display: none;
	}

	.ws-canvas .is-style-ws-story-closing p.is-style-ws-note {
		margin: 1.5rem auto 0;
	}

	p.is-style-ws-note,
	p.is-style-ws-note-margin {
		transform: rotate(-6deg);
	}

	p.is-style-ws-brush {
		padding-inline: 1.4em;
	}
}

@media (prefers-reduced-motion: reduce) {
	.wp-block-button.is-style-ws-pill .wp-block-button__link {
		transition: none;
	}
}
