/*
Theme Name: Tahiro
Theme URI: https://tahiroholistic.com
Author: Ракета5 — Невен Петров
Description: Custom FSE тема за Тахиро Холистик — Мартин Кръстев, Бургас. Кинезитерапия, юмейхо, мануална терапия, лечебни масажи.
Version: 0.1.0
Requires at least: 6.7
Tested up to: 7.1
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: tahiro
Tags: full-site-editing, blocks, one-column, custom-colors, custom-menu, block-patterns
*/

/* --------------------------------------------------------------------------
   Иконата-мотив (детелина). Ползва се като маска, за да наследява currentColor.
   -------------------------------------------------------------------------- */
.tahiro-symbol {
	display: inline-block;
	width: 1em;
	height: 1em;
	flex: 0 0 auto;
	background-color: currentColor;
	-webkit-mask: var(--tahiro-symbol) center / contain no-repeat;
	mask: var(--tahiro-symbol) center / contain no-repeat;
}

:root {
	/* Извивки, снети 1:1 от референта. lg — стъпало 83.5px (hero-то на началната,
	   изрезът под снимката на статията); sm — стъпало 46.93px (CTA-то на статията,
	   изрезът на мобилно). x-координатите са calc(100% - Npx) → формата се разтяга. */
	--tahiro-notch-lg: polygon(calc(100% - 84.844px) 32.8977px, calc(100% - 84.844px) 32.8977px, calc(100% - 87.3392px) 27.1769px, calc(100% - 90.4735px) 21.8917px, calc(100% - 94.1908px) 17.0813px, calc(100% - 98.435px) 12.785px, calc(100% - 103.15px) 9.042px, calc(100% - 108.28px) 5.89153px, calc(100% - 113.769px) 3.37285px, calc(100% - 119.561px) 1.52521px, calc(100% - 125.6px) 0.387842px, calc(100% - 131.829px) 0px, 132.628px 0px, 132.628px 0px, 126.368px 0.391652px, 120.302px 1.53996px, 114.486px 3.40496px, 108.977px 5.94667px, 103.832px 9.12514px, 99.1066px 12.9004px, 94.8588px 17.2324px, 91.1449px 22.0813px, 88.0217px 27.4071px, 85.5458px 33.1698px, 84.1544px 37.0623px, 84.1544px 37.0623px, 80.6882px 45.1301px, 76.3156px 52.5861px, 71.1162px 59.3746px, 65.1693px 65.4395px, 58.5544px 70.7248px, 51.3509px 75.1747px, 43.6381px 78.7331px, 35.4957px 81.3441px, 27.0028px 82.9517px, 18.2391px 83.5px, 0px 83.5px, 0px 100%, 100% 100%, 100% 83.5px, calc(100% - 18.891px) 83.5px, calc(100% - 18.891px) 83.5px, calc(100% - 27.4687px) 82.802px, calc(100% - 35.7732px) 81.0592px, calc(100% - 43.7298px) 78.3325px, calc(100% - 51.2639px) 74.6827px, calc(100% - 58.301px) 70.1709px, calc(100% - 64.7664px) 64.858px, calc(100% - 70.5855px) 58.8048px, calc(100% - 75.6837px) 52.0724px, calc(100% - 79.9864px) 44.7215px, calc(100% - 83.419px) 36.8133px, calc(100% - 84.844px) 32.8977px);
	--tahiro-notch-sm: polygon(calc(100% - 75.558px) 0px, 73.2587px 0px, 73.2587px 0px, 69.6953px 0.234955px, 66.2542px 0.922303px, 62.9703px 2.03577px, 59.8783px 3.54909px, 57.0132px 5.43597px, 54.4099px 7.67016px, 52.1031px 10.2254px, 50.1278px 13.0753px, 48.5188px 16.1938px, 47.311px 19.5544px, 47.311px 19.5544px, 45.6201px 24.2593px, 43.3675px 28.6252px, 40.6021px 32.6151px, 37.3727px 36.1925px, 33.728px 39.3203px, 29.7169px 41.962px, 25.3882px 44.0806px, 20.7906px 45.6395px, 15.9731px 46.6018px, 10.9844px 46.9307px, 0px 46.9307px, 0px 100%, 100% 100%, 100% 46.9307px, calc(100% - 13.283px) 46.9307px, calc(100% - 13.283px) 46.9307px, calc(100% - 18.2717px) 46.6018px, calc(100% - 23.0892px) 45.6395px, calc(100% - 27.6868px) 44.0806px, calc(100% - 32.0156px) 41.962px, calc(100% - 36.0267px) 39.3203px, calc(100% - 39.6715px) 36.1925px, calc(100% - 42.901px) 32.6151px, calc(100% - 45.6665px) 28.6252px, calc(100% - 47.9191px) 24.2593px, calc(100% - 49.61px) 19.5544px, calc(100% - 49.61px) 19.5544px, calc(100% - 50.8179px) 16.1938px, calc(100% - 52.427px) 13.0753px, calc(100% - 54.4023px) 10.2254px, calc(100% - 56.7091px) 7.67016px, calc(100% - 59.3125px) 5.43597px, calc(100% - 62.1776px) 3.54909px, calc(100% - 65.2696px) 2.03577px, calc(100% - 68.5535px) 0.922303px, calc(100% - 71.9946px) 0.234955px, calc(100% - 75.558px) 0px);
	/* data: URI — CSS маските са subject на CORS, външен файл не винаги минава */
	--tahiro-notch-r: 48px;
	/* Символът от вътрешността на логото — звезда със светкавица.
	   Чете се и на 11px, за разлика от цялата емблема, чиито тънки линии
	   се сливат в петно под 20px. */
	--tahiro-symbol: url("assets/icons/symbol.png");
	--tahiro-symbol-white: url("assets/icons/symbol-white.png");
	/* Иконки за конкретно действие — Lucide (ISC). Символът на бранда остава
	   само там, където бутонът няма собствено действие. */
	--tahiro-icon-phone-white: url("assets/icons/ui/phone-white.svg");
	--tahiro-icon-phone-teal: url("assets/icons/ui/phone-teal.svg");
	--tahiro-icon-info-white: url("assets/icons/ui/info-white.svg");
	--tahiro-icon-info-teal: url("assets/icons/ui/info-teal.svg");
	/* Социални канали — Simple Icons (CC0). Ползват се като маски, затова
	   всички излизат в един цвят, вместо фирмените сини/черни иконки. */
	--tahiro-si-facebook: url("assets/icons/social/facebook.svg");
	--tahiro-si-instagram: url("assets/icons/social/instagram.svg");
	--tahiro-si-tiktok: url("assets/icons/social/tiktok.svg");
	--tahiro-si-youtube: url("assets/icons/social/youtube.svg");
	--tahiro-si-whatsapp: url("assets/icons/social/whatsapp.svg");
	--tahiro-si-viber: url("assets/icons/social/viber.svg");
}

/* Списък с детелини вместо точки */
.tahiro-list-symbol ul,
ul.tahiro-list-symbol {
	list-style: none;
	padding-left: 0;
	margin-left: 0;
}
.tahiro-list-symbol li {
	position: relative;
	padding-left: 2em;
	margin-bottom: 0.75em;
}
.tahiro-list-symbol li::before {
	content: '';
	position: absolute;
	left: 0;
	top: 0.35em;
	width: 1em;
	height: 1em;
	background-color: var(--wp--preset--color--primary);
	-webkit-mask: var(--tahiro-symbol) center / contain no-repeat;
	mask: var(--tahiro-symbol) center / contain no-repeat;
}

/* --------------------------------------------------------------------------
   Пълноширинни секции

   post-content е constrained (max-width 1290px) и подрязва alignfull блоковете.
   Референтът ги пуска до ръба на екрана с 30px вътрешен отстъп.
   -------------------------------------------------------------------------- */
.wp-block-post-content > .alignfull:not(.tahiro-hero) {
	width: 100vw;
	max-width: 100vw;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
	padding-left: 30px;
	padding-right: 30px;
}

/* 100vw не отчита скролбара и вади хоризонтален скрол от няколко пиксела */
html { overflow-x: hidden; }
body { overflow-x: clip; }

/* --------------------------------------------------------------------------
   Hero — заоблена рамка, изнесена от краищата, с извивка на дъното
   -------------------------------------------------------------------------- */
.tahiro-hero {
	position: relative;
	border-radius: var(--wp--custom--radius--card);
	overflow: hidden;
	isolation: isolate;
	/* Референтът: 1380px при 1440 viewport = пълна ширина минус 30px от всяка страна.
	   calc(50% - 50vw) изкарва блока от constrained контейнера до ръба на екрана. */
	width: calc(100vw - 60px);
	max-width: none;
	margin-left: calc(50% - 50vw + 30px) !important;
	margin-right: calc(50% - 50vw + 30px) !important;
	margin-top: 0 !important;
	min-height: 80vh;
}
/* На началната hero-то залепва за хедъра — без отстъпа от blockGap */
.home .wp-site-blocks > main { margin-block-start: 0; }

/* Референтът долепя съдържанието ДОЛУ (padding-bottom 110px), не го центрира */
.tahiro-hero > .wp-block-cover__inner-container {
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	align-self: stretch;   /* cover-ът центрира по подразбиране — иначе flex-end е без ефект */
	flex: 1;
}

/* Съдържанието вътре е ограничено до 920px, с несиметричен вертикален отстъп */
.tahiro-hero .wp-block-cover__inner-container > * {
	max-width: 920px;
	margin-left: auto;
	margin-right: auto;
}
/* Заглавието е изключение — на един ред е по-широко от 920px */
.tahiro-hero .wp-block-cover__inner-container > h1 { max-width: none; }
.tahiro-hero::after {
	/* мек тъмен градиент, за да се чете бял текст върху всяка снимка */
	content: '';
	position: absolute;
	inset: 0;
	z-index: 0;
	background: linear-gradient(180deg, rgba(59,56,51,.28) 0%, rgba(59,56,51,.10) 45%, rgba(59,56,51,.34) 100%);
	pointer-events: none;
}
.tahiro-hero > * { position: relative; z-index: 1; }

/* Вътрешният контейнер на cover-а по подразбиране е позициониран. Правим го
   статичен, за да се закачи извивката за самата снимка, а не за текста в нея. */
.tahiro-hero .wp-block-cover__inner-container {
	position: static;
	width: 100%;
}

/* --------------------------------------------------------------------------
   Извивката на дъното на hero-то.

   Формата е снета 1:1 от референта (Flexora) — polygon с изчислени точки,
   които апроксимират S-кривите. x-координатите са calc(100% - Npx), затова
   формата се адаптира по ширина; височината на „стъпалото" е фиксирана 83.5px.
   -------------------------------------------------------------------------- */
.tahiro-hero-notch {
	position: relative;
	z-index: 3;
	width: min(690px, 82%);
	min-height: 181px;
	margin: -83.5px auto 0;   /* застъпва снимката точно с височината на стъпалото */
	background: var(--wp--preset--color--base);
	clip-path: var(--tahiro-notch-lg);
}

/* Съдържанието започва под извивката (83.5px) */
.tahiro-hero-notch > * { position: relative; }

/* Редовете с детелини вътре в извивката */
.tahiro-hero-notch .tahiro-eyebrow {
	font-size: 12px;
	font-weight: 500;
	letter-spacing: 2px;
	line-height: 16px;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: .7em;
	margin: 0;
	white-space: nowrap;
}
.tahiro-hero-notch .tahiro-eyebrow::before {
	content: '';
	width: 16px;
	height: 16px;
	flex: 0 0 auto;
	background-color: var(--wp--preset--color--primary);
	-webkit-mask: var(--tahiro-symbol) center / contain no-repeat;
	mask: var(--tahiro-symbol) center / contain no-repeat;
}

/* Под 700px същата форма, мащабирана наполовина — иначе двете S-извивки
   изяждат цялата ширина и платформата изчезва. Стъпалото става 41.75px. */
@media (max-width: 700px) {
	.tahiro-hero-notch {
		clip-path: polygon(calc(100% - 42.422px) 16.449px, calc(100% - 42.422px) 16.449px, calc(100% - 43.67px) 13.588px, calc(100% - 45.237px) 10.946px, calc(100% - 47.095px) 8.541px, calc(100% - 49.218px) 6.393px, calc(100% - 51.575px) 4.521px, calc(100% - 54.14px) 2.946px, calc(100% - 56.885px) 1.686px, calc(100% - 59.781px) 0.763px, calc(100% - 62.8px) 0.194px, calc(100% - 65.915px) 0.0px, 66.314px 0.0px, 66.314px 0.0px, 63.184px 0.196px, 60.151px 0.77px, 57.243px 1.702px, 54.489px 2.973px, 51.916px 4.563px, 49.553px 6.45px, 47.429px 8.616px, 45.572px 11.041px, 44.011px 13.704px, 42.773px 16.585px, 42.077px 18.531px, 42.077px 18.531px, 40.344px 22.565px, 38.158px 26.293px, 35.558px 29.687px, 32.585px 32.72px, 29.277px 35.362px, 25.675px 37.587px, 21.819px 39.367px, 17.748px 40.672px, 13.501px 41.476px, 9.12px 41.75px, 0.0px 41.75px, 0.0px 100%, 100% 100%, 100% 41.75px, calc(100% - 9.445px) 41.75px, calc(100% - 9.445px) 41.75px, calc(100% - 13.734px) 41.401px, calc(100% - 17.887px) 40.53px, calc(100% - 21.865px) 39.166px, calc(100% - 25.632px) 37.341px, calc(100% - 29.151px) 35.085px, calc(100% - 32.383px) 32.429px, calc(100% - 35.293px) 29.402px, calc(100% - 37.842px) 26.036px, calc(100% - 39.993px) 22.361px, calc(100% - 41.709px) 18.407px, calc(100% - 42.422px) 16.449px);
	}
	.tahiro-hero-notch .tahiro-eyebrow { white-space: normal; }
}

/* Логото в хедъра — 220px по ширина, височината се смята от пропорцията
   (оригиналът е 360×69). На мобилно се свива, за да остане място за
   телефона и хамбургера. */
.tahiro-header__logo img {
	height: auto;
	max-width: 100%;
}

@media (max-width: 900px) {
	.tahiro-header__logo,
	.tahiro-header__logo img { width: 170px; }
}

/* --------------------------------------------------------------------------
   Бутони — pill с кръгла иконка отляво
   -------------------------------------------------------------------------- */
.wp-block-button__link {
	display: inline-flex;
	align-items: center;
	min-height: 48px;
	box-sizing: border-box;
	gap: 10px;
	transition: background-color .25s ease, color .25s ease, transform .25s ease;
}
.wp-block-button__link:hover { transform: translateY(-1px); }

/* Кръгче с детелина вътре — teal кръг, бяла иконка в него */
.wp-block-button.is-style-tahiro-icon .wp-block-button__link::before,
.tahiro-hero .wp-block-button .wp-block-button__link::before {
	content: '';
	width: 28px;
	height: 28px;
	flex: 0 0 auto;
	border-radius: 50%;
	background-color: var(--wp--preset--color--primary);
	background-image: var(--tahiro-symbol-white);
	background-size: 16px;
	background-position: center;
	background-repeat: no-repeat;
	transition: background-color .25s ease;
}
.wp-block-button.is-style-tahiro-icon .wp-block-button__link:hover::before,
.tahiro-hero .wp-block-button .wp-block-button__link:hover::before {
	background-color: var(--wp--preset--color--base);
	background-image: var(--tahiro-symbol-teal);
}

/* Бутон с конкретно действие носи своята иконка вместо символа на бранда */
.wp-block-button.has-icon-phone .wp-block-button__link::before { background-image: var(--tahiro-icon-phone-white); }
.wp-block-button.has-icon-phone .wp-block-button__link:hover::before { background-image: var(--tahiro-icon-phone-teal); }
.wp-block-button.has-icon-info .wp-block-button__link::before { background-image: var(--tahiro-icon-info-white); }
.wp-block-button.has-icon-info .wp-block-button__link:hover::before { background-image: var(--tahiro-icon-info-teal); }
/* Бутон само с текст — без кръгче отляво */
.wp-block-button.has-no-icon .wp-block-button__link::before { content: none; }

.wp-block-button.is-style-tahiro-outline .wp-block-button__link {
	background: transparent;
	color: var(--wp--preset--color--contrast);
	box-shadow: inset 0 0 0 1px #DDD8CE;
}
.wp-block-button.is-style-tahiro-outline .wp-block-button__link:hover {
	background: var(--wp--preset--color--contrast);
	color: var(--wp--preset--color--base);
	box-shadow: none;
}
.wp-block-button.is-style-tahiro-mint .wp-block-button__link {
	background: var(--wp--preset--color--secondary);
	color: var(--wp--preset--color--contrast);
}
.wp-block-button.is-style-tahiro-mint .wp-block-button__link:hover {
	background: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--base);
}

/* Рейтинг под бутоните — едро число и два реда дребен текст до него */
.tahiro-rating {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 14px;
	margin-top: 30px;
}
.tahiro-rating__score {
	font-family: var(--wp--preset--font-family--heading);
	font-size: 48px;
	line-height: 48px;
	color: #fff;
	margin: 0;
}
.tahiro-rating__meta {
	font-size: 10px;
	line-height: 16px;
	font-weight: 500;
	letter-spacing: 2px;
	text-transform: uppercase;
	color: #fff;
	margin: 0;
	text-align: left;
}
.tahiro-rating__stars { letter-spacing: 3px; font-size: 13px; line-height: 1.2; }

/* --------------------------------------------------------------------------
   Карти и pill етикети
   -------------------------------------------------------------------------- */
.tahiro-card {
	border-radius: var(--wp--custom--radius--card);
	background: var(--wp--preset--color--base);
	transition: transform .3s ease, box-shadow .3s ease;
}
.tahiro-card:hover {
	transform: translateY(-4px);
	box-shadow: var(--wp--preset--shadow--card);
}

.tahiro-pill {
	border-radius: var(--wp--custom--radius--pill);
	background: var(--wp--preset--color--tertiary);
	padding: 1.15rem 1.75rem;
}

/* Рамка за снимка с плаващ елемент върху нея.
   position: relative е тук, а не като блоков атрибут — WordPress приема
   position само със стойност "sticky" и маркира "relative" като невалидно. */
.tahiro-media-frame { position: relative; }

/* Плаваща карта с име върху снимка */
.tahiro-float-card {
	position: absolute;
	left: 20px;
	bottom: 20px;
	max-width: min(280px, calc(100% - 40px));
	background: rgba(242,240,236,.94);
	backdrop-filter: blur(8px);
	border-radius: var(--wp--custom--radius--card);
	padding: 14px 22px;
	z-index: 2;
}

/* --------------------------------------------------------------------------
   Хедър
   -------------------------------------------------------------------------- */
.tahiro-header {
	min-height: 80px;
	display: flex;
	align-items: center;
	position: sticky;
	top: 0;
	z-index: 100;
	background: rgba(255,255,255,.92);
}
/* Размазването живее в псевдо-елемент, а НЕ на самия хедър: backdrop-filter
   прави от елемента containing block за position:fixed, което сваля мобилния
   overlay на менюто до височината на хедъра вместо на цял екран. */
.tahiro-header::before {
	content: '';
	position: absolute;
	inset: 0;
	z-index: -1;
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	pointer-events: none;
}

/* Мобилният overlay се позиционира спрямо екрана */
.wp-block-navigation__responsive-container.is-menu-open {
	position: fixed;
	inset: 0;
	padding: 24px;
	z-index: 200;
	display: flex;
	flex-direction: column;
}
/* Вложената структура на WP не се разтяга сама — иначе линковете увисват горе */
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-close,
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-dialog,
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content {
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	width: 100%;
	gap: 6px;
}
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
	flex: 0 0 auto;
	justify-content: center;
	gap: 6px;
}
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
	font-family: var(--wp--preset--font-family--heading);
	font-size: 28px;
	padding: 10px 0;
}
.tahiro-header > .wp-block-group { width: 100%; }
.tahiro-header .wp-block-navigation__responsive-container-open,
.tahiro-header .wp-block-navigation-item__content { font-weight: 500; }

.tahiro-header .current-menu-item > .wp-block-navigation-item__content {
	color: var(--wp--preset--color--primary);
	text-decoration: underline;
	text-underline-offset: 6px;
	text-decoration-thickness: 1.5px;
}

/* --------------------------------------------------------------------------
   Типографски дреболии
   -------------------------------------------------------------------------- */
.tahiro-eyebrow {
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--wp--preset--color--olive);
}

/* Playfair е с високи контрасти — на едри размери диша по-добре с по-тесен tracking.
   Референтът ползва -3px при 80px; държим същото съотношение и надолу. */
/* Заглавието в hero-то: −15% спрямо 80px, но винаги на един ред.
   5.3vw държи реда цял и на по-тесни екрани (при 1440 таванът 68px е водещ). */
.tahiro-hero h1 {
	/* !important, защото WordPress пуска класовете за размер (has-hero-font-size)
	   с !important; без него преразмеряването не хваща. */
	font-size: min(68px, 5.3vw) !important;
	max-width: none;   /* ограничението от 920px важи за останалите блокове в hero-то */
	letter-spacing: -3px;
	white-space: nowrap;
}
.wp-block-post-title { letter-spacing: -0.025em; }
/* Под 900px един ред би смачкал заглавието — пуска се на два */
@media (max-width: 900px) {
	.tahiro-hero h1 {
		font-size: clamp(34px, 6.4vw, 48px) !important;
		letter-spacing: -1.5px;
		white-space: normal;
	}
}

/* Балансирано пренасяне на заглавия (без "самотна" дума на нов ред) */
h1, h2, h3, .wp-block-heading { text-wrap: balance; }
p { text-wrap: pretty; }

/* --------------------------------------------------------------------------
   Достъпност
   -------------------------------------------------------------------------- */
.skip-link:focus {
	position: fixed;
	top: 1rem;
	left: 1rem;
	z-index: 999;
	padding: .75rem 1.25rem;
	background: var(--wp--preset--color--contrast);
	color: var(--wp--preset--color--base);
	border-radius: var(--wp--custom--radius--small);
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after {
		animation-duration: .01ms !important;
		transition-duration: .01ms !important;
		scroll-behavior: auto !important;
	}
}


/* ==========================================================================
   МОБИЛНО — под 900px
   Референтът свива хедъра до лого + две кръгли иконки (телефон и меню),
   реди бутоните в hero-то един под друг и центрира рейтинга вертикално.
   ========================================================================== */
@media (max-width: 900px) {

	/* Референтът: 400px съдържание при 440 екран → 20px отстрани, не 30.
	   Само променливата — WordPress я разнася сам; ръчен padding отгоре
	   го удвоява и секциите излизат по-тесни. */
	body {
		--wp--style--root-padding-left: 20px;
		--wp--style--root-padding-right: 20px;
	}
	/* .has-global-padding носи статичните 30px от theme.json, не променливата */
	.has-global-padding {
		padding-left: 20px;
		padding-right: 20px;
	}
	/* Вложените вече са в отстъпа — иначе се удвоява.
	   :not(.alignfull) е задължително: пълноширинните секции трябва да
	   ЗАПАЗЯТ padding-а си, защото излизат от контейнера с негативен margin. */
	.has-global-padding > .has-global-padding:not(.alignfull),
	.has-global-padding > * > .has-global-padding:not(.alignfull) {
		padding-left: 0;
		padding-right: 0;
	}
	.wp-block-post-content > .alignfull:not(.tahiro-hero) { padding-left: 20px; padding-right: 20px; }

	/* Негативният margin трябва да съвпада с новия отстъп */
	.has-global-padding > .alignfull,
	.wp-site-blocks > .alignfull {
		margin-left: -20px;
		margin-right: -20px;
	}

	/* --- Хедър --- */
	.tahiro-header .wp-block-site-title a {
		font-size: 22px;
		line-height: 1.15;
	}

	/* Телефонът става кръгла иконка — номерът остава в href, само текстът се крие */
	.tahiro-header p:has(> a[href^="tel:"]) {
		width: 44px;
		height: 44px;
		margin: 0;
		border-radius: 50%;
		background: var(--wp--preset--color--tertiary) url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23417572' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72c.127.96.361 1.903.7 2.81a2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45c.907.339 1.85.573 2.81.7A2 2 0 0 1 22 16.92z'/></svg>") center / 20px no-repeat;
		flex: 0 0 auto;
		overflow: hidden;
		text-indent: -999em;
	}
	.tahiro-header p:has(> a[href^="tel:"]) a {
		display: block;
		width: 100%;
		height: 100%;
	}

	/* „Запази час" отпада — дублира се в мобилното меню */
	.tahiro-header .wp-block-buttons { display: none; }

	/* Референтът реди: лого · телефон · хамбургер */
	.tahiro-header > .wp-block-group > .wp-block-navigation { order: 3; margin-left: 4px; }
	.tahiro-header > .wp-block-group > .wp-block-group:last-child { order: 2; }

	/* Хамбургерът се изравнява с иконката на телефона */
	.tahiro-header .wp-block-navigation__responsive-container-open {
		width: 44px;
		height: 44px;
		border-radius: 50%;
		background: var(--wp--preset--color--secondary);
		display: flex;
		align-items: center;
		justify-content: center;
	}

	/* --- Hero --- */
	.tahiro-hero {
		width: calc(100vw - 40px);
		margin-left: calc(50% - 50vw + 20px) !important;
		margin-right: calc(50% - 50vw + 20px) !important;
		min-height: 74vh;
		padding-bottom: 60px !important;
	}
	.tahiro-hero h1 {
		font-size: clamp(28px, 8.2vw, 40px);
		letter-spacing: -1px;
	}

	/* Бутоните — един под друг, центрирани */
	.tahiro-hero .wp-block-buttons {
		flex-direction: column;
		align-items: center;
		gap: 12px;
	}
	.tahiro-hero .wp-block-button { width: auto; }

	/* Рейтингът — числото отгоре, звездите и текстът под него */
	.tahiro-rating {
		flex-direction: column;
		gap: 4px;
		margin-top: 22px;
	}
	.tahiro-rating__meta { text-align: center; }
	.tahiro-rating__score { font-size: 40px; line-height: 44px; }

	/* --- Извивката --- */
	.tahiro-hero-notch {
		width: 88%;
		min-height: 0;
		margin-top: -41.75px;   /* половината стъпало, както е мащабиран polygon-ът */
		padding: 56px 24px 26px !important;
	}
	.tahiro-hero-notch .tahiro-eyebrow {
		justify-content: flex-start;
		text-align: left;
		align-items: flex-start;
	}
	.tahiro-hero-notch .tahiro-eyebrow::before { margin-top: 1px; }
}

@media (max-width: 480px) {
	.tahiro-header .wp-block-site-title a { font-size: 19px; }
	/* padding-top трябва да остане под стъпалото (41.75px), иначе първият ред
	   попада в тясната платформа и детелината му се изрязва от clip-path */
	.tahiro-hero-notch { width: 92%; padding: 56px 20px 26px !important; }
	.tahiro-hero-notch .tahiro-eyebrow { font-size: 9.5px; letter-spacing: 1.6px; }
}

/* ==========================================================================
   СТАТИЯ (single.html) — по референта Flexora, измерено от DOM при 1440 и 440.
   Заглавие → бежова кутия със снимка и изрез (дата, автор, споделяне) →
   текст 630px → CTA кутия с издатина и изрез → свързани статии.
   ========================================================================== */
:root {
	--tahiro-symbol-teal: url("assets/icons/symbol-teal.png");
}

/* Заглавие + категория */
.tahiro-single__head {
	max-width: 950px;
	margin: 65px auto 0;
	text-align: center;
}
.tahiro-single__title {
	font-size: clamp(30px, 4.17vw, 60px);
	line-height: 1.1;
	letter-spacing: -1px;
	margin: 0;
}
.tahiro-single__cats {
	font-family: var(--wp--preset--font-family--heading);
	font-size: 20px;
	line-height: 32px;
	margin-top: 10px;
}
.tahiro-single__cats a { color: inherit; text-decoration: none; }
.tahiro-single__cats a:hover { color: var(--wp--preset--color--primary); }

/* Бежовата кутия. Изрезът е последното дете и застъпва снимката с 54px;
   долният ѝ край съвпада със стъпалото на извивката (83.5px). */
.tahiro-single__hero {
	max-width: 1280px;
	margin: 66px auto 0;
	padding: 30px 30px 0;
	box-sizing: border-box;
	background: var(--wp--preset--color--tertiary);
	border-radius: var(--wp--custom--radius--card);
	display: flow-root;   /* иначе отрицателният margin на изреза излиза извън кутията */
}
.tahiro-single__image {
	width: min(469px, 100%);
	margin: 0 auto !important;
}
.tahiro-single__image img { border-radius: var(--wp--custom--radius--card); }
.tahiro-single__notch {
	position: relative;
	z-index: 1;
	width: 450px;
	max-width: 100%;
	min-height: 94px;              /* 16 + дата 16 + автор 16 + 14 + споделяне 32 */
	margin: -54px auto -10.5px !important;   /* долу = стъпалото (83.5) */
	padding: 16px 20px 0;
	box-sizing: border-box;
	background: var(--wp--preset--color--base);
	clip-path: var(--tahiro-notch-lg);
}
/* Статия без снимка — само редът с датата и споделянето */
.tahiro-single__hero:not(:has(.wp-block-post-featured-image)) {
	background: none;
	padding-top: 0;
}
.tahiro-single__hero:not(:has(.wp-block-post-featured-image)) .tahiro-single__notch {
	margin-top: 0 !important;
	clip-path: none;
}

.tahiro-single__meta {
	gap: 0;
	font-size: 10px;
	line-height: 16px;
	font-weight: 500;
	letter-spacing: 2px;
	text-transform: uppercase;
	color: var(--wp--preset--color--contrast);
}
.tahiro-single__meta > * { margin: 0; }

/* Споделяне: 32px бутони, 1px разделители с по 20px отстрани */
.tahiro-share {
	display: flex;
	justify-content: center;
	align-items: center;
	margin-top: 14px;
}
.tahiro-share__btn {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	padding: 0;
	border: 0;
	background: none;
	color: var(--wp--preset--color--primary);
	cursor: pointer;
	transition: color .2s ease, transform .2s ease;
}
.tahiro-share__btn + .tahiro-share__btn { margin-left: 41px; }
.tahiro-share__btn + .tahiro-share__btn::before {
	content: '';
	position: absolute;
	left: -21px;
	top: 0;
	width: 1px;
	height: 32px;
	background: rgba(0, 0, 0, .15);
}
.tahiro-share__btn svg { height: 17px; width: auto; }
.tahiro-share__btn:hover { color: var(--wp--preset--color--primary-dark); transform: translateY(-1px); }
.tahiro-share__btn:focus-visible { outline: 2px solid var(--wp--preset--color--primary); outline-offset: 2px; border-radius: 4px; }
/* Копирано — иконата става отметка за 2 секунди */
.tahiro-share__btn.is-copied svg { visibility: hidden; }
.tahiro-share__btn.is-copied::after {
	content: '✓';
	position: absolute;
	font-size: 18px;
	font-weight: 600;
}

/* Текстът — колона 630px */
.tahiro-article { margin-top: 40px; }
.tahiro-article > * { margin-block: 16px 0; }
.tahiro-article > :first-child { margin-top: 0; }
.tahiro-article p,
.tahiro-article li {
	font-size: 16px;
	line-height: 1.9;
}
/* Въвеждащият абзац — serif, след него разделител * * *.
   Lora, не Playfair: референтът е с Ovo (среден контраст, малка x-височина);
   Playfair на 20px е едър и тежък и се бие с Manrope. Lora има и българските
   форми на буквите като Manrope. */
.tahiro-article > p:first-child {
	font-family: var(--wp--preset--font-family--lead);
	font-size: 19px;
	line-height: 32px;
	letter-spacing: 0;
}
.tahiro-article > p:first-child::after {
	content: '*  *  *';
	display: block;
	margin-top: 18px;
	font-family: var(--wp--preset--font-family--body);
	font-size: 15px;
	line-height: 15px;
	letter-spacing: 7px;
	white-space: pre;
	text-align: center;
}
.tahiro-article > p:first-child + * { margin-top: 32px; }
/* Подзаглавията — Manrope 500; H2 28px (референтът е 20px, но при кирилица
   и 16px текст изглеждаше като удебелен абзац) */
.tahiro-article h2,
.tahiro-article h3 {
	font-family: var(--wp--preset--font-family--body);
	font-size: 28px;
	line-height: 36px;
	font-weight: 500;
	letter-spacing: -0.01em;
}
.tahiro-article h3 { font-size: 22px; line-height: 30px; }
.tahiro-article > h2,
.tahiro-article > h3 { margin-top: 40px; }
.tahiro-article > h2 + *,
.tahiro-article > h3 + * { margin-top: 20px; }
.tahiro-article ol { padding-left: 1.2em; }
/* Точките в списъците стават символът на бранда */
.tahiro-article ul {
	list-style: none;
	padding-left: 0;
	margin-left: 0;
}
.tahiro-article ul li {
	position: relative;
	padding-left: 1.9em;
}
.tahiro-article ul li::before {
	content: '';
	position: absolute;
	left: 0;
	top: .5em;
	width: 14px;
	height: 14px;
	background-color: var(--wp--preset--color--primary);
	-webkit-mask: var(--tahiro-symbol) center / contain no-repeat;
	mask: var(--tahiro-symbol) center / contain no-repeat;
}
.tahiro-article > figure { margin-block: 30px; }

/* CTA кутия: издатина с детелина отгоре, изрез с бутон отдолу */
.tahiro-post-cta {
	position: relative;
	max-width: 845px;
	margin: 110px auto 0 !important;
	padding: 45px 30px 0;
	box-sizing: border-box;
	background: var(--wp--preset--color--secondary);
	border-radius: var(--wp--custom--radius--card);
	text-align: center;
	display: flow-root;
}
.tahiro-post-cta__tab {
	position: absolute;
	top: -46.93px;
	left: 50%;
	width: 180px;
	height: 72px;
	padding-top: 20px;
	box-sizing: border-box;
	transform: translateX(-50%);
	display: flex;
	justify-content: center;
	background: var(--wp--preset--color--secondary);
	clip-path: var(--tahiro-notch-sm);
	color: var(--wp--preset--color--primary);
	font-size: 30px;
}
.tahiro-post-cta .tahiro-post-cta__kicker {
	max-width: 392px;
	margin: 0 auto;
	font-size: 16px;
	line-height: 30px;
}
.tahiro-post-cta .tahiro-post-cta__title {
	max-width: 630px;
	margin: 8px auto 0;
	font-family: var(--wp--preset--font-family--heading);
	font-size: 34px;
	line-height: 1.2;
	letter-spacing: 0;
}
.tahiro-post-cta__notch {
	position: relative;
	width: 365px;
	max-width: 100%;
	min-height: 73px;
	margin: 48px auto -26px !important;
	padding: 25px 20px 0;
	box-sizing: border-box;
	background: var(--wp--preset--color--base);
	clip-path: var(--tahiro-notch-sm);
	align-items: flex-start;
}
.tahiro-post-cta .wp-block-button__link::before {
	content: '';
	width: 28px;
	height: 28px;
	flex: 0 0 auto;
	border-radius: 50%;
	background: var(--wp--preset--color--base) var(--tahiro-icon-phone-teal) center / 16px no-repeat;
}

/* Свързани статии */
.tahiro-related {
	margin-top: 110px !important;
	padding-top: 99px;
	padding-bottom: 60px;
	background: linear-gradient(180deg, var(--wp--preset--color--tertiary) 0%, rgba(242, 240, 236, 0) 100%);
}
.tahiro-related .tahiro-related__title {
	font-size: 34px;
	line-height: 1.2;
	letter-spacing: 0;
	margin: 0 auto;
}
.tahiro-related__query { margin-top: 50px !important; }
.tahiro-related__query .wp-block-post-template { gap: 40px; }
.tahiro-related__query .wp-block-post-template > li > * { margin-block: 0; }
.tahiro-related__query .wp-block-post-featured-image img { border-radius: var(--wp--custom--radius--card); }
.tahiro-related__query li > .tahiro-related__cat {
	margin-top: 20px;
	font-size: 10px;
	line-height: 16px;
	font-weight: 500;
	letter-spacing: 2px;
	text-transform: uppercase;
	color: var(--wp--preset--color--olive);
}
.tahiro-related__cat a { color: inherit; text-decoration: none; }
.tahiro-related__query li > .tahiro-related__post-title {
	margin-top: 5px;
	font-family: var(--wp--preset--font-family--body);
	font-size: 20px;
	line-height: 28px;
	font-weight: 500;
	letter-spacing: 0;
}
.tahiro-related__post-title a { color: var(--wp--preset--color--contrast); text-decoration: none; }
.tahiro-related__post-title a:hover { color: var(--wp--preset--color--primary); }

/* Мобилно — референтът при 440: 20px отстрани, изрезът става на цялата ширина
   на кутията с малката извивка, застъпва снимката с 24px. */
@media (max-width: 700px) {
	.tahiro-single__head { margin-top: 25px; }
	.tahiro-single__cats { font-size: 16px; line-height: 24px; }
	.tahiro-single__hero { margin-top: 24px; padding: 20px 20px 0; }
	.tahiro-single__notch {
		width: auto;
		max-width: none;
		min-height: 96px;
		margin: -24px -20px 0 !important;
		padding-top: 20px;
		clip-path: var(--tahiro-notch-sm);
	}
	.tahiro-share { margin-top: 12px; }
	.tahiro-article { margin-top: 21px; }
	.tahiro-article > p:first-child { font-size: 18px; line-height: 1.6; }
	.tahiro-article h2 { font-size: 24px; line-height: 1.3; }
	.tahiro-article h3 { font-size: 20px; line-height: 1.3; }
	.tahiro-post-cta { padding: 45px 20px 0; margin-top: 90px !important; }
	.tahiro-post-cta__tab { width: 170px; height: 52px; }
	.tahiro-post-cta .tahiro-post-cta__title { font-size: 24px; }
	.tahiro-post-cta__notch { width: 300px; margin-top: 30px !important; min-height: 68px; padding-top: 20px; }
	.tahiro-related { padding-top: 40px; margin-top: 80px !important; }
	.tahiro-related .tahiro-related__title { font-size: 24px; }
	.tahiro-related__query { margin-top: 20px !important; }
	.tahiro-related__query .wp-block-post-template { grid-template-columns: 1fr; }
	.tahiro-related__query li > .tahiro-related__post-title { font-size: 16px; line-height: 1.4; }
}


/* ==========================================================================
   ФУТЪР — лого, социални иконки, булети със символа
   ========================================================================== */
.tahiro-footer__logo img {
	height: auto;
	max-width: 100%;
}

.tahiro-social {
	display: flex;
	flex-wrap: wrap;
	gap: 20px;
	list-style: none;
	margin: var(--wp--preset--spacing--30) 0 0;
	padding: 0;
}
.tahiro-social a {
	display: inline-flex;
	padding: 4px;
	margin: -4px;   /* по-голяма зона за натискане, без да мести иконките */
}
.tahiro-social__icon {
	display: block;
	width: 32px;   /* кръгло число, 2× по +20% спрямо първоначалните 22px */
	height: 32px;
	background-color: var(--wp--preset--color--primary);
	-webkit-mask: var(--icon) center / contain no-repeat;
	mask: var(--icon) center / contain no-repeat;
	transition: background-color .2s ease, transform .2s ease;
}
.tahiro-social a:hover .tahiro-social__icon {
	background-color: var(--wp--preset--color--primary-dark);
	transform: translateY(-1px);
}

/* Булетите в колоните на футъра — символът, но по-дребен от текста */
footer .tahiro-list-symbol li { padding-left: 1.7em; }
footer .tahiro-list-symbol li::before {
	width: 14px;
	height: 14px;
	top: .6em;
}

/* Viber и WhatsApp в колоната „Контакти“ — същите иконки, по-малко отстояние */
.tahiro-social--contacts { margin-top: var(--wp--preset--spacing--20); }

/* Телефонът под иконките — на мобилно това е първото, което се вижда във футъра */
.tahiro-footer__phone {
	display: inline-block;
	margin-top: var(--wp--preset--spacing--20);
	font-size: 20px;
	font-weight: 600;
	line-height: 1.4;
	color: var(--wp--preset--color--primary);
	text-decoration: none;
}
.tahiro-footer__phone:hover { color: var(--wp--preset--color--primary-dark); }

/* Долният ред: отляво правата, отдясно кредитът на Ракета5 */
.tahiro-footer__bottom {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px 24px;
}
.tahiro-footer__legal,
.tahiro-credit {
	margin: 0;
	font-size: 14px;   /* 12 → 14px (+17%, закръглено от 14.4) */
	line-height: 1.6;
	color: var(--wp--preset--color--contrast-2);
}
.tahiro-credit {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	text-decoration: none;
	transition: color .2s ease;
}
/* Ракетата е локална, за да не тегли от чужд сайт при всяко зареждане */
.tahiro-credit::before {
	content: '';
	flex: 0 0 auto;
	width: 20px;
	height: 20px;
	background: url("assets/img/raketa5.png") center / contain no-repeat;
}
.tahiro-credit:hover { color: var(--wp--preset--color--primary); }

@media (max-width: 700px) {
	.tahiro-footer__bottom {
		flex-direction: column;
		justify-content: center;
		text-align: center;
	}
}
