/*
Theme Name: Marhamatle 2026
Theme URI: https://marhamatle.ru
Description: Тема для сайта Marhamatle
Version: 1.0.0
Author: Yardem Team
Author URI: https://yardem.ru
Text Domain: marhamatle2026
*/

/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --primary:   #1a6b3c;
    --secondary: #f5f0e8;
    --accent:    #c8a96e;
    --text:      #1a1a1a;
    --muted:     #666;
    --white:     #fff;
    --radius:    8px;
    --shadow:    0 2px 12px rgba(0,0,0,.08);
    --container: 1200px;
}

body { font-family: 'Inter', 'Segoe UI', Arial, sans-serif; font-size: 16px; line-height: 1.6; color: var(--text); background: var(--white); }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 20px; }

/* ===== HEADER ===== */
.site-logo { color: var(--white); font-size: 22px; font-weight: 700; }
.site-logo:hover { text-decoration: none; color: var(--accent); }
.main-nav > ul.menu { list-style: none; display: flex; gap: 24px; align-items: center; margin: 0; padding: 0; }

/* ===== LAYOUT ===== */
.site-main { min-height: 60vh; padding: 40px 0; }
body.home .site-main { padding: 0; }
.content-sidebar { display: flex; gap: 30px; align-items: flex-start; }
.content-area { flex: 1; min-width: 0; }
.sidebar { width: 300px; flex-shrink: 0; }

/* ===== HERO (главная) ===== */
.btn { display: inline-block; padding: 12px 28px; background: var(--accent); color: var(--white); border-radius: var(--radius); font-weight: 600; }
.btn:hover { opacity: .9; text-decoration: none; }

/* ===== NEWS GRID ===== */
.section { padding: 50px 0; margin-bottom: 50px; }
.section-title { font-size: 26px; margin-bottom: 24px; color: var(--primary); }
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.news-card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; }
.news-card img { width: 100%; height: 200px; object-fit: cover; }
.news-card-body { padding: 16px; flex: 1; display: flex; flex-direction: column; }
.news-card-title { font-size: 16px; font-weight: 600; margin-bottom: 8px; }
.news-card-title a { color: var(--text); }
.news-card-title a:hover { color: var(--primary); text-decoration: none; }
.news-card-excerpt { font-size: 14px; color: var(--muted); flex: 1; }
.news-card-meta { font-size: 12px; color: var(--muted); margin-top: 10px; }

/* ===== SINGLE POST ===== */
.post-header { margin-bottom: 24px; }
.post-title { font-size: 32px; margin-bottom: 8px; }
.post-meta { font-size: 13px; color: var(--muted); margin-bottom: 20px; }
.post-thumbnail { margin-bottom: 24px; border-radius: var(--radius); overflow: hidden; }
.post-content { font-size: 16px; line-height: 1.8; }
.post-content p { margin-bottom: 16px; }
.post-content img { border-radius: var(--radius); margin: 16px 0; }

/* ===== ARCHIVE ===== */
.archive-header { margin-bottom: 24px; }
.archive-title { font-size: 28px; color: var(--primary); }
.archive-description { color: var(--muted); margin-top: 8px; }
.subcats { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; }
.subcat-tag { padding: 4px 12px; background: var(--secondary); border-radius: 20px; font-size: 13px; color: var(--primary); }
.subcat-tag:hover { background: var(--primary); color: var(--white); text-decoration: none; }
.post-list-item { display: flex; gap: 16px; padding: 20px 0; border-bottom: 1px solid #eee; align-items: flex-start; }
.post-list-thumb { width: 160px; flex-shrink: 0; }
.post-list-thumb img { width: 160px; height: 110px; object-fit: cover; border-radius: var(--radius); }
.post-list-body { flex: 1; }
.post-list-title { font-size: 18px; font-weight: 600; margin-bottom: 6px; }
.post-list-title a { color: var(--text); }
.post-list-title a:hover { color: var(--primary); text-decoration: none; }
.post-list-excerpt { font-size: 14px; color: var(--muted); }
.post-list-meta { font-size: 12px; color: var(--muted); margin-top: 8px; }

/* ===== PAGINATION ===== */
.pagination { display: flex; gap: 6px; flex-wrap: wrap; margin: 30px 0; }
.pagination .page-numbers { padding: 7px 13px; border: 1px solid #ddd; border-radius: var(--radius); font-size: 14px; color: var(--text); }
.pagination .page-numbers.current { background: var(--primary); color: var(--white); border-color: transparent; }
.pagination .page-numbers:hover:not(.current) { background: var(--secondary); text-decoration: none; }

/* ===== SEARCH ===== */
.search-form { display: flex; gap: 8px; margin-bottom: 30px; }
.search-form input[type="search"] { flex: 1; padding: 10px 14px; border: 1px solid #ddd; border-radius: var(--radius); font-size: 15px; }
.search-form button { padding: 10px 20px; background: var(--primary); color: var(--white); border: none; border-radius: var(--radius); cursor: pointer; font-size: 15px; }

/* ===== 404 ===== */
.not-found { text-align: center; padding: 80px 20px; }
.not-found-title { font-size: 28px; color: var(--primary); margin-bottom: 12px; }
.not-found-code { font-size: 80px; color: var(--accent); line-height: 1; margin-bottom: 8px; }
.not-found p { color: var(--muted); margin-bottom: 24px; }

/* ===== SIDEBAR ===== */
.breadcrumbs { font-size: 13px; color: var(--muted); margin-bottom: 16px; }
.breadcrumbs a { color: var(--primary); }
.breadcrumbs .sep { margin: 0 6px; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .news-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .content-sidebar { flex-direction: column; }
    .sidebar { width: 100%; }
    .news-grid { grid-template-columns: 1fr; }
    .post-list-thumb { width: 100px; }
    .post-list-thumb img { width: 100px; height: 70px; }
    .main-nav { display: none; }
}

/* ===== HEADER ICONS ===== */
.site-header .container { display: flex; align-items: center; gap: 20px; justify-content: space-between; height: 64px; }
.main-nav { margin-left: auto; margin-right: 16px; display: flex; gap: 24px; align-items: center; flex-wrap: nowrap; }
.main-nav > ul.menu > li > a.nav-link { color: #fff; font-size: 15px; white-space: nowrap; text-decoration: none; padding-bottom: 2px; border-bottom: 2px solid transparent; transition: border-color .2s; }
.main-nav > ul.menu > li > a.nav-link:hover { border-bottom-color: #fff; text-decoration: none; color: #fff; }
.header-icons { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.header-icon { color: var(--white); display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; transition: background .2s; }
.header-icon:hover { background: rgba(255,255,255,.15); text-decoration: none; color: var(--white); }

/* Footer links — убрано дублирование, стили определены выше */

/* Логотип в шапке */
.site-logo { display: flex; align-items: center; flex-shrink: 0; }
.site-logo-img { height: 44px; width: auto; }

/* Логотип в подвале */
.footer-logo-img { height: 60px; width: auto; opacity: 1; filter: brightness(0) saturate(100%) invert(74%) sepia(40%) saturate(400%) hue-rotate(5deg) brightness(95%); }
.footer-logo-img:hover { opacity: 1; }

/* ===== ПАРАЛЛАКС БАННЕР ===== */
.hero-parallax {
    position: relative;
    height: 100vh;
    min-height: 500px;
    background-attachment: fixed;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
}
.hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.2);
}
.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: #fff;
}
.hero-title { font-size: 52px; font-weight: 700; margin-bottom: 16px; text-shadow: 0 2px 8px rgba(0,0,0,.4); }
.hero-desc  { font-size: 20px; opacity: .9; margin-bottom: 28px; max-width: 600px; margin-left: auto; margin-right: auto; }
.hero-btn   { font-size: 16px; padding: 14px 36px; }

/* ===== ШАПКА: прозрачная (главная) ===== */
.site-header {
    position: fixed;
    left: 0; right: 0;
    z-index: 200;
    transition: background .3s, backdrop-filter .3s, box-shadow .3s;
}
.site-header .container.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}
.site-header--transparent {
    background: rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.site-header--transparent .site-logo-img { filter: brightness(0) invert(1); }
.site-header--transparent .main-nav > ul.menu > li > a,
.site-header--transparent .header-icon { color: #fff; }

/* Шапка после скролла (и на внутренних страницах) */
.site-header--solid,
.site-header--scrolled {
    background: var(--primary);
    box-shadow: 0 2px 12px rgba(0,0,0,.15);
    backdrop-filter: none;
}
.site-header--solid .site-logo-img,
.site-header--scrolled .site-logo-img { filter: none; }

/* Отступ под фиксированной шапкой на внутренних страницах */
body:not(.home) .site-main { padding-top: 30px; }

/* Логотип в шапке — белый */
.site-logo-img--white {
    filter: brightness(0) invert(1) !important;
    height: 52px;
}

/* Логотип по центру баннера */
.hero-logo {
    display: block;
    margin: 0 auto 20px;
    width: 600px;
    max-width: 90%;
    height: auto;
    filter: brightness(0) invert(1);
}

/* Стрелка вниз */
.hero-arrow {
    position: absolute;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    opacity: .8;
    animation: hero-bounce 1.6s infinite;
    z-index: 2;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}
.hero-arrow:hover { opacity: 1; text-decoration: none; }
@keyframes hero-bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50%       { transform: translateX(-50%) translateY(8px); }
}

/* Плавный скролл */
html { scroll-behavior: smooth; }

/* Hero bottom: видео + текст */
.hero-bottom {
    display: flex;
    gap: 32px;
    align-items: center;
    margin-top: 32px;
    text-align: left;
    background: rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 12px;
    padding: 20px;
}
.hero-video-wrap {
    flex-shrink: 0;
    width: 45%;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0,0,0,.4);
}
.hero-video {
    width: 100%;
    height: auto;
    display: block;
}
.hero-text {
    flex: 1;
    color: #fff;
    font-size: 16px;
    line-height: 1.7;
    text-shadow: 0 1px 4px rgba(0,0,0,.5);
}
@media (max-width: 768px) {
    .hero-bottom { flex-direction: column; }
    .hero-video-wrap { width: 100%; }
}

/* ===== КАРУСЕЛЬ ПАРТНЁРОВ ===== */
.partners-carousel-wrap {
    background: transparent;
    padding: 30px 0;
    overflow: hidden;
}
.partners-carousel {
    display: flex;
    align-items: center;
    transition: transform 0.6s ease;
    will-change: transform;
}
.partner-item {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 12px;
}
.partner-item-inner {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,.08);
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    transition: box-shadow .3s;
}
.partner-item:hover .partner-item-inner {
    box-shadow: 0 6px 20px rgba(0,0,0,.14);
}
.partner-logo {
    height: 90px;
    width: auto;
    max-width: 160px;
    object-fit: contain;
    filter: grayscale(100%) opacity(.6);
    transition: filter 0.8s ease;
    will-change: filter;
}
.partner-item a { width: 100%; text-decoration: none; }

/* ===== COOKIE NOTICE ===== */
.cookie-notice {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: rgba(20, 20, 20, 0.96);
    backdrop-filter: blur(6px);
    padding: 16px 20px;
    box-shadow: 0 -4px 20px rgba(0,0,0,.2);
    animation: cookie-slide-up 0.4s ease;
}
@keyframes cookie-slide-up {
    from { transform: translateY(100%); opacity: 0; }
    to   { transform: translateY(0);   opacity: 1; }
}
.cookie-notice-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}
.cookie-notice-text {
    flex: 1;
    color: #ddd;
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
}
.cookie-notice-link { color: var(--accent, #c8a96e); text-decoration: underline; }
.cookie-notice-buttons { display: flex; gap: 10px; flex-shrink: 0; }
.cookie-btn {
    padding: 9px 22px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity .2s;
}
.cookie-btn:hover { opacity: .85; }
.cookie-btn--accept  { background: var(--primary, #1a6b3c); color: #fff; }
.cookie-btn--decline { background: transparent; color: #aaa; border: 1px solid #555; }

@media (max-width: 600px) {
    .cookie-notice-inner { flex-direction: column; align-items: flex-start; }
    .cookie-notice-buttons { width: 100%; }
    .cookie-btn { flex: 1; text-align: center; }
}

/* Кнопка "Помочь проекту" на баннере */
.hero-donate { margin-top: 80px; text-align: center; }
.hero-donate-btn {
    display: inline-block;
    padding: 14px 40px;
    background: var(--accent, #c8a96e);
    color: #fff;
    font-size: 17px;
    font-weight: 700;
    border-radius: 8px;
    text-decoration: none;
    letter-spacing: 0.3px;
    transition: background .2s, transform .2s;
    box-shadow: 0 4px 16px rgba(0,0,0,.25);
}
.hero-donate-btn:hover {
    background: #b8945a;
    transform: translateY(-2px);
    text-decoration: none;
    color: #fff;
}

/* ===== FOOTER TOP ===== */
.footer-top {
    display: flex;
    align-items: center;
    gap: 30px;
    flex-wrap: wrap;
    padding-bottom: 24px;
    margin-bottom: 24px;
    border-bottom: 1px solid rgba(255,255,255,.1);
}
.footer-contacts {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}
.footer-contact-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #ccc;
}
.footer-contact-item a { color: #ccc; text-decoration: none; }
.footer-contact-item a:hover { color: var(--accent, #c8a96e); }
.footer-contact-icon { font-size: 14px; flex-shrink: 0; color: #fff; width: 16px; text-align: center; }

.footer-socials {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}
.footer-social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255,255,255,.1);
    transition: background .2s;
    text-decoration: none;
}
.footer-social-link:hover { background: var(--accent, #c8a96e); }
.footer-social-icon { width: 23px; height: 23px; object-fit: contain; }

@media (max-width: 768px) {
    .footer-top { flex-direction: column; align-items: flex-start; }
}

/* ===== FOOTER 5 КОЛОНОК ===== */
.site-footer { background: #111820; color: #bbb; padding: 50px 0 0; margin-top: 0; }

.footer-5col {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr 1.2fr;
    gap: 32px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255,255,255,.08);
}

/* Блок 1: бренд */
.footer-brand-logo { display: block; }
.footer-about { font-size: 13px; line-height: 1.7; color: #888; }

/* Заголовки блоков */
.footer-block-title {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--accent, #c8a96e);
    margin: 0 0 14px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(200,169,110,.3);
}

/* Навигация */
.footer-nav { display: flex; flex-direction: column; gap: 8px; }
.footer-nav a { color: #999; font-size: 14px; text-decoration: none; transition: color .2s; }
.footer-nav a:hover { color: var(--accent, #c8a96e); }

.footer-nav--main { gap: 12px; list-style: none; margin: 0; padding: 0; }
.footer-nav--main > li { margin: 0; padding: 0; }
.footer-nav--legal { list-style: none; margin: 0; padding: 0; }
.footer-nav--legal > li { margin: 0; padding: 0; }
.footer-block-title--contacts { margin-top: 24px; }
.footer-nav-group { display: flex; flex-direction: column; gap: 6px; }
.footer-nav-parent {
    color: #ccc;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}
.footer-nav-parent:hover { color: var(--accent, #c8a96e); }
.footer-nav-children {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-left: 12px;
    border-left: 1px solid rgba(255, 255, 255, 0.08);
}
.footer-nav-children a {
    font-size: 13px;
    color: #888;
}

/* Контакты */
.footer-block--contacts .footer-contact-item { margin-bottom: 10px; }
.footer-contact-item a { color: #999; text-decoration: none; }
.footer-contact-item a:hover { color: var(--accent, #c8a96e); }
.footer-contact-icon { flex-shrink: 0; margin-top: 1px; font-size: 14px; color: #fff; width: 16px; text-align: center; }

/* Соцсети */
.footer-socials { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.footer-social-link {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,.08);
    display: flex; align-items: center; justify-content: center;
    transition: background .2s;
    text-decoration: none;
}
.footer-social-link:hover { background: var(--accent, #c8a96e); }
.footer-social-icon { width: 23px; height: 23px; object-fit: contain; }

/* Нижняя строка */
.footer-bottom {
    padding: 16px 0;
    text-align: center;
    font-size: 13px;
    color: #555;
}

/* Адаптив */
@media (max-width: 1024px) {
    .footer-5col { grid-template-columns: repeat(2, 1fr); }
    .footer-block--brand { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
    .footer-5col { grid-template-columns: 1fr 1fr; gap: 20px; }
    .footer-block--brand { grid-column: 1 / -1; }
    .footer-block--contacts { grid-column: 1 / -1; }
}

/* ===== ИЗОЛЯЦИЯ LEYKA от стилей темы ===== */

/* Сбрасываем стили темы внутри форм и блоков Leyka */
.leyka-pf,
.leyka-form,
.leyka-campaign-form,
.leyka-campaigns-list,
.leyka-campaign-card,
.leyka-donations-list,
[class*="leyka-"] {
    /* Сброс section-title */
    font-size: revert;
    color: revert;
    margin: revert;
    padding: revert;
}

/* Конкретно .section внутри Leyka */
.leyka-pf .section,
.leyka-form .section,
[class*="leyka-"] .section {
    padding: revert !important;
    background: revert !important;
}

/* Сброс h2 внутри Leyka — только прямые потомки форм */
.leyka-pf h2,
.leyka-form h2,
.leyka-pf-wrap h2,
.leyka-pf-step h2,
.leyka-payment-form h2 {
    position: static !important;
    padding-left: 0 !important;
    font-size: revert !important;
    color: revert !important;
}
.leyka-pf h2::before,
.leyka-form h2::before,
.leyka-pf-wrap h2::before,
.leyka-pf h3::before,
.leyka-form h3::before,
.leyka-pf-wrap h3::before,
.leyka-pf h4::before,
.leyka-form h4::before,
.leyka-pf h5::before,
.leyka-form h5::before,
.leyka-pf h6::before,
.leyka-form h6::before {
    display: none !important;
    content: none !important;
}

/* Сброс .section-title внутри Leyka */
.leyka-pf .section-title,
[class*="leyka-"] .section-title {
    font-size: revert !important;
    color: revert !important;
    margin: revert !important;
    padding: revert !important;
    border: none !important;
}

/* Изоляция img внутри Leyka от стилей .post-content img */
.leyka-pf img,
.leyka-form img,
[class*="leyka-"] img {
    border-radius: 0 !important;
}

/* Leyka: скрыть подпись платформы и поле email донора */
#leyka-platform-signature {
    display: none !important;
}

.donor__textfield.donor__textfield--email,
input.donor__textfield.donor__textfield--email,
.leyka-pf .donor__textfield--email,
.leyka-form .donor__textfield--email {
    display: none !important;
}

/* ===== ТИПОГРАФИКА ТЕКСТОВЫХ СТРАНИЦ ===== */
.post-content,
.entry-content,
.page-content {
    font-family: 'Segoe UI', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.8;
    color: #2a2a2a;
}

.post-content p,
.entry-content p,
.page-content p {
    margin-bottom: 18px;
}

/* Заголовки */
.post-content h2, .entry-content h2, .page-content h2 {
    font-size: 24px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 32px 0 14px;
    padding-bottom: 8px;
    border-bottom: 2px solid rgba(0,0,0,.1);
}
.post-content h3, .entry-content h3, .page-content h3 {
    font-size: 20px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 24px 0 10px;
}
.post-content h4, .entry-content h4, .page-content h4 {
    font-size: 17px;
    font-weight: 600;
    color: #333;
    margin: 20px 0 8px;
}

/* Ссылки */
.post-content a, .entry-content a, .page-content a {
    color: var(--primary, #1a6b3c);
    text-decoration: underline;
    text-underline-offset: 3px;
}
.post-content a:hover, .entry-content a:hover, .page-content a:hover {
    color: var(--accent, #c8a96e);
}

/* UL — иконка fa-check через псевдоэлемент */
.post-content ul,
.entry-content ul,
.page-content ul {
    list-style: none;
    padding-left: 0;
    margin-bottom: 18px;
}
.post-content ul li,
.entry-content ul li,
.page-content ul li {
    position: relative;
    padding-left: 28px;
    margin-bottom: 8px;
    line-height: 1.7;
}
.post-content ul li::before,
.entry-content ul li::before,
.page-content ul li::before {
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    content: '\f00c'; /* fa-check */
    position: absolute;
    left: 0;
    top: 3px;
    color: var(--primary, #1a6b3c);
    font-size: 13px;
}

/* OL */
.post-content ol,
.entry-content ol,
.page-content ol {
    padding-left: 24px;
    margin-bottom: 18px;
}
.post-content ol li,
.entry-content ol li,
.page-content ol li {
    margin-bottom: 8px;
    line-height: 1.7;
    padding-left: 6px;
}
.post-content ol li::marker,
.entry-content ol li::marker,
.page-content ol li::marker {
    color: var(--primary, #1a6b3c);
    font-weight: 700;
}

/* Цитата */
.post-content blockquote,
.entry-content blockquote,
.page-content blockquote {
    border-left: 4px solid var(--accent, #c8a96e);
    background: #faf7f2;
    margin: 24px 0;
    padding: 16px 20px;
    border-radius: 0 6px 6px 0;
    font-style: italic;
    color: #555;
}

/* Таблицы */
.post-content table,
.entry-content table,
.page-content table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 28px 0;
    font-size: 15px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,.08);
    border: 1px solid rgba(26,107,60,.12);
    padding: 0 10px;
}
.post-content table thead,
.entry-content table thead,
.page-content table thead {
    background: linear-gradient(135deg, var(--primary, #1a6b3c), #2d8a52);
    color: #fff;
}
.post-content table th,
.entry-content table th,
.page-content table th {
    padding: 14px 18px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    letter-spacing: .5px;
    text-transform: uppercase;
    white-space: nowrap;
    color: #fff;
}
.post-content table th:first-child,
.entry-content table th:first-child,
.page-content table th:first-child { border-radius: 12px 0 0 0; }
.post-content table th:last-child,
.entry-content table th:last-child,
.page-content table th:last-child  { border-radius: 0 12px 0 0; }

.post-content table td,
.entry-content table td,
.page-content table td {
    padding: 12px 18px;
    border-bottom: 1px solid #e0ebe3;
    border-right: 1px solid #e0ebe3;
    color: #333;
    vertical-align: middle;
    transition: background .15s;
}
.post-content table td:last-child,
.entry-content table td:last-child,
.page-content table td:last-child {
    border-right: none;
}
.post-content table tbody tr:nth-child(even) td,
.entry-content table tbody tr:nth-child(even) td,
.page-content table tbody tr:nth-child(even) td {
    background: #f7fbf8;
}
.post-content table tbody tr:hover td,
.entry-content table tbody tr:hover td,
.page-content table tbody tr:hover td {
    background: #edf6f0;
}
.post-content table tbody tr:last-child td,
.entry-content table tbody tr:last-child td,
.page-content table tbody tr:last-child td {
    border-bottom: none;
}
.post-content table tbody tr:last-child td:first-child,
.entry-content table tbody tr:last-child td:first-child,
.page-content table tbody tr:last-child td:first-child { border-radius: 0 0 0 12px; }
.post-content table tbody tr:last-child td:last-child,
.entry-content table tbody tr:last-child td:last-child,
.page-content table tbody tr:last-child td:last-child  { border-radius: 0 0 12px 0; }

/* Первая колонка — обычный чёрный текст */
.post-content table tbody td:first-child,
.entry-content table tbody td:first-child,
.page-content table tbody td:first-child {
    font-weight: 600;
    color: #333;
    border-right: 1px solid #e0ebe3;
}

/* Ссылки в таблице — зелёные */
.post-content table td a,
.entry-content table td a,
.page-content table td a {
    color: var(--primary, #1a6b3c);
    text-decoration: underline;
}
.post-content table td a:hover,
.entry-content table td a:hover,
.page-content table td a:hover {
    color: var(--accent, #c8a96e);
}

/* Изображения в контенте */
.post-content img,
.entry-content img,
.page-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 16px 0;
}

/* Горизонтальная линия */
.post-content hr,
.entry-content hr,
.page-content hr {
    border: none;
    border-top: 2px solid #eee;
    margin: 32px 0;
}

/* Код */
.post-content code,
.entry-content code,
.page-content code {
    background: #f4f4f4;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 14px;
    color: #c0392b;
}
.post-content pre,
.entry-content pre,
.page-content pre {
    background: #1e1e1e;
    color: #d4d4d4;
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    font-size: 14px;
    margin: 20px 0;
}

@media (max-width: 768px) {
    .post-content table,
    .entry-content table,
    .page-content table {
        display: block;
        overflow-x: auto;
    }
}

.post-content table thead td,
.entry-content table thead td,
.page-content table thead td { color: #fff; }

.post-content table tbody td,
.entry-content table tbody td,
.page-content table tbody td { color: #2d8a52; }

figure.wp-block-table { padding: 0 10px; }

/* ===== WPFORMS ===== */
.wpforms-container {
    max-width: 680px;
    margin: 0 auto;
}

/* Обёртка формы */
.wpforms-form {
    background: #fff;
    border-radius: 12px;
    padding: 32px 36px;
    box-shadow: 0 4px 24px rgba(0,0,0,.08);
}

/* Заголовок формы */
.wpforms-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--primary, #1a6b3c);
    margin-bottom: 6px;
}
.wpforms-description {
    font-size: 14px;
    color: #777;
    margin-bottom: 20px;
}

/* Поля */
.wpforms-field {
    margin-bottom: 20px;
}
.wpforms-field label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
}
.wpforms-field label .wpforms-required-label {
    color: #d63638;
    margin-left: 2px;
}

/* Инпуты */
.wpforms-field input[type="text"],
.wpforms-field input[type="email"],
.wpforms-field input[type="tel"],
.wpforms-field input[type="url"],
.wpforms-field input[type="number"],
.wpforms-field select,
.wpforms-field textarea {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid #dde8e2;
    border-radius: 8px;
    font-size: 15px;
    color: #222;
    background: #fafcfb;
    transition: border-color .2s, box-shadow .2s;
    outline: none;
    font-family: inherit;
}
.wpforms-field input:focus,
.wpforms-field select:focus,
.wpforms-field textarea:focus {
    border-color: var(--primary, #1a6b3c);
    box-shadow: 0 0 0 3px rgba(26,107,60,.1);
    background: #fff;
}
.wpforms-field textarea {
    min-height: 120px;
    resize: vertical;
}

/* Placeholder */
.wpforms-field input::placeholder,
.wpforms-field textarea::placeholder {
    color: #aaa;
    font-size: 14px;
}

/* Ошибки */
.wpforms-field .wpforms-error {
    font-size: 12px;
    color: #d63638;
    margin-top: 4px;
}
.wpforms-field input.wpforms-error,
.wpforms-field textarea.wpforms-error {
    border-color: #d63638;
    background: #fff8f8;
}

/* Кнопка отправки */
.wpforms-submit-container { margin-top: 8px; }
.wpforms-form .wpforms-submit,
button.wpforms-submit {
    display: inline-block;
    padding: 13px 36px;
    background: var(--primary, #1a6b3c);
    color: #fff !important;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background .2s, transform .15s;
    letter-spacing: .3px;
    font-family: inherit;
}
.wpforms-form .wpforms-submit:hover,
button.wpforms-submit:hover {
    background: #155a32;
    transform: translateY(-1px);
}

/* Сообщение об успехе */
.wpforms-confirmation-container-full {
    background: #edfaef;
    border-left: 4px solid var(--primary, #1a6b3c);
    border-radius: 8px;
    padding: 16px 20px;
    font-size: 15px;
    color: #1a4d2e;
    margin-top: 16px;
}

/* Чекбоксы и радио */
.wpforms-field-checkbox li,
.wpforms-field-radio li {
    margin-bottom: 8px;
}
.wpforms-field-checkbox input[type="checkbox"],
.wpforms-field-radio input[type="radio"] {
    accent-color: var(--primary, #1a6b3c);
    width: 16px;
    height: 16px;
    margin-right: 8px;
    cursor: pointer;
}

@media (max-width: 600px) {
    .wpforms-form { padding: 20px 16px; }
}

/* ===== WPFORMS OVERRIDE ===== */
.wpforms-form .wpforms-field-container input:not([type="submit"]):not([type="checkbox"]):not([type="radio"]):not([type="tel"]),
.wpforms-form .wpforms-field-container select,
.wpforms-form .wpforms-field-container textarea {
    width: 100% !important;
    padding: 11px 14px !important;    border: 1.5px solid #dde8e2 !important;
    border-radius: 8px !important;
    font-size: 15px !important;
    color: #222 !important;
    background: #fafcfb !important;
    box-shadow: none !important;
    transition: border-color .2s, box-shadow .2s !important;
    font-family: inherit !important;
}
.wpforms-form .wpforms-field-container input:focus,
.wpforms-form .wpforms-field-container select:focus,
.wpforms-form .wpforms-field-container textarea:focus {
    border-color: var(--primary, #1a6b3c) !important;
    box-shadow: 0 0 0 3px rgba(26,107,60,.1) !important;
    background: #fff !important;
    outline: none !important;
}
.wpforms-form .wpforms-field-label {
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #333 !important;
    margin-bottom: 6px !important;
}
.wpforms-form button[type="submit"],
.wpforms-form input[type="submit"],
.wpforms-form .wpforms-submit {
    background: var(--primary, #1a6b3c) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 13px 36px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: background .2s !important;
    font-family: inherit !important;
    box-shadow: none !important;
}
.wpforms-form button[type="submit"]:hover,
.wpforms-form input[type="submit"]:hover,
.wpforms-form .wpforms-submit:hover {
    background: #155a32 !important;
}

.wpforms-form .wpforms-field-container input[type="tel"] {
    width: 100% !important;
    padding: 11px 14px 11px 50px !important;
    border: 1.5px solid #dde8e2 !important;
    border-radius: 8px !important;
    font-size: 15px !important;
    color: #222 !important;
    background: #fafcfb !important;
    box-shadow: none !important;
    font-family: inherit !important;
}

.wpforms-container,
.wpforms-form { padding-left: 0 !important; margin-left: 0 !important; }

.post-content video,
.entry-content video,
.page-content video,
.post-content .wp-block-video,
.entry-content .wp-block-video,
.page-content .wp-block-video { margin-bottom: 10px; }

.post-content table thead th,
.entry-content table thead th,
.page-content table thead th { border-right: 1px solid rgba(255,255,255,.2); }
.post-content table thead th:last-child,
.entry-content table thead th:last-child,
.page-content table thead th:last-child { border-right: none; }

/* ===== SIDEBAR ===== */
.sidebar { width: 300px; flex-shrink: 0; }

.sidebar-block {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,.06);
}

.sidebar-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--primary, #1a6b3c);
    margin: 0 0 14px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(26,107,60,.15);
    text-transform: uppercase;
    letter-spacing: .5px;
}

/* Навигация потомков */
.sidebar-nav { display: flex; flex-direction: column; gap: 4px; }
.sidebar-nav-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    border-radius: 6px;
    color: #333;
    font-size: 14px;
    text-decoration: none;
    transition: background .15s, color .15s;
}
.sidebar-nav-link:hover,
.sidebar-nav-link.active {
    background: rgba(26,107,60,.08);
    color: var(--primary, #1a6b3c);
    text-decoration: none;
}
.sidebar-nav-count {
    font-size: 12px;
    color: #aaa;
    background: #f0f0f0;
    padding: 1px 7px;
    border-radius: 10px;
}

/* Рекламный баннер */
.sidebar-ad-img { width: 100%; height: auto; display: block; border-radius: 10px; transition: opacity .2s; }
a:hover .sidebar-ad-img { opacity: .9; }

/* ===== ВЫПАДАЮЩЕЕ МЕНЮ ===== */
.nav-item,
.main-nav .menu > .menu-item-has-children { position: relative; display: inline-flex; align-items: center; }
.main-nav .sub-menu.nav-dropdown {
    list-style: none;
    margin: 0;
    padding: 14px 0 6px;
    display: none;
    flex-direction: column;
    gap: 0;
}
.nav-link { color: #fff; font-size: 15px; white-space: nowrap; text-decoration: none; padding-bottom: 2px; border-bottom: 2px solid transparent; transition: border-color .2s; cursor: pointer; }
.nav-link:hover { border-bottom-color: #fff; text-decoration: none; color: #fff; }

.nav-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background: rgba(20, 28, 36, 0.5);
    box-shadow: 0 8px 24px rgba(0,0,0,.35);
    padding: 14px 0 6px;
    z-index: 500;
    border: 1px solid rgba(255,255,255,.08);
}

/* На внутренних страницах (solid шапка) — светлое выпадающее меню */
.site-header--solid .nav-dropdown,
.site-header--scrolled .nav-dropdown {
    background: rgb(255 255 255 / 90%);
    border: 1px solid rgba(0,0,0,.08);
    box-shadow: 0 8px 24px rgba(0,0,0,.12);
}
.site-header--solid .nav-dropdown-link,
.site-header--scrolled .nav-dropdown-link { color: #222; }
.site-header--solid .nav-dropdown-link:hover,
.site-header--scrolled .nav-dropdown-link:hover { background: rgba(0,0,0,.06); color: #111; }

.nav-item--has-dropdown:hover .nav-dropdown,
.main-nav > ul.menu > .menu-item-has-children:hover > .sub-menu.nav-dropdown { display: block; }

.nav-dropdown-link {
    display: block;
    padding: 9px 16px;
    font-size: 14px;
    color: #ddd;
    text-decoration: none;
    transition: background .15s, color .15s;
    white-space: nowrap;
    border-bottom: none !important;
}
.nav-dropdown-link:hover { background: rgba(255,255,255,.08); color: #fff; text-decoration: none; border-bottom: none !important; }

/* Родительская ссылка остаётся подчёркнутой когда открыто меню */
.nav-item--has-dropdown:hover .nav-link,
.main-nav > ul.menu > .menu-item-has-children:hover > a.nav-link { border-bottom-color: #fff; }

.site-header--scrolled .nav-dropdown { color: #000; }

.site-header--scrolled .nav-dropdown a { color: #000; }

.sidebar-news-date {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: #aaa;
}
.sidebar-news-date::before {
    font-family: 'Font Awesome 6 Free';
    font-weight: 400;
    content: '\f073';
    font-size: 10px;
}

/* ===== SIDEBAR EVENT CARDS ===== */
.sidebar-event-card {
    margin-bottom: 16px;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}
.sidebar-event-card:last-child { margin-bottom: 0; }

.sidebar-event-img-wrap { display: block; overflow: hidden; }
.sidebar-event-img {
    width: 100% !important;
    height: 160px !important;
    object-fit: cover !important;
    display: block;
    transition: transform .3s;
}
.sidebar-event-card:hover .sidebar-event-img { transform: scale(1.04); }

.sidebar-event-body {
    padding: 10px 12px 12px;
}
.sidebar-event-title {
    display: block;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    line-height: 1.45;
    margin-bottom: 5px;
}
.sidebar-event-title:hover { color: var(--primary, #1a6b3c); }

.sidebar-ad-img { width: 100%; height: auto; display: block; border-radius: 8px 8px 0 0; }
.sidebar-ad-caption { font-size: 12px; color: #777; padding: 8px 10px; margin: 0; line-height: 1.4; border-radius: 0 0 8px 8px; }

/* ===== ARCHIVE LIST ===== */
.archive-list { display: flex; flex-direction: column; gap: 0; }

.archive-list-item {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    padding: 20px 0;
    border-bottom: 1px solid #eef0ee;
    transition: background .15s;
}
.archive-list-item:first-child { padding-top: 0; }
.archive-list-item:last-child { border-bottom: none; }
.archive-list-item:hover { background: #f8faf8; border-radius: 8px; padding-left: 10px; padding-right: 10px; margin: 0 -10px; }

.archive-list-thumb {
    flex-shrink: 0;
    width: 140px;
    height: 100px;
    border-radius: 8px;
    overflow: hidden;
    display: block;
}
.archive-list-img {
    width: 140px !important;
    height: 100px !important;
    object-fit: cover !important;
    display: block;
    transition: transform .3s;
}
.archive-list-item:hover .archive-list-img { transform: scale(1.05); }

.archive-list-body { flex: 1; min-width: 0; }

.archive-list-meta {
    display: flex;
    gap: 14px;
    font-size: 12px;
    color: #aaa;
    margin-bottom: 7px;
    flex-wrap: wrap;
}
.archive-list-meta span { display: flex; align-items: center; gap: 4px; }
.archive-list-meta a { color: #aaa; text-decoration: none; }
.archive-list-meta a:hover { color: var(--primary, #1a6b3c); }

.archive-list-title {
    font-size: 17px;
    font-weight: 700;
    line-height: 1.4;
    margin: 0 0 8px;
}
.archive-list-title a { color: #1a1a1a; text-decoration: none; }
.archive-list-title a:hover { color: var(--primary, #1a6b3c); }

.archive-list-excerpt {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 10px;
}

.archive-list-more {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    font-weight: 600;
    color: var(--primary, #1a6b3c);
    text-decoration: none;
}
.archive-list-more:hover { color: var(--accent, #c8a96e); text-decoration: none; }
.archive-list-more i { font-size: 11px; transition: transform .2s; }
.archive-list-item:hover .archive-list-more i { transform: translateX(3px); }

@media (max-width: 600px) {
    .archive-list-thumb { width: 90px; height: 68px; }
    .archive-list-img { width: 90px !important; height: 68px !important; }
    .archive-list-title { font-size: 15px; }
}

/* ===== ГЕРОЙ СТРАНИЦЫ (шаблон page-hero-content) ===== */
.page-hero {
    position: relative;
    min-height: 280px;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
    margin-bottom: 0;
}
.page-hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
}
.page-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,.65) 0%, rgba(0,0,0,.2) 60%, rgba(0,0,0,.1) 100%);
}
.page-hero-content {
    position: relative;
    z-index: 1;
    padding: 48px 20px 40px;
    color: #fff;
}
.page-hero-title {
    font-size: 36px;
    font-weight: 700;
    margin: 0 0 12px;
    line-height: 1.2;
    text-shadow: 0 2px 8px rgba(0,0,0,.3);
}
.page-hero-desc {
    font-size: 18px;
    max-width: 720px;
    opacity: .9;
    margin: 0;
    line-height: 1.5;
}
@media (max-width: 768px) {
    .page-hero { min-height: 220px; }
    .page-hero-title { font-size: 26px; }
    .page-hero-desc { font-size: 16px; }
}

/* ===== ДОЧЕРНИЕ СТРАНИЦЫ КАРТОЧКАМИ ===== */
.page-children-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 36px;
}

.page-child-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,.07);
    text-decoration: none;
    transition: box-shadow .2s, transform .2s;
}
.page-child-card:hover {
    box-shadow: 0 6px 24px rgba(0,0,0,.13);
    transform: translateY(-3px);
    text-decoration: none;
}

.page-child-card-img {
    height: 160px;
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
    transition: transform .3s;
}
.page-child-card:hover .page-child-card-img { transform: scale(1.03); }
.page-child-card-img--empty {
    background: linear-gradient(135deg, #e8f5ee, #d0eadb);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    color: var(--primary, #1a6b3c);
    opacity: .5;
}

.page-child-card-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.page-child-card-title {
    font-size: 15px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 8px;
    line-height: 1.4;
}
.page-child-card:hover .page-child-card-title { color: var(--primary, #1a6b3c); }
.page-child-card-desc {
    font-size: 13px;
    color: #777;
    line-height: 1.5;
    flex: 1;
    margin-bottom: 12px;
}
.page-child-card-more {
    font-size: 13px;
    font-weight: 600;
    color: var(--primary, #1a6b3c);
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: auto;
}
.page-child-card-more i { font-size: 11px; transition: transform .2s; }
.page-child-card:hover .page-child-card-more i { transform: translateX(3px); }

@media (max-width: 768px) {
    .page-children-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
    .page-children-grid { grid-template-columns: 1fr; }
}

/* ===== БАННЕР В КОНТЕНТЕ (главная) ===== */
.content-banner {
    margin-top: 50px;
}
.content-banner-img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: var(--radius, 8px);
}

#content { padding-top: 60px; }

/* ===== ПЛАВНОЕ ПРИБЛИЖЕНИЕ ФОТО ===== */
.news-card img,
.archive-list-img,
.sidebar-event-img,
.page-child-card-img {
    transition: transform .4s ease !important;
}

/* ===== БУРГЕР И МОБИЛЬНОЕ МЕНЮ ===== */

/* Бургер-кнопка — скрыта на десктопе */
.burger-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 36px;
    height: 36px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    flex-shrink: 0;
}
.burger-btn span {
    display: block;
    width: 22px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: transform .3s ease, opacity .3s ease;
}
/* Крестик когда открыто */
.burger-btn.is-active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger-btn.is-active span:nth-child(2) { opacity: 0; }
.burger-btn.is-active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Оверлей */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 998;
    opacity: 0;
    transition: opacity .3s ease;
}
.mobile-menu-overlay.is-active { opacity: 1; }

/* Само мобильное меню — выезжает справа */
.mobile-menu {
    position: fixed;
    top: 0;
    right: 0;
    width: min(320px, 85vw);
    height: 100%;
    background: #1a3a28;
    z-index: 999;
    transform: translateX(100%);
    transition: transform .35s ease;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
.mobile-menu.is-active { transform: translateX(0); }

.mobile-menu-inner {
    padding: 70px 24px 40px;
}

/* Ссылки в мобильном меню */
.mobile-nav .nav-link,
.mobile-nav a {
    display: block;
    color: #fff;
    font-size: 16px;
    font-weight: 500;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255,255,255,.1);
    text-decoration: none;
    transition: color .2s;
}
.mobile-nav .nav-link:hover,
.mobile-nav a:hover { color: var(--accent, #c8a96e); }

/* Выпадающее в мобильном — скрыто, раскрывается по кнопке + */
.mobile-nav .nav-item,
.mobile-nav .menu > .menu-item-has-children { display: block; position: static; }
.mobile-nav .nav-item--has-dropdown,
.mobile-nav .menu > .menu-item-has-children { display: flex; flex-wrap: wrap; align-items: center; }
.mobile-nav .nav-item--has-dropdown > .nav-link,
.mobile-nav .menu > .menu-item-has-children > a { flex: 1; border-bottom: none; }

/* Кнопка + */
.mobile-nav .nav-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,.1);
    border: none;
    border-radius: 4px;
    color: #fff;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    flex-shrink: 0;
    transition: background .2s, transform .3s;
    padding: 0;
}
.mobile-nav .nav-toggle:hover { background: rgba(255,255,255,.2); }
.mobile-nav .nav-toggle.is-open { transform: rotate(45deg); }

.mobile-nav .nav-dropdown,
.mobile-nav .sub-menu {
    display: block;
    max-height: 0;
    overflow: hidden;
    width: 100%;
    position: static;
    background: none;
    box-shadow: none;
    padding: 0 0 0 16px;
    min-width: 0;
    border-radius: 0;
    list-style: none;
    margin: 0;
    transition: max-height .6s cubic-bezier(0.4, 0, 0.2, 1);
}
.mobile-nav .sub-menu li,
.mobile-nav .nav-dropdown li { list-style: none; margin: 0; padding: 0; }
.mobile-nav .nav-dropdown.is-open,
.mobile-nav .sub-menu.is-open { max-height: 600px; }
.mobile-nav .nav-dropdown-link,
.mobile-nav .sub-menu a {
    display: block;
    color: rgba(255,255,255,.75);
    font-size: 14px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,.06);
    background: none;
}
.mobile-nav .nav-dropdown-link:hover,
.mobile-nav .sub-menu a:hover { color: var(--accent, #c8a96e); background: none; }
@media (max-width: 900px) {
    .main-nav { display: none !important; }
    .burger-btn { display: flex; }
}

@media (min-width: 901px) {
    .mobile-menu,
    .mobile-menu-overlay { display: none !important; }
}

/* ================================================
   МОБИЛЬНАЯ АДАПТАЦИЯ — комплексная
   ================================================ */

/* ── Шапка ── */
@media (max-width: 900px) {
    .site-header .container { height: 56px; padding: 0 16px; }
    .site-logo-img { height: 36px; }
}

/* ── Параллакс баннер ── */
@media (max-width: 768px) {
    .hero-parallax { min-height: 100svh; }
    .hero-content { padding: 20px 16px; }
    .hero-logo { max-width: 200px; margin-bottom: 20px; }
    .hero-bottom { flex-direction: column; gap: 16px; }
    .hero-video-wrap { width: 100%; border-radius: 8px; }
    .hero-text { font-size: 15px; line-height: 1.6; }
    .hero-donate { margin-top: 20px; }
    .hero-donate-btn { padding: 12px 24px; font-size: 15px; }
    .hero-arrow { bottom: 20px; }
}

/* ── Главная — сетка новостей ── */
@media (max-width: 768px) {
    .section { padding: 32px 0; }
    .section-title { font-size: 22px; margin-bottom: 16px; }
    .news-grid { grid-template-columns: 1fr; gap: 16px; }
    .news-card img { height: 180px; }
    .content-banner { margin-top: 24px; }
}

/* ── Layout: контент + сайдбар ── */
@media (max-width: 900px) {
    .content-sidebar { flex-direction: column; gap: 24px; }
    .sidebar { width: 100%; }
    body:not(.home) .site-main { padding-top: 70px; }
}

/* ── Single / Page ── */
@media (max-width: 768px) {
    .post-title,
    .page-title { font-size: 24px; line-height: 1.3; }
    .post-content,
    .page-content { font-size: 15px; }
    .post-thumbnail img { border-radius: 6px; }
    .breadcrumbs { font-size: 12px; }
}

/* ── Archive ── */
@media (max-width: 768px) {
    .archive-title { font-size: 22px; }
    .post-list-item { flex-direction: column; gap: 12px; }
    .post-list-thumb { width: 100%; }
    .post-list-thumb img { width: 100%; height: 180px; border-radius: 8px; }
    .post-list-title { font-size: 16px; }
    .archive-list-item { flex-direction: column; gap: 10px; }
    .archive-list-thumb { width: 100% !important; height: auto !important; }
    .archive-list-img { width: 100% !important; height: 160px !important; border-radius: 8px; }
}

/* ── Карточки дочерних страниц ── */
@media (max-width: 600px) {
    .page-children-grid { grid-template-columns: 1fr !important; }
    .page-child-card-img { height: 160px !important; }
}

/* ── Таблицы ── */
@media (max-width: 768px) {
    .post-content table,
    .page-content table { font-size: 13px; }
    .post-content table td,
    .post-content table th { padding: 6px 8px; }
    figure.wp-block-table { padding: 0; overflow-x: auto; }
}

/* ── Пагинация ── */
@media (max-width: 480px) {
    .pagination { gap: 4px; }
    .pagination .page-numbers { padding: 6px 10px; font-size: 13px; }
}

/* ── Поиск ── */
@media (max-width: 480px) {
    .search-form { flex-direction: column; }
    .search-form input[type="search"],
    .search-form button { width: 100%; }
}

/* ── 404 ── */
@media (max-width: 480px) {
    .not-found-code { font-size: 56px; }
    .not-found-title { font-size: 22px; }
}

/* ── Подвал ── */
@media (max-width: 768px) {
    .site-footer { padding: 32px 0 16px; margin-top: 40px; }
    .footer-5col { grid-template-columns: 1fr 1fr !important; gap: 24px; }
    .footer-block--brand { grid-column: 1 / -1; }
    .footer-bottom { font-size: 12px; }
}
@media (max-width: 480px) {
    .footer-5col { grid-template-columns: 1fr !important; }
}

/* ── Сайдбар — события и баннеры ── */
@media (max-width: 900px) {
    .sidebar-ad-img { max-width: 480px; }
}

/* ── WPForms ── */
@media (max-width: 600px) {
    .wpforms-form { padding: 16px; }
    .wpforms-field input,
    .wpforms-field textarea { font-size: 15px; }
}

/* ── Партнёры ── */
@media (max-width: 768px) {
    .partners-section { padding: 32px 0; }
    .partner-logo { height: 60px; }
}

/* Партнёры — адаптив через JS (PER_ROW меняется динамически) */
@media (max-width: 900px) {
    .partners-carousel-wrap { overflow: hidden; padding: 20px 0; }
    .partner-logo { height: 70px; }
}
@media (max-width: 768px) {
    .partners-section { padding: 32px 0; }
    .partner-logo { height: 60px; }
}
@media (max-width: 480px) {
    .partner-logo { height: 55px; }
}

/* ── Общие утилиты ── */
@media (max-width: 768px) {
    .container { padding: 0 16px; }
    img { max-width: 100%; height: auto; }
}

/* Sidebar events — сетка на мобильных как на десктопе */
@media (max-width: 900px) {
    .sidebar-events-list {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    .sidebar-event-card { margin-bottom: 0; }
}
@media (max-width: 480px) {
    .sidebar-events-list { grid-template-columns: 1fr; }
}

/* ================================================
   ТАБЛИЦЫ — мобильная адаптация (card-flip)
   ================================================ */

.post-content figure.wp-block-table,
.page-content figure.wp-block-table {
    overflow-x: visible;
}

@media (max-width: 640px) {

    .post-content table.mobile-cards,
    .page-content table.mobile-cards {
        display: block;
        width: 100%;
        min-width: 0;
        border-collapse: collapse;
        font-size: 14px;
    }

    /* Скрываем thead */
    .post-content table.mobile-cards thead,
    .page-content table.mobile-cards thead {
        display: none;
    }

    .post-content table.mobile-cards tbody,
    .page-content table.mobile-cards tbody {
        display: block;
    }

    /* Каждая строка — отдельный блок с отступом снизу */
    .post-content table.mobile-cards tbody tr,
    .page-content table.mobile-cards tbody tr {
        display: block;
        margin-bottom: 16px;
        border: 1px solid #d0e8d8;
        border-radius: 8px;
        overflow: hidden;
    }

    /* Каждая ячейка — строка: label слева, значение справа */
    .post-content table.mobile-cards tbody td,
    .page-content table.mobile-cards tbody td {
        display: grid;
        grid-template-columns: 120px 1fr;
        align-items: stretch;
        padding: 0;
        border: none;
        border-bottom: 1px solid #d0e8d8;
        background: #fff;
        color: var(--text, #333);
        font-size: 14px;
        line-height: 1.5;
    }

    .post-content table.mobile-cards tbody td:last-child,
    .page-content table.mobile-cards tbody td:last-child {
        border-bottom: none;
    }

    /* Подпись — зелёная левая колонка */
    .post-content table.mobile-cards tbody td::before,
    .page-content table.mobile-cards tbody td::before {
        content: attr(data-label);
        display: flex;
        align-items: center;
        padding: 8px 10px;
        background: var(--primary, #1a6b3c);
        color: #fff;
        font-size: 13px;
        font-weight: 600;
        line-height: 1.4;
        word-break: break-word;
    }

    /* Значение — правая часть */
    .post-content table.mobile-cards tbody td > *,
    .page-content table.mobile-cards tbody td > * {
        padding: 8px 10px;
    }

    /* Текстовые ноды не оборачиваются — добавляем паддинг через псевдоэлемент-обёртку */
    .post-content table.mobile-cards tbody td,
    .page-content table.mobile-cards tbody td {
        position: relative;
    }

    /* Значение через after-trick не работает — используем JS span */
    .post-content table.mobile-cards tbody td .td-value,
    .page-content table.mobile-cards tbody td .td-value {
        display: flex;
        align-items: center;
        padding: 8px 10px;
        word-break: break-word;
    }

    /* Чётные строки — лёгкий фон */
    .post-content table.mobile-cards tbody tr:nth-child(even) td,
    .page-content table.mobile-cards tbody tr:nth-child(even) td {
        background: #f7fbf8;
    }
    .post-content table.mobile-cards tbody tr:nth-child(even) td::before,
    .page-content table.mobile-cards tbody tr:nth-child(even) td::before {
        background: #155a32;
    }

    /* Если нет data-label — просто блок */
    .post-content table.mobile-cards tbody td[data-label=""]::before,
    .page-content table.mobile-cards tbody td[data-label=""]::before {
        display: none;
    }
    .post-content table.mobile-cards tbody td[data-label=""],
    .page-content table.mobile-cards tbody td[data-label=""] {
        grid-template-columns: 1fr;
        padding: 8px 10px;
    }
}

/* Соцсети в подвале */
.footer-socials { margin-top: 16px; }
.footer-socials-icons { display: flex; gap: 8px; flex-wrap: wrap; }
.footer-social-icon { filter: none !important; }

.footer-slogan {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 17px;
    font-style: italic;
    font-weight: 400;
    color: rgba(255,255,255,.85);
    line-height: 1.7;
    margin-top: 14px;
    letter-spacing: 0.2px;
}

.footer-block--brand .footer-block-title--social {
    margin-top: 20px;
}

.footer-block--brand .footer-socials {
    margin-top: 0;
}

/* Навигация между статьями */
.post-navigation {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #eee;
}
.post-nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--primary, #1a6b3c);
    text-decoration: none;
    max-width: 48%;
    transition: color .2s;
}
.post-nav-link:hover { color: var(--accent, #c8a96e); text-decoration: none; }
.post-nav-next { margin-left: auto; text-align: right; }

/* ===== КНОПКА НАВЕРХ ===== */
.scroll-to-top {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 46px;
    height: 46px;
    background: var(--primary, #1a6b3c);
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(0,0,0,.2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: opacity .3s ease, transform .3s ease, background .2s;
    z-index: 990;
}
.scroll-to-top.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.scroll-to-top:hover { background: var(--accent, #c8a96e); }

@media (max-width: 600px) {
    .scroll-to-top { bottom: 20px; right: 16px; width: 40px; height: 40px; }
}

/* ===== СЕКЦИЯ ВИДЕО + ТЕКСТ (главная) ===== */
.intro-section { background: #f8f9fa; }
.intro-inner {
    display: flex;
    gap: 40px;
    align-items: stretch;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 16px rgba(0,0,0,.07);
    overflow: hidden;
}
.intro-video-wrap {
    flex: 0 0 50%;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,.12);
}
.intro-video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

/* Карточка текста */
.intro-text-card {
    flex: 1;
    font-size: 16px;
    line-height: 1.8;
    color: var(--text, #333);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 32px 36px;
}
.intro-text-card p { margin-bottom: 14px; }
.intro-text-card p:last-child { margin-bottom: 0; }
.intro-text-card h2,
.intro-text-card h3 { color: var(--primary, #1a6b3c); margin-bottom: 12px; }

@media (max-width: 768px) {
    .intro-inner { flex-direction: column; gap: 20px; }
    .intro-video-wrap { flex: none; width: 100%; min-height: 220px; }
    .intro-text-card { padding: 20px; }
}

/* Кнопка "Все события" */
.section-footer { text-align: center; margin-top: 24px; }

/* ===== ПАРТНЁРЫ: первый закреплён + карусель ===== */
.partners-layout {
    display: flex;
    align-items: center;
    gap: 0;
    overflow: hidden;
    border-top: 1px solid #e0e0e0;
    padding: 10px 0;
}

/* Первый партнёр — идентичен .partner-item */
.partner-first {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 12px;
    box-sizing: border-box;
}
.partner-first a {
    width: 100%;
    text-decoration: none;
}
.partner-first .partner-item-inner {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,.08);
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    transition: box-shadow .3s;
}
.partner-first:hover .partner-item-inner {
    box-shadow: 0 6px 20px rgba(0,0,0,.14);
}
.partner-first .partner-logo {
    height: 90px;
    width: auto;
    max-width: 160px;
    object-fit: contain;
    filter: grayscale(100%) opacity(.6);
    transition: filter 0.8s ease;
    will-change: filter;
}
.partner-first:hover .partner-logo {
    filter: grayscale(0%) opacity(1);
}
@media (max-width: 900px) { .partner-first .partner-logo { height: 70px; } }
@media (max-width: 768px) { .partner-first .partner-logo { height: 60px; } }
@media (max-width: 480px) { .partner-first .partner-logo { height: 55px; } }

/* Разделитель — по вертикальной середине */
.partner-divider {
    width: 1px;
    height: 60px;
    background: #e0e0e0;
    flex-shrink: 0;
    align-self: center;
}

/* Карусель остальных — ширина задаётся JS */
.partners-layout .partners-carousel-wrap {
    overflow: hidden;
    min-width: 0;
    padding: 0;
    flex-shrink: 0;
}
.partners-layout .partners-carousel {
    display: flex;
    align-items: center;
    will-change: transform;
}


@media (max-width: 480px) {
    .hero-text { font-size: 14px; line-height: 1.3; }
}
@media (max-width: 480px) {
    .hero-logo { display: none; }
    .hero-arrow { display: none; }
}

.intro-read-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 16px;
    font-size: 15px;
    font-weight: 600;
    color: var(--primary, #1a6b3c);
    text-decoration: none;
    transition: gap .2s, color .2s;
}
.intro-read-more:hover {
    color: var(--accent, #c8a96e);
    gap: 10px;
    text-decoration: none;
}

/* Родительская категория в меню сайдбара */
.sidebar-nav-parent {
    font-weight: 700;
    color: var(--primary, #1a6b3c);
    border-bottom: 2px solid rgba(26,107,60,.15);
    margin-bottom: 4px;
    padding-bottom: 10px;
}
.sidebar-nav-parent:hover {
    background: rgba(26,107,60,.05);
}

/* Доступный заголовок H1 без визуального дубля (главная) */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}
