/*
Theme Name: Zyntech Custom Template
Author: SEO Specialist
Description: Кастомная тема с гибкими шаблонами страниц.
Version: 1.1.3
*/

/* ==========================================================================
   CSS CUSTOM PROPERTIES — меняем бренд в одном месте
   ========================================================================== */
:root {
    --color-accent:  #ff0055;
    --color-black:   #000;
    --color-white:   #fff;
    --color-muted:   #666666;
    --color-border:  #1a1a1a;

    --font-heading:  'Russo One', sans-serif;
    --font-body:     'Inter', sans-serif;

    --container-xl:  1600px;
    --container-lg:  1200px;
    --container-hd:  1400px;
}

/* ==========================================================================
   RESET / БАЗОВЫЕ СТИЛИ
   ========================================================================== */
body {
    margin: 0;
    padding: 0;
    background: var(--color-white);
    font-family: var(--font-body);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}


/* Глобальный сброс ссылок */
a {
    color: inherit;
    text-decoration: none;
}

a:visited {
    color: inherit;
}

/* Исключение — крошки управляют цветом сами */
.zb-breadcrumbs a,
.zb-breadcrumbs a:visited {
    color: var(--zb-color-link);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-body);
    font-weight: 700;
    color: var(--color-black);
    line-height: 1.3;
    margin: 0;
}

/* ==========================================================================
   КОНТЕЙНЕР
   ========================================================================== */
.container {
    max-width: var(--container-xl);
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
    box-sizing: border-box;
}

.news-section,
.top-post-slider,
.main-content {
    width: 100%;
    overflow: hidden;
}

@media (max-width: 1440px) {
    .container { max-width: var(--container-lg); }
}

@media (max-width: 991px) {
    .container { padding: 0 15px; }
}

/* ==========================================================================
   ШАПКА
   ========================================================================== */
.site-header {
    background: var(--color-black);
    color: var(--color-white);
    padding: 12px 0;
}

.header-container {
    max-width: var(--container-hd);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    position: relative;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 20px;
}

.logo img {
    height: 70px;
    width: auto;
    display: block;
}

.tagline {
    font-family: var(--font-heading);
    font-size: 17px;
    line-height: 1.1;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    text-align: center;
    color: var(--color-white);
}

/* --- Навигация --- */
.header-nav {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-buttons {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 10px;
}

.nav-buttons li { margin: 0; padding: 0; }

.nav-buttons li a {
    color: var(--color-white);
    text-decoration: none;
    padding: 10px 18px;
    font-size: 20px;
    font-weight: 400;
    font-family: var(--font-heading);
    text-transform: uppercase;
    display: block;
    border: 2px solid transparent;
    transition: border-color 0.3s ease;
}

.nav-buttons li a:hover {
    border-color: var(--color-white);
}

/* --- Поиск --- */
.search-btn {
    background: #000 !important;
    background-color: #000 !important;
    border: 2px solid transparent !important;
    outline: none;
    color: var(--color-white);
    cursor: pointer;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.3s ease;
    margin-left: 10px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    box-shadow: none;
    border-radius: 0;
}

.search-btn:hover {
    border-color: var(--color-white) !important;
}

.search-btn:hover {
    border-color: var(--color-white);
}

/* --- Соцсети в шапке --- */
.header-socials {
    display: flex;
    gap: 15px;
    align-items: center;
}

.soc-link {
    width: 45px;
    height: 45px;
    display: block;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    transition: opacity 0.3s ease;
}

.soc-link:hover { opacity: 0.7; }

/* Иконки — единый блок для шапки и футера */
.vk   { background-image: url('/wp-content/uploads/2026/01/iconvk-colorno-roundno.svg'); }
.tg   { background-image: url('/wp-content/uploads/2026/01/icontelegramm-colorno-roundno.svg'); }
.yt   { background-image: url('/wp-content/uploads/2026/01/iconyoutube-colorno-roundno.svg'); }
.dzen { background-image: url('/wp-content/uploads/2026/01/iconyandex_zen-colorno-roundno.svg'); }

/* ==========================================================================
   ФУТЕР
   ========================================================================== */
.site-footer {
    background: var(--color-black);
    padding: 25px 0;
    border-top: 1px solid var(--color-border);
    width: 100%;
}

.footer-container {
    max-width: var(--container-hd);
    margin: 0 auto;
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 60px;
    align-items: center;
    padding: 0 15px;
}

.f-brand-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex: 0 0 auto;
}

.f-logo {
    height: 100px;
    width: auto;
    margin-bottom: 15px;
}

.f-tagline {
    font-family: var(--font-heading);
    font-size: 14px;
    line-height: 1.2;
    color: var(--color-white);
    text-transform: uppercase;
}

.f-copyright {
    font-family: var(--font-heading);
    font-size: 10px;
    color: #555;
    margin-top: 10px;
}

.f-nav-col {
    flex: 0 0 auto;
    display: flex;
}

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

.f-menu-list li {
    list-style: none;
    margin-bottom: 8px;
}

.f-menu-list li a {
    font-family: var(--font-heading);
    color: var(--color-white);
    text-decoration: none;
    text-transform: uppercase;
    font-size: 14px;
    font-weight: 400;
    padding: 4px 16px;
    border: 2px solid transparent;
    display: inline-block;
    transition: border-color 0.3s ease;
}

.f-menu-list li a:hover {
    border-color: var(--color-white);
}

.f-soc-block {
    display: flex;
    gap: 10px;
    flex: 0 0 auto;
}

.f-soc-link {
    width: 40px;
    height: 40px;
    display: block;
    background-size: 40px;
    background-repeat: no-repeat;
    background-position: center;
    border: 2px solid transparent;
    transition: border-color 0.3s ease;
}

.f-soc-link:hover {
    border-color: var(--color-white);
}

/* ==========================================================================
   NEWS GRID — 6 постов (1 + 2 + 3)
   ========================================================================== */
.news-section {
    padding: 0;
    background: var(--color-white);
}

.section-title {
    margin-bottom: 25px;
    font-family: var(--font-heading) !important;
    text-transform: uppercase;
    font-size: 26px;
    letter-spacing: 0.5px;
}

.section-title a {
    color: var(--color-black);
    text-decoration: none;
    font-family: var(--font-heading) !important;
    font-weight: 400 !important;
    font-size: 35px !important;
    border-left: 5px solid var(--color-accent);
    padding-left: 15px;
}

.zyn-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: 250px 250px 280px;
    gap: 20px;
}

/* Обычная раскладка */
.news-section:not(.grid-reversed) .zyn-card:nth-child(1) { grid-column: 1 / 3; grid-row: 1 / 3; }
.news-section:not(.grid-reversed) .zyn-card:nth-child(2) { grid-column: 3 / 4; grid-row: 1 / 2; }
.news-section:not(.grid-reversed) .zyn-card:nth-child(3) { grid-column: 3 / 4; grid-row: 2 / 3; }
.news-section:not(.grid-reversed) .zyn-card:nth-child(n+4) { grid-row: 3 / 4; }

/* Зеркальная раскладка */
.grid-reversed .zyn-card:nth-child(1) { grid-column: 2 / 4; grid-row: 1 / 3; }
.grid-reversed .zyn-card:nth-child(2) { grid-column: 1 / 2; grid-row: 1 / 2; }
.grid-reversed .zyn-card:nth-child(3) { grid-column: 1 / 2; grid-row: 2 / 3; }
.grid-reversed .zyn-card:nth-child(n+4) { grid-row: 3 / 4; }

/* --- Карточки --- */
.zyn-card {
    position: relative;
    background-size: cover;
    background-position: center;
    border-radius: 4px;
    overflow: hidden;
    display: flex;
    transition: transform 0.3s ease;
}

.zyn-card:hover { transform: translateY(-8px); }
.zyn-card:hover .deco-line { width: 90px; }

.card-overlay {
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to top,
        rgba(0,0,0,0.98) 0%,
        rgba(0,0,0,0.85) 20%,
        rgba(0,0,0,0.4)  50%,
        transparent      75%
    );
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 20px;
    box-sizing: border-box;
    overflow: hidden;
}

.card-content {
    display: flex;
    flex-direction: column;
    width: 100%;
    pointer-events: none;
}

.card-title {
    font-family: var(--font-body);
    font-weight: 700;
    color: var(--color-white);
    text-shadow: 1px 1px 3px rgba(0,0,0,0.9);
    margin: 5px 0;
}

.main-card .card-title { font-size: 30px; }
.sub-card .card-title  { font-size: 20px; }

.category-badge {
    background: var(--color-accent);
    color: var(--color-white);
    font-family: var(--font-heading);
    font-size: 12px;
    font-weight: 400;
    padding: 4px 10px;
    text-transform: uppercase;
    display: inline-block;
    align-self: flex-start;
    margin-bottom: 6px;
    border-radius: 2px;
}

.deco-line {
    width: 35px;
    height: 2px;
    background: var(--color-accent);
    margin-bottom: 0;
    transition: width 0.4s ease;
}

.card-meta {
    display: block;
    margin-top: 6px;
}

.post-date {
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 700;
    color: var(--color-white);
    text-shadow: 1px 1px 3px rgba(0,0,0,0.9);
    display: block;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card-excerpt {
    font-family: var(--font-body);
    font-size: 15px;
    color: var(--color-white);
    text-shadow: 1px 1px 3px rgba(0,0,0,0.9);
    margin: 10px 0;
    line-height: 1.4;
}

.grid-footer {
    display: flex;
    justify-content: flex-start;
}

.read-more-btn {
    display: inline-block;
    padding: 10px 5px;
    background: transparent !important;
    color: #666666 !important;
    text-decoration: none;
    font-family: var(--font-heading) !important;
    font-size: 17px !important;
    margin-top: 6px !important;
    margin-bottom: 6px !important;
    font-weight: 400 !important;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.read-more-btn:hover {
    background: transparent !important;
    color: #888 !important;
    border-bottom-color: #888 !important;
}

/* ==========================================================================
   AJAX ПОИСК
   ========================================================================== */
.search-wrapper {
    position: relative;
}

.search-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    width: 360px;
    background: var(--color-black);
    border: 1px solid #222;
    box-shadow: 0 10px 30px rgba(0,0,0,0.7);
    z-index: 9999;
}

.search-dropdown.is-active {
    display: block;
}

.search-dropdown-inner {
    padding: 10px 0;
}

.search-input-wrap {
    padding: 10px 15px;
    border-bottom: 1px solid #222;
}

.search-input {
    width: 100%;
    background: #111;
    border: 1px solid #333;
    color: var(--color-white);
    font-family: var(--font-body);
    font-size: 15px;
    padding: 10px 14px;
    box-sizing: border-box;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    border-radius: 0;
}

.search-input::placeholder {
    color: #555;
}

.search-input:focus {
    border-color: var(--color-accent);
}

.search-results-list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 360px;
    overflow-y: auto;
}

.search-result-item a {
    display: flex;
    flex-direction: column;
    padding: 10px 15px;
    text-decoration: none;
    border-bottom: 1px solid #1a1a1a;
    transition: background 0.2s ease;
}

.search-result-item a:hover {
    background: #111;
}

.search-result-title {
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 700;
    color: var(--color-white);
    line-height: 1.3;
    margin-bottom: 4px;
}

.search-result-cat {
    font-family: var(--font-heading);
    font-size: 11px;
    color: var(--color-accent);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.search-status {
    padding: 12px 15px;
    font-family: var(--font-body);
    font-size: 13px;
    color: #555;
    text-align: center;
}

/* ==========================================================================
   МОБИЛЬНАЯ АДАПТАЦИЯ (≤ 991px)
   ========================================================================== */
@media (max-width: 991px) {

    /* Шапка */
    .header-container {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 1px 15px;
        position: relative;
    }

    .header-brand {
        gap: 10px;
    }

    .logo img {
        height: 60px;
    }

    .tagline {
        font-size: 14px;
        line-height: 1.2;
        text-align: center;
    }

    .header-controls {
        display: flex;
        align-items: center;
        gap: 12px;
    }

    .menu-toggle {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 4px;
        width: 42px;
        height: 42px;
        background: var(--color-black);
        border: none;
        padding: 0;
        border-radius: 2px;
        cursor: pointer;
    }

    .menu-toggle .bar {
        width: 22px;
        height: 2px;
        background: var(--color-white);
        display: block;
        transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
    }

    .menu-toggle.open .bar:nth-child(1) { transform: translateY(6px) rotate(45deg); }
    .menu-toggle.open .bar:nth-child(2) { opacity: 0; }
    .menu-toggle.open .bar:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

    /* Выпадающее меню */
    .header-nav {
        position: absolute;
        top: 100%;
        right: 0;
        width: 220px;
        background: var(--color-black);
        display: none;
        flex-direction: column;
        z-index: 9999;
        border-top: 2px solid var(--color-border);
        box-shadow: -10px 10px 20px rgba(0,0,0,0.8);
    }

    .header-nav.is-active { display: flex; }

    .nav-buttons {
        flex-direction: column;
        padding: 0;
        margin: 0;
        gap: 0;
    }

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

    .nav-buttons li a {
        display: block;
        width: 100%;
        padding: 18px 25px;
        font-size: 18px;
        text-align: left;
        border: none;
        border-bottom: 1px solid #111;
        box-sizing: border-box;
    }

    /* Сетка — одна колонка */
    .zyn-grid {
        display: flex;
        flex-direction: column;
        gap: 20px;
    }

    .zyn-card {
        height: 320px;
        width: 100%;
    }

    /* Заголовки секций */
    .section-title { margin-bottom: 20px; }

    .section-title a {
        border-left-width: 3px;
        font-size: 25px;
        padding-left: 10px;
    }

    .card-excerpt { display: none; }

    .card-overlay { padding: 15px; }

    .main-card .card-title,
    .sub-card .card-title { font-size: 20px; }

    /* Футер */
    .footer-container {
        flex-direction: column;
        gap: 10px;
        text-align: center;
        padding: 5px;
    }

    .f-logo { height: 75px; }

    .f-brand-column { align-items: center; }

    .f-nav-col {
        width: 100%;
        justify-content: center;
    }

    .f-menu-list {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .f-menu-list li a { padding: 1px 16px; }

    .f-soc-block {
        justify-content: center;
        width: 100%;
        margin-top: 10px;
    }

    .header-socials.pc-only { display: none; }
}

/* ==========================================================================
   ДЕСКТОП (≥ 992px)
   ========================================================================== */
@media (min-width: 992px) {
    .menu-toggle { display: none; }
}

/* Сброс для хлебных крошек */
nav.zb-breadcrumbs ol,
nav.zb-breadcrumbs ol li {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    margin-block-start: 0 !important;
    margin-block-end: 0 !important;
    padding-inline-start: 0 !important;
    counter-reset: none !important;
    counter-increment: none !important;
}

nav.zb-breadcrumbs ol li::before {
    content: none !important;
    display: none !important;
}

/* ==========================================================================
   СТРАНИЦА РУБРИКИ
   ========================================================================== */

/* Отступ крошек от шапки */
.cat-breadcrumbs {
    padding-top: 20px;
}

/* Заголовок рубрики */
.cat-header {
    padding: 30px 0 20px;
}

.cat-title {
    font-family: var(--font-heading);
    font-size: 36px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-black);
    border-left: 5px solid var(--color-accent);
    padding-left: 15px;
    margin: 0;
}

/* Строка перелинковки */
.cat-links-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.cat-links-label {
    font-family: var(--font-heading);
    font-size: 18px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-black);
    white-space: nowrap;
}

.cat-subcats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.cat-links-row .cat-tags {
    padding: 0;
    margin: 0;
}

/* Плитка тегов */
.cat-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0 0 30px;
}

.cat-tag {
    font-family: var(--font-heading);
    font-size: 18px;
    letter-spacing: 0.5px;
    color: var(--color-muted);
    border: 1px solid #ddd;
    padding: 5px 12px;
    transition: border-color 0.2s ease, color 0.2s ease;
    white-space: nowrap;
}

.cat-tag:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
}

/* Сетка — отступ секции */
.cat-grid-section {
    padding: 0 0 40px;
}

/* Группа из 6 постов — отдельный grid */
.cat-grid-group {
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: 250px 250px 280px;
    margin-bottom: 20px;
}

/* Позиции внутри группы — обычная */
.cat-card-pos-1 { grid-column: 1 / 3; grid-row: 1 / 3; height: auto; }
.cat-card-pos-2 { grid-column: 3 / 4; grid-row: 1 / 2; height: auto; }
.cat-card-pos-3 { grid-column: 3 / 4; grid-row: 2 / 3; height: auto; }
.cat-card-pos-4 { grid-column: 1 / 2; grid-row: 3 / 4; height: auto; }
.cat-card-pos-5 { grid-column: 2 / 3; grid-row: 3 / 4; height: auto; }
.cat-card-pos-6 { grid-column: 3 / 4; grid-row: 3 / 4; height: auto; }

/* Зеркальная группа — большая карточка справа */
.cat-grid-section .cat-grid-group--reversed .cat-card-pos-1 { grid-column: 2 / 4 !important; grid-row: 1 / 3 !important; }
.cat-grid-section .cat-grid-group--reversed .cat-card-pos-2 { grid-column: 1 / 2 !important; grid-row: 1 / 2 !important; }
.cat-grid-section .cat-grid-group--reversed .cat-card-pos-3 { grid-column: 1 / 2 !important; grid-row: 2 / 3 !important; }

/* Пагинация */
.cat-pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    padding: 10px 0 40px;
}

.cat-pagination .page-numbers {
    font-family: var(--font-heading);
    font-size: 13px;
    padding: 8px 14px;
    border: 2px solid #ddd;
    color: var(--color-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: border-color 0.2s ease, color 0.2s ease;
}

.cat-pagination .page-numbers:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
}

.cat-pagination .page-numbers.current {
    border-color: var(--color-accent);
    color: var(--color-accent);
}

/* SEO-текст */
.cat-seo-text {
    border-top: 1px solid #eee;
    padding: 25px 0 50px;
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.8;
    color: #444;
}

.cat-seo-text p:first-child {
    border-left: 5px solid var(--color-accent);
    padding-left: 15px;
    margin: 0 0 14px;
}

.cat-seo-text p {
    margin: 0 0 14px;
}

.cat-seo-text h2 {
    font-size: 20px;
    margin: 24px 0 10px;
}

.cat-seo-text h3 {
    font-size: 17px;
    margin: 20px 0 8px;
}

.cat-seo-text p {
    margin: 0 0 14px;
}

/* Адаптив */
@media (max-width: 991px) {
    .cat-title { font-size: 26px; }

    .zyn-grid--category {
        display: flex;
        flex-direction: column;
        gap: 20px;
    }

    .zyn-grid--category .zyn-card {
        height: 280px;
        width: 100%;
    }

    .cat-seo-text { font-size: 14px; }
}