/* ==========================================================================
   TENGO Design — main.css
   Токены сняты с макетов Figma (tengogroup.pl, 1440 и 390 px).
   Адаптив: mobile-first, плавная типографика clamp(), брейкпоинты
   480 / 768 / 1024 / 1200 / 1440.
   ========================================================================== */

:root {
	--c-ink: #171717;
	--c-dark: #242424;
	--c-sand: #c9c0b4;
	--c-bg: #ffffff;
	--c-soft: #f5f3f0;
	--c-line: #e7e3de;
	--c-muted: #5f5f5f;
	--c-shadow: #a2a2a2;

	--font: "Segoe", "Segoe UI", Arial, sans-serif;
	--font-t: "Segoe", "Segoe UI", Arial, sans-serif;

	--fs-h1: clamp(2rem, 1.35rem + 2.3vw, 3.125rem);        /* 32 → 50 */
	--fs-h2: clamp(1.625rem, 1.25rem + 1.4vw, 2.5rem);      /* 26 → 40 */
	--fs-h3: clamp(1.25rem, 1.1rem + 0.6vw, 1.625rem);      /* 20 → 26 */
	--fs-lead: clamp(1.125rem, 1.05rem + 0.35vw, 1.5rem);   /* 18 → 24 */
	--fs-body: clamp(1rem, 0.96rem + 0.15vw, 1.125rem);     /* 16 → 18 */
	--fs-small: 0.875rem;

	--container: 1200px;
	--gutter: clamp(16px, 4vw, 40px);
	--section: clamp(56px, 4rem + 3vw, 110px);
	--radius: 4px;
	--header-h: 64px;
	--ease: cubic-bezier(.2, .7, .2, 1);
}

@media (min-width: 1024px) {
	:root { --header-h: 100px; }
}

/* ---------- Reset / base ---------- */
*:where(:not(#allrecords *)), *:where(:not(#allrecords *))::before, *:where(:not(#allrecords *))::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
body {
	margin: 0;
	font-family: var(--font);
	font-size: var(--fs-body);
	line-height: 1.45;
	color: var(--c-ink);
	background: var(--c-bg);
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
	overflow-x: clip;
}
/* Горизонтальная прокрутка на телефонах закрыта: clip не создаёт отдельную область прокрутки, поэтому прокрутка окна и анимации Tilda работают как обычно */
html { overflow-x: clip; }
body.is-locked { overflow: hidden; }
:where(img, svg, video, iframe):where(:not(#allrecords *)) { max-width: 100%; height: auto; }
:where(img):where(:not(#allrecords *)) { display: block; }
:where(a):where(:not(#allrecords *)) { color: inherit; text-decoration: none; transition: opacity .2s var(--ease), color .2s var(--ease), background-color .2s var(--ease); }
:where(a):where(:not(#allrecords *)):hover { opacity: .75; }
:where(h1, h2, h3, h4, h5, h6):where(:not(#allrecords *)) { margin: 0 0 .5em; font-weight: 600; line-height: 1.2; letter-spacing: -0.01em; }
:where(h1):where(:not(#allrecords *)), .h1 { font-size: var(--fs-h1); }
:where(h2):where(:not(#allrecords *)), .h2 { font-size: var(--fs-h2); }
:where(h3):where(:not(#allrecords *)), .h3 { font-size: var(--fs-h3); }
:where(p):where(:not(#allrecords *)) { margin: 0 0 1em; }
:where(ul, ol):where(:not(#allrecords *)) { margin: 0; padding: 0; }
:where(button):where(:not(#allrecords *)) { font: inherit; color: inherit; cursor: pointer; }
:where(input, textarea, select):where(:not(#allrecords *)) { font: inherit; }
:focus-visible { outline: 2px solid var(--c-ink); outline-offset: 3px; }
.visually-hidden, .screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 8px; top: -60px; z-index: 1000; background: var(--c-ink); color: #fff; padding: 10px 16px; border-radius: var(--radius); }
.skip-link:focus { top: 8px; }
.muted { color: var(--c-sand); }

.container { width: 100%; max-width: calc(var(--container) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.container--narrow { max-width: calc(820px + 2 * var(--gutter)); }
.section { padding-block: calc(var(--section) / 2); }
.section__title { font-size: var(--fs-h2); margin-bottom: clamp(20px, 3vw, 40px); }
.site-main { min-height: 50vh; padding-top: var(--header-h); }
.header-overlay .site-main { padding-top: 0; }

/* ---------- Buttons ---------- */
.btn,
.elementor-widget-button .elementor-button,
.wp-block-button__link {
	display: inline-flex; align-items: center; justify-content: center; gap: 10px;
	min-height: 56px; padding: 12px 24px;
	background: var(--c-ink); color: #fff;
	border: 1px solid var(--c-ink); border-radius: var(--radius);
	font-family: var(--font); font-size: 1.125rem; font-weight: 400; line-height: 1.3; text-align: center;
	cursor: pointer; transition: background-color .2s var(--ease), color .2s var(--ease), transform .2s var(--ease);
}
.btn:hover,
.elementor-widget-button .elementor-button:hover { opacity: 1; background: #000; color: #fff; }
.btn--outline { background: transparent; color: var(--c-ink); }
.btn--outline:hover { background: var(--c-ink); color: #fff; }
.btn--light { background: #fff; color: var(--c-ink); border-color: #fff; }
.btn--block { width: 100%; }
@media (max-width: 479px) { .btn, .elementor-widget-button .elementor-button { width: 100%; font-size: 1rem; } }

.link-arrow { display: inline-flex; align-items: center; gap: 12px; font-size: 1rem; }
.link-arrow .icon { width: 40px; height: 40px; padding: 10px; background: var(--c-ink); color: #fff; border-radius: var(--radius); }

/* ---------- Logo ---------- */
.logo-text { display: inline-flex; flex-direction: column; align-items: center; line-height: 1; color: var(--c-ink); }
.logo-text__main { font-size: 30px; font-weight: 700; letter-spacing: .14em; }
.logo-text__sub { font-size: 19px; font-weight: 600; margin-top: 2px; }
.logo-text--light { color: #fff; }
.custom-logo { width: auto; max-height: 40px; }
@media (min-width: 1024px) { .custom-logo { max-height: 57px; } }

/* ---------- Header ---------- */
.site-header {
	position: fixed; inset: 0 0 auto 0; z-index: 100;
	height: var(--header-h);
	background: linear-gradient(to bottom, #fff 0%, rgba(255,255,255,.92) 60%, rgba(255,255,255,0) 100%);
	transition: background-color .25s var(--ease), box-shadow .25s var(--ease), height .25s var(--ease);
}
.admin-bar .site-header { top: 46px; }
@media (min-width: 783px) { .admin-bar .site-header { top: 32px; } }
.site-header.is-scrolled { background: #fff; box-shadow: 0 1px 0 var(--c-line); }
@media (min-width: 1024px) { .site-header.is-scrolled { height: 80px; } }
.site-header__inner { height: 100%; display: flex; align-items: center; gap: 24px; padding-inline: clamp(16px, 2.8vw, 40px); }
.site-header__logo { flex: 0 0 auto; }
.site-header__logo .logo-text__main { font-size: 22px; }
.site-header__logo .logo-text__sub { font-size: 14px; }
@media (min-width: 1024px) {
	.site-header__logo .logo-text__main { font-size: 30px; }
	.site-header__logo .logo-text__sub { font-size: 19px; }
}
.site-header__tools { margin-left: auto; display: flex; align-items: center; gap: clamp(12px, 1.6vw, 24px); }

/* Main nav (desktop) */
.main-nav { display: none; flex: 1 1 auto; justify-content: center; }
@media (min-width: 1200px) { .main-nav { display: flex; } }
.main-nav__list { display: flex; list-style: none; gap: clamp(8px, 1.5vw, 40px); }
.main-nav__list > li { position: relative; }
.main-nav__list > li > a { display: inline-flex; align-items: center; gap: 6px; padding: 8px 4px; font-size: 16px; font-weight: 600; white-space: nowrap; }
.main-nav__list > li.menu-item-has-children > a::after { content: ""; border: 3px solid transparent; border-top: 4px solid currentColor; border-bottom: 0; margin-top: 2px; }
.main-nav__list .current-menu-item > a, .main-nav__list .current-menu-ancestor > a { text-decoration: underline; text-underline-offset: 6px; }
.main-nav .sub-menu {
	position: absolute; top: 100%; left: 50%; min-width: 240px; list-style: none;
	padding: 12px 0; background: #fff; border-radius: var(--radius); box-shadow: 0 10px 30px rgba(0,0,0,.12);
	opacity: 0; visibility: hidden; transform: translate(-50%, 8px); transition: opacity .2s var(--ease), transform .2s var(--ease), visibility .2s;
}
.main-nav li:hover > .sub-menu, .main-nav li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.main-nav .sub-menu a { display: block; padding: 8px 20px; font-size: 15px; white-space: nowrap; }
.main-nav .sub-menu a:hover { background: var(--c-soft); opacity: 1; }

/* Phone pill */
.phone-pill {
	display: none; align-items: center; gap: 10px; height: 32px; padding: 0 16px;
	background: #fff; color: var(--c-ink); border-radius: 30px; font-size: 14px; white-space: nowrap;
	box-shadow: 2px 0 2px var(--c-shadow), -2px 0 2px var(--c-shadow);
}
.phone-pill .icon { width: 16px; height: 16px; padding: 3px; background: var(--c-ink); color: #fff; border-radius: 50%; }
@media (min-width: 1024px) { .site-header .phone-pill { display: inline-flex; } }
.offcanvas .phone-pill, .site-footer .phone-pill { display: inline-flex; }
.phone-pill--light { box-shadow: none; height: 32px; }

/* Socials */
.socials { display: flex; list-style: none; gap: 8px; }
.socials a { display: grid; place-items: center; width: 24px; height: 24px; }
.socials .icon { width: 14px; height: 14px; }
.socials--header { display: none; }
@media (min-width: 1024px) { .socials--header { display: flex; } }
.socials--header a { background: var(--c-dark); color: #fff; }
.socials--header li:nth-child(n+4) { display: none; }
.socials--footer a { border: 1px solid var(--c-sand); color: #fff; }
.socials--dark a { background: var(--c-dark); color: #fff; width: 36px; height: 36px; }
.socials--dark .icon { width: 18px; height: 18px; }

/* Lang switch */
.lang-switch { list-style: none; display: flex; gap: 8px; }
.lang-switch a { display: grid; place-items: center; min-width: 40px; height: 44px; font-size: 18px; }

/* Burger */
.burger { display: inline-flex; flex-direction: column; justify-content: center; gap: 4px; width: 44px; height: 44px; padding: 7px; background: none; border: 0; }
.burger span { display: block; height: 3px; width: 30px; background: var(--c-ink); transition: transform .25s var(--ease), opacity .2s; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Off-canvas menu ---------- */
.offcanvas { position: fixed; inset: 0; z-index: 200; }
.offcanvas[hidden] { display: block; visibility: hidden; pointer-events: none; }
.offcanvas__backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.4); opacity: 0; transition: opacity .3s var(--ease); }
.offcanvas__panel {
	position: absolute; top: 0; right: 0; bottom: 0; width: min(400px, 100%);
	display: flex; flex-direction: column; gap: 24px; padding: 20px clamp(20px, 5vw, 40px) max(24px, env(safe-area-inset-bottom));
	background: #fff; overflow-y: auto; overscroll-behavior: contain;
	transform: translateX(100%); transition: transform .35s var(--ease);
}
.offcanvas.is-open { visibility: visible; pointer-events: auto; }
.offcanvas.is-open .offcanvas__backdrop { opacity: 1; }
.offcanvas.is-open .offcanvas__panel { transform: none; }
.offcanvas__head { display: flex; justify-content: space-between; align-items: center; }
.offcanvas__close, .modal__close { display: grid; place-items: center; width: 44px; height: 44px; margin-left: auto; background: none; border: 0; }
.offcanvas__list { list-style: none; display: flex; flex-direction: column; }
.offcanvas__list > li { border-bottom: 1px solid var(--c-line); }
.offcanvas__list a { display: block; padding: 14px 0; font-size: 18px; font-weight: 600; }
.offcanvas__list .menu-item-has-children { position: relative; }
.offcanvas__list .submenu-toggle { position: absolute; right: 0; top: 4px; width: 44px; height: 44px; display: grid; place-items: center; background: none; border: 0; transition: transform .2s; }
.offcanvas__list .submenu-toggle[aria-expanded="true"] { transform: rotate(180deg); }
.offcanvas__list .sub-menu { list-style: none; display: none; padding: 0 0 12px 12px; }
.offcanvas__list .sub-menu.is-open { display: block; }
.offcanvas__list .sub-menu a { padding: 8px 0; font-size: 16px; font-weight: 400; }
.offcanvas__foot { margin-top: auto; display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
.offcanvas__mail { font-size: 16px; }

/* ---------- Page hero / breadcrumbs ---------- */
.page-hero { padding-top: clamp(24px, 4vw, 60px); padding-bottom: clamp(16px, 3vw, 40px); }
.page-hero__title { font-size: var(--fs-h1); margin-bottom: 16px; }
.page-hero__lead { font-size: var(--fs-lead); max-width: 760px; color: var(--c-ink); }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; font-size: 14px; color: var(--c-muted); }
.breadcrumbs li:not(:last-child)::after { content: "/"; margin-left: 6px; opacity: .5; }

/* ---------- Content ---------- */
.entry-content { padding-bottom: calc(var(--section) / 2); }
.entry-content > * + * { margin-top: 1em; }
.entry-content h2 { margin-top: 1.6em; }
.entry-content h3 { margin-top: 1.4em; }
.entry-content ul, .entry-content ol { padding-left: 1.3em; }
.entry-content li + li { margin-top: .35em; }
.entry-content a:not(.btn) { text-decoration: underline; text-underline-offset: 3px; }
.entry-content img { border-radius: var(--radius); }
.entry-content figure { margin: 1.5em 0; }
.entry-content figcaption { font-size: 14px; color: var(--c-muted); margin-top: 8px; }
.entry-content table { width: 100%; border-collapse: collapse; display: block; overflow-x: auto; }
.entry-content th, .entry-content td { padding: 10px 12px; border-bottom: 1px solid var(--c-line); text-align: left; }
.entry-content blockquote { margin: 1.5em 0; padding-left: 20px; border-left: 3px solid var(--c-sand); font-size: var(--fs-lead); }
.alignwide { width: min(100vw - 2 * var(--gutter), 1200px); margin-inline: auto; }
.alignfull { width: 100vw; margin-inline: calc(50% - 50vw); max-width: none; }

/* ---------- Grid & cards ---------- */
.grid { display: grid; gap: clamp(16px, 2.2vw, 32px); grid-template-columns: 1fr; }
@media (min-width: 600px) { .grid--2, .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .grid--3 { grid-template-columns: repeat(3, 1fr); } .grid--4 { grid-template-columns: repeat(4, 1fr); } }

.card__link { display: block; height: 100%; }
.card__link:hover { opacity: 1; }
.card__media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; border-radius: var(--radius); background: var(--c-soft); }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.card__link:hover .card__media img { transform: scale(1.04); }
.card__body { padding-top: 16px; }
.card__title { font-size: clamp(1.125rem, 1.05rem + .3vw, 1.375rem); margin-bottom: 6px; }
.card__meta { display: block; font-size: 14px; color: var(--c-muted); margin: 0 0 6px; }
.thumb-placeholder { display: block; width: 100%; height: 100%; background: linear-gradient(135deg, var(--c-soft), var(--c-line)); }

/* Overlay-cards (портфолио как на Tilda: подпись поверх фото) */
.cards--overlay .card__link { position: relative; overflow: hidden; border-radius: var(--radius); }
.cards--overlay .card__media { aspect-ratio: 4 / 5; }
@media (min-width: 600px) { .cards--overlay .card__media { aspect-ratio: 4 / 5; } }
.cards--overlay .card__body { position: absolute; inset: auto 0 0 0; padding: 20px; color: #fff; background: linear-gradient(to top, rgba(0,0,0,.7), rgba(0,0,0,0)); }
.cards--overlay .card__meta { color: rgba(255,255,255,.85); }

/* ---------- Project ---------- */
.project-hero { padding-top: clamp(24px, 4vw, 60px); }
.project-hero__title { font-size: var(--fs-h1); }
.project-facts { display: flex; flex-wrap: wrap; gap: 12px 40px; margin: 16px 0 clamp(24px, 3vw, 40px); }
.project-facts dt { font-size: 14px; color: var(--c-muted); text-transform: uppercase; letter-spacing: .04em; }
.project-facts dd { margin: 2px 0 0; font-size: 18px; font-weight: 600; }
.project-hero__media img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius); }
.project__content { padding-top: clamp(32px, 4vw, 60px); max-width: calc(860px + 2 * var(--gutter)); }
.project-gallery { display: grid; gap: clamp(8px, 1.4vw, 20px); grid-template-columns: 1fr; }
@media (min-width: 768px) { .project-gallery { grid-template-columns: 1fr 1fr; } .project-gallery__item.is-wide { grid-column: 1 / -1; } }
.project-gallery__item { display: block; overflow: hidden; border-radius: var(--radius); background: var(--c-soft); }
.project-gallery__item img { width: 100%; height: 100%; object-fit: cover; }
.project-gallery__item:hover { opacity: .92; }

/* ---------- Blog post ---------- */
.post-hero { padding-top: clamp(24px, 4vw, 60px); }
.post-hero__meta { font-size: 14px; color: var(--c-muted); }
.post-hero__title { font-size: var(--fs-h1); }
.post-hero__media { margin-block: clamp(16px, 3vw, 40px); }
.post-hero__media img { width: 100%; border-radius: var(--radius); aspect-ratio: 16 / 9; object-fit: cover; }
.post-single .entry-content { font-size: var(--fs-body); line-height: 1.6; }
.nav-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 40px; }
.nav-links .page-numbers { display: grid; place-items: center; min-width: 44px; height: 44px; padding: 0 12px; border: 1px solid var(--c-line); border-radius: var(--radius); }
.nav-links .current { background: var(--c-ink); color: #fff; border-color: var(--c-ink); }

/* ---------- CTA + form ---------- */
.cta-block { background: var(--c-soft); margin-top: calc(var(--section) / 2); }
.cta-block__inner { display: grid; gap: clamp(24px, 4vw, 80px); padding-block: calc(var(--section) / 2); }
@media (min-width: 900px) { .cta-block__inner { grid-template-columns: 1fr 1fr; align-items: start; } }
.cta-block__text p { font-size: var(--fs-body); max-width: 520px; }

.tengo-form { display: grid; gap: 12px; width: 100%; }
.tengo-form input[type="email"], .tengo-form input[type="tel"], .tengo-form input[type="text"] {
	width: 100%; height: 56px; padding: 0 18px; font-size: 16px; /* 16px — без автозума на iOS */
	color: var(--c-ink); background: #fff; border: 1px solid #cfcac3; border-radius: var(--radius);
	transition: border-color .2s;
}
.tengo-form input:focus { border-color: var(--c-ink); outline: none; }
.tengo-form input:user-invalid { border-color: #b3261e; }
.tengo-form__consent { font-size: 12px; line-height: 1.5; color: var(--c-muted); margin: 4px 0 0; }
.tengo-form__consent a { text-decoration: underline; }
.tengo-form__msg { padding: 12px 16px; border-radius: var(--radius); font-size: 15px; }
.tengo-form__msg--ok { background: #e8f3ea; }
.tengo-form__msg--err { background: #fbe9e7; }
.tengo-form .hp { position: absolute; left: -9999px; }
.tengo-form--dark input { background: transparent; color: #fff; border-color: rgba(255,255,255,.4); }
.tengo-form--dark input::placeholder { color: rgba(255,255,255,.7); }

/* ---------- Modal ---------- */
.modal { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; padding: 16px; }
.modal[hidden] { display: grid; visibility: hidden; pointer-events: none; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.55); opacity: 0; transition: opacity .25s var(--ease); }
.modal__dialog {
	position: relative; width: min(560px, 100%); max-height: calc(100dvh - 32px); overflow-y: auto;
	padding: clamp(24px, 5vw, 48px); background: #fff; border-radius: var(--radius);
	opacity: 0; transform: translateY(16px); transition: opacity .25s var(--ease), transform .25s var(--ease);
}
.modal.is-open { visibility: visible; pointer-events: auto; }
.modal.is-open .modal__backdrop { opacity: 1; }
.modal.is-open .modal__dialog { opacity: 1; transform: none; }
.modal__close { position: absolute; top: 8px; right: 8px; }
.modal__title { padding-right: 32px; }
.modal__text { color: var(--c-muted); font-size: 16px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--c-ink); color: #fff; padding-top: clamp(40px, 5vw, 56px); font-size: 14px; line-height: 22px; }
.site-footer a:hover { opacity: 1; color: var(--c-sand); }
.site-footer__grid { display: grid; gap: 32px; grid-template-columns: 1fr; }
@media (min-width: 480px) and (max-width: 1023px) {
	/* как на Tilda: сверху реквизиты, посередине две колонки «Oferta» / «O nas», внизу контакты */
	.site-footer__grid { grid-template-columns: 1fr 1fr; gap: 0; }
	.site-footer__col--brand, .site-footer__col:last-child { grid-column: 1 / -1; }
	.site-footer__col--brand { padding-bottom: 40px; }
	.site-footer__col:not(.site-footer__col--brand):not(:last-child) { padding: 24px 20px 32px 0; border-top: 1px solid rgba(201,192,180,.2); border-bottom: 1px solid rgba(201,192,180,.2); }
	.site-footer__col:nth-child(3) { padding-left: 20px; border-left: 1px solid rgba(201,192,180,.2); }
	.site-footer__col:last-child { padding: 32px 0 8px; }
}
@media (min-width: 1024px) {
	.site-footer__grid { grid-template-columns: 300px repeat(3, 1fr); gap: 0; }
	.site-footer__col:not(.site-footer__col--brand) { padding: 112px 24px 24px; border-left: 1px solid rgba(201,192,180,.2); }
	.site-footer__col--brand { padding: 0 20px 24px; }
}
.site-footer__logo { display: inline-block; margin-bottom: 40px; }
.site-footer__logo-img { width: 173px; height: auto; filter: brightness(0) invert(1); }
.site-footer__info p { margin: 0 0 8px; opacity: .8; }
.site-footer__title { margin: 0 0 24px; font-size: 16px; line-height: 25px; text-transform: uppercase; color: var(--c-sand); opacity: .8; }
.site-footer__subtitle { margin: 16px 0 0; text-transform: uppercase; color: var(--c-sand); opacity: .8; }
.site-footer__menu { list-style: none; display: flex; flex-direction: column; gap: 16px; }
.site-footer__menu a { opacity: .8; }
.site-footer__hours p { margin: 0 0 4px; opacity: .8; }
.site-footer__time { display: flex; align-items: center; gap: 8px; color: var(--c-sand); text-transform: uppercase; }
.site-footer__time .dot { width: 4px; height: 4px; border-radius: 10px; background: #fff; }
.site-footer .socials { margin-top: 16px; }
.site-footer__bottom {
	display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 24px;
	margin-top: 32px; padding: 20px 0 max(24px, env(safe-area-inset-bottom)); border-top: 1px solid rgba(201,192,180,.2); font-size: 12px; line-height: 19px;
}
.site-footer__copy { margin: 0; opacity: .8; }
.site-footer__legal { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 24px; }
.site-footer__legal a { opacity: .8; }
@media (max-width: 599px) {
	.site-footer__col { padding-bottom: 24px; border-bottom: 1px solid rgba(201,192,180,.2); }
	.site-footer__title { margin-bottom: 16px; }
}

/* ---------- 404 ---------- */
.error-404 { min-height: 60vh; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; padding-block: var(--section); }
.error-404__code { font-size: clamp(80px, 18vw, 200px); font-weight: 700; line-height: 1; margin: 0; color: var(--c-sand); }

/* ---------- Search form ---------- */
.search-form { display: flex; gap: 8px; }
.search-form input { flex: 1; height: 56px; padding: 0 16px; border: 1px solid #cfcac3; border-radius: var(--radius); }

/* ==========================================================================
   Elementor (бесплатный): приводим виджеты к стилю сайта
   ========================================================================== */
.elementor-page .elementor-widget-heading .elementor-heading-title { font-family: var(--font); color: var(--c-ink); line-height: 1.2; }
.elementor-widget-text-editor { font-family: var(--font); color: var(--c-ink); }
.elementor-widget-text-editor p:last-child { margin-bottom: 0; }
.elementor-widget-text-editor ul { padding-left: 1.2em; }
.elementor-section.elementor-section-boxed > .elementor-container { max-width: var(--container); }
.elementor-section { padding-inline: var(--gutter); }
.elementor-section .elementor-section { padding-inline: 0; }
.elementor-image img { border-radius: var(--radius); }
.elementor-widget-button .elementor-button { font-family: var(--font); }

/* Tabs → адаптивная «лента» кнопок как на Tilda (t817) */
.tengo-tabs .elementor-tabs-wrapper { display: flex !important; flex-wrap: wrap; gap: 8px 4px; border-bottom: 0; }
.tengo-tabs .elementor-tab-desktop-title {
	padding: 14px 20px !important; font-size: 16px; font-weight: 400; color: var(--c-ink);
	border: 1px solid var(--c-line) !important; border-radius: var(--radius); background: #fff;
}
.tengo-tabs .elementor-tab-desktop-title.elementor-active { background: var(--c-ink); color: #fff; border-color: var(--c-ink) !important; }
.tengo-tabs .elementor-tab-desktop-title::before, .tengo-tabs .elementor-tab-desktop-title::after { display: none !important; }
.tengo-tabs .elementor-tab-content { padding: clamp(20px, 3vw, 40px) 0 0 !important; border: 0 !important; }
@media (max-width: 767px) {
	.tengo-tabs .elementor-tabs-wrapper { display: none !important; }
	.tengo-tabs .elementor-tab-mobile-title { padding: 16px 0 !important; border: 0 !important; border-bottom: 1px solid var(--c-line) !important; font-weight: 600; font-size: 18px; }
	.tengo-tabs .elementor-tab-mobile-title.elementor-active { color: var(--c-ink); }
	.tengo-tabs .elementor-tab-content { padding: 16px 0 24px !important; }
}

/* Лого клиентов: серые, в цвет при наведении */
.tengo-logos img { filter: grayscale(1); opacity: .8; transition: filter .3s, opacity .3s; max-height: 60px; width: auto; margin-inline: auto; }
.tengo-logos img:hover { filter: none; opacity: 1; }

/* Бренды-чипсы в блоке «Meble, podłogi, wykładziny» */
.tengo-chips ul { list-style: none; padding: 0 !important; display: flex; flex-wrap: wrap; gap: 8px; }
.tengo-chips li { margin: 0 !important; }
.tengo-chips a { display: inline-block; padding: 6px 12px; font-size: 14px; border: 1px solid var(--c-line); border-radius: 30px; text-decoration: none !important; }
.tengo-chips a:hover { background: var(--c-ink); color: #fff; opacity: 1; }

/* Карточки публикаций */
.tengo-press .elementor-image-box-wrapper { text-align: left; }
.tengo-press .elementor-image-box-img { margin-bottom: 16px !important; width: 100% !important; }
.tengo-press .elementor-image-box-img img { aspect-ratio: 3 / 4; object-fit: cover; width: 100%; }

/* Сплит-блоки (текст + фото) — на мобиле фото над текстом */
@media (max-width: 767px) {
	.tengo-split-reverse > .elementor-container { flex-direction: column-reverse; }
}

/* ---------- Lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 400; display: grid; place-items: center; padding: 56px 8px; background: rgba(0,0,0,.92); }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 100%; max-height: calc(100dvh - 112px); object-fit: contain; border-radius: var(--radius); }
.lightbox button { position: absolute; width: 48px; height: 48px; background: none; border: 0; color: #fff; font-size: 40px; line-height: 1; }
.lightbox__close { top: 8px; right: 8px; }
.lightbox__prev { left: 4px; top: 50%; transform: translateY(-50%); }
.lightbox__next { right: 4px; top: 50%; transform: translateY(-50%); }

/* Кнопка-контур в Elementor */
.btn-outline .elementor-button { background: transparent !important; color: var(--c-ink) !important; }
.btn-outline .elementor-button:hover { background: var(--c-ink) !important; color: #fff !important; }

/* Публикации: горизонтальный слайдер со свайпом (scroll-snap) */
.press-slider {
	list-style: none; display: grid; grid-auto-flow: column; grid-auto-columns: clamp(220px, 70vw, 280px);
	gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 0 0 16px !important; margin: 0;
	scrollbar-width: thin; -webkit-overflow-scrolling: touch;
}
@media (min-width: 1024px) { .press-slider { grid-auto-columns: calc((100% - 60px) / 4); } }
.press-card { scroll-snap-align: start; }
.press-card__link { display: flex; flex-direction: column; gap: 8px; height: 100%; }
.press-card__img { display: block; aspect-ratio: 3 / 4; border-radius: var(--radius); background: var(--c-soft) center / cover no-repeat; }
.press-card__src { font-weight: 600; font-size: 16px; margin-top: 8px; }
.press-card__title { font-size: 14px; color: var(--c-muted); flex: 1; }
.press-card__more { align-self: flex-start; padding: 6px 16px; font-size: 14px; background: var(--c-ink); color: #fff; border-radius: var(--radius); }

/* ---------- Каталог (товары Tilda Store) ---------- */
.product-grid { display: grid; gap: clamp(24px, 3vw, 40px); grid-template-columns: 1fr; margin: 2em 0; }
@media (min-width: 768px) { .product-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .product-grid { grid-template-columns: repeat(3, 1fr); } }
.product-card { display: flex; flex-direction: column; gap: 16px; }
.product-card__media { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.product-card__media img { width: 100%; border-radius: var(--radius); background: var(--c-soft); object-fit: contain; }
.product-card__main { grid-column: 1 / -1; aspect-ratio: 1 / 1; }
.product-card__thumb { aspect-ratio: 1 / 1; }
.product-card__title { font-size: 1.25rem; margin: 0; }
.product-card__descr { color: var(--c-muted); font-size: 15px; margin: 0; }
.product-card__text { font-size: 15px; line-height: 1.55; }
.product-card__text p { margin: 0 0 .6em; }

/* ==========================================================================
   Главная (front-page.php) — по макету tengogroup.pl
   ========================================================================== */
.home .h-section { padding-block: calc(var(--section) / 2); }
.h-title { font-size: var(--fs-h2); font-weight: 600; margin: 0 0 clamp(16px, 2.4vw, 32px); }
.h-lead { font-size: var(--fs-body); max-width: 620px; margin: -8px 0 0; }
.h-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: clamp(16px, 2.4vw, 32px); }
.h-head .h-title { margin-bottom: 8px; }
.h-btns { display: flex; flex-wrap: wrap; gap: 16px 40px; margin-top: 24px; }
.h-btns .btn { min-width: 259px; }
.h-btns--center { justify-content: center; }
@media (max-width: 599px) { .h-btns { gap: 12px; } .h-btns .btn { min-width: 0; width: 100%; } }

/* Hero */
.h-hero { display: grid; gap: clamp(24px, 4vw, 40px); align-items: center; padding-block: clamp(16px, 5vw, 90px) calc(var(--section) / 2); }
@media (min-width: 1024px) { .h-hero { grid-template-columns: 620fr 680fr; } }
.h-hero__title { font-size: var(--fs-h1); line-height: 1.2; margin: 0 0 10px; }
.h-hero__subtitle { font-size: var(--fs-lead); font-weight: 600; line-height: 1.2; margin: 0 0 24px; }
.h-hero__lead { font-size: 18px; line-height: 22px; max-width: 526px; margin: 0; }
@media (max-width: 599px) { .h-hero__lead { font-size: 16px; line-height: 1.4; } }
.h-fade { position: relative; aspect-ratio: 680 / 550; border-radius: var(--radius); overflow: hidden; background: var(--c-soft); }
.h-fade__item { position: absolute; inset: 0; opacity: 0; transition: opacity 1s var(--ease); }
.h-fade__item.is-active { opacity: 1; }
.h-fade__item img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 1023px) { .h-hero__media { order: -1; } }

/* Tabs: desktop — ряд вкладок, mobile — аккордеон */
.h-tabs__list { display: flex; flex-wrap: wrap; gap: 8px; border-bottom: 1px solid var(--c-line); padding-bottom: 16px; margin-bottom: clamp(20px, 3vw, 40px); }
.h-tabs__tab { padding: 14px 20px; font-size: 16px; background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius); transition: background .2s, color .2s; }
.h-tabs__tab:hover { border-color: var(--c-ink); }
.h-tabs__tab.is-active { background: var(--c-ink); color: #fff; border-color: var(--c-ink); }
.h-tabs__acc { display: none; }
.h-tabs__body { display: grid; gap: clamp(20px, 3vw, 48px); align-items: start; }
@media (min-width: 768px) { .h-tabs__body { grid-template-columns: 1fr 1fr; } }
.h-tabs__media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); }
.h-tabs__text { font-size: 17px; line-height: 1.5; }
.h-tabs__text ul { padding-left: 1.2em; margin: 0 0 1em; }
.h-tabs__text li + li { margin-top: 4px; }
.h-tabs__text .btn { margin-top: 8px; }
@media (max-width: 767px) {
	.h-tabs__list { display: none; }
	.h-tabs__panel[hidden] { display: block; }
	.h-tabs__panel { border-bottom: 1px solid var(--c-line); }
	.h-tabs__acc { display: flex; justify-content: space-between; align-items: center; width: 100%; padding: 16px 0; font-size: 18px; font-weight: 600; text-align: left; background: none; border: 0; }
	.h-tabs__acc::after { content: "+"; font-size: 24px; font-weight: 400; transition: transform .2s; }
	.h-tabs__acc[aria-expanded="true"]::after { transform: rotate(45deg); }
	.h-tabs__acc[aria-expanded="false"] + .h-tabs__body { display: none; }
	.h-tabs__body { padding-bottom: 24px; }
}

/* Логотипы клиентов — бегущая строка */
.h-marquee { overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.h-marquee__track { display: flex; width: max-content; animation: h-marquee 60s linear infinite; }
.h-marquee:hover .h-marquee__track { animation-play-state: paused; }
.h-marquee__item { flex: 0 0 auto; width: clamp(120px, 14vw, 180px); padding: 0 clamp(12px, 2vw, 24px); }
.h-marquee__item img { width: 100%; height: 72px; object-fit: contain; }
@keyframes h-marquee { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .h-marquee__track { animation: none; flex-wrap: wrap; width: auto; justify-content: center; } }

/* Стрелки */
.h-arrows { display: flex; gap: 8px; flex: 0 0 auto; }
.h-arrow { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--c-ink); color: #fff; border: 0; }
.h-arrow .icon { width: 20px; height: 20px; }
.h-arrow--prev .icon { transform: rotate(180deg); }
.h-arrow:disabled { opacity: .3; cursor: default; }

/* Публикации */
.h-press__track { list-style: none; margin: 0; padding: 0 0 8px; display: grid; grid-auto-flow: column; grid-auto-columns: clamp(240px, 72vw, 280px); gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.h-press__track::-webkit-scrollbar { display: none; }
@media (min-width: 1024px) { .h-press__track { grid-auto-columns: calc((100% - 60px) / 4); } }
.h-press__card { scroll-snap-align: start; }
.h-press__card a { display: flex; flex-direction: column; height: 100%; gap: 8px; }
.h-press__card a:hover { opacity: 1; }
.h-press__img { display: block; aspect-ratio: 3 / 4; overflow: hidden; border-radius: var(--radius); background: var(--c-soft); }
.h-press__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.h-press__card a:hover img { transform: scale(1.04); }
.h-press__src { font-weight: 600; margin-top: 8px; }
.h-press__title { font-size: 15px; color: var(--c-muted); flex: 1; }
.h-press__more { align-self: flex-start; padding: 6px 18px; font-size: 14px; color: #fff; background: var(--c-ink); border-radius: var(--radius); }
.h-press__logos { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 24px 40px; margin-top: clamp(32px, 4vw, 56px); }
.h-press__logos img { height: 72px; width: auto; max-width: 220px; object-fit: contain; }
@media (max-width: 599px) { .h-press__logos { justify-content: center; } .h-press__logos img { height: 52px; max-width: 40%; } }

/* Сплит-блоки (текст + фото) */
.h-split { display: grid; gap: clamp(24px, 4vw, 64px); align-items: center; }
@media (min-width: 900px) { .h-split { grid-template-columns: 1fr 1fr; } }
.h-split__text p { font-size: 18px; line-height: 1.45; max-width: 560px; }
@media (max-width: 599px) { .h-split__text p { font-size: 16px; } }
.h-split__media img { width: 100%; border-radius: var(--radius); aspect-ratio: 4 / 3; object-fit: cover; }
.h-split__media--duo { display: grid; gap: 12px; }
.h-split__media--duo img { aspect-ratio: 16 / 10; }
@media (max-width: 899px) { .h-split__media { order: -1; } }
.h-cta .h-split__media img { aspect-ratio: 3 / 4; }
@media (max-width: 899px) { .h-cta .h-split__media img { aspect-ratio: 4 / 3; } }

.h-chips { list-style: none; padding: 0; margin: 16px 0 8px; display: flex; flex-wrap: wrap; gap: 8px; }
.h-chips a { display: inline-block; padding: 6px 12px; font-size: 14px; border: 1px solid var(--c-line); border-radius: 30px; }
.h-chips a:hover { background: var(--c-ink); color: #fff; border-color: var(--c-ink); opacity: 1; }

/* Реализации — слайдер карточек */
.h-projects__track { list-style: none; margin: 0; padding: 0 var(--gutter) 8px; display: grid; grid-auto-flow: column; grid-auto-columns: min(78vw, 560px); gap: clamp(12px, 2vw, 24px); overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter); scrollbar-width: none; }
.h-projects__track::-webkit-scrollbar { display: none; }
@media (min-width: 1240px) { .h-projects__track { padding-inline: calc((100vw - var(--container)) / 2); scroll-padding-inline: calc((100vw - var(--container)) / 2); } }
.h-projects__item { scroll-snap-align: start; }
.h-projects__item a { position: relative; display: block; border-radius: var(--radius); overflow: hidden; }
.h-projects__item a:hover { opacity: 1; }
.h-projects__item img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .6s var(--ease); }
.h-projects__item a:hover img { transform: scale(1.03); }
.h-projects__cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 20px 16px; color: #fff; background: linear-gradient(to top, rgba(0,0,0,.65), transparent); font-size: 16px; }
.h-projects__num { position: absolute; top: 16px; right: 16px; color: #fff; font-size: 22px; font-weight: 600; text-shadow: 0 1px 6px rgba(0,0,0,.4); }
.h-projects__num small { font-size: 14px; font-weight: 400; opacity: .8; }

/* Страницы «блоки Tilda 1 в 1»: шапка темы поверх, отступ под фиксированную шапку */
.is-tilda-embed .site-main { padding-top: 0; } /* как на Tilda: шапка фиксированная и лежит поверх первого блока */
.site-main:has(> article:first-child > .tp-cover:first-child, > article:first-child > .ta-split:first-child, > .tl:first-child, > .tb:first-child) { padding-top: 0; }
.is-tilda-embed #allrecords { font-family: initial; font-size: 16px; line-height: normal; color: #000; -webkit-font-smoothing: auto; }
.is-tilda-embed .site-header, .is-tilda-embed .site-footer, .is-tilda-embed .offcanvas, .is-tilda-embed .modal { font-family: var(--font); }

/* ==========================================================================
   Проект (single-project.php) — 1 в 1 со страницами проектов Tilda
   ========================================================================== */
.tp-cover { position: relative; display: flex; align-items: center; justify-content: center; height: var(--cover-h, 100vh); min-height: 420px; background: #000 center / cover no-repeat; text-align: center; overflow: hidden; }
.tp-cover__filter { position: absolute; inset: 0; background: linear-gradient(rgba(0, 0, 0, .2), rgba(0, 0, 0, .4)); }
.tp-cover__body { position: relative; width: 100%; max-width: 1200px; padding: 0 20px; }
.tp-cover__title { margin: 0; padding: 24px 0 38px; font-family: var(--font-t); font-weight: 600; font-size: 72px; line-height: 1.17; letter-spacing: .5px; color: #fff; overflow-wrap: anywhere; }
.tp-cover__arrow { position: absolute; left: 50%; bottom: 40px; transform: translateX(-50%); display: block; width: 38px; height: 20px; line-height: 0; animation: tp-arrow 1.7s infinite; }
.tp-cover__arrow:hover { opacity: 1; }
@keyframes tp-arrow { 0%, 20%, 50%, 80%, 100% { transform: translate(-50%, 0); } 40% { transform: translate(-50%, -8px); } 60% { transform: translate(-50%, -4px); } }
@media (max-width: 1200px) { .tp-cover__title { font-size: 60px; } }
@media (max-width: 640px) { .tp-cover__title { font-size: 36px; } }
@media (max-width: 480px) { .tp-cover__title { font-size: 30px; } .tp-cover { height: var(--cover-h, 100svh); } }

.tp-facts { padding: 60px 0; background: #fff; font-family: var(--font-t); color: #171717; text-align: center; }
.tp-facts__row { display: grid; grid-template-columns: repeat(var(--n, 2), minmax(0, 1fr)); gap: 0 40px; max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.tp-facts__row--1 { --n: 1; max-width: 640px; }
.tp-facts__row--3 { --n: 3; }
.tp-facts__row--4 { --n: 4; }
.tp-facts__value { padding: 8px 0 6px; font-size: 32px; font-weight: 400; line-height: 53px; }
.tp-facts__line { height: 1px; margin-top: 14px; background: #171717; opacity: .2; }
.tp-facts__label { min-height: 10px; padding: 4px 0 6px; font-size: 18px; line-height: 1.55; box-sizing: border-box; }
@media (max-width: 960px) {
	.tp-facts__row { grid-template-columns: 1fr; gap: 21px; }
	.tp-facts__item { margin-bottom: 20px; }
}

.tp-content { display: flex; flex-direction: column; font-family: var(--font-t); color: #171717; }
.tp-content > * { width: 100%; max-width: 1160px; margin: 0 auto 30px; box-sizing: border-box; }
.tp-content > p, .tp-content > ul, .tp-content > ol, .tp-content > h2, .tp-content > h3, .tp-content > h4, .tp-content > blockquote { max-width: 800px; padding: 0 20px; }
.tp-content > p, .tp-content li { font-size: 20px; line-height: 1.55; font-weight: 400; }
.tp-content > h2 { font-size: 36px; line-height: 1.23; font-weight: 600; margin-top: 60px; }
.tp-content > h3 { font-size: 26px; line-height: 1.35; font-weight: 600; }
.tp-content .wp-block-image, .tp-content figure { margin-left: auto; margin-right: auto; }
.tp-content .wp-block-image img { display: block; width: 100%; height: auto; }
.tp-content .wp-block-gallery { display: grid; grid-template-columns: repeat(var(--cols, 2), minmax(0, 1fr)); gap: 20px; padding: 0; }
.tp-content .wp-block-gallery.columns-1 { --cols: 1; }
.tp-content .wp-block-gallery.columns-3 { --cols: 3; }
.tp-content .wp-block-gallery.columns-4 { --cols: 4; }
.tp-content .wp-block-gallery > figure, .tp-content .wp-block-gallery .wp-block-image { width: auto !important; margin: 0 !important; }
.tp-content .wp-block-gallery img { display: block; width: 100%; height: auto; object-fit: cover; }
.tp-content .wp-block-gallery figcaption { display: none; }
.tp-content > .wp-block-image figcaption { font-size: 14px; color: #777; text-align: center; margin-top: 8px; }
@media (max-width: 1200px) { .tp-content > .wp-block-image, .tp-content > .wp-block-gallery { max-width: 940px; } .tp-content > p, .tp-content > ul, .tp-content > ol, .tp-content > h2, .tp-content > h3, .tp-content > blockquote { max-width: 620px; } .tp-facts__row { max-width: 960px; } }
@media (max-width: 960px) {
	.tp-content > .wp-block-image { padding: 0; }
	.tp-content .wp-block-gallery { gap: 20px; padding: 0 20px; }
}

.tp-form { padding: 120px 20px; font-family: var(--font-t); color: #171717; text-align: center; background: #fff; }
.tp-form__title { max-width: 600px; margin: 0 auto 45px; font-size: 32px; font-weight: 600; line-height: 1.23; }
.tp-form__form { max-width: 600px; margin: 0 auto; }
.tp-form__input { display: block; width: 100%; height: 60px; margin: 0 0 25px; padding: 0 20px; border: 1px solid #5e2028; border-radius: 5px; background: #fff; font: 400 16px/1.33 var(--font-t); color: #000; box-sizing: border-box; outline: none; -webkit-appearance: none; appearance: none; }
.tp-form__input::placeholder { color: #000; opacity: .5; }
.tp-form__input:focus { border-color: #171717; }
.tp-form__submit { display: block; width: 100%; height: 60px; margin: 0; padding: 0 45px; border: 1px solid #171717; border-radius: 5px; background: #171717; color: #fff; font: 400 16px/1.4 var(--font-t); text-transform: uppercase; cursor: pointer; transition: background-color .2s ease-in-out, color .2s ease-in-out, border-color .2s ease-in-out; }
.tp-form__submit:hover, .tp-form__submit:focus-visible { background: #fff; color: #000; border-color: #5e2028; }
.tp-form__note { margin: 50px 0 0; font-size: 14px; line-height: 1.55; color: #171717; }
.tp-form__note a { color: #2599e6; }
.tp-form__msg { margin: 0 0 25px; padding: 14px 20px; border-radius: 5px; background: #eef7ee; font-size: 16px; }
.tp-form__msg--err { background: #fbeeee; }
.tp-form .hp { position: absolute; left: -9999px; }
@media (max-width: 960px) { .tp-form { padding: 90px 20px; } }

.tp-back { padding: 30px 20px 240px; text-align: center; background: #fff; }
.tp-back__btn { display: inline-flex; align-items: center; justify-content: center; height: 60px; min-width: 270px; padding: 0 45px; border-radius: 4px; background: #171717; color: #fff !important; font: 600 16px/1.4 var(--font-t); text-transform: uppercase; box-sizing: border-box; }
.tp-back__btn:hover { opacity: 1; background: #2b2b2b; }
@media (min-width: 1025px) and (hover: hover) { .tp-cover { background-attachment: fixed; } }

/* Галереи-плитки Tilda (t155, t603, t660–t680) — блок «Галерея» со стилем is-style-tNNN,
   у картинок классы раскладки: tg-lg / tg-sm, tg-left / tg-right, tg-ar-W-H (пропорции), tg-cNN (ширина плитки) */
:is(.tp-content, .ta-content) .wp-block-gallery[class*="is-style-t"] { display: grid; gap: 20px; padding: 20px 0; grid-auto-flow: row dense; }
:is(.tp-content, .ta-content) .wp-block-gallery[class*="is-style-t"] > figure { position: relative; overflow: hidden; }
:is(.tp-content, .ta-content) .wp-block-gallery[class*="is-style-t"]:not(.is-style-slider) > figure img { position: absolute; inset: 0; width: 100%; height: 100% !important; object-fit: cover; }
:is(.tp-content, .ta-content) figure.tg-ar-1-1 { aspect-ratio: 1 / 1 !important; }
:is(.tp-content, .ta-content) figure.tg-ar-3-4 { aspect-ratio: 3 / 4 !important; }
:is(.tp-content, .ta-content) figure.tg-ar-4-3 { aspect-ratio: 4 / 3 !important; }
:is(.tp-content, .ta-content) figure.tg-ar-3-2 { aspect-ratio: 3 / 2 !important; }
:is(.tp-content, .ta-content) figure.tg-ar-2-3 { aspect-ratio: 2 / 3 !important; }
:is(.tp-content, .ta-content) figure.tg-ar-16-9 { aspect-ratio: 16 / 9 !important; }
:is(.tp-content, .ta-content) figure.tg-ar-9-16 { aspect-ratio: 9 / 16 !important; }
:is(.tp-content, .ta-content) figure.tg-ar-4-5 { aspect-ratio: 4 / 5 !important; }
:is(.tp-content, .ta-content) figure.tg-ar-5-4 { aspect-ratio: 5 / 4 !important; }
:is(.tp-content, .ta-content) figure.tg-ar-2-1 { aspect-ratio: 2 / 1 !important; }
:is(.tp-content, .ta-content) figure.tg-ar-1-2 { aspect-ratio: 1 / 2 !important; }
:is(.tp-content, .ta-content) figure.tg-ar-21-9 { aspect-ratio: 21 / 9 !important; }

/* t662: большая (2/3) + малая (1/3), высота 506 при 1160 */
:is(.tp-content, .ta-content) .wp-block-gallery.is-style-t662 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
:is(.tp-content, .ta-content) .wp-block-gallery.is-style-t662 > figure { aspect-ratio: 373 / 506; }
:is(.tp-content, .ta-content) .wp-block-gallery.is-style-t662 > figure.tg-lg { grid-column: span 2; aspect-ratio: 766 / 506; }
/* t660: большая квадратная на 2 ряда + 2 квадрата */
:is(.tp-content, .ta-content) .wp-block-gallery.is-style-t660 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
:is(.tp-content, .ta-content) .wp-block-gallery.is-style-t660 > figure { aspect-ratio: 1; }
:is(.tp-content, .ta-content) .wp-block-gallery.is-style-t660 > figure.tg-lg { grid-column: 1 / span 2; grid-row: span 2; aspect-ratio: auto; }
:is(.tp-content, .ta-content) .wp-block-gallery.is-style-t660 > figure.tg-lg.tg-right { grid-column: 2 / span 2; }
:is(.tp-content, .ta-content) .wp-block-gallery.is-style-t660 > figure.tg-sm.tg-left { grid-column: 1; }
:is(.tp-content, .ta-content) .wp-block-gallery.is-style-t660 > figure.tg-sm.tg-right { grid-column: 3; }
/* t680: на всю ширину, большая + малые квадраты */
:is(.tp-content, .ta-content) .wp-block-gallery.is-style-t680 { grid-template-columns: repeat(4, minmax(0, 1fr)); max-width: none; width: auto; margin-left: 20px; margin-right: 20px; }
:is(.tp-content, .ta-content) .wp-block-gallery.is-style-t680 > figure { aspect-ratio: 1; }
:is(.tp-content, .ta-content) .wp-block-gallery.is-style-t680 > figure.tg-lg { grid-column: span 2; aspect-ratio: 690 / 335; }
:is(.tp-content, .ta-content) .wp-block-gallery.is-style-t680.tg-rows2 > figure.tg-lg { grid-row: span 2; aspect-ratio: auto; }
:is(.tp-content, .ta-content) .wp-block-gallery.is-style-t680 > figure.tg-lg.tg-right { grid-column: 3 / span 2; }
/* t661: одна на всю ширину + две в ряд */
:is(.tp-content, .ta-content) .wp-block-gallery.is-style-t661 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
:is(.tp-content, .ta-content) .wp-block-gallery.is-style-t661 > figure { aspect-ratio: 3 / 2; }
:is(.tp-content, .ta-content) .wp-block-gallery.is-style-t661 > figure:first-child { grid-column: 1 / -1; aspect-ratio: 16 / 9; }
/* t667: две в ряд */
:is(.tp-content, .ta-content) .wp-block-gallery.is-style-t667 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
:is(.tp-content, .ta-content) .wp-block-gallery.is-style-t667 > figure { aspect-ratio: 1; }
/* t603: плитки на всю ширину */
:is(.tp-content, .ta-content) .wp-block-gallery.is-style-t603 { grid-template-columns: repeat(12, minmax(0, 1fr)); max-width: none; width: auto; margin-left: 40px; margin-right: 40px; padding: 20px 0 0; }
:is(.tp-content, .ta-content) .wp-block-gallery.is-style-t603 > figure { grid-column: span 4; aspect-ratio: 1; }
:is(.tp-content, .ta-content) .wp-block-gallery.is-style-t603 > figure.tg-c25 { grid-column: span 3; }
:is(.tp-content, .ta-content) .wp-block-gallery.is-style-t603 > figure.tg-c50 { grid-column: span 6; }
:is(.tp-content, .ta-content) .wp-block-gallery.is-style-t603 > figure.tg-c66 { grid-column: span 8; }
:is(.tp-content, .ta-content) .wp-block-gallery.is-style-t603 > figure.tg-c75 { grid-column: span 9; }
:is(.tp-content, .ta-content) .wp-block-gallery.is-style-t603 > figure.tg-c100 { grid-column: span 12; }
/* t155: большая слева + две справа */
:is(.tp-content, .ta-content) .wp-block-gallery.is-style-t155 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 40px; padding: 0 0 20px; }
:is(.tp-content, .ta-content) .wp-block-gallery.is-style-t155 > figure { aspect-ratio: 560 / 320; }
:is(.tp-content, .ta-content) .wp-block-gallery.is-style-t155 > figure:first-child { grid-row: span 2; aspect-ratio: auto; }
/* ширина одиночных фото и слайдеров (t-width_N у Tilda) */
:is(.tp-content, .ta-content) > .tg-w-11 { max-width: 1060px; } :is(.tp-content, .ta-content) > .tg-w-10 { max-width: 960px; } :is(.tp-content, .ta-content) > .tg-w-9 { max-width: 860px; }
:is(.tp-content, .ta-content) > .tg-w-8 { max-width: 760px; } :is(.tp-content, .ta-content) > .tg-w-7 { max-width: 660px; } :is(.tp-content, .ta-content) > .tg-w-6 { max-width: 560px; }
:is(.tp-content, .ta-content) .wp-block-gallery.is-style-t603.tg-boxed { max-width: 1220px; width: 100%; margin-left: auto; margin-right: auto; }
:is(.tp-content, .ta-content) > .tg-t195 { padding: 10px 0 31px; }
@media (max-width: 960px) {
	:is(.tp-content, .ta-content) .wp-block-gallery[class*="is-style-t"] { padding: 10px 0; gap: 10px; }
	:is(.tp-content, .ta-content) > .tg-t195 { padding: 30px 20px 51px; }
	:is(.tp-content, .ta-content) .wp-block-gallery.is-style-t680 { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-left: 20px; margin-right: 20px; }
	:is(.tp-content, .ta-content) .wp-block-gallery.is-style-t680 > figure.tg-lg, :is(.tp-content, .ta-content) .wp-block-gallery.is-style-t680.tg-rows2 > figure.tg-lg { grid-column: 1 / -1; grid-row: auto; aspect-ratio: 1; }
	:is(.tp-content, .ta-content) .wp-block-gallery.is-style-t661, :is(.tp-content, .ta-content) .wp-block-gallery.is-style-t155 { grid-template-columns: 1fr; }
	:is(.tp-content, .ta-content) .wp-block-gallery.is-style-t155 { padding: 0 0 20px; gap: 20px; }
	:is(.tp-content, .ta-content) .wp-block-gallery.is-style-t155 > figure:first-child { grid-row: auto; aspect-ratio: 350 / 660; }
	:is(.tp-content, .ta-content) .wp-block-gallery.is-style-t155 > figure { aspect-ratio: 350 / 320; }
	:is(.tp-content, .ta-content) .wp-block-gallery.is-style-t603 { margin-left: 20px; margin-right: 20px; }
	:is(.tp-content, .ta-content) .wp-block-gallery.is-style-t603 > figure, :is(.tp-content, .ta-content) .wp-block-gallery.is-style-t603 > figure.tg-c25 { grid-column: span 6; }
	:is(.tp-content, .ta-content) > [class*="tg-w-"] { max-width: none; }
}

/* Слайдер (t604, t670): блок «Галерея» со стилем is-style-slider */
:is(.tp-content, .ta-content) .wp-block-gallery[class*="is-style-t"].is-style-slider { display: block; position: relative; max-width: 960px; padding: 0; overflow: hidden; }
:is(.tp-content, .ta-content) .wp-block-gallery.is-style-slider.tg-w-9 { max-width: 860px; } :is(.tp-content, .ta-content) .wp-block-gallery.is-style-slider.tg-w-10 { max-width: 960px; } :is(.tp-content, .ta-content) .wp-block-gallery.is-style-slider.tg-w-8 { max-width: 760px; }
.tg-track { display: flex; transition: transform .5s ease-in-out; touch-action: pan-y; }
.tg-track > figure { flex: 0 0 100%; margin: 0 !important; position: relative; }
.is-style-t604 .tg-track > figure { padding: 0 50px; box-sizing: border-box; }
.is-style-t604 .tg-track > figure img { aspect-ratio: 860 / 550; object-fit: cover; }
.is-style-t670 .tg-track > figure img { width: 100%; height: auto; }
.tg-arrow { position: absolute; top: 50%; z-index: 2; display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; margin-top: -20px; padding: 0; border: 0; border-radius: 50%; background: rgba(232, 232, 232, .9); cursor: pointer; }
.tg-arrow svg { width: 9px; height: 14px; }
.tg-arrow--prev { left: 5px; }
.tg-arrow--next { right: 5px; }
.tg-dots { display: flex; justify-content: center; gap: 10px; height: 60px; align-items: center; }
.tg-dots button { width: 10px; height: 10px; padding: 0; border: 0; border-radius: 50%; background: #c7c7c7; cursor: pointer; }
.tg-dots button.is-active { background: #222; }
@media (max-width: 960px) {
	:is(.tp-content, .ta-content) .wp-block-gallery[class*="is-style-t"].is-style-slider { max-width: none; }
	.is-style-t604 .tg-track > figure { padding: 0; }
}

/* ==========================================================================
   Список проектов (templates/template-projects.php) — как Zero Block-и Tilda
   ========================================================================== */
.tl { max-width: 1200px; margin: 0 auto; padding: 120px 0 120px; font-family: var(--font-t); }
.tl__title { margin: 0 0 60px; font-size: 92px; font-weight: 700; line-height: 1.55; color: #000; letter-spacing: 0; }
.tl__intro { max-width: 760px; margin: -30px 0 60px; font-size: 20px; line-height: 1.55; color: #171717; }
.tl__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 21px; grid-auto-flow: row dense; }
.tl-tile { position: relative; display: block; overflow: hidden; background: #d4d4d4; aspect-ratio: 386 / 280; color: #fff; }
.tl-tile:hover { opacity: 1; }
.tl-tile--lg { grid-row: span 2; grid-column: 1 / span 2; aspect-ratio: auto; }
.tl-tile--lg.tl-tile--right { grid-column: 2 / span 2; }
.tl-tile--extra.tl-tile--right { grid-column: 3; }
.tl-tile--extra.tl-tile--left { grid-column: 1; }
.tl-tile__img, .tl-tile__img img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; }
.tl-tile__overlay { position: absolute; inset: 0; background: #121212; opacity: 0; transition: opacity .4s ease; }
.tl-tile__cap { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 20px; text-align: center; opacity: 0; transition: opacity .4s ease; }
.tl-tile__name { font-size: 30px; font-weight: 700; line-height: 1.55; }
.tl-tile--sm .tl-tile__name { font-size: 24px; }
.tl-tile__facts { font-size: 20px; font-weight: 400; line-height: 1.55; }
.tl-tile:hover .tl-tile__overlay, .tl-tile:focus-visible .tl-tile__overlay { opacity: .5; }
.tl-tile:hover .tl-tile__cap, .tl-tile:focus-visible .tl-tile__cap { opacity: 1; }
.tl-tile__mname { display: none; }
@media (max-width: 1240px) { .tl { padding-left: 20px; padding-right: 20px; } .tl__title { font-size: 72px; } }
@media (max-width: 960px) { .tl__title { font-size: 56px; } .tl-tile__name { font-size: 22px; } .tl-tile__facts { font-size: 16px; } }
@media (max-width: 640px) {
	.tl { padding: 120px 35px 90px; }
	.tl__title { margin-bottom: 30px; font-size: 42px; line-height: 1.5; }
	.tl__grid { grid-template-columns: 1fr; gap: 19px; }
	.tl-tile, .tl-tile--lg, .tl-tile--lg.tl-tile--right { grid-column: auto; grid-row: auto; aspect-ratio: auto; background: none; overflow: visible; color: #000; }
	.tl-tile--extra { display: none; }
	.tl-tile__img { position: relative; inset: auto; aspect-ratio: 320 / 490; background: #d4d4d4; }
	.tl-tile__overlay, .tl-tile__cap { display: none; }
	.tl-tile__mname { display: block; font-size: 20px; font-weight: 700; line-height: 1.55; }
}

/* ==========================================================================
   Статья (template-parts/article.php) — вёрстка статей Tilda
   ========================================================================== */
.ta-split { display: grid; grid-template-columns: 1fr 1fr; height: 100vh; min-height: 560px; }
.ta-split__text { display: flex; align-items: center; padding: 40px 40px 40px max(20px, calc(50vw - 590px)); }
.ta-split__title { max-width: 460px; margin: 0; font: 400 52px/1.15 var(--font-t); letter-spacing: normal; color: #333; }
.ta-split__img { background: #eee center / cover no-repeat; }
.ta-plain { max-width: 1160px; margin: 0 auto; padding: 90px 20px 30px; }
.ta-plain__title { margin: 0; font: 600 52px/1.23 var(--font-t); color: #171717; }
@media (max-width: 1200px) { .ta-split__title { font-size: 48px; } }
@media (max-width: 960px) {
	.ta-split { grid-template-columns: 1fr; height: auto; min-height: 0; }
	.ta-split__text { padding: 60px 20px 40px; }
	.ta-split__img { aspect-ratio: 4 / 5; }
}
@media (max-width: 640px) { .ta-split__title { font-size: 30px; } }

/* Контент статьи: колонки и отступы как у сетки Tilda (1200 / 960) */
.ta-content { display: flex; flex-direction: column; padding-bottom: 1px; font-family: var(--font-t); color: #171717; }
.ta-content > * { width: 100%; max-width: 1160px; margin-left: auto; margin-right: auto; box-sizing: border-box; }
.ta-content > p, .ta-content > h1, .ta-content > h2, .ta-content > h3, .ta-content > h4, .ta-content > ul, .ta-content > ol, .ta-content > .wp-block-buttons { max-width: 760px; margin-top: 0; margin-bottom: 0; }
.ta-content > [class*="tg-col-"] { max-width: var(--w, 760px); margin-left: max(20px, calc(50% - 580px + var(--pre, 0) * 100px)); margin-right: auto; }
.ta-content > [class*="tg-col-"]:not([class*="tg-pre-"]).has-text-align-center { margin-left: auto; }
.tg-col-12 { --w: 1160px; } .tg-col-11 { --w: 1060px; } .tg-col-10 { --w: 960px; } .tg-col-9 { --w: 860px; } .tg-col-8 { --w: 760px; } .tg-col-7 { --w: 660px; } .tg-col-6 { --w: 560px; } .tg-col-5 { --w: 460px; } .tg-col-4 { --w: 360px; } .tg-col-3 { --w: 260px; }
.tg-pre-1 { --pre: 1; } .tg-pre-2 { --pre: 2; } .tg-pre-3 { --pre: 3; } .tg-pre-4 { --pre: 4; } .tg-pre-5 { --pre: 5; } .tg-pre-6 { --pre: 6; }
@media (max-width: 1200px) {
	.ta-content > [class*="tg-col-"] { max-width: calc(var(--w, 760px) * 0.8 + 12px); margin-left: max(20px, calc(50% - 470px + var(--pre, 0) * 80px)); }
}
@media (max-width: 960px) {
	.ta-content > p, .ta-content > h1, .ta-content > h2, .ta-content > h3, .ta-content > h4, .ta-content > ul, .ta-content > ol, .ta-content > .wp-block-buttons, .ta-content > [class*="tg-col-"] { max-width: none; margin-left: 0; margin-right: 0; padding-left: 20px; padding-right: 20px; }
}
.ta-content ul, .ta-content ol { padding-left: 1.3em; }
.ta-content li { margin: 0; }
.ta-content a { color: #ff8562; }
.ta-content .wp-block-image img { display: block; width: 100%; height: auto; }
.ta-content > .wp-block-image { margin-bottom: 0; }
@media (max-width: 1200px) { .ta-content > .wp-block-image, .ta-content > .wp-block-gallery { max-width: 940px; } }
@media (max-width: 960px) { .ta-content > .wp-block-image { max-width: none; } .ta-content > .wp-block-gallery { padding-left: 20px; padding-right: 20px; } }
/* галереи и плитки в статьях — как в проектах */
.ta-content .wp-block-gallery { display: grid; grid-template-columns: repeat(var(--cols, 2), minmax(0, 1fr)); gap: 20px; padding: 0; }
.ta-content .wp-block-gallery.columns-1 { --cols: 1; } .ta-content .wp-block-gallery.columns-3 { --cols: 3; } .ta-content .wp-block-gallery.columns-4 { --cols: 4; }
.ta-content .wp-block-gallery > figure { width: auto !important; margin: 0 !important; }
.ta-content .wp-block-gallery img { display: block; width: 100%; height: auto; }

/* Типографика Tilda: t-text / t-descr / t-title / t-name (размеры и адаптив как в tilda-grid) */
.tg-f-text-xs { font-size: 15px; line-height: 1.55; } .tg-f-text-sm { font-size: 18px; line-height: 1.55; } .tg-f-text-md { font-size: 20px; line-height: 1.55; } .tg-f-text-lg { font-size: 22px; line-height: 1.55; } .tg-f-text-xl { font-size: 24px; line-height: 1.5; }
.tg-f-descr-xxs { font-size: 14px; line-height: 1.55; } .tg-f-descr-xs { font-size: 16px; line-height: 1.55; } .tg-f-descr-sm { font-size: 18px; line-height: 1.55; } .tg-f-descr-md { font-size: 20px; line-height: 1.55; } .tg-f-descr-lg { font-size: 22px; line-height: 1.5; } .tg-f-descr-xl { font-size: 24px; line-height: 1.5; } .tg-f-descr-xxl { font-size: 26px; line-height: 1.5; }
.tg-f-title-xxs, .tg-f-heading-xxs { font-size: 36px; line-height: 1.23; } .tg-f-title-xs, .tg-f-heading-xs { font-size: 42px; line-height: 1.23; } .tg-f-title-sm, .tg-f-heading-sm { font-size: 48px; line-height: 1.23; } .tg-f-title-md, .tg-f-heading-md { font-size: 52px; line-height: 1.23; } .tg-f-title-lg, .tg-f-heading-lg { font-size: 60px; line-height: 1.23; } .tg-f-title-xl, .tg-f-heading-xl { font-size: 72px; line-height: 1.17; } .tg-f-title-xxl, .tg-f-heading-xxl { font-size: 80px; line-height: 1.17; }
.tg-f-name-xs { font-size: 16px; line-height: 1.35; } .tg-f-name-sm { font-size: 18px; line-height: 1.35; } .tg-f-name-md { font-size: 20px; line-height: 1.35; } .tg-f-name-lg { font-size: 22px; line-height: 1.35; } .tg-f-name-xl { font-size: 24px; line-height: 1.35; }
.tg-f-uptitle-xs, .tg-f-uptitle-sm, .tg-f-uptitle-md { font-size: 14px; line-height: 1.55; text-transform: uppercase; letter-spacing: 2px; }
[class*="tg-f-title"], [class*="tg-f-heading"] { font-weight: 600; }
[class*="tg-f-text"], [class*="tg-f-descr"] { font-weight: 400; }
[class*="tg-f-name"] { font-weight: 600; }
.ta-content h2, .ta-content h3, .ta-content h4 { letter-spacing: 0; }
@media (max-width: 1200px) {
	.tg-f-text-xs { font-size: 14px; } .tg-f-text-sm { font-size: 16px; } .tg-f-text-md { font-size: 18px; } .tg-f-text-lg { font-size: 20px; }
	.tg-f-descr-xxs { font-size: 12px; } .tg-f-descr-xs { font-size: 14px; } .tg-f-descr-sm { font-size: 16px; } .tg-f-descr-md { font-size: 18px; } .tg-f-descr-lg { font-size: 20px; } .tg-f-descr-xl { font-size: 22px; }
	.tg-f-title-xxs, .tg-f-heading-xxs { font-size: 32px; } .tg-f-title-xs, .tg-f-heading-xs { font-size: 38px; } .tg-f-title-sm, .tg-f-heading-sm { font-size: 44px; } .tg-f-title-md, .tg-f-heading-md { font-size: 48px; } .tg-f-title-lg, .tg-f-heading-lg { font-size: 54px; } .tg-f-title-xl, .tg-f-heading-xl { font-size: 60px; }
	.tg-f-name-xs { font-size: 14px; } .tg-f-name-sm { font-size: 16px; } .tg-f-name-md { font-size: 18px; } .tg-f-name-lg { font-size: 20px; }
}
@media (max-width: 640px) {
	.tg-f-text-xs { font-size: 12px; line-height: 1.45; } .tg-f-text-sm { font-size: 14px; line-height: 1.45; } .tg-f-text-md { font-size: 16px; line-height: 1.45; } .tg-f-text-lg { font-size: 16px; line-height: 1.45; }
	.tg-f-descr-sm, .tg-f-descr-md { font-size: 16px; line-height: 1.45; } .tg-f-descr-lg, .tg-f-descr-xl, .tg-f-descr-xxl { font-size: 18px; line-height: 1.45; }
	.tg-f-title-xxs, .tg-f-heading-xxs { font-size: 28px; } .tg-f-title-xs, .tg-f-heading-xs, .tg-f-title-sm, .tg-f-heading-sm, .tg-f-title-md, .tg-f-heading-md { font-size: 30px; } .tg-f-title-lg, .tg-f-heading-lg, .tg-f-title-xl, .tg-f-heading-xl, .tg-f-title-xxl { font-size: 36px; }
	.ta-content h2[style*="font-size"] { font-size: 28px !important; line-height: 1.23 !important; }
	.ta-content h3[style*="font-size"] { font-size: 20px !important; line-height: 1.35 !important; }
}

/* Кнопки из Tilda (t-btn) */
.tg-btns { gap: 20px; }
.tg-btn .wp-block-button__link { display: inline-flex; align-items: center; justify-content: center; height: 60px; padding: 0 45px; border: 1px solid #171717; border-radius: 5px; background: #171717; color: #fff !important; font: 400 16px/1.4 var(--font-t); text-decoration: none; transition: background-color .2s, color .2s; }
.tg-btn .wp-block-button__link:hover { background: #fff; color: #000 !important; opacity: 1; }

/* ==========================================================================
   Лента блога (templates/template-blog.php) — как лента Tilda (t897)
   ========================================================================== */
.tb { max-width: 1160px; margin: 0 auto; padding: 58px 0 135px; font-family: var(--font-t); }
.tb__title { margin: 0 0 92px; font-size: 42px; font-weight: 700; text-align: center; line-height: 1.23; color: #171717; }
.tb__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 50px 40px; }
.tb-card { display: flex; flex-direction: column; color: #000; }
.tb-card:hover { opacity: 1; }
.tb-card.is-hidden { display: none; }
.tb-card__img { position: relative; display: block; aspect-ratio: 360 / 277; overflow: hidden; background: #eee; }
.tb-card__img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.tb-card:hover .tb-card__img img { transform: scale(1.03); }
.tb-card__title { margin-top: 20px; font-size: 20px; font-weight: 700; line-height: 1.35; color: #171717; }
.tb-card__descr { margin-top: 8px; font-size: 15px; font-weight: 400; line-height: 1.55; color: rgba(0, 0, 0, .9); }
.tb-card__date { margin-top: 14px; font-size: 15px; font-weight: 500; color: rgba(0, 0, 0, .5); }
.tb__more { margin-top: 60px; text-align: center; }
.tb__more-btn { height: 60px; min-width: 223px; padding: 0 30px; border: 0; border-radius: 3px; background: #000; color: #fff; font: 600 16px/1.4 var(--font-t); cursor: pointer; }
@media (max-width: 1200px) { .tb { padding-left: 20px; padding-right: 20px; } }
@media (max-width: 960px) { .tb__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .tb__title { margin-bottom: 60px; } }
@media (max-width: 640px) {
	.tb { padding: 60px 20px 90px; }
	.tb__title { margin-bottom: 45px; font-size: 30px; }
	.tb__grid { grid-template-columns: 1fr; gap: 60px; }
}
/* внутренние отступы блоков Tilda */
.ta-content > .tg-pt-2 { padding-top: 2px; } .ta-content > .tg-pt-8 { padding-top: 8px; } .ta-content > .tg-pb-6 { padding-bottom: 6px; }

/* Лента фото с прокруткой (t1148): фото одной высоты, ширина по пропорциям */
:is(.tp-content, .ta-content) .wp-block-gallery.is-style-t1148 { display: flex !important; flex-wrap: nowrap !important; gap: 20px; padding: 0 0 0 max(20px, calc(50% - 580px)) !important; overflow-x: auto; scrollbar-width: none; max-width: none; }
:is(.tp-content, .ta-content) .wp-block-gallery.is-style-t1148::-webkit-scrollbar { display: none; }
:is(.tp-content, .ta-content) .wp-block-gallery.is-style-t1148 > figure { flex: 0 0 auto !important; width: auto !important; height: 500px; margin: 0 !important; }
:is(.tp-content, .ta-content) .wp-block-gallery.is-style-t1148 > figure img { position: static !important; width: auto !important; height: 100% !important; max-width: none; object-fit: cover; }
@media (max-width: 640px) { :is(.tp-content, .ta-content) .wp-block-gallery.is-style-t1148 > figure { height: 300px; } }
.tg-1148-ctrl { display: flex; justify-content: flex-end; align-items: flex-start; gap: 10px; height: 90px; width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; box-sizing: border-box; }
.tg-1148-ctrl button { width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50px; background: #000; cursor: pointer; display: flex; align-items: center; justify-content: center; }

/* «До / после» (t410): две картинки одна над другой, ползунок открывает вторую */
:is(.tp-content, .ta-content) .wp-block-gallery.is-style-t410 { display: block !important; position: relative; width: calc(100% - 40px); max-width: 1160px; margin-left: auto !important; margin-right: auto !important; padding: 0 !important; overflow: hidden; user-select: none; touch-action: pan-y; cursor: ew-resize; }
:is(.tp-content, .ta-content) .wp-block-gallery.is-style-t410.tg-w-8 { max-width: 760px; } :is(.tp-content, .ta-content) .wp-block-gallery.is-style-t410.tg-w-10 { max-width: 960px; } :is(.tp-content, .ta-content) .wp-block-gallery.is-style-t410.tg-w-6 { max-width: 560px; }
:is(.tp-content, .ta-content) .wp-block-gallery.is-style-t410 > figure { margin: 0 !important; width: 100% !important; position: relative; }
:is(.tp-content, .ta-content) .wp-block-gallery.is-style-t410 > figure img { position: static !important; display: block; width: 100% !important; height: auto !important; }
:is(.tp-content, .ta-content) .wp-block-gallery.is-style-t410 > figure + figure { position: absolute !important; inset: 0; clip-path: inset(0 0 0 var(--ba, 50%)); }
:is(.tp-content, .ta-content) .wp-block-gallery.is-style-t410 > figure + figure img { height: 100% !important; object-fit: cover; }
.tg-ba-handle { position: absolute; top: 0; bottom: 0; left: var(--ba, 50%); width: 2px; margin-left: -1px; background: #fff; z-index: 2; pointer-events: none; }
.tg-ba-handle::after { content: ""; position: absolute; top: 50%; left: 50%; width: 40px; height: 40px; margin: -20px 0 0 -20px; border-radius: 50%; background: #fff; box-shadow: 0 0 6px rgba(0,0,0,.2); }
@media (max-width: 960px) { :is(.tp-content, .ta-content) .wp-block-gallery.is-style-t410 { max-width: none !important; } }
/* плитки на всю ширину экрана (t-container_100 у Tilda) */
:is(.tp-content, .ta-content) .wp-block-gallery[class*="is-style-t"].tg-full { max-width: none; width: auto; margin-left: 20px; margin-right: 20px; }

/* Отступы блоков на телефоне (как t-rec_pt-res-480 у Tilda) */
@media (max-width: 480px) {
:is(.tp-content,.ta-content) > .tg-mt-m-0{margin-top:0px!important}
:is(.tp-content,.ta-content) > .tg-mb-m-0{margin-bottom:0px!important}
:is(.tp-content,.ta-content) > .tg-mt-m-5{margin-top:5px!important}
:is(.tp-content,.ta-content) > .tg-mb-m-5{margin-bottom:5px!important}
:is(.tp-content,.ta-content) > .tg-mt-m-10{margin-top:10px!important}
:is(.tp-content,.ta-content) > .tg-mb-m-10{margin-bottom:10px!important}
:is(.tp-content,.ta-content) > .tg-mt-m-15{margin-top:15px!important}
:is(.tp-content,.ta-content) > .tg-mb-m-15{margin-bottom:15px!important}
:is(.tp-content,.ta-content) > .tg-mt-m-20{margin-top:20px!important}
:is(.tp-content,.ta-content) > .tg-mb-m-20{margin-bottom:20px!important}
:is(.tp-content,.ta-content) > .tg-mt-m-25{margin-top:25px!important}
:is(.tp-content,.ta-content) > .tg-mb-m-25{margin-bottom:25px!important}
:is(.tp-content,.ta-content) > .tg-mt-m-30{margin-top:30px!important}
:is(.tp-content,.ta-content) > .tg-mb-m-30{margin-bottom:30px!important}
:is(.tp-content,.ta-content) > .tg-mt-m-35{margin-top:35px!important}
:is(.tp-content,.ta-content) > .tg-mb-m-35{margin-bottom:35px!important}
:is(.tp-content,.ta-content) > .tg-mt-m-40{margin-top:40px!important}
:is(.tp-content,.ta-content) > .tg-mb-m-40{margin-bottom:40px!important}
:is(.tp-content,.ta-content) > .tg-mt-m-45{margin-top:45px!important}
:is(.tp-content,.ta-content) > .tg-mb-m-45{margin-bottom:45px!important}
:is(.tp-content,.ta-content) > .tg-mt-m-50{margin-top:50px!important}
:is(.tp-content,.ta-content) > .tg-mb-m-50{margin-bottom:50px!important}
:is(.tp-content,.ta-content) > .tg-mt-m-55{margin-top:55px!important}
:is(.tp-content,.ta-content) > .tg-mb-m-55{margin-bottom:55px!important}
:is(.tp-content,.ta-content) > .tg-mt-m-60{margin-top:60px!important}
:is(.tp-content,.ta-content) > .tg-mb-m-60{margin-bottom:60px!important}
:is(.tp-content,.ta-content) > .tg-mt-m-65{margin-top:65px!important}
:is(.tp-content,.ta-content) > .tg-mb-m-65{margin-bottom:65px!important}
:is(.tp-content,.ta-content) > .tg-mt-m-70{margin-top:70px!important}
:is(.tp-content,.ta-content) > .tg-mb-m-70{margin-bottom:70px!important}
:is(.tp-content,.ta-content) > .tg-mt-m-75{margin-top:75px!important}
:is(.tp-content,.ta-content) > .tg-mb-m-75{margin-bottom:75px!important}
:is(.tp-content,.ta-content) > .tg-mt-m-80{margin-top:80px!important}
:is(.tp-content,.ta-content) > .tg-mb-m-80{margin-bottom:80px!important}
:is(.tp-content,.ta-content) > .tg-mt-m-85{margin-top:85px!important}
:is(.tp-content,.ta-content) > .tg-mb-m-85{margin-bottom:85px!important}
:is(.tp-content,.ta-content) > .tg-mt-m-90{margin-top:90px!important}
:is(.tp-content,.ta-content) > .tg-mb-m-90{margin-bottom:90px!important}
:is(.tp-content,.ta-content) > .tg-mt-m-95{margin-top:95px!important}
:is(.tp-content,.ta-content) > .tg-mb-m-95{margin-bottom:95px!important}
:is(.tp-content,.ta-content) > .tg-mt-m-100{margin-top:100px!important}
:is(.tp-content,.ta-content) > .tg-mb-m-100{margin-bottom:100px!important}
:is(.tp-content,.ta-content) > .tg-mt-m-105{margin-top:105px!important}
:is(.tp-content,.ta-content) > .tg-mb-m-105{margin-bottom:105px!important}
:is(.tp-content,.ta-content) > .tg-mt-m-110{margin-top:110px!important}
:is(.tp-content,.ta-content) > .tg-mb-m-110{margin-bottom:110px!important}
:is(.tp-content,.ta-content) > .tg-mt-m-115{margin-top:115px!important}
:is(.tp-content,.ta-content) > .tg-mb-m-115{margin-bottom:115px!important}
:is(.tp-content,.ta-content) > .tg-mt-m-120{margin-top:120px!important}
:is(.tp-content,.ta-content) > .tg-mb-m-120{margin-bottom:120px!important}
:is(.tp-content,.ta-content) > .tg-mt-m-125{margin-top:125px!important}
:is(.tp-content,.ta-content) > .tg-mb-m-125{margin-bottom:125px!important}
:is(.tp-content,.ta-content) > .tg-mt-m-130{margin-top:130px!important}
:is(.tp-content,.ta-content) > .tg-mb-m-130{margin-bottom:130px!important}
:is(.tp-content,.ta-content) > .tg-mt-m-135{margin-top:135px!important}
:is(.tp-content,.ta-content) > .tg-mb-m-135{margin-bottom:135px!important}
:is(.tp-content,.ta-content) > .tg-mt-m-140{margin-top:140px!important}
:is(.tp-content,.ta-content) > .tg-mb-m-140{margin-bottom:140px!important}
:is(.tp-content,.ta-content) > .tg-mt-m-145{margin-top:145px!important}
:is(.tp-content,.ta-content) > .tg-mb-m-145{margin-bottom:145px!important}
:is(.tp-content,.ta-content) > .tg-mt-m-150{margin-top:150px!important}
:is(.tp-content,.ta-content) > .tg-mb-m-150{margin-bottom:150px!important}
:is(.tp-content,.ta-content) > .tg-mt-m-155{margin-top:155px!important}
:is(.tp-content,.ta-content) > .tg-mb-m-155{margin-bottom:155px!important}
:is(.tp-content,.ta-content) > .tg-mt-m-160{margin-top:160px!important}
:is(.tp-content,.ta-content) > .tg-mb-m-160{margin-bottom:160px!important}
:is(.tp-content,.ta-content) > .tg-mt-m-165{margin-top:165px!important}
:is(.tp-content,.ta-content) > .tg-mb-m-165{margin-bottom:165px!important}
:is(.tp-content,.ta-content) > .tg-mt-m-170{margin-top:170px!important}
:is(.tp-content,.ta-content) > .tg-mb-m-170{margin-bottom:170px!important}
:is(.tp-content,.ta-content) > .tg-mt-m-175{margin-top:175px!important}
:is(.tp-content,.ta-content) > .tg-mb-m-175{margin-bottom:175px!important}
:is(.tp-content,.ta-content) > .tg-mt-m-180{margin-top:180px!important}
:is(.tp-content,.ta-content) > .tg-mb-m-180{margin-bottom:180px!important}
:is(.tp-content,.ta-content) > .tg-mt-m-185{margin-top:185px!important}
:is(.tp-content,.ta-content) > .tg-mb-m-185{margin-bottom:185px!important}
:is(.tp-content,.ta-content) > .tg-mt-m-190{margin-top:190px!important}
:is(.tp-content,.ta-content) > .tg-mb-m-190{margin-bottom:190px!important}
:is(.tp-content,.ta-content) > .tg-mt-m-195{margin-top:195px!important}
:is(.tp-content,.ta-content) > .tg-mb-m-195{margin-bottom:195px!important}
:is(.tp-content,.ta-content) > .tg-mt-m-200{margin-top:200px!important}
:is(.tp-content,.ta-content) > .tg-mb-m-200{margin-bottom:200px!important}
:is(.tp-content,.ta-content) > .tg-mt-m-205{margin-top:205px!important}
:is(.tp-content,.ta-content) > .tg-mb-m-205{margin-bottom:205px!important}
:is(.tp-content,.ta-content) > .tg-mt-m-210{margin-top:210px!important}
:is(.tp-content,.ta-content) > .tg-mb-m-210{margin-bottom:210px!important}
:is(.tp-content,.ta-content) > .tg-mt-m-215{margin-top:215px!important}
:is(.tp-content,.ta-content) > .tg-mb-m-215{margin-bottom:215px!important}
:is(.tp-content,.ta-content) > .tg-mt-m-220{margin-top:220px!important}
:is(.tp-content,.ta-content) > .tg-mb-m-220{margin-bottom:220px!important}
:is(.tp-content,.ta-content) > .tg-mt-m-225{margin-top:225px!important}
:is(.tp-content,.ta-content) > .tg-mb-m-225{margin-bottom:225px!important}
:is(.tp-content,.ta-content) > .tg-mt-m-230{margin-top:230px!important}
:is(.tp-content,.ta-content) > .tg-mb-m-230{margin-bottom:230px!important}
:is(.tp-content,.ta-content) > .tg-mt-m-235{margin-top:235px!important}
:is(.tp-content,.ta-content) > .tg-mb-m-235{margin-bottom:235px!important}
:is(.tp-content,.ta-content) > .tg-mt-m-240{margin-top:240px!important}
:is(.tp-content,.ta-content) > .tg-mb-m-240{margin-bottom:240px!important}
:is(.tp-content,.ta-content) > .tg-mt-m-245{margin-top:245px!important}
:is(.tp-content,.ta-content) > .tg-mb-m-245{margin-bottom:245px!important}
:is(.tp-content,.ta-content) > .tg-mt-m-250{margin-top:250px!important}
:is(.tp-content,.ta-content) > .tg-mb-m-250{margin-bottom:250px!important}
:is(.tp-content,.ta-content) > .tg-mt-m-255{margin-top:255px!important}
:is(.tp-content,.ta-content) > .tg-mb-m-255{margin-bottom:255px!important}
:is(.tp-content,.ta-content) > .tg-mt-m-260{margin-top:260px!important}
:is(.tp-content,.ta-content) > .tg-mb-m-260{margin-bottom:260px!important}
:is(.tp-content,.ta-content) > .tg-mt-m-265{margin-top:265px!important}
:is(.tp-content,.ta-content) > .tg-mb-m-265{margin-bottom:265px!important}
:is(.tp-content,.ta-content) > .tg-mt-m-270{margin-top:270px!important}
:is(.tp-content,.ta-content) > .tg-mb-m-270{margin-bottom:270px!important}
:is(.tp-content,.ta-content) > .tg-mt-m-275{margin-top:275px!important}
:is(.tp-content,.ta-content) > .tg-mb-m-275{margin-bottom:275px!important}
:is(.tp-content,.ta-content) > .tg-mt-m-280{margin-top:280px!important}
:is(.tp-content,.ta-content) > .tg-mb-m-280{margin-bottom:280px!important}
:is(.tp-content,.ta-content) > .tg-mt-m-285{margin-top:285px!important}
:is(.tp-content,.ta-content) > .tg-mb-m-285{margin-bottom:285px!important}
:is(.tp-content,.ta-content) > .tg-mt-m-290{margin-top:290px!important}
:is(.tp-content,.ta-content) > .tg-mb-m-290{margin-bottom:290px!important}
:is(.tp-content,.ta-content) > .tg-mt-m-295{margin-top:295px!important}
:is(.tp-content,.ta-content) > .tg-mb-m-295{margin-bottom:295px!important}
:is(.tp-content,.ta-content) > .tg-mt-m-300{margin-top:300px!important}
:is(.tp-content,.ta-content) > .tg-mb-m-300{margin-bottom:300px!important}
}
/* Плитки на телефоне/планшете: поля 20px по бокам, как у контейнера Tilda */
@media (max-width: 960px) {
	:is(.tp-content, .ta-content) .wp-block-gallery[class*="is-style-t"]:not(.is-style-slider):not(.is-style-t1148):not(.is-style-t410) { margin-left: 20px !important; margin-right: 20px !important; width: auto; max-width: none; }
}

/* Шапка на компьютере — положение элементов как в шапке Tilda (Zero Block 1200 / высота 100) */
@media (min-width: 1200px) {
	.site-header, .site-header.is-scrolled { height: 100px; }
	.site-header__inner { position: relative; display: block; padding: 0; }
	.site-header__logo { position: absolute; left: 40px; top: 22px; }
	.site-header__logo .custom-logo { width: 140px; height: 57px; max-height: none; object-fit: contain; }
	.main-nav { position: absolute; left: calc(50% - 200px); top: 30px; display: block; }
	.main-nav__list { display: flex; gap: 0; }
	.main-nav__list > li { width: 100px; }
	.main-nav__list > li > a { width: 100px; height: 40px; justify-content: center; padding: 0; }
	.site-header__tools { position: static; }
	/* телефон и соцсети привязаны к правому краю, как в шапке Tilda (при любой ширине экрана) */
	.site-header .phone-pill { position: absolute; right: 278px; left: auto; top: 36px; width: 148px; height: 32px; padding: 0; justify-content: center; }
	.site-header .socials--header { position: absolute; right: 150px; left: auto; top: 40px; gap: 8px; }
	.site-header .lang-switch { position: absolute; right: 70px; top: 28px; }
	.site-header .burger { position: absolute; right: 24px; top: 28px; }
}

/* ==========================================================================
   Бургер-меню — как боковое меню Tilda (t450): тёмная панель справа 400px
   ========================================================================== */
.offcanvas__backdrop { background: rgba(97, 97, 97, .1); }
.offcanvas__panel {
	position: absolute; top: 0; right: 0; bottom: 0; left: auto;
	width: 400px; max-width: 100%; height: 100%;
	display: flex; flex-direction: column; justify-content: space-between; gap: 40px;
	padding: 48px 40px 38px; box-sizing: border-box; overflow-y: auto;
	background: #14161a; color: #fff; box-shadow: none; border-radius: 0;
	font-family: var(--font-t, var(--font));
	transform: translateX(100%); transition: transform .3s ease-in-out;
}
.admin-bar .offcanvas__panel { top: 32px; height: calc(100% - 32px); }
@media (max-width: 782px) { .admin-bar .offcanvas__panel { top: 46px; height: calc(100% - 46px); } }
.offcanvas.is-open .offcanvas__panel { transform: none; }
.offcanvas__panel .offcanvas__close { position: absolute; top: 5px; right: 5px; width: 40px; height: 40px; margin: 0; padding: 0; display: grid; place-items: center; background: #14161a; border: 0; cursor: pointer; }
.offcanvas__nav { margin: 0; }
.offcanvas__panel .offcanvas__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 15px; }
.offcanvas__panel .offcanvas__list > li { border: 0; margin: 0; padding: 0; }
.offcanvas__panel .offcanvas__list a { display: inline-block; padding: 0; font-size: 20px; font-weight: 400; line-height: 26px; letter-spacing: 1.25px; color: #fff; text-decoration: none; transition: opacity .2s; }
.offcanvas__panel .offcanvas__list a:hover { opacity: .7; }
.offcanvas__panel .offcanvas__list .current-menu-item > a { font-weight: 500; opacity: .7; }
.offcanvas__list--mob { display: none !important; }
@media (max-width: 1199px) {
	.offcanvas__list--desk { display: none !important; }
	.offcanvas__list--mob { display: flex !important; }
}
.offcanvas__panel .offcanvas__foot { margin: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 0; }
.socials--burger { list-style: none; margin: 0 0 29px; padding: 0; display: flex; gap: 8px; }
.socials--burger a { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: #fff; color: #14161a; }
.socials--burger a svg { width: 16px; height: 16px; fill: #14161a; }
.offcanvas__phone { display: inline-flex; align-items: center; justify-content: center; width: 204px; height: 50px; border-radius: 4px; background: #fff; color: #171717 !important; font-size: 15px; font-weight: 600; text-decoration: none; }
.offcanvas__phone:hover { opacity: .9; }
.offcanvas__panel .lang-switch { margin: 27px 0 0; gap: 12px; }
.offcanvas__panel .lang-switch a { display: inline; min-width: 0; height: auto; font-size: 14px; font-weight: 400; letter-spacing: 1px; color: #fff; }
@media (max-width: 640px) {
	.offcanvas__panel { width: 100%; }
}

/* Выпадающее меню шапки — как подменю Tilda (t794): 200px по центру пункта, уголок сверху */
.main-nav__list .current-menu-item > a, .main-nav__list .current-menu-ancestor > a { text-decoration: none; }
.main-nav__list > li > a { border-radius: 4px; transition: background-color .2s; }
.main-nav__list > li.menu-item-has-children:hover > a, .main-nav__list > li.menu-item-has-children:focus-within > a { background: rgba(23, 23, 23, .05); }
.main-nav__list > li.menu-item-has-children:hover > a::after, .main-nav__list > li.menu-item-has-children:focus-within > a::after { border-top: 0; border-bottom: 4px solid currentColor; margin-top: -2px; }
.main-nav .sub-menu {
	top: 65px; width: 200px; min-width: 0; box-sizing: border-box;
	display: flex; flex-direction: column; gap: 12px;
	padding: 18px 20px; border-radius: 3px; box-shadow: 0 0 7px rgba(0, 0, 0, .2);
	text-align: center; transform: translate(-50%, 0);
}
.main-nav li:hover > .sub-menu, .main-nav li:focus-within > .sub-menu { transform: translate(-50%, 0); }
.main-nav .sub-menu::before { content: ""; position: absolute; left: 50%; top: -7px; width: 15px; height: 15px; margin-left: -7.5px; background: #fff; transform: rotate(45deg); box-shadow: -2px -2px 3px rgba(0, 0, 0, .06); }
.main-nav .sub-menu::after { content: ""; position: absolute; left: 0; right: 0; top: -30px; height: 30px; }
.main-nav .sub-menu > li { position: relative; }
.main-nav .sub-menu a { display: block; padding: 0; font-size: 14px; font-weight: 600; line-height: 1.35; color: #222; white-space: normal; background: none !important; transition: opacity .2s; }
.main-nav .sub-menu a:hover { opacity: .7; }
.main-nav__list > li > a:hover { opacity: 1; color: inherit; }

/* Шапка как на Tilda: всегда прозрачная, белый градиент сверху вниз (и при прокрутке тоже) */
.site-header, .site-header.is-scrolled { background: linear-gradient(#fff, rgba(255, 255, 255, 0)); box-shadow: none; }

/* Список проектов: при наведении затемняются все плитки проекта (большая и две малые) */
.tl-tile.is-hover .tl-tile__overlay { opacity: .5; }
.tl-tile.is-hover .tl-tile__cap { opacity: 1; }

/* Блоки Tilda на странице-списке (заголовок, тексты, форма) */
.has-tilda-parts #allrecords { font-family: initial; font-size: 16px; line-height: normal; color: #000; -webkit-font-smoothing: auto; }
.tl.tl--after-tilda { padding-top: 0; }
.site-main:has(> .tl-tilda:first-child) { padding-top: 0; }
.tl:has(+ .tl-tilda--after) { padding-bottom: 21px; }

/* Загрузка файла в формах Tilda (резюме) */
.tengo-upload { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; cursor: pointer; font-family: inherit; }
.tengo-upload input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.tengo-upload__btn { display: inline-flex; align-items: center; height: 40px; padding: 0 20px; border-radius: 3px; background: #171717; color: #fff; font-size: 14px; font-weight: 600; }
.tengo-upload__name { font-size: 13px; color: #555; }

/* Ряды списка проектов (как Zero Block-и Tilda) */
.tl__grid { display: flex !important; flex-direction: column; gap: 21px; }
.tl-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 21px; }
.tl-row--feat { grid-auto-flow: row; }
.tl-row--feat .tl-tile--lg { grid-row: 1 / span 2; grid-column: 1 / span 2; }
.tl-row--feat.tl-row--right .tl-tile--lg { grid-column: 2 / span 2; }
.tl-row--feat .tl-tile--extra.tl-tile--right { grid-column: 3; }
.tl-row--feat .tl-tile--extra.tl-tile--left { grid-column: 1; }
@media (max-width: 640px) {
	.tl__grid { gap: 19px; }
	.tl-row { grid-template-columns: 1fr; gap: 19px; }
	.tl-row--feat .tl-tile--lg, .tl-row--feat.tl-row--right .tl-tile--lg { grid-row: auto; grid-column: auto; }
}

/* ==========================================================================
   Список проектов на планшете и телефоне — как раскладки Zero Block Tilda
   (960 / 640 / 480 / 320): подписи под фото, без затемнения, ряды без зазора
   ========================================================================== */
@media (max-width: 1199px) {
	.tl, .tl.tl--after-tilda { max-width: 960px; padding-left: 0; padding-right: 0; box-sizing: content-box; }
	.tl__grid { gap: 0 !important; }
	.tl-row { display: grid !important; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 21px; row-gap: 0; align-items: start; }
	.tl-tile, .tl-tile--lg, .tl-tile--lg.tl-tile--right { aspect-ratio: auto; background: none; overflow: visible; color: #000; grid-row: auto; }
	.tl-tile__img { position: relative; inset: auto; display: block; aspect-ratio: 306 / 230; background: #d4d4d4; overflow: hidden; }
	.tl-tile__overlay, .tl-tile__cap { display: none !important; }
	.tl-tile__mname { display: block; height: 50px; overflow: hidden; font-size: 20px; font-weight: 700; line-height: 31px; color: #000; white-space: nowrap; text-overflow: ellipsis; }
	/* избранный проект: большая слева/справа + 2 малые */
	.tl-row--feat { grid-template-columns: 549fr 390fr; grid-template-rows: auto 1fr; row-gap: 21px; }
	.tl-row--feat.tl-row--right { grid-template-columns: 390fr 549fr; }
	.tl-row--feat .tl-tile--lg { grid-column: 1; grid-row: 1 / span 2; }
	.tl-row--feat.tl-row--right .tl-tile--lg { grid-column: 2; }
	.tl-row--feat .tl-tile--lg .tl-tile__img { aspect-ratio: 549 / 481; }
	.tl-row--feat .tl-tile--lg .tl-tile__mname { font-size: 30px; line-height: 50px; }
	.tl-row--feat .tl-tile--extra { display: block; grid-column: 2 !important; }
	.tl-row--feat.tl-row--right .tl-tile--extra { grid-column: 1 !important; }
	.tl-row--feat .tl-tile--extra .tl-tile__img { aspect-ratio: 390 / 230; }
	.tl-row--feat .tl-tile--extra .tl-tile__mname { display: none; }
	.tl-row--feat .tl-tile--extra + .tl-tile--extra { align-self: start; }
}
@media (max-width: 1000px) {
	.tl, .tl.tl--after-tilda { padding-left: 20px; padding-right: 20px; box-sizing: border-box; max-width: 1000px; }
}
@media (max-width: 959px) {
	.tl, .tl.tl--after-tilda { max-width: 640px; padding-left: 0; padding-right: 0; box-sizing: content-box; }
	.tl-row { grid-template-columns: 1fr; }
	.tl-tile__img { aspect-ratio: 640 / 350; }
	.tl-row--feat, .tl-row--feat.tl-row--right { grid-template-columns: 329fr 290fr; }
	.tl-row--feat.tl-row--right .tl-tile--lg { grid-column: 1; }
	.tl-row--feat.tl-row--right .tl-tile--extra { grid-column: 2 !important; }
	.tl-row--feat .tl-tile--lg .tl-tile__img { aspect-ratio: 329 / 441; }
	.tl-row--feat .tl-tile--lg .tl-tile__mname { font-size: 20px; line-height: 31px; }
	.tl-row--feat .tl-tile--extra .tl-tile__img { aspect-ratio: 290 / 210; }
}
@media (max-width: 679px) {
	.tl, .tl.tl--after-tilda { padding-left: 20px; padding-right: 20px; box-sizing: border-box; max-width: 680px; }
}
@media (max-width: 639px) {
	.tl, .tl.tl--after-tilda { max-width: 480px; padding-left: 0; padding-right: 0; box-sizing: content-box; }
	.tl-row--feat, .tl-row--feat.tl-row--right { display: block !important; }
	.tl-row--feat .tl-tile--extra { display: none !important; }
	.tl-tile__img, .tl-row--feat .tl-tile--lg .tl-tile__img { aspect-ratio: 480 / 300; }
}
@media (max-width: 519px) {
	.tl, .tl.tl--after-tilda { padding-left: 20px; padding-right: 20px; box-sizing: border-box; max-width: 520px; }
}
@media (max-width: 479px) {
	.tl, .tl.tl--after-tilda { max-width: 320px; padding-left: 0; padding-right: 0; box-sizing: content-box; }
	.tl-tile__img, .tl-row--feat .tl-tile--lg .tl-tile__img { aspect-ratio: 320 / 490; }
}
@media (max-width: 359px) {
	.tl, .tl.tl--after-tilda { padding-left: 10px; padding-right: 10px; box-sizing: border-box; }
}

/* Заголовки статей, исправленные для SEO (H1 → H2 и т.п.): вид прежний */
#allrecords .tti-h { margin-top: 0; margin-bottom: 0; }
#allrecords .tti-h--wrap { display: inherit; margin: 0; font: inherit; color: inherit; letter-spacing: inherit; text-transform: inherit; text-align: inherit; }

/* Новые блоки, добавленные в редакторе (без собственных отступов, как у перенесённых): отступы как в статьях Tilda */
:is(.tp-content,.ta-content) > :not([style*="margin"]) { margin-top: 0; margin-bottom: 30px; }
:is(.tp-content,.ta-content) > :is(h2,h3,h4,.wp-block-heading):not([style*="margin"]) { margin-top: 75px; margin-bottom: 30px; }
:is(.tp-content,.ta-content) > :is(figure,.wp-block-image,.wp-block-gallery,.wp-block-columns):not([style*="margin"]) { margin-top: 60px; margin-bottom: 60px; }
:is(.tp-content,.ta-content) > :first-child:not([style*="margin"]) { margin-top: 105px; }
:is(.tp-content,.ta-content) > :last-child:not([style*="margin"]) { margin-bottom: 105px; }
@media (max-width: 640px) {
	:is(.tp-content,.ta-content) > :is(h2,h3,h4,.wp-block-heading):not([style*="margin"]) { margin-top: 45px; }
	:is(.tp-content,.ta-content) > :is(figure,.wp-block-image,.wp-block-gallery,.wp-block-columns):not([style*="margin"]) { margin-top: 30px; margin-bottom: 30px; }
	:is(.tp-content,.ta-content) > :first-child:not([style*="margin"]) { margin-top: 60px; }
	:is(.tp-content,.ta-content) > :last-child:not([style*="margin"]) { margin-bottom: 60px; }
}
