/*
Theme Name: Завод упаковки
Theme URI: http://zu.test
Author: ZU
Description: Собственная block-тема B2B-сайта производства ПП-мешков и биг-бэгов. Без родительской темы.
Requires at least: 6.7
Tested up to: 7.1
Requires PHP: 7.4
Version: 0.5.18
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: zu
Tags: full-site-editing, block-themes, block-patterns, custom-colors, custom-logo, editor-style, featured-images
*/

html {
	scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}
}

body {
	-webkit-font-smoothing: antialiased;
}

#produkciya {
	scroll-margin-top: 5.5rem;
}

/* WP 7: у .wp-site-blocks дети получают margin-block — между CTA и футером видна полоса фона. */
.wp-site-blocks > * {
	margin-block-start: 0 !important;
	margin-block-end: 0 !important;
}

main.wp-block-group > * {
	margin-block-start: 0 !important;
}

a:where(:not(.wp-element-button):not(.zu-more a):not(.zu-hero__btn):not(.zu-accent-link):not(.zu-outline-btn):not(.zu-footer-contacts a)) {
	text-decoration-thickness: 1px;
	text-underline-offset: 0.12em;
}

/* ── Header (референс: fixed #1C2430, h-16, border-b) ── */
.zu-header {
	position: sticky;
	top: 0;
	z-index: 100;
	border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.zu-header a,
.zu-header .wp-block-site-title a,
.zu-header .wp-block-navigation-item__content {
	text-decoration: none;
}

.zu-header .wp-block-site-title a {
	color: var(--wp--preset--color--white);
	font-weight: 800;
	font-size: 1.125rem;
	letter-spacing: -0.02em;
	transition: opacity 0.15s ease;
}

.zu-header .wp-block-site-title a:hover,
.zu-header .wp-block-site-title a:focus {
	opacity: 0.9;
}

/*
 * WP core: .wp-block-navigation .wp-block-navigation-item__content.wp-block-navigation-item__content
 * { color: inherit } — перебивает более слабый селектор, hover незаметен (уже #fff).
 * Референс: text-white/70 → hover:text-white.
 */
.zu-header .wp-block-navigation .wp-block-navigation-item__content.wp-block-navigation-item__content {
	color: rgba(255, 255, 255, 0.7);
	transition: color 0.15s ease;
}

.zu-header .wp-block-navigation .wp-block-navigation-item__content.wp-block-navigation-item__content:hover,
.zu-header .wp-block-navigation .wp-block-navigation-item__content.wp-block-navigation-item__content:focus,
.zu-header .wp-block-navigation .current-menu-item > .wp-block-navigation-item__content {
	color: #fff;
}

.zu-header .wp-block-navigation__responsive-container-open,
.zu-header .wp-block-navigation__responsive-container-close {
	color: rgba(255, 255, 255, 0.7);
	transition: color 0.15s ease;
}

.zu-header .wp-block-navigation__responsive-container-open:hover,
.zu-header .wp-block-navigation__responsive-container-open:focus,
.zu-header .wp-block-navigation__responsive-container-close:hover,
.zu-header .wp-block-navigation__responsive-container-close:focus {
	color: #fff;
}

.zu-header-tag {
	margin: 0;
	letter-spacing: 0.15em;
	text-transform: uppercase;
	opacity: 0.35;
	font-size: 0.625rem;
	font-weight: 500;
}

.zu-header .wp-block-button__link {
	padding: 0.625rem 1.25rem;
	letter-spacing: 0.05em;
	transition: background-color 0.15s ease;
}

/* Mobile: keep header one row so CTA doesn't sit on the hero title */
@media (max-width: 781px) {
	.zu-header .zu-header-tag {
		display: none;
	}

	/* CTA wraps under logo and visually covers the page hero title */
	.zu-header .wp-block-buttons {
		display: none;
	}
}

/* Desktop: CTA is the button — hide duplicate nav link added for mobile menu */
@media (min-width: 782px) {
	.zu-header .wp-block-navigation-item:last-child {
		display: none;
	}
}

/* ── Buttons (глобальные WP-кнопки) ── */
.wp-element-button,
.wp-block-button__link {
	border-radius: 0;
	font-size: 0.875rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	padding: 1rem 2rem;
	opacity: 1;
	background-color: var(--wp--preset--color--accent);
	color: #fff;
	transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.wp-block-button__link.has-accent-background-color {
	background-color: #1b4fd8 !important;
	opacity: 1 !important;
}

.wp-block-button__link.has-accent-background-color:hover,
.wp-block-button__link.has-accent-background-color:focus {
	background-color: #1540b8 !important;
}

.wp-block-button__link.has-accent-background-color:active {
	background-color: #1035a0 !important;
}

.wp-block-button.is-style-outline .wp-block-button__link,
.zu-btn-ghost .wp-block-button__link {
	border-width: 1px;
	border-style: solid;
	border-color: rgba(255, 255, 255, 0.3);
	background: transparent !important;
	color: #fff !important;
	font-weight: 500;
	opacity: 1 !important;
}

.wp-block-button.is-style-outline .wp-block-button__link:hover,
.wp-block-button.is-style-outline .wp-block-button__link:focus,
.zu-btn-ghost .wp-block-button__link:hover,
.zu-btn-ghost .wp-block-button__link:focus {
	border-color: rgba(255, 255, 255, 0.7);
	background: transparent !important;
	color: #fff !important;
}

/*
 * Hero 1:1 с Figma Make (App.tsx HomePage / PageHero):
 * слой фона absolute (фото opacity + градиент),
 * контент relative поверх — затемнение НЕ на тексте.
 */
.zu-hero,
.zu-page-hero {
	position: relative;
	display: flex;
	align-items: flex-end;
	overflow: hidden;
	width: 100%;
	margin: 0;
	box-sizing: border-box;
}

/*
 * Внутренние страницы: post-content = constrained (40rem).
 * HTML-hero без alignfull сжимается — белые поля. Делаем как alignfull.
 */
.is-layout-constrained > .wp-block-zu-hero,
.is-layout-constrained > .zu-page-hero,
.is-layout-constrained > .zu-hero,
.is-layout-constrained > .wp-block-html:has(.zu-page-hero),
.is-layout-constrained > .wp-block-html:has(.zu-hero) {
	max-width: none !important;
	width: auto !important;
	margin-left: calc(-1 * var(--wp--style--root--padding-left, 0px)) !important;
	margin-right: calc(-1 * var(--wp--style--root--padding-right, 0px)) !important;
}

.zu-hero {
	min-height: calc(100vh - 4rem);
	height: calc(100svh - 4rem);
}

/* min-height only: fixed height clipped long mobile titles under sticky header */
.zu-page-hero {
	min-height: 18rem;
	height: auto;
}

@media (min-width: 768px) {
	.zu-page-hero {
		min-height: 24rem;
	}
}

/* Фон: #1C2430 + img + градиент — только здесь затемнение */
.zu-hero__bg {
	position: absolute;
	inset: 0;
	z-index: 0;
	background-color: #1c2430;
	pointer-events: none;
}

.zu-hero__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	opacity: 0.4;
}

.zu-page-hero .zu-hero__img {
	opacity: 0.35;
}

.zu-hero__bg::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(
		to top,
		#1c2430 0%,
		rgba(28, 36, 48, 0.3) 50%,
		transparent 100%
	);
}

/* Контент — отдельный слой, без opacity */
.zu-hero__inner {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: 80rem;
	margin-left: auto;
	margin-right: auto;
	padding: 0 1.5rem 4rem;
	box-sizing: border-box;
	text-align: left;
	color: #fff;
}

.zu-page-hero .zu-hero__inner {
	padding-top: 2.5rem;
	padding-bottom: 2.5rem;
}

@media (min-width: 768px) {
	.zu-hero .zu-hero__inner {
		padding-bottom: 6rem;
	}

	.zu-page-hero .zu-hero__inner {
		padding-top: 2rem;
		padding-bottom: 3.5rem;
	}
}

.zu-hero__label {
	margin: 0 0 1.75rem;
	font-size: 0.6875rem;
	font-weight: 700;
	letter-spacing: 0.25em;
	text-transform: uppercase;
	color: #6b8ed4;
}

.zu-hero__title {
	margin: 0 0 1.75rem;
	max-width: 48rem;
	/* Floor lowered: 2.4rem overflowed long RU words on iPhone 15 (393px). */
	font-size: clamp(1.85rem, 2.2vw + 1.35rem, 5rem);
	font-weight: 800;
	line-height: 1.04;
	letter-spacing: -0.025em;
	color: #fff;
	overflow-wrap: anywhere;
	word-break: break-word;
}

.zu-page-hero__title {
	margin: 0;
	max-width: 42rem;
	font-size: clamp(1.75rem, 1.5vw + 1.35rem, 3rem);
	font-weight: 800;
	line-height: 1.15;
	letter-spacing: -0.025em;
	color: #fff;
	overflow-wrap: anywhere;
	word-break: break-word;
}

/* Page H1s outside hero (order/contacts) share xx-large preset — same mobile overflow. */
h1.wp-block-heading {
	overflow-wrap: anywhere;
	word-break: break-word;
}

@media (max-width: 781px) {
	.zu-hero__label {
		letter-spacing: 0.14em;
	}

	h1.wp-block-heading {
		font-size: clamp(1.75rem, 6vw + 0.75rem, 2.5rem);
	}
}

.zu-hero__lead {
	margin: 0 0 2.75rem;
	max-width: 32rem;
	font-size: clamp(1.125rem, 2vw, 1.25rem);
	line-height: 1.625;
	color: rgba(255, 255, 255, 0.55);
}

.zu-page-hero__lead {
	margin: 0.75rem 0 0;
	max-width: 36rem;
	font-size: 1.125rem;
	line-height: 1.625;
	color: rgba(255, 255, 255, 0.55);
}

.zu-hero__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
}

.zu-hero__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 1rem 2rem;
	font-size: 0.875rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	text-decoration: none;
	border: 0;
	border-radius: 0;
	cursor: pointer;
	transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.zu-hero__btn--primary {
	background-color: #1b4fd8;
	color: #fff;
}

.zu-hero__btn--primary:hover,
.zu-hero__btn--primary:focus {
	background-color: #1540b8;
	color: #fff;
}

.zu-hero__btn--primary:active {
	background-color: #1035a0;
}

.zu-hero__btn--ghost {
	background: transparent;
	color: #fff;
	font-weight: 500;
	border: 1px solid rgba(255, 255, 255, 0.3);
}

.zu-hero__btn--ghost:hover,
.zu-hero__btn--ghost:focus {
	border-color: rgba(255, 255, 255, 0.7);
	color: #fff;
}

.zu-footer a {
	color: inherit;
	text-decoration: none;
	transition: color 0.2s ease;
}

.zu-footer a:hover,
.zu-footer a:focus {
	color: #fff;
	text-decoration: none;
}
