/*
Theme Name: TEA Polymer
Author: TEA Polymer
Description: Тема для сайта ТЕА Полимер — литьё пластмасс под давлением
Version: 3.1
*/

/* === ПЕРЕМЕННЫЕ (мягкий приглушённый фон, приятный глазу) === */
:root {
    --turquoise: #1abc9c;
    --turquoise-dark: #16a085;
    --turquoise-soft: rgba(26, 188, 156, 0.14);
    --text-dark: #1a252f;
    --text-gray: #3d4a5c;
    --text-gray-light: #5a6a7a;
    --bg-light: #e8eef3;
    --bg-subtle: #dde5ec;
    --bg-page: #f0f3f6;
    --white: #f7f9fb;
    --card-bg: #ffffff;
    --radius: 14px;
    --radius-sm: 8px;
    --radius-full: 9999px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.06);
    --shadow-xl: 0 20px 40px -10px rgba(0,0,0,0.14);
    --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --focus-ring: 0 0 0 3px rgba(26, 188, 156, 0.35);
    --header-height: 64px;
    --space-section: clamp(3.5rem, 2.5rem + 4vw, 6rem);
    color-scheme: light;
}

/* === СБРОС И БАЗОВЫЕ СТИЛИ === */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: auto; /* smooth через JS — без AbortError */
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    height: 100%;
}

body {
    font-family: 'Montserrat', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text-dark);
    line-height: 1.65;
    background-color: var(--bg-page);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    margin: 0;
    min-height: 100%;
    display: flex;
    flex-direction: column;
    font-feature-settings: "kern" 1, "liga" 1;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', system-ui, sans-serif;
    font-weight: 700;
    color: var(--text-dark);
    text-wrap: balance;
    letter-spacing: -0.02em;
    line-height: 1.25;
}

a {
    text-decoration: none;
    transition: color var(--transition-fast), opacity var(--transition-fast);
    color: var(--turquoise);
}

a:hover {
    color: var(--turquoise-dark);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Content-visibility for long sections — better performance */
.section {
    content-visibility: auto;
    contain-intrinsic-size: auto 500px;
}

/* === ВЫДЕЛЕНИЕ И СКРОЛЛБАР === */
::selection {
    background: var(--turquoise);
    color: #fff;
}

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-light);
}

::-webkit-scrollbar-thumb {
    background: #c5c5c5;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-gray);
}

/* === ФОКУС === */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
    outline: none;
    box-shadow: var(--focus-ring);
    border-radius: 4px;
}

/* === SKIP-LINK === */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--turquoise);
    color: #fff;
    padding: 8px;
    z-index: 9999;
    transition: top 0.3s;
}

.skip-link:focus-visible {
    top: 0;
}

/* === ВЕРХНЯЯ ПАНЕЛЬ === */
.top-bar {
    background: var(--text-dark);
    padding: 6px 0;
}

.top-bar-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 25px;
    flex-wrap: wrap;
}

.top-bar-item {
    color: rgba(255,255,255,0.85);
    font-size: clamp(0.75rem, 0.7rem + 0.2vw, 0.82rem);
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

.top-bar-item:hover {
    color: var(--turquoise);
}

.top-bar-icon {
    font-size: 0.85rem;
}

/* === ШАПКА И НАВИГАЦИЯ === */
.site-header {
    background: rgba(247, 249, 251, 0.88);
    backdrop-filter: saturate(180%) blur(12px);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    box-shadow: 0 1px 0 rgba(0,0,0,0.06);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 12px 0;
    transition: box-shadow var(--transition), background var(--transition);
}

.site-header.is-scrolled {
    box-shadow: var(--shadow-md);
    background: rgba(247, 249, 251, 0.95);
}

.nav-menu {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
}

.logo {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: clamp(1.15rem, 1rem + 0.5vw, 1.35rem);
    color: var(--turquoise);
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.4rem;
    cursor: pointer;
    color: var(--text-dark);
    padding: 5px;
    line-height: 1;
    border-radius: 4px;
}

.nav-wrapper {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--card-bg, #fff);
    box-shadow: var(--shadow-md);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.nav-wrapper.open {
    max-height: 600px;
}

.nav-links {
    list-style: none;
}

.nav-links a {
    color: var(--text-gray);
    font-weight: 500;
    display: block;
}

.nav-links a:hover {
    color: var(--turquoise);
}

.nav-links a.active {
    color: var(--turquoise);
    font-weight: 700;
    background-color: rgba(26, 188, 156, 0.12);
    position: relative;
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 0;
    height: 2px;
    background: var(--turquoise);
    border-radius: 2px;
}

/* === ВЫПАДАЮЩЕЕ ПОДМЕНЮ === */
.has-submenu {
    position: relative;
}

.submenu {
    list-style: none;
    margin: 0;
    padding: 0;
}

.has-submenu > a::after {
    content: '▾';
    font-size: 0.65em;
    margin-left: 4px;
    display: inline-block;
    transition: transform 0.2s ease;
}

/* === ЛОГОТИП === */
.tea-header-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: -8px; /* чуть сдвигаем блок влево */
    flex-shrink: 0;
    min-width: 0;
}

.tea-header-logo {
    padding: 0 !important;
    margin: 0 !important;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.tea-logo-img {
    margin: 0 !important;
    display: block;
}

.tea-brand-name {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: clamp(1.15rem, 1rem + 0.7vw, 1.55rem);
    color: var(--text-dark);
    text-decoration: none;
    letter-spacing: 0.02em;
    white-space: nowrap;
    line-height: 1.2;
}

.tea-brand-name:hover {
    color: var(--turquoise);
}

/* === СЕКЦИИ И КОНТЕЙНЕРЫ === */
.container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 clamp(16px, 4vw, 24px);
}

.section {
    padding: var(--space-section) 0;
    max-width: 100%;
    width: 100%;
    margin: 0 auto;
    background-color: transparent;
}

.section-bg-light {
    background-color: var(--bg-light);
    max-width: 100%;
    padding: var(--space-section) 0;
}

.section-bg-light .container {
    max-width: 1140px;
    margin: 0 auto;
}

.section-title {
    font-size: clamp(1.5rem, 1.15rem + 1.4vw, 2.35rem);
    text-align: center;
    margin-bottom: clamp(1.5rem, 1rem + 1.5vw, 2.75rem);
    letter-spacing: -0.025em;
    position: relative;
    text-wrap: balance;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--turquoise);
    margin: 15px auto 0;
    border-radius: 2px;
}

.section-title[style*="text-align:left"]::after,
.promo-text .section-title::after {
    margin: 15px 0 0;
}

/* === HERO === */
.hero-section {
    min-height: clamp(420px, 62vh, 640px) !important;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: clamp(56px, 6vw, 96px) 20px;
    max-width: 100%;
    background: var(--bg-subtle);
    position: relative;
    overflow: hidden;
}

/* Фоновое фото на весь блок */
.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    opacity: 0.85;
    transform: scale(1.02);
}

/* Слой: изображение хорошо читается, текст остаётся разборчивым */
.hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(
        180deg,
        rgba(15, 23, 42, 0.55) 0%,
        rgba(15, 23, 42, 0.62) 50%,
        rgba(15, 23, 42, 0.72) 100%
    );
    pointer-events: none;
}

.hero-section .container {
    position: relative;
    z-index: 2;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-top: clamp(8px, 1vw, 16px);
}

.hero-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: clamp(1.8rem, 1.3rem + 2.5vw, 3.2rem);
    line-height: 1.15;
    color: var(--text-dark);
    margin: 0 auto clamp(15px, 1.5vw, 30px);
    max-width: 800px;
    text-align: center;
    text-wrap: balance;
    text-shadow: none;
}

/* Светлый текст только у героя с фоновым фото (главная) */
.hero-section:has(.hero-bg) .hero-title {
    color: #f8fafc;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.55), 0 1px 3px rgba(0, 0, 0, 0.4);
}

.hero-subtitle {
    font-size: clamp(1rem, 0.92rem + 0.4vw, 1.2rem);
    line-height: 1.65;
    color: var(--text-gray);
    margin: 0 auto clamp(18px, 2vw, 28px);
    max-width: 640px;
    text-align: center;
    text-shadow: none;
}

.hero-section:has(.hero-bg) .hero-subtitle {
    color: #e2e8f0;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.5);
}

.btn-outline-hero {
    background: rgba(247, 249, 251, 0.75) !important;
    color: var(--turquoise-dark) !important;
    border: 2px solid var(--turquoise) !important;
    box-shadow: none !important;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.btn-outline-hero:hover {
    background: rgba(255, 255, 255, 0.95) !important;
    color: var(--turquoise-dark) !important;
}

/* === КНОПКИ (современный стиль) === */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4em;
    background: var(--turquoise);
    color: #fff;
    padding: 13px 28px;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.01em;
    transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
    border: none;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(26, 188, 156, 0.25);
    line-height: 1.3;
}

.btn:hover {
    background: var(--turquoise-dark);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(26, 188, 156, 0.35);
}

.btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(26, 188, 156, 0.2);
}

.hero-section .btn {
    margin-top: clamp(10px, 1vw, 20px) !important;
    margin-bottom: 0 !important;
    padding: 10px 24px !important;
}

/* === О НАС === */
.about-text {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    font-size: clamp(0.95rem, 0.9rem + 0.2vw, 1.1rem);
    color: var(--text-gray);
    line-height: 1.8;
}

.about-text p {
    margin-bottom: 20px;
}

/* about-stats flex variant superseded by grid card version */


/* === ПРОМО-БЛОКИ === */
.promo-block {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}

.promo-text .section-title {
    text-align: center;
    margin-bottom: 20px;
}

.promo-text .section-title::after {
    margin: 15px auto 0;
}

.promo-desc {
    font-size: clamp(0.95rem, 0.9rem + 0.2vw, 1.1rem);
    color: var(--text-gray);
    line-height: 1.8;
    margin-bottom: 25px;
}

/* === СЕТКА КАРТОЧЕК === */
.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
    gap: clamp(18px, 1.5vw + 0.5rem, 28px);
    margin-top: clamp(1.75rem, 1.25rem + 1.5vw, 2.75rem);
}

/* === ОДИНАКОВЫЕ ИЗОБРАЖЕНИЯ В АРХИВАХ === */
.post-type-archive-catalog .post-image-wrapper,
.post-type-archive-molds .post-image-wrapper,
.post-type-archive-articles .post-image-wrapper {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: var(--bg-light);
}

.post-type-archive-catalog .post-thumbnail-img,
.post-type-archive-molds .post-thumbnail-img,
.post-type-archive-articles .post-thumbnail-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* === КАРТОЧКА (современный elevation + hover) === */
.card {
    background: var(--card-bg);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
    border: 1px solid rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
    border-color: rgba(26, 188, 156, 0.15);
}

.post-image-wrapper {
    width: 100%;
    height: auto;
    overflow: hidden;
    background: var(--bg-subtle, #edf2f7);
    flex-shrink: 0;
    display: block;
    padding: 0;
    position: relative;
    box-sizing: border-box;
    aspect-ratio: 4 / 3;
    border-radius: 0;
}

.post-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    border-radius: 0;
    transition: transform var(--transition);
}

.card:hover .post-image-wrapper img {
    transform: scale(1.04);
}

.post-thumbnail-img {
    width: 100%;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
    border-radius: 0;
    margin: 0;
}

.card-content {
    padding: 18px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-grow: 1;
}

.card h3 {
    margin: 0 0 10px;
    font-size: 1.1rem;
    line-height: 1.3;
}

.excerpt {
    color: var(--text-gray);
    margin-bottom: 15px;
    font-size: 0.88rem;
    line-height: 1.5;
}

.card .btn {
    margin-top: auto;
    padding: 8px 22px;
    font-size: 0.86rem;
}

/* === АНИМАЦИЯ КАРТОЧЕК === */
.card {
    opacity: 1;
}

.card.card-reveal {
    animation: cardFadeIn 0.4s ease forwards;
}

@keyframes cardFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* === СПЕЦИАЛЬНО ДЛЯ ПРОМО-БЛОКОВ === */
.promo-block .post-image-wrapper,
.seo-banner img {
    height: auto !important;
    overflow: visible !important;
}

/* Hero background — full block, semi-transparent */
.hero-bg img {
    height: 100% !important;
    width: 100% !important;
    object-fit: cover !important;
}

.promo-block .post-thumbnail-img {
    max-width: 100% !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
}

/* === ЭТАПЫ СОТРУДНИЧЕСТВА === */
.steps-list {
    max-width: 700px;
    margin: 0 auto;
    line-height: 2;
    font-size: clamp(0.95rem, 0.9rem + 0.2vw, 1.1rem);
    color: var(--text-gray);
    counter-reset: steps;
    list-style: none;
    padding-left: 0;
}

.steps-list li {
    position: relative;
    padding-left: 50px;
    margin-bottom: 18px;
    counter-increment: steps;
}

.steps-list li::before {
    content: counter(steps);
    position: absolute;
    left: 0;
    top: 0;
    width: 32px;
    height: 32px;
    background: var(--turquoise);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
}

/* === КОНТАКТЫ === */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
    gap: 30px;
    max-width: 900px;
    margin: 0 auto;
}

.contact-item {
    background: var(--bg-light);
    padding: 30px 25px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    gap: 18px;
    transition: var(--transition);
}

.contact-item:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}

.contact-icon {
    width: 52px;
    height: 52px;
    background: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
    box-shadow: var(--shadow-sm);
}

.contact-info h4 {
    font-size: 0.9rem;
    color: var(--text-gray);
    margin-bottom: 4px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.contact-info p {
    font-size: 1.05rem;
    color: var(--text-dark);
    font-weight: 600;
}

.contact-info a {
    color: var(--text-dark);
}

.contact-info a:hover {
    color: var(--turquoise);
}

/* === ОДИНОЧНАЯ ЗАПИСЬ === */
.single-article {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

.single-article h1 {
    font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem);
    margin-bottom: 20px;
    text-wrap: balance;
    text-align: center;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.article-meta {
    color: var(--text-gray-light);
    font-size: 0.9rem;
    margin-bottom: 30px;
    display: inline-block;
    margin: 20px auto 30px;
    width: 100%;
}

.article-meta span {
    display: block;
    font-size: 0.9rem;
    color: var(--text-gray-light);
    margin: 0;
}

.article-meta span::before {
    content: '·';
    margin-right: 10px;
    color: #ccc;
}

.article-meta span:first-child::before {
    display: none;
}

.single-article img {
    border-radius: var(--radius);
    margin: 25px 0;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.single-article p {
    margin-bottom: 20px;
    line-height: 1.8;
    font-size: 1.05rem;
}

.single-article h2 {
    font-size: 1.5rem;
    margin: 35px 0 15px;
}

.single-article h3 {
    font-size: 1.2rem;
    margin: 30px 0 12px;
}

.single-article ul, .single-article ol {
    margin: 15px 0 20px 25px;
}

.single-article li {
    margin-bottom: 8px;
    line-height: 1.7;
}

/* === ЦЕНТРИРОВАННЫЕ СТРАНИЦЫ === */
.single-page-centered {
    text-align: center;
}

.single-page-centered h1,
.single-page-centered h2,
.single-page-centered h3 {
    text-align: center;
}

.single-page-centered p {
    text-align: center;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.single-page-centered ul,
.single-page-centered ol {
    display: inline-block;
    text-align: left;
    margin: 15px auto 20px;
    padding-left: 25px;
}

.single-page-centered img {
    margin-left: auto;
    margin-right: auto;
}

.single-page-centered blockquote {
    text-align: center;
    border: none;
    padding: 20px 40px;
    color: var(--text-gray);
    font-style: italic;
}

/* === ОДИНОЧНЫЕ КАРТОЧКИ НА ВНУТРЕННИХ СТРАНИЦАХ === */
.single-card-grid {
    max-width: 700px;
    margin: 0 auto;
}

.single-card-grid .card {
    max-width: 100%;
}

.single-card-grid .card-content {
    padding: 30px 25px;
}

.single-card-grid .card-content h3 {
    font-size: clamp(1.1rem, 1rem + 0.5vw, 1.4rem);
    margin-bottom: 12px;
}

.single-card-grid .card-content p {
    font-size: clamp(0.95rem, 0.9rem + 0.2vw, 1.1rem);
    line-height: 1.8;
    color: var(--text-gray);
    margin-bottom: 0;
}

.single-card-grid .btn {
    margin-top: 20px;
}

/* === ХЛЕБНЫЕ КРОШКИ === */
.breadcrumbs {
    max-width: 1200px;
    margin: 20px auto 0;
    padding: 0 20px;
    font-size: 0.85rem;
    color: var(--text-gray);
}

.breadcrumbs ol {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    align-items: center;
}

.breadcrumbs a {
    color: var(--turquoise);
}

.breadcrumbs a:hover {
    color: var(--turquoise-dark);
    text-decoration: underline;
}

.breadcrumbs .separator {
    color: #ccc;
}

.breadcrumbs .current {
    color: var(--text-dark);
    font-weight: 500;
}

/* === ФОРМЫ И ИНПУТЫ === */
.form-group {
    margin-bottom: clamp(15px, 1.5vw, 25px);
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.9rem;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: var(--radius);
    font-size: 0.95rem;
    color: var(--text-dark);
    background: var(--white);
    transition: var(--transition);
    box-sizing: border-box;
}

.form-control:focus {
    outline: none;
    border-color: var(--turquoise);
    box-shadow: var(--focus-ring);
}

.form-control::placeholder {
    color: var(--text-gray-light);
}

/* === ПАГИНАЦИЯ === */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-gray);
    background: var(--bg-light);
    text-decoration: none;
    transition: var(--transition);
}

.pagination .page-numbers:hover {
    background: rgba(26, 188, 156, 0.1);
    color: var(--turquoise);
}

.pagination .page-numbers.current {
    background: var(--turquoise);
    color: #fff;
}

.pagination .page-numbers.dots {
    background: transparent;
    color: var(--text-gray-light);
}

/* === КНОПКА «НАВЕРХ» === */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 48px;
    height: 48px;
    background: var(--turquoise);
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 1.4rem;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease, background 0.3s ease;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--turquoise-dark);
    transform: translateY(-3px);
}

.back-to-top:focus-visible {
    box-shadow: var(--focus-ring);
}

/* === КОММЕНТАРИИ === */
.comments-area {
    max-width: 800px;
    margin: 40px auto 0;
    padding: 0 20px;
}

.comments-title {
    font-size: 1.3rem;
    margin-bottom: 25px;
}

.comment-list {
    list-style: none;
    padding: 0;
    margin: 0 0 30px;
}

.comment-list .comment {
    padding: 20px 0;
    border-bottom: 1px solid rgba(0,0,0,0.08);
}

.comment-list .comment:last-child {
    border-bottom: none;
}

.comment-author {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.comment-author .says {
    color: var(--text-gray);
    font-weight: 400;
}

.comment-metadata {
    font-size: 0.82rem;
    color: var(--text-gray-light);
    margin-bottom: 10px;
}

.comment-metadata a {
    color: var(--text-gray-light);
}

.comment-body {
    font-size: 0.95rem;
    color: var(--text-gray);
    line-height: 1.7;
}

.comment-respond {
    margin-top: 30px;
}

.comment-reply-title {
    font-size: 1.15rem;
    margin-bottom: 15px;
}

.comment-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: var(--radius);
    font-size: 0.95rem;
    color: var(--text-dark);
    background: var(--white);
    box-sizing: border-box;
    transition: var(--transition);
}

.comment-form input:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: var(--turquoise);
    box-shadow: var(--focus-ring);
}

.comment-form textarea {
    resize: vertical;
    min-height: 120px;
}

.comment-form .submit {
    align-self: flex-start;
    background: var(--turquoise);
    color: #fff;
    padding: 12px 30px;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
}

.comment-form .submit:hover {
    background: var(--turquoise-dark);
}

.comment-form .comment-form-cookies-consent {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-gray);
}

.comment-form .comment-form-cookies-consent input {
    width: auto;
}

/* === ФОРМА ПОИСКА === */
.search-form {
    display: flex;
    gap: 10px;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

.search-form input[type="search"],
.search-form input[type="text"] {
    flex: 1;
    min-width: 0;
    padding: 12px 18px;
    border: 1px solid #ddd;
    border-radius: 50px;
    font-size: 0.95rem;
    font-family: 'Montserrat', sans-serif;
    color: var(--text-dark);
    background: var(--white);
    transition: var(--transition);
    box-sizing: border-box;
}

.search-form input[type="search"]:focus,
.search-form input[type="text"]:focus {
    outline: none;
    border-color: var(--turquoise);
    box-shadow: var(--focus-ring);
}

.search-form button,
.search-form .btn {
    flex-shrink: 0;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .search-form {
        flex-direction: column;
        gap: 12px;
    }

    .search-form button,
    .search-form .btn {
        width: 100%;
    }
}

/* === РЕЗУЛЬТАТЫ ПОИСКА === */
.search-results-section {
    padding-bottom: 0 !important;
}

.search-results-info {
    text-align: center;
    color: var(--text-gray);
    margin-bottom: 30px;
    font-size: 1.05rem;
}

.search-results-info strong {
    color: var(--text-dark);
}

body.search-results .site-footer {
    margin-top: 0;
}

@media (max-width: 768px) {
    .search-results-info {
        font-size: 0.95rem;
        margin-bottom: 20px;
    }
}

/* === СТРАНИЦА 404 === */
.error-404-section {
    text-align: center;
    padding-bottom: 0 !important;
}

.error-404-section .container {
    max-width: 600px;
}

.error-404-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.error-404-text {
    color: var(--text-gray);
    font-size: 1.05rem;
    line-height: 1.7;
    margin: 0;
}

.error-404-search {
    display: flex;
    justify-content: center;
    gap: 10px;
    width: 100%;
    max-width: 500px;
    margin: 10px auto 0;
}

.error-404-input {
    flex: 1;
    min-width: 0;
}

.error-404-btn {
    white-space: nowrap;
    flex-shrink: 0;
}

.error-404-home {
    margin-top: 5px;
}

body.error404 .site-footer {
    margin-top: 0;
}

@media (max-width: 768px) {
    .error-404-search {
        flex-direction: column;
        gap: 12px;
    }

    .error-404-btn {
        width: 100%;
    }
}

/* === ПОДВАЛ === */
.site-footer {
    background: var(--text-dark);
    color: rgba(255,255,255,0.85);
    padding: clamp(40px, 3vw, 60px) 20px;
    text-align: center;
    margin-top: auto;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: clamp(30px, 4vw, 50px);
}

.footer-col h4 {
    color: var(--white);
    font-size: 1.1rem;
    margin-bottom: clamp(15px, 1.5vw, 20px);
}

.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col ul li a {
    color: rgba(255,255,255,0.7);
    transition: var(--transition);
}

.footer-col ul li a:hover {
    color: var(--turquoise);
    padding-left: 5px;
}

.copyright {
    margin-top: clamp(40px, 4vw, 60px);
    padding-top: clamp(20px, 2vw, 30px);
    border-top: 1px solid rgba(255,255,255,0.1);
    text-align: center;
    color: rgba(255,255,255,0.6);
    font-size: 0.85rem;
}

/* === МОДАЛЬНОЕ ОКНО === */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(3px);
}

.modal-content {
    background: var(--white);
    padding: 30px;
    border-radius: var(--radius);
    width: 90%;
    max-width: 500px;
    position: relative;
    box-shadow: var(--shadow-lg);
    animation: modalSlide 0.3s ease-out;
}

@keyframes modalSlide {
    from { transform: translateY(-20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-gray);
    transition: color 0.2s;
}

.close-modal:hover {
    color: var(--text-dark);
}


/* === Utility classes for templates === */
.post-thumbnail-wrap {
  margin-bottom: 30px;
}

.archive-intro {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 40px;
  color: var(--text-gray);
}

.no-image-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-light);
}

.no-image-placeholder span {
  color: #aaa;
  font-size: 0.9rem;
}

.empty-archive-msg {
  text-align: center;
  color: var(--text-gray);
}

/* === ПОИСК В МЕНЮ === */
.nav-search {
  position: relative;
  display: flex;
  align-items: center;
}

.nav-search-toggle {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-gray);
  font-size: 1.1rem;
  padding: 8px 12px;
  border-radius: var(--radius);
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.nav-search-toggle:hover {
  color: var(--turquoise);
  background-color: rgba(26, 188, 156, 0.08);
}

.nav-search-toggle:focus-visible {
  box-shadow: var(--focus-ring);
}

.nav-search-form {
  display: none;
  align-items: center;
  gap: 6px;
  position: absolute;
  top: 100%;
  right: 0;
  background: var(--white);
  box-shadow: var(--shadow-md);
  border-radius: var(--radius);
  padding: 12px;
  z-index: 1001;
  min-width: 280px;
}

.nav-search-form.open {
  display: flex;
}

.nav-search-form input[type="search"] {
  flex: 1;
  min-width: 0;
  padding: 10px 14px;
  border: 1px solid #ddd;
  border-radius: 50px;
  font-size: 0.88rem;
  font-family: 'Montserrat', sans-serif;
  color: var(--text-dark);
  background: var(--white);
  transition: var(--transition);
  box-sizing: border-box;
}

.nav-search-form input[type="search"]:focus {
  outline: none;
  border-color: var(--turquoise);
  box-shadow: var(--focus-ring);
}

.nav-search-form button {
  background: var(--turquoise);
  color: #fff;
  border: none;
  border-radius: 50px;
  padding: 10px 18px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition);
  flex-shrink: 0;
}

.nav-search-form button:hover {
  background: var(--turquoise-dark);
}

@media (max-width: 768px) {
  .nav-search-form {
    position: static;
    box-shadow: none;
    padding: 10px 20px;
    min-width: 100%;
    border-bottom: 1px solid rgba(0,0,0,0.08);
  }
  .nav-search-toggle {
    display: none;
  }
  .nav-search-form {
    display: flex;
  }
}
/* === УТИЛИТЫ === */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.mt-1 { margin-top: 10px; }
.mt-2 { margin-top: 20px; }
.mt-3 { margin-top: 30px; }
.mb-1 { margin-bottom: 10px; }
.mb-2 { margin-bottom: 20px; }
.mb-3 { margin-bottom: 30px; }

/* === ДЕСКТОП: ГОРИЗОНТАЛЬНОЕ МЕНЮ === */
@media (min-width: 769px) {
    .mobile-toggle {
        display: none;
    }

    .nav-wrapper {
        position: static;
        top: auto;
        left: auto;
        width: auto;
        background: transparent;
        box-shadow: none;
        max-height: none;
        height: auto;
        overflow: visible;
    }

    .nav-links {
        display: flex;
        flex-direction: row;
        justify-content: flex-end;
        align-items: center;
        gap: 2px;
    }

    .nav-links li {
        list-style: none;
    }

    .nav-links a {
        display: inline-block;
        padding: 8px 12px;
        border-radius: var(--radius);
        font-size: clamp(0.8rem, 0.75rem + 0.15vw, 0.86rem);
    }

    .nav-links a:hover {
        background-color: rgba(26, 188, 156, 0.08);
    }

    .nav-links a.active {
        color: var(--turquoise);
        border-bottom: 2px solid var(--turquoise);
        background-color: transparent;
        border-radius: 0;
    }

    .nav-links a.active::after {
        display: none;
    }

    /* Подменю при наведении — десктоп */
    .submenu {
        position: absolute;
        top: 100%;
        left: 0;
        min-width: 240px;
        background: var(--white);
        box-shadow: var(--shadow-md);
        border-radius: var(--radius);
        padding: 8px 0;
        opacity: 0;
        visibility: hidden;
        transform: translateY(10px);
        transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
        z-index: 1001;
    }

    .has-submenu:hover .submenu {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .has-submenu:hover > a::after {
        transform: rotate(180deg);
    }

    .submenu li {
        list-style: none;
    }

    .submenu a {
        display: block;
        padding: 10px 18px;
        font-size: clamp(0.78rem, 0.73rem + 0.15vw, 0.85rem);
        font-weight: 500;
        color: var(--text-gray);
        white-space: nowrap;
        border-radius: 0;
    }

    .submenu a:hover {
        background-color: rgba(26, 188, 156, 0.08);
        color: var(--turquoise);
    }
}

/* === АДАПТИВНОСТЬ: ПЛАНШЕТЫ И ТЕЛЕФОНЫ === */
@media (max-width: 768px) {
    .mobile-toggle {
        display: block;
    }

    .nav-wrapper {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--card-bg, #fff);
        box-shadow: var(--shadow-md);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }

    .nav-wrapper.open {
        max-height: 600px;
    }

    .nav-links {
        flex-direction: column;
        padding: 10px 0;
    }

    .nav-links li {
        width: 100%;
    }

    .nav-links a {
        padding: 14px 20px;
        border-bottom: 1px solid rgba(0,0,0,0.08);
        border-radius: 0;
        font-size: 0.9rem;
    }

    .nav-links a.active {
        color: var(--turquoise);
        font-weight: 700;
        background-color: rgba(26, 188, 156, 0.1);
        border-bottom: 1px solid rgba(0,0,0,0.08);
    }

    /* Подменю по нажатию — мобильные */
    .submenu {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }

    .has-submenu.open .submenu {
        max-height: 250px;
    }

    .has-submenu.open > a::after {
        transform: rotate(180deg);
    }

    .submenu a {
        padding: 12px 20px 12px 40px;
        border-bottom: 1px solid rgba(0,0,0,0.08);
        font-size: 0.85rem;
        color: var(--text-gray);
        border-radius: 0;
    }

    .submenu a:hover {
        background-color: rgba(26, 188, 156, 0.08);
    }

    .top-bar-inner {
        justify-content: center;
        gap: 15px;
    }

    .top-bar-item {
        font-size: 0.78rem;
    }

    .hero-section {
        min-height: clamp(360px, 55vh, 520px) !important;
        padding: clamp(40px, 5vw, 64px) 16px;
    }

    .hero-section .btn {
        width: 100%;
        box-sizing: border-box;
        margin-top: clamp(10px, 1vw, 15px) !important;
        padding: 12px !important;
    }

    .section {
        padding: clamp(25px, 4vw, 40px) 16px;
    }

    .section-bg-light {
        padding: clamp(25px, 4vw, 40px) 16px;
    }

    .section-title {
        font-size: clamp(1.3rem, 1.1rem + 1vw, 1.7rem);
        margin-bottom: clamp(20px, 3vw, 30px);
    }

    .section-title::after {
        margin: 10px auto 0;
    }

    .content-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .card-content {
        padding: 16px;
    }

    .card h3 {
        font-size: 1.05rem;
        margin-bottom: 8px;
    }

    .excerpt, .card-content p {
        font-size: 0.9rem;
        line-height: 1.5;
    }

    .card .btn,
    .card-content .btn,
    .card-content a.btn,
    .card-content button.btn {
        display: block;
        width: 100%;
        text-align: center;
        padding: 12px 20px;
        font-size: 0.95rem;
        margin-top: 15px;
        box-sizing: border-box;
    }

    .section ol {
        padding-left: 20px;
        font-size: 0.95rem;
        line-height: 1.8;
    }

    .section ol li {
        margin-bottom: 6px;
    }

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 16px;
        max-width: 400px;
    }

    .contact-item {
        padding: 20px 18px;
        gap: 14px;
    }

    .contact-icon {
        width: 44px;
        height: 44px;
        font-size: 1.1rem;
    }

    .contact-info h4 {
        font-size: 0.8rem;
    }

    .contact-info p {
        font-size: 0.95rem;
    }

    .footer-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-col ul {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
        padding: 0;
        margin: 0;
    }

    .footer-col ul li {
        margin: 0;
    }

    .footer-col h4 {
        text-align: center;
    }

    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 42px;
        height: 42px;
        font-size: 1.2rem;
    }

    #tz-modal {
        padding: 10px;
        align-items: flex-start;
        overflow-y: auto;
    }

    #tz-modal > div {
        width: 100%;
        max-width: 100%;
        padding: 20px 16px;
        margin: 10px 0;
        max-height: 90vh;
        overflow-y: auto;
    }

    #tz-modal h2 {
        font-size: 1.2rem;
        margin-bottom: 8px;
    }

    #tz-modal p {
        font-size: 0.85rem;
        margin-bottom: 15px;
    }

    #tz-modal input[type="text"],
    #tz-modal input[type="email"],
    #tz-modal input[type="tel"],
    #tz-modal textarea {
        padding: 14px 12px;
        font-size: 16px;
        margin-bottom: 12px;
    }

    #tz-modal input[type="file"] {
        font-size: 0.85rem;
        padding: 10px 0;
    }

    #tz-modal .btn {
        padding: 14px 20px;
        font-size: 1rem;
    }

    .tz-close {
        top: 10px !important;
        right: 14px !important;
        font-size: 32px !important;
    }
}

/* === МАЛЫЕ ТЕЛЕФОНЫ === */
@media (max-width: 480px) {
    .section {
        padding: 20px 14px;
    }

    .section-title {
        font-size: 1.25rem;
    }

    .card-content {
        padding: 14px;
    }

    .card h3 {
        font-size: 1rem;
    }

    .card-content p,
    .excerpt {
        font-size: 0.88rem;
    }

    .contact-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .contact-info p {
        font-size: 0.9rem;
    }

    #tz-modal > div {
        padding: 16px 12px;
    }

    #tz-modal h2 {
        font-size: 1.1rem;
    }

    .section ol {
        padding-left: 18px;
        font-size: 0.9rem;
    }
}

/* === ЛАНДШАФТНАЯ ОРИЕНТАЦИЯ === */
@media (max-width: 768px) and (orientation: landscape) {
    #tz-modal {
        align-items: center;
        padding: 20px;
    }

    #tz-modal > div {
        max-width: 480px;
        max-height: 85vh;
        margin: 0 auto;
    }
}

/* === REDUCED MOTION === */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .card:hover,
    .contact-item:hover {
        transform: none;
    }

    .btn:hover {
        transform: none;
    }

    .back-to-top {
        transition: none;
    }
}



/* === ABOUT / STEPS / ADVANTAGES (наполнение главной) === */
.about-text {
    max-width: 780px;
    margin: 0 auto 2rem;
    text-align: left;
    color: var(--text-gray);
    font-size: clamp(0.95rem, 0.9rem + 0.2vw, 1.05rem);
    line-height: 1.8;
}
.about-text p + p { margin-top: 1rem; }
.about-text strong { color: var(--text-dark); }

.about-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    max-width: 920px;
    margin: 0 auto;
    align-items: stretch;
}
.about-stat {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 1.35rem 1.15rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 110px;
    box-sizing: border-box;
    height: 100%;
}
.about-stat-number {
    display: block;
    font-size: clamp(1.45rem, 1.2rem + 0.8vw, 1.85rem);
    font-weight: 800;
    color: var(--turquoise);
    line-height: 1.2;
    margin: 0 0 0.45rem;
    width: 100%;
}
.about-stat-label {
    display: block;
    margin: 0;
    padding: 0;
    font-size: 0.82rem;
    line-height: 1.35;
    color: var(--text-gray);
    width: 100%;
    max-width: 11em;
}
@media (max-width: 768px) {
    .about-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    .about-stat {
        min-height: 100px;
        padding: 1.15rem 0.9rem;
    }
}
@media (max-width: 420px) {
    .about-stats {
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
    }
}

.steps-list {
    max-width: 720px;
    margin: 0 auto;
    padding-left: 1.25rem;
    color: var(--text-gray);
    line-height: 1.9;
    font-size: 1rem;
}
.steps-list li { margin-bottom: 0.65rem; }
.steps-list strong { color: var(--text-dark); }

.advantages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
    gap: clamp(16px, 1.5vw, 24px);
    margin-top: 1.5rem;
}
.advantage-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 1.5rem 1.35rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0,0,0,0.05);
    transition: transform var(--transition), box-shadow var(--transition);
}
.advantage-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}
.advantage-card h3 {
    font-size: 1.05rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}
.advantage-card p {
    font-size: 0.92rem;
    color: var(--text-gray);
    line-height: 1.65;
    margin: 0;
}
.advantage-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: var(--turquoise-soft);
    color: var(--turquoise-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    margin-bottom: 0.85rem;
}

.materials-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-top: 1.25rem;
}
.material-chip {
    background: var(--card-bg);
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: var(--radius-full);
    padding: 0.4rem 0.9rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-dark);
    box-shadow: var(--shadow-sm);
}

/* === DARK MODE (системный) === */
@media (prefers-color-scheme: dark) {
    :root {
        color-scheme: dark;
        --text-dark: #f1f5f9;
        --text-gray: #cbd5e1;
        --text-gray-light: #94a3b8;
        --bg-light: #0f172a;
        --bg-subtle: #1e293b;
        --bg-page: #0b1220;
        --white: #1e293b;
        --card-bg: #1e293b;
        --shadow-sm: 0 1px 3px rgba(0,0,0,0.4);
        --shadow-md: 0 4px 12px rgba(0,0,0,0.45);
        --shadow-lg: 0 12px 28px rgba(0,0,0,0.5);
        --shadow-xl: 0 20px 40px rgba(0,0,0,0.55);
        --turquoise-soft: rgba(26, 188, 156, 0.22);
    }

    body {
        background-color: var(--bg-page);
        color: var(--text-dark);
    }

    .site-header {
        background: rgba(15, 23, 42, 0.88);
        box-shadow: 0 1px 0 rgba(255,255,255,0.06);
    }

    .site-header.is-scrolled {
        background: rgba(15, 23, 42, 0.95);
    }

    .card {
        background: var(--card-bg);
        border-color: rgba(255,255,255,0.08);
    }

    .card:hover {
        border-color: rgba(26, 188, 156, 0.3);
    }

    .card h3,
    .card-content h3 {
        color: var(--text-dark);
    }

    .card .excerpt,
    .card-content p,
    .card-content .excerpt {
        color: var(--text-gray);
    }

    .post-image-wrapper {
        background: linear-gradient(145deg, #1e293b 0%, #0f172a 100%);
    }

    .top-bar {
        background: #020617;
    }

    .nav-links a {
        color: var(--text-gray);
    }

    .nav-links a:hover,
    .nav-links a.active {
        color: var(--turquoise);
        background-color: rgba(26, 188, 156, 0.12);
    }

    .hero-section {
        background: #0f172a;
    }

    .hero-bg img {
        opacity: 0.55;
    }

    .hero-overlay {
        background: linear-gradient(
            180deg,
            rgba(15, 23, 42, 0.55) 0%,
            rgba(15, 23, 42, 0.62) 50%,
            rgba(15, 23, 42, 0.72) 100%
        );
    }

    .hero-title {
        color: var(--text-dark);
        text-shadow: none;
    }

    .hero-subtitle {
        color: var(--text-gray);
        text-shadow: none;
    }

    .hero-section:has(.hero-bg) .hero-title {
        color: #f8fafc;
        text-shadow: 0 2px 12px rgba(0, 0, 0, 0.55), 0 1px 3px rgba(0, 0, 0, 0.4);
    }

    .hero-section:has(.hero-bg) .hero-subtitle {
        color: #e2e8f0;
        text-shadow: 0 1px 8px rgba(0, 0, 0, 0.5);
    }

    .tea-brand-name {
        color: var(--text-dark);
    }

    .btn-outline-hero {
        background: rgba(30, 41, 59, 0.75) !important;
        color: var(--turquoise) !important;
        border-color: var(--turquoise) !important;
    }

    .btn-outline-hero:hover {
        background: rgba(30, 41, 59, 0.95) !important;
    }

    .section-bg-light {
        background-color: var(--bg-light);
    }

    .section-title {
        color: var(--text-dark);
    }

    /* === Новые блоки главной (тёмная тема) === */
    .about-text {
        color: var(--text-gray);
    }

    .about-text strong {
        color: var(--text-dark);
    }

    .about-stat {
        background: var(--card-bg);
        border-color: rgba(255,255,255,0.08);
    }

    .about-stat-number {
        color: var(--turquoise);
    }

    .about-stat-label {
        color: var(--text-gray);
    }

    .steps-list {
        color: var(--text-gray);
    }

    .steps-list strong {
        color: var(--text-dark);
    }

    .advantage-card {
        background: var(--card-bg);
        border-color: rgba(255,255,255,0.08);
    }

    .advantage-card:hover {
        border-color: rgba(26, 188, 156, 0.28);
    }

    .advantage-card h3 {
        color: var(--text-dark);
    }

    .advantage-card p {
        color: var(--text-gray);
    }

    .advantage-icon {
        background: var(--turquoise-soft);
        color: var(--turquoise);
    }

    .material-chip {
        background: var(--card-bg);
        border-color: rgba(255,255,255,0.1);
        color: var(--text-dark);
        box-shadow: none;
    }

    .promo-desc {
        color: var(--text-gray);
    }

    .contact-item {
        background: rgba(255,255,255,0.05);
        border-color: rgba(255,255,255,0.06);
    }

    .contact-icon {
        background: rgba(26, 188, 156, 0.15);
    }

    .contact-info h4 {
        color: var(--text-dark);
    }

    .contact-info p,
    .contact-info a {
        color: var(--text-gray);
    }

    .breadcrumbs a {
        color: var(--turquoise);
    }

    .breadcrumbs .current {
        color: var(--text-dark);
    }

    .site-footer {
        background: #020617;
        color: var(--text-gray);
    }

    .submenu {
        background: var(--card-bg);
        border-color: rgba(255,255,255,0.08);
    }

    .submenu a {
        color: var(--text-gray);
    }

    .submenu a:hover {
        background-color: rgba(26, 188, 156, 0.15);
        color: var(--turquoise);
    }

    /* Мобильное меню — тёмная тема */
    .mobile-toggle {
        color: var(--text-dark);
    }

    .nav-wrapper {
        background: #0f172a !important;
        box-shadow: 0 8px 24px rgba(0,0,0,0.45);
    }

    .nav-links a {
        color: var(--text-gray);
        border-bottom-color: rgba(255,255,255,0.08) !important;
    }

    .nav-links a:hover,
    .nav-links a.active {
        color: var(--turquoise);
        background-color: rgba(26, 188, 156, 0.12);
        border-bottom-color: rgba(255,255,255,0.08) !important;
    }

    .submenu {
        background: #0b1220 !important;
    }

    .submenu a {
        color: var(--text-gray);
        border-bottom-color: rgba(255,255,255,0.06) !important;
    }

    .submenu a:hover,
    .submenu a.active {
        color: var(--turquoise);
        background-color: rgba(26, 188, 156, 0.12);
    }

    .nav-search-form {
        background: #0f172a;
        border-color: rgba(255,255,255,0.1);
    }

    .nav-search-form input[type="search"] {
        background: #1e293b;
        color: var(--text-dark);
        border-color: rgba(255,255,255,0.12);
    }

    .nav-search-form input[type="search"]::placeholder {
        color: var(--text-gray-light);
    }

    .nav-search-toggle {
        color: var(--text-gray);
    }

    .pagination .page-numbers {
        background: rgba(255,255,255,0.05);
        color: var(--text-gray);
    }

    .back-to-top {
        box-shadow: 0 4px 20px rgba(0,0,0,0.5);
    }

    ::-webkit-scrollbar-track {
        background: #0f172a;
    }

    ::-webkit-scrollbar-thumb {
        background: #475569;
    }
}

/* === ПЕЧАТЬ === */
@media print {
    .top-bar,
    .site-header,
    .site-footer,
    .breadcrumbs,
    .mobile-toggle,
    .btn,
    .back-to-top {
        display: none !important;
    }

    .section {
        padding: 20px 0;
        max-width: 100%;
    }

    .card {
        box-shadow: none;
        border: 1px solid #ddd;
        break-inside: avoid;
    }

    body {
        color: #000;
        background: #fff;
        font-size: 12pt;
        line-height: 1.5;
    }

    a {
        color: #000;
        text-decoration: underline;
    }

    a::after {
        content: ' (' attr(href) ')';
        font-size: 0.8em;
        color: #666;
    }
}
/* === СОЦИАЛЬНЫЕ СЕТИ === */
.top-bar-social {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 2px;
}

.top-bar-social-link,
.contact-social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: var(--transition);
}

.top-bar-social-link {
    width: 30px;
    height: 30px;
    color: rgba(255,255,255,0.88);
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 50%;
}

.top-bar-social-link:hover {
    color: var(--turquoise);
    border-color: var(--turquoise);
    transform: translateY(-1px);
}

.top-bar-social-link svg,
.contact-social-link svg {
    display: block;
}

.contact-social-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 8px;
    width: 100%;
}

.contact-item-social {
    grid-column: 1 / -1;
    justify-content: center;
}

.contact-item-social .contact-info {
    flex: 1;
    text-align: center;
}

.contact-social-link {
    width: 42px;
    height: 42px;
    color: var(--text-dark);
    background: var(--white);
    border-radius: 50%;
    box-shadow: var(--shadow-sm);
}

.contact-social-link:hover {
    color: var(--turquoise);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

@media (max-width: 700px) {
    .top-bar-inner {
        justify-content: center;
        gap: 10px 16px;
    }

    .top-bar-social {
        width: 100%;
        justify-content: center;
        margin-left: 0;
    }
}


/* === ВСПЛЫВАЮЩИЕ ПОДСКАЗКИ СОЦСЕТЕЙ === */
.contact-social-link,
.top-bar-social a {
    position: relative;
}

.contact-social-link::after,
.top-bar-social a::after {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 9px);
    transform: translate(-50%, 4px);
    padding: 5px 9px;
    border-radius: 5px;
    background: var(--text-dark);
    color: var(--white);
    content: "";
    font-size: 12px;
    line-height: 1.2;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
    z-index: 100;
}

.contact-social-link::before,
.top-bar-social a::before {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 4px);
    transform: translate(-50%, 4px);
    border: 5px solid transparent;
    border-top-color: var(--text-dark);
    content: "";
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
    z-index: 100;
}

.contact-social-link:nth-child(1)::after,
.top-bar-social a:nth-child(1)::after {
    content: "Instagram";
}

.contact-social-link:nth-child(2)::after,
.top-bar-social a:nth-child(2)::after {
    content: "ВКонтакте";
}

.contact-social-link:nth-child(3)::after,
.top-bar-social a:nth-child(3)::after {
    content: "Telegram";
}

.contact-social-link:nth-child(4)::after,
.top-bar-social a:nth-child(4)::after {
    content: "MAX";
}

.contact-social-link:hover::after,
.contact-social-link:hover::before,
.top-bar-social a:hover::after,
.top-bar-social a:hover::before {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
}




/* === БЕЗ ПОДСКАЗОК В TOP-BAR === */
.top-bar-social a::before,
.top-bar-social a::after {
    display: none;
    content: none;
}


/* === СКРЫТЬ БЛОКИ «КАТАЛОГ» И «ПРЕСС-ФОРМЫ» НА ГЛАВНОЙ === */
#catalog-promo,
#molds-promo {
    display: none;
}


/* === СКРЫТЬ ПУНКТЫ «КАТАЛОГ» И «ПРЕСС-ФОРМЫ» В ОСНОВНОМ МЕНЮ === */
.nav-links li:has(> a[href*="/katalog/"]),
.nav-links li:has(> a[href*="/press-formy/"]) {
    display: none;
}


/* === ЗАЩИТА КОНТЕНТА === */
/* Запрет выделения текста на всём сайте */
html, body,
body * {
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
    user-select: none !important;
}

/* Исключения: телефон, email, адрес и связанные контакты */
.contact-info,
.contact-info *,
.contact-item .contact-info,
.contact-item .contact-info *,
a[href^="tel:"],
a[href^="tel:"] *,
a[href^="mailto:"],
a[href^="mailto:"] *,
.top-bar-item,
.top-bar-item *,
.top-bar a[href^="mailto:"],
.top-bar a[href^="mailto:"] *,
[itemprop="telephone"],
[itemprop="telephone"] *,
[itemprop="email"],
[itemprop="email"] *,
[itemprop="address"],
[itemprop="address"] *,
.selectable,
.selectable * {
    -webkit-user-select: text !important;
    -moz-user-select: text !important;
    -ms-user-select: text !important;
    user-select: text !important;
    -webkit-touch-callout: default !important;
    cursor: text;
}

/* Явно разрешаем выделение email (на случай вложенной разметки) */
a[href^="mailto:"],
a[href*="@"] {
    -webkit-user-select: text !important;
    -moz-user-select: text !important;
    -ms-user-select: text !important;
    user-select: text !important;
    -webkit-touch-callout: default !important;
}

/* Поля форм — можно выделять и вводить */
input,
textarea,
select,
[contenteditable="true"] {
    -webkit-user-select: text !important;
    -moz-user-select: text !important;
    -ms-user-select: text !important;
    user-select: text !important;
}

/* Защита изображений от перетаскивания и «захвата» */
img,
svg,
.hero-bg,
.post-image-wrapper,
.hero-visual {
    -webkit-user-drag: none !important;
    user-drag: none !important;
    -webkit-touch-callout: none !important;
    pointer-events: auto;
}

img {
    -webkit-user-select: none !important;
    user-select: none !important;
}


/* Карточка на всю ширину сетки (3 колонки), по центру */
.content-grid .card-span-full {
    grid-column: 1 / -1;
    max-width: 720px;
    width: 100%;
    justify-self: center;
    text-align: center;
}
.content-grid .card-span-full .card-content {
    align-items: center;
}
.content-grid .card-span-full .excerpt {
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
}

@media (max-width: 768px) {
    .tea-header-brand {
        margin-left: -4px;
        gap: 8px;
        max-width: calc(100% - 56px);
    }
    .tea-brand-name {
        font-size: 1.1rem;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

/* === ОБОРУДОВАНИЕ: сетка карточек === */
.equipment-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(260px, 340px));
    gap: 1.25rem;
    justify-content: center;
    justify-items: stretch;
    max-width: 760px;
    margin: 0 auto;
}

@media (max-width: 640px) {
    .equipment-grid {
        grid-template-columns: minmax(260px, 1fr);
        max-width: 400px;
    }
}

.equipment-card {
    display: flex;
    flex-direction: column;
    text-align: left;
    background: var(--card-bg);
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    padding: 0;
    font: inherit;
    color: inherit;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.equipment-card:hover,
.equipment-card:focus-visible {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    outline: none;
}

.equipment-card-image {
    aspect-ratio: 16 / 11;
    overflow: hidden;
    background: #e8eef3;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    box-sizing: border-box;
}

.equipment-card-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
}

.equipment-card-body {
    padding: 1rem 1.1rem 1.15rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    flex: 1;
}

.equipment-card-body h3 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--text-dark);
}

.equipment-card-body p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-gray);
    line-height: 1.5;
    flex: 1;
}

.equipment-card-more {
    color: var(--turquoise);
    font-weight: 600;
    font-size: 0.9rem;
    margin-top: 0.35rem;
}

/* === МОДАЛКА ОБОРУДОВАНИЯ === */
.eq-modal[hidden] {
    display: none !important;
}

.eq-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.eq-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(3px);
}

.eq-modal-dialog {
    position: relative;
    z-index: 1;
    background: var(--card-bg, #fff);
    border-radius: calc(var(--radius) + 4px);
    box-shadow: 0 20px 50px rgba(0,0,0,0.25);
    max-width: 920px;
    width: 100%;
    max-height: min(92vh, 900px);
    overflow: auto;
    padding: 1.25rem 1.35rem 1.5rem;
}

.eq-modal-close {
    position: absolute;
    top: 10px;
    right: 12px;
    border: none;
    background: transparent;
    font-size: 1.75rem;
    line-height: 1;
    cursor: pointer;
    color: var(--text-gray);
    z-index: 2;
    padding: 4px 8px;
}

.eq-modal-close:hover {
    color: var(--text-dark);
}

.eq-modal-top {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 1.25rem;
    align-items: start;
}

.eq-modal-image {
    border-radius: var(--radius);
    overflow: hidden;
    background: #e8eef3;
    aspect-ratio: 4 / 3;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem;
    box-sizing: border-box;
}

.eq-modal-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
}

.eq-modal-info h2 {
    margin: 0 0 0.65rem;
    font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.6rem);
    color: var(--text-dark);
    padding-right: 2rem;
}

.eq-modal-desc {
    margin: 0 0 1rem;
    color: var(--text-gray);
    line-height: 1.65;
    font-size: 0.95rem;
}

.eq-modal-specs {
    margin: 0;
    display: grid;
    gap: 0.45rem;
}

.eq-modal-specs div {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    padding: 0.4rem 0;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    font-size: 0.9rem;
}

.eq-modal-specs dt {
    margin: 0;
    color: var(--text-gray);
    font-weight: 500;
}

.eq-modal-specs dd {
    margin: 0;
    color: var(--text-dark);
    font-weight: 600;
    text-align: right;
}

.eq-modal-products {
    margin-top: 1.35rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(0,0,0,0.08);
}

.eq-modal-products h3 {
    margin: 0 0 0.75rem;
    font-size: 1rem;
    color: var(--text-dark);
}

.eq-modal-products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.65rem;
}

.eq-modal-products-grid figure {
    margin: 0;
    border-radius: 8px;
    overflow: hidden;
    background: #e8eef3;
    aspect-ratio: 1;
}

.eq-modal-products-grid img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
}

.eq-modal-products-grid figure {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.35rem;
    box-sizing: border-box;
}

body.eq-modal-open {
    overflow: hidden;
}

@media (max-width: 768px) {
    .eq-modal-top {
        grid-template-columns: 1fr;
    }
    .eq-modal-products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .eq-modal-specs div {
        grid-template-columns: 1fr;
    }
    .eq-modal-specs dd {
        text-align: left;
    }
}

@media (prefers-color-scheme: dark) {
    .equipment-card {
        border-color: rgba(255,255,255,0.08);
    }
    .equipment-card-image,
    .eq-modal-image,
    .eq-modal-products-grid figure {
        background: #1e293b;
    }
    .eq-modal-specs div {
        border-bottom-color: rgba(255,255,255,0.08);
    }
    .eq-modal-products {
        border-top-color: rgba(255,255,255,0.1);
    }
}

/* Компактное меню на странице Производство пресс-форм */
body.page-template-page-proizvodstvo-press-form .nav-links {
    gap: 0.15rem;
    flex-wrap: nowrap;
}
body.page-template-page-proizvodstvo-press-form .nav-links > li > a {
    padding: 8px 8px;
    font-size: 0.82rem;
    white-space: nowrap;
}
body.page-template-page-proizvodstvo-press-form .nav-menu {
    max-width: 1280px;
    padding: 0 12px;
}
body.page-template-page-proizvodstvo-press-form .tea-brand-name {
    font-size: 0.95rem;
}
body.page-template-page-proizvodstvo-press-form .tea-header-brand {
    gap: 8px;
    margin-right: 8px;
}
@media (max-width: 1100px) {
    body.page-template-page-proizvodstvo-press-form .nav-links > li > a {
        padding: 8px 6px;
        font-size: 0.78rem;
    }
}
