/**
 * Text Pages Styles
 * Универсальные стили для текстовых страниц
 * Применяется ко всем страницам с классом .text-page
 */

/* Подключение шрифта Jost */
@import url('https://fonts.googleapis.com/css2?family=Jost:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');

/* Стили для текстовых страниц */
body.text-page {
    font-family: 'Jost', sans-serif;
    color: #535353; /* Основной цвет текста */
}

body.single-page {
    font-family: 'Jost', sans-serif;
    color: #535353; /* Основной цвет текста */
}

body.text-page .site-main {
    background: #f8f9fa;
    padding: 0;
}

/* Контент страницы */
body.text-page .page-content-wrapper {
    font-family: 'Jost', sans-serif;
    line-height: 1.6;
}

/* Текстовый блок с белым фоном */
body.text-page .entry-content {
    background: #ffffff;
    border-radius: 15px;
    padding: 50px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    margin-bottom: 20px;
}

/* Превью изображение страницы */
body.text-page .post-thumbnail {
    background: #ffffff;
    border-radius: 15px 15px 0 0;
    padding: 50px 50px 0 50px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    clip-path: inset(-20px -20px 0 -20px);
}

body.text-page .post-thumbnail img {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

/* Если есть post-thumbnail — объединяем визуально с entry-content */
body.text-page .post-thumbnail + .entry-content {
    border-radius: 0 0 15px 15px;
    padding-top: 30px;
    clip-path: inset(0 -20px -20px -20px);
}

/* Заголовок страницы */
body.text-page .entry-header {
    background: linear-gradient(135deg, #228B22 0%, #32CD32 100%);
    color: #ffffff;
    text-align: center;
    padding: 60px 0;
    margin: 0;
    border-radius: 0;
    position: relative;
    overflow: hidden;
}

body.text-page .entry-header::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('../images/islam-pattern-white.svg');
    background-repeat: repeat;
    background-size: 100px 100px;
    pointer-events: none;
    z-index: 0;
}

body.text-page .entry-header .container {
    position: relative;
    z-index: 1;
}

body.text-page .entry-title {
    font-family: 'Jost', sans-serif;
    font-size: 3.5rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    line-height: 1.1;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Заголовки в контенте */
body.text-page .entry-content h1,
body.text-page .entry-content h2,
body.text-page .entry-content h3,
body.text-page .entry-content h4 {
    font-family: 'Jost', sans-serif;
    color: #535353;
    font-weight: 600;
    margin: 40px 0 20px 0;
}

body.text-page .entry-content h2 {
    font-size: 2.2rem;
    color: #228B22;
    border-bottom: 3px solid #228B22;
    padding-bottom: 10px;
    margin-bottom: 30px;
}

body.text-page .entry-content h3 {
    font-size: 1.6rem;
    color: #DC143C;
    margin-top: 35px;
}

body.text-page .entry-content h4 {
    font-size: 1.3rem;
    color: #535353;
}

/* Параграфы */
body.text-page .entry-content p, body.single-page .entry-content p {
    font-size: 1.3rem;
    color: #535353;
    margin-bottom: 20px;
    line-height: 1.6;
}

/* Списки */
body.text-page .entry-content ul,
body.text-page .entry-content ol {
    margin: 20px 0;
    padding-left: 30px;
}

body.text-page .entry-content li {
    font-size: 1.1rem;
    color: #535353;
    margin-bottom: 10px;
    line-height: 1.5;
}

/* Ссылки */
body.text-page .entry-content a:not(.depth-button):not(.depth-button--light):not(.clip-trigger) {
    color: #228B22;
    text-decoration: none;
    font-weight: 500;
    font-size: 1.2rem;
    transition: color 0.2s ease;
}

body.text-page .entry-content a:not(.depth-button):not(.depth-button--light):not(.clip-trigger):hover {
    color: #DC143C;
    text-decoration: underline;
}

/* Таблицы */
body.text-page .entry-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 30px 0;
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

body.text-page .entry-content th,
body.text-page .entry-content td {
    padding: 15px 20px;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
}

body.text-page .entry-content th {
    background: #f8f9fa;
    font-weight: 600;
    color: #535353;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

body.text-page .entry-content td {
    font-size: 1.1rem;
    color: #535353;
}

/* Блоки с важной информацией */
body.text-page .entry-content .wp-block-group,
body.text-page .entry-content .wp-block-columns {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 30px;
    margin: 30px 0;
    border-left: 4px solid #228B22;
}

/* Кнопки и ссылки-кнопки */
body.text-page .entry-content .wp-block-button .wp-block-button__link,
body.text-page .entry-content .button,
body.text-page .entry-content a[class*="btn"]:not(.depth-button):not(.depth-button--light):not(.clip-trigger),
body.text-page .entry-content a[href*="mailto:"]:not(.depth-button):not(.depth-button--light),
body.text-page .entry-content a[href*="tel:"]:not(.depth-button):not(.depth-button--light),
body.text-page .entry-content a.wp-block-file__button {
    background: #228B22 !important;
    color: #ffffff !important;
    padding: 8px 16px !important;
    border-radius: 12px !important;
    text-decoration: none !important;
    font-family: 'Jost', sans-serif !important;
    font-weight: 600 !important;
    font-size: 1.1rem !important;
    display: inline-block !important;
    transition: all 0.3s ease !important;
    border: none !important;
    cursor: pointer !important;
    text-align: center !important;
    box-shadow: 0 2px 8px rgba(34, 139, 34, 0.2) !important;
}

/* Depth CTA: внешний вид задают пакеты project-depth */
body.text-page .entry-content .participation a[href*="mailto:"],
body.text-page .entry-content .participation a[href*="tel:"] {
    background: none !important;
    color: inherit !important;
    padding: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    display: inline !important;
    font: inherit !important;
    font-size: inherit !important;
    font-weight: inherit !important;
    text-decoration: underline !important;
}

body.text-page .entry-content .wp-block-button .wp-block-button__link:hover,
body.text-page .entry-content .button:hover,
body.text-page .entry-content a[class*="btn"]:not(.depth-button):not(.depth-button--light):not(.clip-trigger):hover,
body.text-page .entry-content a[href*="mailto:"]:not(.depth-button):not(.depth-button--light):hover,
body.text-page .entry-content a[href*="tel:"]:not(.depth-button):not(.depth-button--light):hover,
body.text-page .entry-content a.wp-block-file__button:hover {
    background: #1e7a1e !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 15px rgba(34, 139, 34, 0.4) !important;
    text-decoration: none !important;
    color: #ffffff !important;
}

/* Ссылки с классом download-link - обычный зелёный текст */
body.text-page .entry-content a.download-link:not(.wp-block-file__button) {
    background: none !important;
    padding: 0 !important;
    border-radius: 0 !important;
    min-width: auto !important;
    box-shadow: none !important;
    display: inline !important;
    color: #228B22 !important;
    font-size: 1.2rem !important;
    font-weight: 500 !important;
    text-decoration: none !important;
    transition: color 0.2s ease !important;
    border: none !important;
}

body.text-page .entry-content a.download-link:not(.wp-block-file__button):hover {
    color: #DC143C !important;
    text-decoration: underline !important;
    transform: none !important;
    box-shadow: none !important;
    background: none !important;
}

/* Обычные текстовые ссылки */
body.text-page .entry-content a[href]:not([href*="mailto:"]):not([href*="tel:"]):not([class*="btn"]):not(.wp-block-button__link):not(.wp-block-file__button):not(.download-link):not(.swiper-arrow):not(.depth-button):not(.depth-button--light):not(.clip-trigger) {
    background: none !important;
    padding: 0 !important;
    border-radius: 0 !important;
    min-width: auto !important;
    box-shadow: none !important;
    display: inline !important;
    color: #228B22 !important;
    font-size: 1.2rem !important;
    font-weight: 500 !important;
    text-decoration: none !important;
    transition: color 0.2s ease !important;
}

body.text-page .entry-content a[href]:not([href*="mailto:"]):not([href*="tel:"]):not([class*="btn"]):not(.wp-block-button__link):not(.wp-block-file__button):not(.download-link):not(.swiper-arrow):not(.depth-button):not(.depth-button--light):not(.clip-trigger):hover {
    color: #DC143C !important;
    text-decoration: underline !important;
    transform: none !important;
    box-shadow: none !important;
}

/* Изображения */
body.text-page .entry-content img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin: 20px auto;
    display: block; /* Делаем изображение блочным элементом для центрирования */
}


/* Изображения с подписями (figure) */
body.text-page .entry-content figure {
    margin: 30px auto;
    text-align: center;
    max-width: 100%;
}

body.text-page .entry-content figure img {
    margin: 0 auto 15px auto;
}

body.text-page .entry-content figcaption {
    font-family: 'Jost', sans-serif;
    font-size: 0.9rem;
    font-style: italic;
    color: #535353;
    text-align: center;
    margin-top: 10px;
    padding: 0 20px;
}

/* WordPress блоки изображений */
body.text-page .entry-content .wp-block-image {
    text-align: center;
    margin: 30px auto;
}

body.text-page .entry-content .wp-block-image img {
    margin: 0 auto;
}

/* Галереи изображений */
body.text-page .entry-content .wp-block-gallery {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin: 30px auto;
}

body.text-page .entry-content .wp-block-gallery .wp-block-image {
    margin: 0;
    flex: 0 0 auto;
}

/* Выравнивание изображений WordPress */
body.text-page .entry-content .aligncenter {
    display: block;
    margin: 25px auto;
    text-align: center;
}

body.text-page .entry-content .alignleft {
    float: left;
    margin: 10px 20px 20px 0;
}

body.text-page .entry-content .alignright {
    float: right;
    margin: 10px 0 20px 20px;
}

/* Очистка float для следующих элементов */
body.text-page .entry-content .alignleft + *,
body.text-page .entry-content .alignright + * {
    clear: both;
}

/* Цитаты */
body.text-page .entry-content blockquote {
    background: #f8f9fa;
    border-left: 4px solid #DC143C;
    padding: 20px 30px;
    margin: 30px 0;
    font-style: italic;
    font-size: 1.2rem;
    color: #555555;
    border-radius: 0 8px 8px 0;
}

/* Код */
body.text-page .entry-content code {
    background: #f8f9fa;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    color: #DC143C;
}

body.text-page .entry-content pre {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 20px 0;
    border-left: 4px solid #228B22;
}

/* Разделители */
body.text-page .entry-content hr {
    border: none;
    height: 3px;
    background: linear-gradient(135deg, #228B22 0%, #DC143C 100%);
    margin: 40px 0;
    border-radius: 2px;
}

/* Адаптивность */
@media (max-width: 992px) {
    body.text-page .entry-title {
        font-size: 2.8rem;
    }
    
    body.text-page .entry-header {
        padding: 50px 0;
    }
    
    body.text-page .entry-content {
        padding: 35px;
    }
}

@media (max-width: 768px) {
    body.text-page .entry-title {
        font-size: 2.2rem;
    }
    
    body.text-page .entry-header {
        padding: 40px 0;
    }
    
    body.text-page .entry-content {
        padding: 25px;
        margin-bottom: 30px;
    }
    
    body.text-page .entry-content h2 {
        font-size: 1.8rem;
    }
    
    body.text-page .entry-content h3 {
        font-size: 1.4rem;
    }
    
    body.text-page .entry-content th,
    body.text-page .entry-content td {
        padding: 12px 15px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    body.text-page .entry-title {
        font-size: 1.8rem;
    }
    
    body.text-page .entry-content {
        padding: 20px;
    }
    
    body.text-page .entry-content .wp-block-group,
    body.text-page .entry-content .wp-block-columns {
        padding: 20px;
    }
    
    body.text-page .entry-content blockquote {
        padding: 15px 20px;
        font-size: 1.1rem;
    }
}

/* Скрытие элементов, которые не нужны на текстовых страницах */
body.text-page .entry-meta,
body.text-page .entry-footer .post-navigation {
    display: none;
}

/* Анимации */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

body.text-page .entry-content {
    animation: fadeInUp 0.6s ease-out forwards;
}

/* Поддержка reduced motion */
@media (prefers-reduced-motion: reduce) {
    body.text-page .entry-content {
        animation: none;
    }
    
    body.text-page .entry-content .button:hover {
        transform: none;
    }
}

/* Добавляем иконку скачивания для кнопок загрузки */
body.text-page .entry-content a.wp-block-file__button:before {
    content: "⬇ ";
    margin-right: 8px;
    font-size: 1rem;
    display: inline-block;
}

/* Блок файла - отступ сверху */
body.text-page .entry-content .wp-block-file {
    margin-top: 10px;
}

/* Стили для секции breadcrumb */
body.text-page .section-breadcrumb {
    margin-bottom: 30px;
    border-bottom: 1px solid var(--dobro-gray-200);
    background: #fff;
}

/* Убираем точки из списков UL в элементах с классом data-field */
.data-field ul,
.leyka-ddata-field ul,
[class*="data-field"] ul {
    list-style: none;
    padding-left: 0;
    margin-left: 0;
}

.data-field ul li,
.leyka-ddata-field ul li,
[class*="data-field"] ul li {
    list-style: none;
    padding-left: 0;
    margin-left: 0;
}

/* Убираем точки из списков UL в классах types-field и legal-field */
.types-field ul,
.legal-field ul,
[class*="types-field"] ul,
[class*="legal-field"] ul {
    list-style: none !important;
    padding-left: 0 !important;
    margin-left: 0 !important;
}

.types-field ul li,
.legal-field ul li,
[class*="types-field"] ul li,
[class*="legal-field"] ul li {
    list-style: none !important;
    list-style-type: none !important;
    padding-left: 0 !important;
    margin-left: 0 !important;
}

/* Убираем псевдоэлементы которые могут создавать точки */
.types-field ul li:before,
.legal-field ul li:before,
[class*="types-field"] ul li:before,
[class*="legal-field"] ul li:before {
    content: none !important;
    display: none !important;
}

/* Убираем точки из всех списков в формах Leyka */
.leyka-payment-form ul,
.leyka-campaign-form ul,
.leyka-donation-form ul {
    list-style: none;
    padding-left: 0;
    margin-left: 0;
}

.leyka-payment-form ul li,
.leyka-campaign-form ul li,
.leyka-donation-form ul li {
    list-style: none;
    padding-left: 0;
    margin-left: 0;
}

/* Стили для breadcrumb на текстовых страницах */
body.text-page .breadcrumbs li:first-child a {
    font-size: 18px; /* Увеличиваем размер текста */
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px; /* Увеличиваем минимальную ширину */
    height: 24px; /* Увеличиваем высоту */
    color: #6b6969; /* Серый цвет по умолчанию */
}

body.text-page .breadcrumbs li:first-child a svg {
    width: 20px; /* Увеличиваем размер SVG */
    height: 20px; /* Увеличиваем размер SVG */
    fill: currentColor; /* Наследует цвет от родителя */
}

body.text-page .breadcrumbs li:first-child a:hover {
    color: #228B22; /* Зеленый цвет при наведении */
}

body.text-page .breadcrumbs li {
    font-weight: 600;
    font-size: 16px; /* Увеличиваем размер текста для всех элементов breadcrumb */
    color: #6b6969; /* Серый цвет по умолчанию */
}

body.text-page .breadcrumbs li a {
    color: #6b6969; /* Серый цвет для всех ссылок */
    text-decoration: none;
}

body.text-page .breadcrumbs li a:hover {
    color: #228B22; /* Зеленый цвет при наведении */
}

/* Добавляем стрелку-сепаратор между элементами breadcrumb */
body.text-page .breadcrumbs li:not(:last-child)::after {
    content: '→';
    margin: 0 8px;
    color: #6b6969; /* Серый цвет для стрелки */
}

/* Скрытый текст для SEO */
body.text-page .breadcrumbs .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Обновляем селекторы для новой структуры ol вместо ul */
body.text-page .breadcrumbs ol {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 0;
}

body.text-page .breadcrumbs ol li {
    display: flex;
    align-items: center;
    color: #6b6969; /* Серый цвет по умолчанию */
}

body.text-page .breadcrumbs ol li a {
    color: #6b6969; /* Серый цвет для ссылок */
    text-decoration: none;
}

body.text-page .breadcrumbs ol li a:hover {
    color: #228B22; /* Зеленый цвет при наведении */
}
/* Стили для страницы проектов с карточками */

/* Контейнер для сетки проектов - УДАЛЕНО */

/* Колонки Bootstrap */
body.text-page .entry-content .col-md-6,
body.text-page .entry-content .col-lg-4 {
    margin-bottom: 0 !important;
    padding: 0 !important;
}

/* Карточка проекта */
body.text-page .entry-content .card {
    background: #ffffff;
    border: none;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
}

body.text-page .entry-content .card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

/* Изображение карточки */
body.text-page .entry-content .card_img {
    width: 100%;
    height: 280px;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    position: relative;
    overflow: hidden;
}

/* Градиентный оверлей для изображения */
body.text-page .entry-content .card_img::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg,
        rgba(34, 139, 34, 0.1) 0%,
        rgba(220, 20, 60, 0.1) 100%
    );
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

body.text-page .entry-content .card:hover .card_img::before {
    opacity: 1;
}

/* Тело карточки */
body.text-page .entry-content .card-body {
    padding: 30px 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    background: #ffffff;
}

/* Заголовок карточки */
body.text-page .entry-content .card-title {
    font-family: 'Jost', sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    line-height: 1.3;
    margin: 0 0 20px 0;
    color: #535353;
}

body.text-page .entry-content .card-title a {
    color: #535353 !important;
    text-decoration: none !important;
    transition: color 0.3s ease;
    display: block;
}

body.text-page .entry-content .card-title a:hover {
    color: #228B22 !important;
    text-decoration: none !important;
}

/* Текст карточки */
body.text-page .entry-content .card-text {
    flex-grow: 1;
    margin: 0;
}

body.text-page .entry-content .card-text p {
    font-family: 'Jost', sans-serif;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.6;
    color: #535353;
    margin: 0;
    text-align: justify;
}

/* Эффект при наведении на карточку */
body.text-page .entry-content .card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg,
        rgba(34, 139, 34, 0.05) 0%,
        rgba(220, 20, 60, 0.05) 100%
    );
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    border-radius: 20px;
}

body.text-page .entry-content .card:hover::after {
    opacity: 1;
}

/* Адаптивность для планшетов */
@media (max-width: 992px) {
    body.text-page .entry-content .row {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 25px;
    }
    
    body.text-page .entry-content .card_img {
        height: 250px;
    }
    
    body.text-page .entry-content .card-body {
        padding: 25px 20px;
    }
    
    body.text-page .entry-content .card-title {
        font-size: 1.2rem;
    }
}

/* Адаптивность для мобильных */
@media (max-width: 768px) {
    body.text-page .entry-content .row {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    body.text-page .entry-content .card_img {
        height: 220px;
    }
    
    body.text-page .entry-content .card-body {
        padding: 20px 18px;
    }
    
    body.text-page .entry-content .card-title {
        font-size: 1.1rem;
        margin-bottom: 15px;
    }
    
    body.text-page .entry-content .card-text p {
        font-size: 0.95rem;
        text-align: left;
    }
}

/* Адаптивность для маленьких экранов */
@media (max-width: 480px) {
    body.text-page .entry-content .row {
        gap: 15px;
    }
    
    body.text-page .entry-content .card {
        border-radius: 15px;
    }
    
    body.text-page .entry-content .card_img {
        height: 200px;
    }
    
    body.text-page .entry-content .card-body {
        padding: 18px 15px;
    }
    
    body.text-page .entry-content .card-title {
        font-size: 1rem;
        margin-bottom: 12px;
    }
    
    body.text-page .entry-content .card-text p {
        font-size: 0.9rem;
        line-height: 1.5;
    }
}

/* Анимация появления карточек */
.card {
    animation: fadeInUp 0.6s ease-out forwards;
}

/* Задержка анимации для каждой карточки */
body.text-page .entry-content .card:nth-child(1) { animation-delay: 0.1s; }
body.text-page .entry-content .card:nth-child(2) { animation-delay: 0.2s; }
body.text-page .entry-content .card:nth-child(3) { animation-delay: 0.3s; }
body.text-page .entry-content .card:nth-child(4) { animation-delay: 0.4s; }
body.text-page .entry-content .card:nth-child(5) { animation-delay: 0.5s; }
body.text-page .entry-content .card:nth-child(6) { animation-delay: 0.6s; }
body.text-page .entry-content .card:nth-child(7) { animation-delay: 0.7s; }
body.text-page .entry-content .card:nth-child(8) { animation-delay: 0.8s; }
body.text-page .entry-content .card:nth-child(9) { animation-delay: 0.9s; }
body.text-page .entry-content .card:nth-child(n+10) { animation-delay: 1s; }

/* Поддержка reduced motion */
@media (prefers-reduced-motion: reduce) {
    body.text-page .entry-content .card {
        animation: none;
    }
    
    body.text-page .entry-content .card:hover {
        transform: none;
    }
}

/* Улучшенная типографика для карточек */
body.text-page .entry-content .card-title a {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: all 0.3s ease;
}

body.text-page .entry-content .card:hover .card-title a {
    background: linear-gradient(135deg, #228B22 0%, #32CD32 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Фокус для доступности */
body.text-page .entry-content .card-title a:focus {
    outline: 2px solid #228B22;
    outline-offset: 2px;
    border-radius: 4px;
}
/* Стили для single.php - макет с sidebar и article */

/* Основной контейнер для single поста */
body.single-page .single-post-layout {
    display: grid;
    grid-template-columns: 1fr 3fr; /* aside: 25%, article: 75% (как col-3 и col-9) */
    gap: 30px;
    align-items: start;
    /* Убираем overflow: hidden - он может блокировать sticky */
}

/* Sidebar (aside) - левая колонка */
body.single-page .single-post-layout .widget-area.sidebar {
    min-width: 0;
    flex-shrink: 0;
}

/* Article (основной контент) - правая колонка */
body.single-page .single-post-layout article {
    min-width: 0;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

/* Тело статьи (header + thumbnail + content) — визуальное оформление */
body.single-page .single-post-layout .entry-body {
    background: #ffffff;
    border-radius: 15px;
    padding: 40px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    font-family: 'Jost', sans-serif;
}

/* Заголовок поста */
body.single-page .single-post-layout .entry-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
    background: transparent;
    color: inherit;
    text-align: left;
    padding: 0;
    border-radius: 0;
}

body.single-page .single-post-layout .entry-title {
    font-family: 'Jost', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: #2c3e50;
    line-height: 1.2;
    margin: 0 0 20px 0;
    text-shadow: none;
}

/* Мета информация поста */
body.single-page .single-post-layout .entry-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end; /* Позиционируем по правому краю */
    gap: 20px;
    font-family: 'Jost', sans-serif;
    font-size: 0.9rem;
    color: #666666;
    margin-top: 0;
}

body.single-page .single-post-layout .entry-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

body.single-page .single-post-layout .entry-meta a {
    color: #228B22;
    text-decoration: none;
    font-weight: 500;
}

body.single-page .single-post-layout .entry-meta a:hover {
    color: #DC143C;
    text-decoration: underline;
}

/* Миниатюра поста */
body.single-page .single-post-layout .post-thumbnail {
    margin: 30px 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

body.single-page .single-post-layout .post-thumbnail img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

body.single-page .single-post-layout .post-thumbnail:hover img {
    transform: scale(1.02);
}



/* Футер поста */
body.single-page .single-post-layout .entry-footer {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #f0f0f0;
}

/* Навигация между постами */
body.single-page .single-post-layout .post-navigation {
    margin-top: 40px;
}

body.single-page .single-post-layout .post-navigation .nav-links {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    gap: 20px;
}

body.single-page .single-post-layout .nav-links .nav-previous,
body.single-page .single-post-layout .nav-links .nav-next {
    flex: 0 0 auto;
    max-width: 45%;
}

body.single-page .single-post-layout .nav-links .nav-previous {
    text-align: left;
}

body.single-page .single-post-layout .nav-links .nav-next {
    text-align: right;
}

body.single-page .single-post-layout .nav-links a {
    display: block;
    padding: 15px 25px;
    background: transparent;
    border: 2px solid #228B22;
    border-radius: 12px;
    text-decoration: none;
    color: #080808;
    transition: all 0.3s ease;
    font-family: 'Jost', sans-serif;
    min-height: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
}

body.single-page .single-post-layout .nav-links a:hover {
    background: #228B22;
    color: #ffffff;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(34, 139, 34, 0.3);
}

body.single-page .single-post-layout .nav-subtitle {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0;
    opacity: 1;
    text-transform: none;
    letter-spacing: 0;
}

body.single-page .single-post-layout .nav-title {
    display: none; /* Скрываем заголовки, они теперь в тултипах */
}

/* Скрываем заголовок навигации для screen readers */
body.single-page .single-post-layout .post-navigation .screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Если есть только одна кнопка навигации */
body.single-page .single-post-layout .nav-links .nav-previous:only-child,
body.single-page .single-post-layout .nav-links .nav-next:only-child {
    max-width: 45%;
}

body.single-page .single-post-layout .nav-links .nav-previous:only-child {
    margin-right: auto;
}

body.single-page .single-post-layout .nav-links .nav-next:only-child {
    margin-left: auto;
}

/* Адаптивность для планшетов */
@media (max-width: 992px) {
    body.single-page .single-post-layout {
        grid-template-columns: 1fr 2.5fr; /* Немного увеличиваем sidebar на планшетах */
        gap: 30px;
    }
    
    body.single-page .single-post-layout .widget-area.sidebar {
    }
    
    body.single-page .single-post-layout .entry-body {
        padding: 30px;
    }
    
    body.single-page .single-post-layout .entry-title {
        font-size: 2.2rem;
    }
}

/* Адаптивность для мобильных */
@media (max-width: 768px) {
    body.single-page .single-post-layout {
        grid-template-columns: 1fr; /* Одна колонка на мобильных */
        gap: 20px;
    }
    
    body.single-page .single-post-layout .widget-area.sidebar {
        order: 2; /* Sidebar внизу на мобильных */
    }
    
    body.single-page .single-post-layout article {
        order: 1; /* Article вверху на мобильных */
    }
    
    body.single-page .single-post-layout .entry-body {
        padding: 25px;
    }
    
    body.single-page .single-post-layout .entry-title {
        font-size: 1.8rem;
    }
    
    body.single-page .single-post-layout .entry-meta {
        flex-direction: column;
        gap: 10px;
        text-align: right; /* Сохраняем выравнивание по правому краю на мобильных */
    }
    
    body.single-page .single-post-layout .post-navigation .nav-links {
        flex-direction: column;
        gap: 15px;
    }
    
    body.single-page .single-post-layout .nav-links .nav-previous,
    body.single-page .single-post-layout .nav-links .nav-next {
        max-width: 100%;
        text-align: center;
    }
    
    body.single-page .single-post-layout .nav-links a {
        padding: 12px 20px;
        min-height: 50px;
    }
}

/* Адаптивность для маленьких экранов */
@media (max-width: 480px) {
    body.single-page .single-post-layout .widget-area.sidebar {
    }
    
    body.single-page .single-post-layout .entry-body {
        padding: 20px;
        border-radius: 10px;
    }
    
    body.single-page .single-post-layout .entry-title {
        font-size: 1.5rem;
    }
    
    body.single-page .single-post-layout .nav-links a {
        padding: 15px 18px;
        min-height: 60px;
    }
    
    body.single-page .single-post-layout .nav-subtitle {
        font-size: 0.9rem;
        margin-bottom: 0;
    }
    
    body.single-page .single-post-layout .nav-title {
        display: none; /* Скрываем заголовки на мобильных */
    }
}

/* Стили для комментариев */
body.single-page .single-post-layout .comments-area {
    margin-top: 40px;
    padding: 30px;
    background: #f8f9fa;
    border-radius: 15px;
    grid-column: 1 / -1; /* Комментарии на всю ширину */
}

@media (max-width: 768px) {
    body.single-page .single-post-layout .comments-area {
        padding: 20px;
        margin-top: 20px;
    }
}

/* ===== СТИЛИ ДЛЯ SINGLE.PHP (ПОСТЫ) ===== */

/* Кнопки файлов, email и телефон в постах */
body.single-page .entry-content a[href*="mailto:"],
body.single-page .entry-content a[href*="tel:"],
body.single-page .entry-content a.wp-block-file__button {
    background: #228B22 !important;
    color: #ffffff !important;
    padding: 8px 16px !important;
    border: none !important;
    border-radius: 6px !important;
    text-decoration: none !important;
    font-weight: 500 !important;
    display: inline-block !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
    margin: 4px 8px !important;
    font-size: 14px !important;
    line-height: 1.4 !important;
}

body.single-page .entry-content a[href*="mailto:"]:hover,
body.single-page .entry-content a[href*="tel:"]:hover,
body.single-page .entry-content a.wp-block-file__button:hover {
    background: #1e7a1e !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2) !important;
    color: #ffffff !important;
}

/* Добавляем иконку скачивания для кнопок загрузки в постах */
body.single-page .entry-content a.wp-block-file__button:before {
    content: "⬇ ";
    margin-right: 8px;
}

/* Блок файла - отступ сверху в постах */
body.single-page .entry-content .wp-block-file {
    margin-top: 10px;
}

/* Ссылки с классом download-link в постах - обычный зелёный текст */
body.single-page .entry-content a.download-link:not(.wp-block-file__button) {
    background: none !important;
    padding: 0 !important;
    border-radius: 0 !important;
    min-width: auto !important;
    box-shadow: none !important;
    display: inline !important;
    color: #228B22 !important;
    font-size: 1.2rem !important;
    font-weight: 500 !important;
    text-decoration: none !important;
    transition: color 0.2s ease !important;
    border: none !important;
}

body.single-page .entry-content a.download-link:not(.wp-block-file__button):hover {
    color: #DC143C !important;
    text-decoration: underline !important;
    transform: none !important;
    box-shadow: none !important;
    background: none !important;
}

/* Обычные текстовые ссылки в постах */
body.single-page .entry-content a[href]:not([href*="mailto:"]):not([href*="tel:"]):not([class*="btn"]):not(.wp-block-button__link):not(.wp-block-file__button):not(.download-link):not(.swiper-arrow):not(.depth-button):not(.depth-button--light):not(.clip-trigger) {
    background: none !important;
    padding: 0 !important;
    border-radius: 0 !important;
    min-width: auto !important;
    box-shadow: none !important;
    display: inline !important;
    color: #228B22 !important;
    font-size: 1.2rem !important;
    font-weight: 500 !important;
    text-decoration: none !important;
    transition: color 0.2s ease !important;
}

body.single-page .entry-content a[href]:not([href*="mailto:"]):not([href*="tel:"]):not([class*="btn"]):not(.wp-block-button__link):not(.wp-block-file__button):not(.download-link):not(.swiper-arrow):not(.depth-button):not(.depth-button--light):not(.clip-trigger):hover {
    color: #DC143C !important;
    text-decoration: underline !important;
    transform: none !important;
    box-shadow: none !important;
}

/* ===== СТИЛИ ДЛЯ ХЛЕБНЫХ КРОШЕК В SINGLE.PHP ===== */

body.single-page .site-main {
    background: #f8f9fa;
    padding: 0;
}

/* Стили для секции breadcrumb - как на text-page */
body.single-page .section-breadcrumb {
    margin-bottom: 30px;
    border-bottom: 1px solid var(--dobro-gray-200);
    background: #fff;
}

/* Стили для breadcrumb на single страницах - как на text-page */
body.single-page .breadcrumbs li:first-child a {
    font-size: 18px; /* Увеличиваем размер текста */
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px; /* Увеличиваем минимальную ширину */
    height: 24px; /* Увеличиваем высоту */
    color: #6b6969; /* Серый цвет по умолчанию */
}

body.single-page .breadcrumbs li:first-child a svg {
    width: 20px; /* Увеличиваем размер SVG */
    height: 20px; /* Увеличиваем размер SVG */
    fill: currentColor; /* Наследует цвет от родителя */
}

body.single-page .breadcrumbs li:first-child a:hover {
    color: #228B22; /* Зеленый цвет при наведении */
}

body.single-page .breadcrumbs li {
    font-weight: 600;
    font-size: 16px; /* Увеличиваем размер текста для всех элементов breadcrumb */
    color: #6b6969; /* Серый цвет по умолчанию */
}

body.single-page .breadcrumbs li a {
    color: #6b6969; /* Серый цвет для всех ссылок */
    text-decoration: none;
}

body.single-page .breadcrumbs li a:hover {
    color: #228B22; /* Зеленый цвет при наведении */
}

/* Добавляем стрелку-сепаратор между элементами breadcrumb */
body.single-page .breadcrumbs li:not(:last-child)::after {
    content: '→';
    margin: 0 8px;
    color: #6b6969; /* Серый цвет для стрелки */
}

/* Скрытый текст для SEO */
body.single-page .breadcrumbs .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Обновляем селекторы для новой структуры ol вместо ul */
body.single-page .breadcrumbs ol {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 0;
}

body.single-page .breadcrumbs ol li {
    display: flex;
    align-items: center;
    color: #6b6969; /* Серый цвет по умолчанию */
}

body.single-page .breadcrumbs ol li a {
    color: #6b6969; /* Серый цвет для ссылок */
    text-decoration: none;
}

body.single-page .breadcrumbs ol li a:hover {
    color: #228B22; /* Зеленый цвет при наведении */
}
/* ===== СТИЛИ ДЛЯ СЕКЦИИ CONTENT В SINGLE.PHP ===== */

/* Секция content - как на text-page */
body.single-page .content {
    padding: 0;
}

body.single-page .content .container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Обновляем стили для single-post-layout чтобы контент был как на text-page */
body.single-page .single-post-layout article .entry-content {
    background: transparent; /* Убираем фон, так как он теперь у article */
    border-radius: 0;
    padding: 0; /* Убираем padding, так как он теперь у article */
    box-shadow: none; /* Убираем тень, так как она теперь у article */
    margin-bottom: 0;
    font-family: 'Jost', sans-serif;
    line-height: 1.6;
    overflow-wrap: break-word; /* Переносит длинные слова */
    word-wrap: break-word; /* Поддержка старых браузеров */
}

/* Ограничения для всех элементов внутри entry-body */
body.single-page .single-post-layout .entry-body * {
    max-width: 100%;
    box-sizing: border-box;
}

/* Специальные ограничения для изображений */
body.single-page .single-post-layout .entry-body img {
    max-width: 100% !important;
    height: auto !important;
    width: auto !important;
}

/* Ограничения для таблиц */
body.single-page .single-post-layout .entry-body table {
    max-width: 100%;
    table-layout: fixed;
    word-wrap: break-word;
}

/* Ограничения для pre и code блоков */
body.single-page .single-post-layout .entry-body pre,
body.single-page .single-post-layout .entry-body code {
    max-width: 100%;
    overflow-x: auto;
    word-wrap: break-word;
    white-space: pre-wrap;
}
/* ===== НАСЛЕДОВАНИЕ СТИЛЕЙ ОТ TEXT-PAGE ДЛЯ SINGLE-PAGE ===== */

/* Применяем стили text-page к single-page для изображений */
body.single-page .entry-content img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin: 20px auto;
    display: block;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

body.single-page .entry-content img:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

body.single-page .entry-content figure {
    margin: 30px auto;
    text-align: center;
    max-width: 100%;
}

body.single-page .entry-content figure img {
    margin: 0 auto 15px auto;
}

body.single-page .entry-content figcaption {
    font-family: 'Jost', sans-serif;
    font-size: 0.9rem;
    font-style: italic;
    color: #535353;
    text-align: center;
    margin-top: 10px;
    padding: 0 20px;
}

body.single-page .entry-content .wp-block-image {
    text-align: center;
    margin: 30px auto;
}

body.single-page .entry-content .wp-block-image img {
    margin: 0 auto;
}

body.single-page .entry-content .wp-block-gallery {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin: 30px auto;
}

body.single-page .entry-content .wp-block-gallery .wp-block-image {
    margin: 0;
    flex: 0 0 auto;
}

body.single-page .entry-content .aligncenter {
    display: block;
    margin: 25px auto;
    text-align: center;
}

body.single-page .entry-content .alignleft {
    float: left;
    margin: 10px 20px 20px 0;
}

body.single-page .entry-content .alignright {
    float: right;
    margin: 10px 0 20px 20px;
}

body.single-page .entry-content .alignleft + *,
body.single-page .entry-content .alignright + * {
    clear: both;
}

/* ===== СТИЛИ ДЛЯ СТРАНИЦ КАТЕГОРИЙ ===== */

/* Описание категории */
body.text-page .category-description {
    font-size: 1.2rem;
    font-weight: 400;
    margin-top: 20px;
    opacity: 0.9;
    line-height: 1.5;
}

/* Сетка постов категории */
.category-posts-grid {
    margin-bottom: 40px;
}

/* Ряды постов категории - все по 3 карточки */
.news-feed-row--category {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 30px;
}

/* Карточки постов категории */
.category-post-card {
    background: #ffffff;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.category-post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Блок "Ничего не найдено" */
.no-posts-found {
    text-align: center;
    padding: 60px 20px;
    background: #ffffff;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin: 40px 0;
}

.no-posts-found h2 {
    font-family: 'Jost', sans-serif;
    font-size: 2rem;
    font-weight: 600;
    color: #000000;
    margin: 0 0 20px 0;
}

.no-posts-found p {
    font-family: 'Jost', sans-serif;
    font-size: 1.1rem;
    color: #666666;
    margin: 0 0 30px 0;
    line-height: 1.5;
}

.back-to-home {
    display: inline-block;
    padding: 15px 30px;
    background: #228B22;
    color: #ffffff;
    text-decoration: none;
    border-radius: 8px;
    font-family: 'Jost', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.back-to-home:hover {
    background: #1e7a1e;
    color: #ffffff;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(34, 139, 34, 0.3);
}

/* Пагинация */
body.text-page .pagination {
    text-align: center;
    margin: 40px 0;
    display: flex;
    justify-content: center;
}

body.text-page .nav-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    max-width: 1000px;
    margin: 0 auto;
}

body.text-page .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 8px 12px;
    margin: 0 2px;
    background: #ffffff;
    color: #000000;
    text-decoration: none;
    border-radius: 6px;
    font-family: 'Jost', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid #e0e0e0;
    transition: all 0.3s ease;
    line-height: 1;
}

body.text-page .page-numbers:hover,
body.text-page .page-numbers.current {
    background: #228B22;
    color: #ffffff;
    border-color: #228B22;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(34, 139, 34, 0.2);
}

body.text-page .page-numbers.prev,
body.text-page .page-numbers.next {
    font-weight: 600;
    padding: 8px 16px;
    min-width: auto;
}

body.text-page .page-numbers.dots {
    border: none;
    background: transparent;
    color: #999999;
    cursor: default;
}

body.text-page .page-numbers.dots:hover {
    background: transparent;
    color: #999999;
    transform: none;
    box-shadow: none;
}

/* Адаптивность для страниц категорий */
@media (max-width: 992px) {
    .news-feed-row--category {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    body.text-page .category-description {
        font-size: 1.1rem;
    }
}

@media (max-width: 768px) {
    .news-feed-row--category {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    body.text-page .entry-header {
        padding: 40px 0;
    }
    
    body.text-page .entry-title {
        font-size: 2.5rem;
    }
    
    body.text-page .category-description {
        font-size: 1rem;
        margin-top: 15px;
    }
    
    .no-posts-found {
        padding: 40px 20px;
        margin: 20px 0;
    }
    
    .no-posts-found h2 {
        font-size: 1.5rem;
    }
    
    .no-posts-found p {
        font-size: 1rem;
    }
    
    .back-to-home {
        padding: 12px 25px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    body.text-page .entry-header {
        padding: 30px 0;
    }
    
    body.text-page .entry-title {
        font-size: 2rem;
    }
    
    body.text-page .category-description {
        font-size: 0.95rem;
    }
    
    .news-feed-row--category {
        gap: 15px;
        margin-bottom: 20px;
    }
    
    .no-posts-found {
        padding: 30px 15px;
    }
    
    body.text-page .nav-links {
        gap: 3px;
        max-width: 100%;
        flex-wrap: wrap;
    }
    
    body.text-page .page-numbers {
        min-width: 35px;
        height: 35px;
        padding: 6px 10px;
        margin: 0 1px;
        font-size: 0.85rem;
    }
    
    body.text-page .page-numbers.prev,
    body.text-page .page-numbers.next {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
}

/* Анимации для карточек категорий */
.category-post-card {
    animation: fadeInUp 0.6s ease forwards;
}

.category-post-card:nth-child(1) { animation-delay: 0.1s; }
.category-post-card:nth-child(2) { animation-delay: 0.2s; }
.category-post-card:nth-child(3) { animation-delay: 0.3s; }

/* Поддержка уменьшенной анимации */
@media (prefers-reduced-motion: reduce) {
    .category-post-card {
        animation: none;
    }
    
    .category-post-card:hover {
        transform: none;
    }
}
/* ===== СТИЛИ ДЛЯ СТРАНИЦЫ КОНТАКТОВ ===== */

/* Стилизация связки P + UL как табличка */
body.text-page .entry-content p + ul {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 0;
    margin: 10px 0 30px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

/* Заголовок таблички (P перед UL) */
body.text-page .entry-content p:has(+ ul) {
    background: linear-gradient(135deg, #228B22 0%, #32CD32 100%);
    color: #ffffff;
    font-weight: 600;
    font-size: 1.1rem;
    padding: 15px 20px;
    margin: 30px 0 0 0;
    border-radius: 12px 12px 0 0;
    border: 1px solid #228B22;
    border-bottom: none;
}

/* Список как тело таблички */
body.text-page .entry-content p + ul {
    list-style: none;
    padding: 0;
    margin: 0;
    border-top: none;
    border-radius: 0 0 12px 12px;
}

/* Элементы списка как строки таблички */
body.text-page .entry-content p + ul li {
    padding: 12px 20px;
    border-bottom: 1px solid #f0f2f5;
    font-size: 1rem;
    line-height: 1.5;
    color: #374151;
    transition: background-color 0.2s ease;
    margin-bottom: 0; /* Убираем margin-bottom */
}

/* Убираем границу у последнего элемента */
body.text-page .entry-content p + ul li:last-child {
    border-bottom: none;
}

/* Ховер эффект для строк */
body.text-page .entry-content p + ul li:hover {
    background-color: #f8f9fa;
}

/* Альтернативная окраска строк (зебра) */
body.text-page .entry-content p + ul li:nth-child(even) {
    background-color: #fafbfc;
}

body.text-page .entry-content p + ul li:nth-child(even):hover {
    background-color: #f0f2f5;
}

/* Fallback для браузеров без поддержки :has() */
@supports not selector(:has(*)) {
    /* Используем класс для заголовков табличек */
    body.text-page .entry-content p.table-header {
        background: linear-gradient(135deg, #228B22 0%, #32CD32 100%);
        color: #ffffff;
        font-weight: 600;
        font-size: 1.1rem;
        padding: 15px 20px;
        margin: 30px 0 0 0;
        border-radius: 12px 12px 0 0;
        border: 1px solid #228B22;
        border-bottom: none;
    }
    
    body.text-page .entry-content p.table-header + ul {
        border-top: none;
        border-radius: 0 0 12px 12px;
    }
}

/* Адаптивность для мобильных */
@media (max-width: 768px) {
    body.text-page .entry-content p:has(+ ul),
    body.text-page .entry-content p.table-header {
        font-size: 1rem;
        padding: 12px 15px;
    }
    
    body.text-page .entry-content p + ul li {
        padding: 10px 15px;
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    body.text-page .entry-content p:has(+ ul),
    body.text-page .entry-content p.table-header {
        padding: 10px 12px;
        font-size: 0.95rem;
    }
    
    body.text-page .entry-content p + ul li {
        padding: 8px 12px;
        font-size: 0.9rem;
    }
}

/* ===== СТИЛИ ДЛЯ СТРАНИЦЫ ПОИСКА ===== */

/* Контейнер формы поиска */
.search-form-container {
    margin: 30px 0;
    text-align: center;
}

/* Форма поиска - только для страниц поиска, не для модального окна */
body.text-page .search-form:not(.search-modal .search-form) {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    max-width: 500px;
    margin: 0 auto;
}

body.text-page .search-form:not(.search-modal .search-form) input[type="search"] {
    flex: 1;
    padding: 12px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-family: 'Jost', sans-serif;
    font-size: 1rem;
    background: #ffffff;
    transition: border-color 0.3s ease;
}

body.text-page .search-form:not(.search-modal .search-form) input[type="search"]:focus {
    outline: none;
    border-color: #228B22;
    box-shadow: 0 0 0 3px rgba(34, 139, 34, 0.1);
}

body.text-page .search-form:not(.search-modal .search-form) input[type="submit"] {
    padding: 12px 25px;
    background: #228B22;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-family: 'Jost', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

body.text-page .search-form:not(.search-modal .search-form) input[type="submit"]:hover {
    background: #1e7a1e;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(34, 139, 34, 0.3);
}

/* Адаптивность для формы поиска */
@media (max-width: 480px) {
    body.text-page .search-form:not(.search-modal .search-form) {
        flex-direction: column;
        gap: 15px;
    }
    
    body.text-page .search-form:not(.search-modal .search-form) input[type="search"] {
        width: 100%;
    }
    
    body.text-page .search-form:not(.search-modal .search-form) input[type="submit"] {
        width: 100%;
        padding: 15px 25px;
    }
}
/* ===== ДОПОЛНИТЕЛЬНЫЕ СТИЛИ ДЛЯ ПАГИНАЦИИ ===== */

/* Контейнер пагинации WordPress */
body.text-page .posts-pagination {
    text-align: center;
    margin: 40px 0;
    display: flex;
    justify-content: center;
}

/* Альтернативные классы пагинации */
body.text-page .pagination-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    max-width: 1000px;
    margin: 0 auto;
}

/* Стили для старых версий пагинации */
body.text-page .wp-pagenavi {
    text-align: center;
    margin: 40px 0;
}

body.text-page .wp-pagenavi a,
body.text-page .wp-pagenavi span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 8px 12px;
    margin: 0 2px;
    background: #ffffff;
    color: #000000;
    text-decoration: none;
    border-radius: 6px;
    font-family: 'Jost', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid #e0e0e0;
    transition: all 0.3s ease;
    line-height: 1;
}

body.text-page .wp-pagenavi a:hover,
body.text-page .wp-pagenavi .current {
    background: #228B22;
    color: #ffffff;
    border-color: #228B22;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(34, 139, 34, 0.2);
}

/* Компактная пагинация для мобильных */
@media (max-width: 480px) {
    body.text-page .nav-links,
    body.text-page .pagination-links {
        max-width: 100%;
        overflow-x: auto;
        padding: 0 10px;
        justify-content: flex-start;
        -webkit-overflow-scrolling: touch;
    }
    
    body.text-page .nav-links::-webkit-scrollbar,
    body.text-page .pagination-links::-webkit-scrollbar {
        height: 3px;
    }
    
    body.text-page .nav-links::-webkit-scrollbar-track,
    body.text-page .pagination-links::-webkit-scrollbar-track {
        background: #f1f1f1;
        border-radius: 3px;
    }
    
    body.text-page .nav-links::-webkit-scrollbar-thumb,
    body.text-page .pagination-links::-webkit-scrollbar-thumb {
        background: #228B22;
        border-radius: 3px;
    }
    
    /* Скрываем многоточия на очень маленьких экранах */
    body.text-page .page-numbers.dots {
        display: none;
    }
}

/* Стили для активной страницы */
body.text-page .page-numbers.current,
body.text-page .current {
    background: #228B22 !important;
    color: #ffffff !important;
    border-color: #228B22 !important;
    font-weight: 600;
    cursor: default;
}

/* Стили для недоступных кнопок */
body.text-page .page-numbers.disabled {
    background: #f5f5f5;
    color: #cccccc;
    border-color: #e0e0e0;
    cursor: not-allowed;
}

body.text-page .page-numbers.disabled:hover {
    background: #f5f5f5;
    color: #cccccc;
    transform: none;
    box-shadow: none;
}
/* ===== СТИЛИ ДЛЯ КАРТОЧЕК КОМАНДЫ ===== */

/* Контейнер для карточек команды */
.content_box #dle-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin: 40px 0;
}

/* Обертка карточки команды */
.item_news-wrap {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Карточка команды */
.item_news {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #ffffff;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    padding: 0;
}

.item_news:hover {
    border-color: #228B22;
    transform: translateY(-3px);
    text-decoration: none;
    color: inherit;
}

/* Контейнер изображения */
.team__img {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 300px;
    overflow: hidden;
    position: relative;
    background: #f5f5f5;
}

.team__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease;
}

.item_news:hover .team__img img {
    transform: scale(1.05);
}

/* Текстовый контент */
.text_news {
    display: block;
    font-family: 'Jost', sans-serif;
    font-size: 1.3rem;
    font-weight: 600;
    color: #000000;
    padding: 20px 20px 10px 20px;
    line-height: 1.3;
    text-align: center;
}

/* Нижняя часть карточки */
.article__bottom {
    display: block;
    padding: 0 20px 20px 20px;
    margin-top: auto;
}

.article__date {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.date {
    font-family: 'Jost', sans-serif;
    font-size: 0.9rem;
    font-weight: 400;
    color: #666666;
    line-height: 1.4;
    text-align: center;
}

/* Адаптивность для карточек команды */
@media (max-width: 992px) {
    .content_box #dle-content {
        grid-template-columns: repeat(3, 1fr);
        gap: 25px;
    }
    
    .team__img {
        height: 280px;
    }
    
    .text_news {
        font-size: 1.2rem;
        padding: 18px 18px 8px 18px;
    }
    
    .article__bottom {
        padding: 0 18px 18px 18px;
    }
    
    .date {
        font-size: 0.85rem;
    }
}

@media (max-width: 768px) {
    .content_box #dle-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        margin: 30px 0;
    }
    
    .team__img {
        height: 250px;
    }
    
    .text_news {
        font-size: 1.1rem;
        padding: 15px 15px 8px 15px;
    }
    
    .article__bottom {
        padding: 0 15px 15px 15px;
    }
    
    .date {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .content_box #dle-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .team__img {
        height: 300px;
    }
    
    .text_news {
        font-size: 1.2rem;
        padding: 20px 20px 10px 20px;
    }
    
    .article__bottom {
        padding: 0 20px 20px 20px;
    }
    
    .date {
        font-size: 0.9rem;
    }
}

/* Анимации для карточек команды */
.item_news-wrap {
    animation: fadeInUp 0.6s ease forwards;
}

.item_news-wrap:nth-child(1) { animation-delay: 0.1s; }
.item_news-wrap:nth-child(2) { animation-delay: 0.2s; }
.item_news-wrap:nth-child(3) { animation-delay: 0.3s; }
.item_news-wrap:nth-child(4) { animation-delay: 0.4s; }
.item_news-wrap:nth-child(5) { animation-delay: 0.5s; }
.item_news-wrap:nth-child(6) { animation-delay: 0.6s; }

/* Поддержка уменьшенной анимации */
@media (prefers-reduced-motion: reduce) {
    .item_news-wrap {
        animation: none;
    }
    
    .item_news:hover {
        transform: none;
    }
    
    .item_news:hover .team__img img {
        transform: none;
    }
}

/* Убираем лишние отступы и переносы строк */
.item_news br {
    display: none;
}

/* Стили для случая, когда нет ссылки */
.item_news-wrap a.item_news:not([href]) {
    cursor: default;
}

.item_news-wrap a.item_news:not([href]):hover {
    border-color: #e0e0e0;
    transform: none;
}
/* Убираем верхний отступ у изображений в карточках команды */
.item_news-wrap img {
    margin-top: 0 !important;
}
/* ===== УСЛОВНОЕ ОТКЛЮЧЕНИЕ СТИЛЕЙ ENTRY-CONTENT ===== */

/* Убираем стили у entry-content, если внутри есть projects-grid */
.entry-content:has(.projects-grid) {
    /* Сбрасываем все основные стили */
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    
    /* Убираем типографику */
    font-size: inherit !important;
    line-height: inherit !important;
    color: inherit !important;
    
    /* Убираем отступы для дочерних элементов */
    > * {
        margin: 0 !important;
    }
    
    /* Убираем стили для параграфов и заголовков */
    p, h1, h2, h3, h4, h5, h6 {
        margin: 0 !important;
        padding: 0 !important;
    }
}

/* Также убираем стили для других возможных сеток */
.entry-content:has(.news-feed-grid),
.entry-content:has(.category-posts-grid),
.entry-content:has(.content_box) {
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
}

/* Fallback для браузеров без поддержки :has() */
@supports not selector(:has(*)) {
    /* Создаем специальный класс для отключения стилей */
    .entry-content.no-styles {
        padding: 0 !important;
        margin: 0 !important;
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
        border-radius: 0 !important;
    }
    
    .entry-content.no-styles > * {
        margin: 0 !important;
    }
    
    .entry-content.no-styles p,
    .entry-content.no-styles h1,
    .entry-content.no-styles h2,
    .entry-content.no-styles h3,
    .entry-content.no-styles h4,
    .entry-content.no-styles h5,
    .entry-content.no-styles h6 {
        margin: 0 !important;
        padding: 0 !important;
    }
}y-content.no-styles {
        padding: 0 !important;
        margin: 0 !important;
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
        border-radius: 0 !important;
    }
    
    .entry-content.no-styles > * {
        margin: 0 !important;
    }
    
    .entry-content.no-styles p,
    .entry-content.no-styles h1,
    .entry-content.no-styles h2,
    .entry-content.no-styles h3,
    .entry-content.no-styles h4,
    .entry-content.no-styles h5,
    .entry-content.no-styles h6 {
        margin: 0 !important;
        padding: 0 !important;
    }


/* Стили для page.php и category.php - макет с sidebar */

/* Основной контейнер для страниц с sidebar - только внутри секции content */
body.text-page .content .page-post-layout {
    display: grid;
    grid-template-columns: 1fr 3fr; /* aside: 25%, content: 75% */
    gap: 30px;
    align-items: start;
}

/* Sidebar (aside) - левая колонка для page.php и category.php - только внутри page-post-layout */
body.text-page .page-post-layout .widget-area.sidebar {
    order: 1; /* Sidebar слева */
}

/* Дополнительный селектор для надежности */
body.text-page .sidebar,
body.text-page aside.sidebar {
}

/* Дополнительные селекторы для single.php */
body.single-page .sidebar,
body.single-page aside.sidebar {
}

/* Контент - правая колонка для page.php и category.php - только внутри page-post-layout */
body.text-page .page-post-layout .page-content-wrapper,
body.text-page .page-post-layout .category-content-wrapper {
    order: 2; /* Контент справа */
}

/* Адаптивность для планшетов */
@media (max-width: 992px) {
    body.text-page .content .page-post-layout {
        grid-template-columns: 1fr 2.5fr; /* Немного увеличиваем sidebar на планшетах */
        gap: 30px;
    }
    
    body.text-page .page-post-layout .widget-area.sidebar {
    }
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    body.text-page .content .page-post-layout {
        grid-template-columns: 1fr; /* Одна колонка на мобильных */
        gap: 20px;
    }
    
    body.text-page .page-post-layout .widget-area.sidebar {
        order: 2; /* Sidebar внизу на мобильных */
    }
    
    body.text-page .page-post-layout .page-content-wrapper,
    body.text-page .page-post-layout .category-content-wrapper {
        order: 1; /* Контент сверху на мобильных */
    }
}

/* Адаптивность для маленьких экранов */
@media (max-width: 480px) {
    body.text-page .page-post-layout .widget-area.sidebar {
    }
}


/* Исправление для изображений с фиксированными размерами ТОЛЬКО в .post-thumbnail */
body.text-page .page-content-wrapper .post-thumbnail img[width],
body.text-page .page-content-wrapper .post-thumbnail img[height],
body.single-page .page-content-wrapper .post-thumbnail img[width],
body.single-page .page-content-wrapper .post-thumbnail img[height] {
    width: auto !important;
    max-width: 100% !important;
    height: auto !important;
}


/* Убираем padding на мобильных */
@media (max-width: 768px) {
    body.text-page .entry-content {
        padding: 20px !important;
    }
}


       /* Блок миникарточек - 3 в ряд на десктопе */
        .mini-cards-block {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 24px;
            margin: 40px 0;
        }

        .mini-card {
            background: #fff;
            border: 1px solid #e0e0e0;
            border-radius: 8px;
            overflow: hidden;
            transition: transform 0.3s ease, box-shadow 0.3s ease;
            display: flex;
            flex-direction: column;
            position: relative;
        }

        .mini-card:hover {
            transform: translateY(-4px);
            box-shadow: 0 4px 20px rgba(0,0,0,0.15);
        }

        /* Изображение фиксированной высоты с сохранением закруглений */
        body.text-page .entry-content .mini-card-image {
            width: 100%;
            height: 300px;
            overflow: hidden;
            background: #f0f0f0;
            border-radius: 8px 8px 0 0;
            position: relative;
        }

        body.text-page .entry-content .mini-card-image img {
            width: 100%;
            height: 100%;
            margin: 0 !important;
            object-fit: cover;
            object-position: center top;
            transition: transform 0.3s ease;
            display: block;
        }

        .mini-card:hover .mini-card-image img {
            transform: scale(1.05);
        }

        .mini-card-content {
            padding: 16px;
            flex: 1;
            display: flex;
            flex-direction: column;
            position: relative;
        }

        /* Ссылка с псевдоэлементом на всю карточку */
        .mini-card-link {
            font-size: 16px;
            font-weight: 600;
            color: #0073aa;
            text-decoration: none;
            margin-bottom: 8px;
            display: inline-block;
            transition: color 0.3s ease;
            position: relative;
            z-index: 2;
        }

        /* Псевдоэлемент растягивается на всю карточку */
        .mini-card-link::before {
            content: '';
            position: absolute;
            top: -16px;
            left: -16px;
            right: -16px;
            bottom: -16px;
            z-index: -1;
        }

        .mini-card-link::after {
            content: '';
            position: absolute;
            top: calc(-280px - 16px);
            left: -16px;
            right: -16px;
            bottom: -16px;
            z-index: 1;
        }

        .mini-card-description {
            font-size: 14px;
            color: #666;
            line-height: 1.5;
            flex: 1;
        }

        /* Планшеты - 2 в ряд */
        @media (max-width: 1024px) and (min-width: 769px) {
            .mini-cards-block {
                grid-template-columns: repeat(2, 1fr);
                gap: 20px;
            }

            .mini-card-image {
                height: 300px;
            }

            .mini-card-link::after {
                top: calc(-300px - 16px);
            }
        }

        /* Планшеты маленькие - 2 в ряд */
        @media (max-width: 768px) and (min-width: 481px) {

            .mini-cards-block {
                grid-template-columns: repeat(2, 1fr);
                gap: 16px;
            }

            .mini-card-image {
                height: 260px;
            }

            .mini-card-link::after {
                top: calc(-260px - 16px);
            }
        }

        /* Мобильные - 1 в ряд, без ограничения высоты */
        @media (max-width: 480px) {

            .mini-cards-block {
                grid-template-columns: 1fr;
                gap: 16px;
            }

            .mini-card-image {
                height: auto;
                min-height: 280px;
            }

            .mini-card-image img {
                height: auto;
                min-height: 280px;
            }
             .entry-content a {
                display: block !important;
             }
            /* На мобильных пересчитываем позицию псевдоэлемента */
            .mini-card-link::after {
                top: -16px;
            }

            .mini-card-content {
                padding: 14px;
            }

            .mini-card-link {
                font-size: 15px;
            }

            .mini-card-description {
                font-size: 13px;
            }
        }


/* Страница без сайдбара */
body.no-sidebar .single-post-layout {
    grid-template-columns: 1fr !important;
}
body.no-sidebar .single-post-layout article {
    max-width: 900px;
    margin: 0 auto;
}


/* Страница без сайдбара (page.php) */
body.no-sidebar .page-post-layout {
    grid-template-columns: 1fr !important;
}
body.no-sidebar .page-post-layout .page-content-wrapper {
    max-width: 900px;
    margin: 0 auto;
    width: 100%;
}

/* ===== Кнопка "Редактировать" для администратора ===== */
.post-edit-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #228B22 0%, #2ea82e 100%);
    color: #ffffff !important;
    text-decoration: none !important;
    border-radius: 8px;
    font-family: 'Jost', sans-serif;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.5px;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    margin-top: 20px;
}

.post-edit-link:hover {
    background: transparent;
    color: #228B22 !important;
    border-color: #228B22;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(34, 139, 34, 0.25);
    text-decoration: none !important;
}

.post-edit-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
    pointer-events: none;
}

.post-edit-link:hover::before {
    left: 100%;
}

.entry-footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

/* ===== Блок «Последние новости» после статьи ===== */
.related-news-section {
    padding: 30px 0 0;
}

.related-news__title {
    font-family: 'Jost', sans-serif;
    font-size: 1.4rem;
    font-weight: 600;
    color: #2c3e50;
    text-align: center;
    margin: 0 0 20px;
}

.related-news-section .news-feed-row--category {
    gap: 20px;
}

/* Footer внутри article — без внутреннего оформления */
body.single-page .single-post-layout .entry-footer {
    margin-top: 30px;
    border-top: none;
    padding-top: 0;
}

/* ===== Центрирование iframe в контенте ===== */
.entry-content iframe {
    display: block;
    margin-left: auto;
    margin-right: auto;
    max-width: 100%;
}

.entry-content .wp-block-embed,
.entry-content figure.wp-block-embed {
    display: flex;
    justify-content: center;
}

.entry-content .wp-block-embed__wrapper {
    width: 100%;
    max-width: 100%;
}

/* Скрываем стрелки swiper — после правил текстовых ссылок */
body.text-page .entry-content a.swiper-arrow[href]:not([href*="mailto:"]):not([href*="tel:"]):not([class*="btn"]):not(.wp-block-button__link):not(.wp-block-file__button):not(.download-link),
body.text-page .entry-content .leyka-tpl-star-form a.swiper-arrow,
body.text-page .entry-content .leyka-screen-form a.swiper-arrow,
body.single-page .entry-content a.swiper-arrow[href]:not([href*="mailto:"]):not([href*="tel:"]):not([class*="btn"]):not(.wp-block-button__link):not(.wp-block-file__button):not(.download-link) {
    display: none !important;
}

/* Leyka: оверлеи вне entry-content, скрыты до открытия */
body.text-page .entry-content:has(.leyka-tpl-star-form),
body.text-page .entry-content:has(.leyka-screen-form),
body.text-page .entry-content:has([id^="leyka-pf-"]),
body.single-page .entry-content:has(.leyka-tpl-star-form),
body.single-page .entry-content:has(.leyka-screen-form),
body.single-page .entry-content:has([id^="leyka-pf-"]) {
    overflow: visible !important;
    transform: none !important;
}

body.text-page .page-content-wrapper:has(.leyka-tpl-star-form),
body.text-page .page-content-wrapper:has([id^="leyka-pf-"]),
body.single-page .page-content-wrapper:has(.leyka-tpl-star-form),
body.single-page .page-content-wrapper:has([id^="leyka-pf-"]) {
    overflow: visible !important;
}

.leyka-pf__overlay,
.leyka-pf__agreement {
    max-width: none !important;
    box-sizing: border-box !important;
}

.leyka-pf__overlay {
    display: none !important;
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    max-width: none !important;
    max-height: none !important;
    margin: 0 !important;
    z-index: 99990 !important;
    background: rgba(0, 0, 0, 0.45);
}

.leyka-pf__overlay.is-visible,
.leyka-pf--oferta-open .leyka-pf__overlay,
.leyka-pf--pd-open .leyka-pf__overlay {
    display: block !important;
}

.leyka-pf__agreement {
    display: none !important;
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    right: auto !important;
    bottom: auto !important;
    transform: translate(-50%, -50%) !important;
    width: min(640px, calc(100vw - 32px)) !important;
    max-width: none !important;
    max-height: min(80vh, calc(100vh - 32px)) !important;
    margin: 0 !important;
    padding: 44px 20px 20px !important;
    overflow: hidden !important;
    z-index: 99991 !important;
    background: #fff !important;
    border-radius: 8px !important;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25) !important;
    flex-direction: column !important;
    align-items: stretch !important;
}

.leyka-pf__agreement.is-visible,
.leyka-pf--oferta-open .leyka-pf__agreement.oferta,
.leyka-pf--pd-open .leyka-pf__agreement.pd {
    display: flex !important;
}

.leyka-pf__agreement .agreement__frame {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    width: 100% !important;
    overflow-y: auto !important;
}

.leyka-pf__agreement .agreement__close {
    position: absolute !important;
    top: 10px !important;
    right: 10px !important;
    left: auto !important;
    bottom: auto !important;
    display: block !important;
    width: 32px !important;
    height: 32px !important;
    margin: 0 !important;
    padding: 0 !important;
    flex: none !important;
    align-self: auto !important;
    background: none !important;
    background-image: none !important;
    border: none !important;
    box-shadow: none !important;
    color: transparent !important;
    font-size: 0 !important;
    line-height: 0 !important;
    text-decoration: none !important;
    cursor: pointer !important;
    z-index: 2 !important;
}

.leyka-pf__agreement .agreement__close::before {
    content: '×';
    display: block;
    width: 32px;
    height: 32px;
    font-size: 28px;
    line-height: 32px;
    text-align: center;
    color: #444;
    font-weight: 400;
}

.leyka-pf__agreement .agreement__close:hover::before,
.leyka-pf__agreement .agreement__close:focus::before {
    color: #111;
}

body.text-page .entry-content .leyka-pf__agreement a:not(.agreement__close),
body.text-page .entry-content .leyka-pf__overlay a,
body.single-page .entry-content .leyka-pf__agreement a:not(.agreement__close),
body.single-page .entry-content .leyka-pf__overlay a {
    display: inline !important;
    background: none !important;
    padding: 0 !important;
    border-radius: 0 !important;
    min-width: auto !important;
    box-shadow: none !important;
    font-size: inherit !important;
    font-weight: inherit !important;
    color: inherit !important;
    text-decoration: underline !important;
}

/* ===== Depth-пакеты / паттерн: не перебивать CSS переменные и рамки ===== */
body.text-page .entry-content [id^="yardem-"][id$="-depth"] .local-nav,
body.single-page .entry-content [id^="yardem-"][id$="-depth"] .local-nav,
body.obf2026-depth-pattern .entry-content [id^="yardem-"][id$="-depth"] .local-nav {
    border-block: 1px solid #dfe7df !important;
}

body.text-page .entry-content [id^="yardem-"][id$="-depth"] .local-nav a,
body.single-page .entry-content [id^="yardem-"][id$="-depth"] .local-nav a,
body.obf2026-depth-pattern .entry-content [id^="yardem-"][id$="-depth"] .local-nav a {
    display: block !important;
    background: transparent !important;
    padding: 8px 9px !important;
    border-radius: 5px !important;
    border-bottom: 3px solid #199b29 !important;
    min-width: 0 !important;
    box-shadow: none !important;
    color: #087a18 !important;
    font-size: .78rem !important;
    font-weight: 700 !important;
    line-height: 1.25 !important;
    text-align: center !important;
    text-decoration: none !important;
    transform: none !important;
}

body.text-page .entry-content [id^="yardem-"][id$="-depth"] .local-nav a:hover,
body.single-page .entry-content [id^="yardem-"][id$="-depth"] .local-nav a:hover,
body.obf2026-depth-pattern .entry-content [id^="yardem-"][id$="-depth"] .local-nav a:hover {
    background: #f0f9f1 !important;
    color: #087a18 !important;
    text-decoration: none !important;
}

body.text-page .entry-content [id^="yardem-"][id$="-depth"] .local-nav a.is-active,
body.single-page .entry-content [id^="yardem-"][id$="-depth"] .local-nav a.is-active,
body.obf2026-depth-pattern .entry-content [id^="yardem-"][id$="-depth"] .local-nav a.is-active {
    color: #199b29 !important;
    border-bottom-width: 4px !important;
}

body.text-page .entry-content [id^="yardem-"][id$="-depth"] .section-kicker,
body.single-page .entry-content [id^="yardem-"][id$="-depth"] .section-kicker,
body.obf2026-depth-pattern .entry-content [id^="yardem-"][id$="-depth"] .section-kicker {
    color: #199b29 !important;
}

body.text-page .entry-content [id^="yardem-"][id$="-depth"] .deep-metrics strong,
body.single-page .entry-content [id^="yardem-"][id$="-depth"] .deep-metrics strong,
body.obf2026-depth-pattern .entry-content [id^="yardem-"][id$="-depth"] .deep-metrics strong {
    color: #087a18 !important;
}

body.text-page .entry-content [id^="yardem-"][id$="-depth"] .outings-visual > img,
body.single-page .entry-content [id^="yardem-"][id$="-depth"] .outings-visual > img,
body.obf2026-depth-pattern .entry-content [id^="yardem-"][id$="-depth"] .outings-visual > img,
body.text-page .entry-content [id^="yardem-"][id$="-depth"] .people-feature > img,
body.single-page .entry-content [id^="yardem-"][id$="-depth"] .people-feature > img,
body.obf2026-depth-pattern .entry-content [id^="yardem-"][id$="-depth"] .people-feature > img {
    margin: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    max-width: none !important;
    height: 100% !important;
    display: block !important;
}

body.text-page .entry-content [id^="yardem-"][id$="-depth"] .depth-head h2,
body.single-page .entry-content [id^="yardem-"][id$="-depth"] .depth-head h2,
body.obf2026-depth-pattern .entry-content [id^="yardem-"][id$="-depth"] .depth-head h2 {
    border-bottom: 0 !important;
    padding-bottom: 0 !important;
    color: #202720 !important;
}

/* Участие: зелёный финальный блок паттерна */
body.text-page .entry-content [id^="yardem-"][id$="-depth"] .participation,
body.single-page .entry-content [id^="yardem-"][id$="-depth"] .participation,
body.obf2026-depth-pattern .entry-content [id^="yardem-"][id$="-depth"] .participation {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 32px !important;
    margin-top: 70px !important;
    padding: 40px !important;
    border: 0 !important;
    border-radius: 10px !important;
    border-left: 0 !important;
    background: #146422 !important;
    color: #fff !important;
    box-shadow: none !important;
}

body.text-page .entry-content [id^="yardem-"][id$="-depth"] .participation .section-kicker,
body.single-page .entry-content [id^="yardem-"][id$="-depth"] .participation .section-kicker,
body.obf2026-depth-pattern .entry-content [id^="yardem-"][id$="-depth"] .participation .section-kicker {
    color: #b9e8c0 !important;
}

body.text-page .entry-content [id^="yardem-"][id$="-depth"] .participation h2,
body.single-page .entry-content [id^="yardem-"][id$="-depth"] .participation h2,
body.obf2026-depth-pattern .entry-content [id^="yardem-"][id$="-depth"] .participation h2 {
    margin: 0 0 8px !important;
    padding: 0 !important;
    border: 0 !important;
    color: #fff !important;
    background: none !important;
}

body.text-page .entry-content [id^="yardem-"][id$="-depth"] .participation p,
body.single-page .entry-content [id^="yardem-"][id$="-depth"] .participation p,
body.obf2026-depth-pattern .entry-content [id^="yardem-"][id$="-depth"] .participation p {
    max-width: 540px !important;
    margin: 0 !important;
    color: rgba(255, 255, 255, .78) !important;
    font-size: inherit !important;
}

body.text-page .entry-content [id^="yardem-"][id$="-depth"] .participation a:not(.depth-button):not(.depth-button--light),
body.single-page .entry-content [id^="yardem-"][id$="-depth"] .participation a:not(.depth-button):not(.depth-button--light),
body.obf2026-depth-pattern .entry-content [id^="yardem-"][id$="-depth"] .participation a:not(.depth-button):not(.depth-button--light) {
    display: inline !important;
    background: none !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    color: inherit !important;
    font: inherit !important;
    font-size: inherit !important;
    font-weight: inherit !important;
    text-decoration: underline !important;
    text-underline-offset: 2px !important;
    transform: none !important;
}

body.text-page .entry-content [id^="yardem-"][id$="-depth"] .participation a.depth-button,
body.text-page .entry-content [id^="yardem-"][id$="-depth"] .participation a.depth-button--light,
body.single-page .entry-content [id^="yardem-"][id$="-depth"] .participation a.depth-button,
body.single-page .entry-content [id^="yardem-"][id$="-depth"] .participation a.depth-button--light,
body.obf2026-depth-pattern .entry-content [id^="yardem-"][id$="-depth"] .participation a.depth-button,
body.obf2026-depth-pattern .entry-content [id^="yardem-"][id$="-depth"] .participation a.depth-button--light {
    box-sizing: border-box !important;
    flex: 0 0 auto !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: auto !important;
    min-width: 0 !important;
    min-height: 52px !important;
    margin: 0 !important;
    padding: 14px 30px !important;
    border: 0 !important;
    border-radius: 999px !important;
    color: #0a4f14 !important;
    background: linear-gradient(180deg, #e8fbea 0%, #b9e8c0 55%, #9fdba9 100%) !important;
    box-shadow: 0 14px 30px rgba(0, 0, 0, .28) !important;
    font-family: Jost, Arial, sans-serif !important;
    font-size: .86rem !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    letter-spacing: .02em !important;
    text-decoration: none !important;
    text-transform: none !important;
    white-space: nowrap !important;
    transform: none !important;
}

body.text-page .entry-content [id^="yardem-"][id$="-depth"] .participation a.depth-button:hover,
body.text-page .entry-content [id^="yardem-"][id$="-depth"] .participation a.depth-button--light:hover,
body.single-page .entry-content [id^="yardem-"][id$="-depth"] .participation a.depth-button:hover,
body.single-page .entry-content [id^="yardem-"][id$="-depth"] .participation a.depth-button--light:hover,
body.obf2026-depth-pattern .entry-content [id^="yardem-"][id$="-depth"] .participation a.depth-button:hover,
body.obf2026-depth-pattern .entry-content [id^="yardem-"][id$="-depth"] .participation a.depth-button--light:hover {
    color: #0a4f14 !important;
    background: linear-gradient(180deg, #f2fff4 0%, #c9f0d0 55%, #abe3b4 100%) !important;
    box-shadow: 0 18px 36px rgba(0, 0, 0, .32) !important;
    text-decoration: none !important;
    transform: translateY(-2px) !important;
}

@media (max-width: 600px) {
    body.text-page .entry-content [id^="yardem-"][id$="-depth"] .participation,
    body.single-page .entry-content [id^="yardem-"][id$="-depth"] .participation,
    body.obf2026-depth-pattern .entry-content [id^="yardem-"][id$="-depth"] .participation {
        align-items: flex-start !important;
        flex-direction: column !important;
        padding: 28px 22px !important;
    }

    body.text-page .entry-content [id^="yardem-"][id$="-depth"] .participation a.depth-button,
    body.text-page .entry-content [id^="yardem-"][id$="-depth"] .participation a.depth-button--light,
    body.single-page .entry-content [id^="yardem-"][id$="-depth"] .participation a.depth-button,
    body.single-page .entry-content [id^="yardem-"][id$="-depth"] .participation a.depth-button--light,
    body.obf2026-depth-pattern .entry-content [id^="yardem-"][id$="-depth"] .participation a.depth-button,
    body.obf2026-depth-pattern .entry-content [id^="yardem-"][id$="-depth"] .participation a.depth-button--light {
        width: 100% !important;
        white-space: normal !important;
        text-align: center !important;
    }
}
