/*
Theme Name: Доктор Софтер — Журнал
Theme URI: https://j.drsofter.ru
Author: ООО «Доктор Софтер»
Author URI: https://drsofter.ru
Description: Корпоративный журнал компании «Доктор Софтер». Дизайн выдержан в стилистике основного сайта drsofter.ru: шрифт Inter, фирменный синий #4658C0, строгие скругления 2px, фирменные формы заявок с лид-магнитами.
Version: 1.0.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: drsofter-journal
*/

/* ==========================================================================
   Дизайн-токены drsofter.ru
   ========================================================================== */
:root {
    --ds-primary: #4658C0;      /* фирменный синий */
    --ds-primary-hover: #1692fb;/* ховер кнопок */
    --ds-dark: #202123;         /* заголовки, тёмный текст */
    --ds-text: #404245;         /* основной текст */
    --ds-muted: #595a5b;        /* вторичный текст, лейблы */
    --ds-border: #eee;          /* тонкие бордеры */
    --ds-input-border: #C8C8C8; /* бордеры инпутов */
    --ds-bg-soft: #F1F4FA;      /* светло-голубые подложки секций и форм */
    --ds-bg-card: #FCFCFD;      /* фон карточек-контейнеров */
    --ds-light-btn: #E6EBF2;    /* светлая кнопка */
    --ds-green: #6FCF97;
    --ds-telegram: #419FD9;
    --ds-whatsapp: #27d045;
    --ds-radius: 2px;           /* фирменное скругление */
    --ds-container: 1200px;
    --ds-content: 780px;
}

/* ==========================================================================
   База
   ========================================================================== */
* { box-sizing: border-box; }

html {
    -webkit-text-size-adjust: none;
    text-size-adjust: none;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.65;
    color: var(--ds-text);
    background: #fff;
}

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

a {
    color: var(--ds-primary);
    text-decoration: none;
    transition: .3s;
}
a:hover { text-decoration: underline; }

h1, h2, h3, h4, h5, h6 {
    color: var(--ds-dark);
    line-height: 1.25;
    margin: 0 0 .6em;
    font-weight: 700;
}

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

/* Широкий контейнер шапки — навигации нужно больше места */
.container--wide { max-width: 1400px; }

.screen-reader-text {
    position: absolute !important;
    width: 1px; height: 1px;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
}

/* ==========================================================================
   Кнопки (как .btn основного сайта)
   ========================================================================== */
.btn {
    user-select: none;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 32px;
    height: 56px;
    text-align: center;
    color: #fff !important;
    font-family: inherit;
    font-size: 17px;
    line-height: 1;
    font-weight: 500;
    background: var(--ds-primary);
    border: none;
    border-radius: var(--ds-radius);
    outline: none;
    cursor: pointer;
    transition: .3s;
    text-decoration: none !important;
}
.btn:hover { background: var(--ds-primary-hover); }

.btn--small {
    height: 42px;
    padding: 0 22px;
    font-size: 15px;
}

.btn--light {
    background: var(--ds-light-btn);
    color: var(--ds-dark) !important;
}
.btn--light:hover {
    background: var(--ds-light-btn);
    color: var(--ds-primary) !important;
}

.btn[disabled] {
    opacity: .6;
    cursor: default;
}

/* ==========================================================================
   Шапка
   ========================================================================== */
.site-header {
    position: fixed;
    top: 0; left: 0;
    width: 100%;
    z-index: 1001;
    background: #fff;
    border-bottom: 1px solid var(--ds-border);
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    height: 72px;
}

.site-header__brand {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    text-decoration: none !important;
}
.site-header__brand img {
    width: 220px;
    display: block;
}
.site-header__brand-badge {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--ds-primary);
    background: var(--ds-bg-soft);
    border-radius: var(--ds-radius);
    padding: 4px 8px;
    position: relative;
    top: 1px;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 24px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.site-nav li { margin: 0; }
.site-nav a {
    color: var(--ds-dark);
    font-size: 15px;
    font-weight: 500;
    white-space: nowrap;
    text-decoration: none !important;
}
.site-nav a:hover,
.site-nav .current-menu-item > a,
.site-nav .current_page_item > a { color: var(--ds-primary); }

.site-header__contacts {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}
.site-header__phone {
    font-weight: 600;
    font-size: 16px;
    color: var(--ds-dark);
    text-decoration: none !important;
    white-space: nowrap;
}
.site-header__phone:hover { color: var(--ds-primary); }

.site-header__contacts .btn { height: 44px; padding: 0 24px; font-size: 15px; }

/* Бургер */
.menu-btn {
    display: none;
    width: 30px; height: 22px;
    position: relative;
    cursor: pointer;
    flex-shrink: 0;
}
.menu-btn span,
.menu-btn::before,
.menu-btn::after {
    content: '';
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--ds-dark);
    transition: .3s;
}
.menu-btn::before { top: 0; }
.menu-btn span { top: 10px; }
.menu-btn::after { top: 20px; }
.menu-btn.active::before { transform: rotate(45deg); top: 10px; }
.menu-btn.active span { opacity: 0; }
.menu-btn.active::after { transform: rotate(-45deg); top: 10px; }

.site-main { padding-top: 72px; min-height: 60vh; }

@media (max-width: 1280px) {
    .site-header__nav-wrap {
        position: fixed;
        top: 72px; right: 0;
        width: 0;
        height: calc(100vh - 72px);
        background: #fff;
        overflow: hidden;
        transition: width .4s;
        z-index: 1000;
    }
    .site-header__nav-wrap.menu-show {
        width: 280px;
        border-left: 1px solid var(--ds-bg-soft);
        overflow-y: auto;
    }
    .site-nav {
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        padding: 16px 28px;
        min-width: 280px;
    }
    .site-nav a { display: block; padding: 12px 0; font-size: 17px; white-space: normal; }
    .menu-btn { display: block; }
    .site-header__contacts .btn { height: 40px; padding: 0 18px; font-size: 14px; }
}
@media (max-width: 640px) {
    .site-header__inner { height: 63px; }
    .site-main { padding-top: 63px; }
    .site-header__nav-wrap { top: 63px; height: calc(100vh - 63px); }
    .site-header__brand img { width: 170px; }
    .site-header__phone { font-size: 14px; }
    .site-header__contacts .btn { display: none; }
}
@media (max-width: 420px) {
    .site-header__brand-badge { display: none; }
}

/* ==========================================================================
   Хиро журнала
   ========================================================================== */
.journal-hero {
    background: linear-gradient(180deg, #fff -10%, var(--ds-bg-soft) 60%, #fff 120%);
    border-bottom: 1px solid var(--ds-border);
    padding: 56px 0 48px;
    margin-bottom: 48px;
}
.journal-hero__title {
    font-size: 44px;
    font-weight: 800;
    margin: 0 0 12px;
    letter-spacing: -.01em;
}
.journal-hero__title span { color: var(--ds-primary); }
.journal-hero__description {
    font-size: 18px;
    color: var(--ds-muted);
    max-width: 640px;
    margin: 0;
}
.journal-hero--compact { padding: 40px 0 36px; margin-bottom: 40px; }
.journal-hero--compact .journal-hero__title { font-size: 32px; }

.journal-hero__terms {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
}

.term-chip {
    display: inline-block;
    padding: 7px 14px;
    background: #fff;
    border: 1px solid var(--ds-border);
    border-radius: var(--ds-radius);
    color: var(--ds-dark);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none !important;
}
.term-chip:hover, .term-chip.active {
    border-color: var(--ds-primary);
    color: var(--ds-primary);
}

@media (max-width: 767px) {
    .journal-hero { padding: 36px 0 32px; margin-bottom: 32px; }
    .journal-hero__title { font-size: 30px; }
    .journal-hero--compact .journal-hero__title { font-size: 24px; }
    .journal-hero__description { font-size: 16px; }
}

/* ==========================================================================
   Лента: карточки статей
   ========================================================================== */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    margin-bottom: 56px;
}
@media (max-width: 991px) { .posts-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .posts-grid { grid-template-columns: 1fr; gap: 20px; } }

.post-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--ds-border);
    border-radius: var(--ds-radius);
    overflow: hidden;
    transition: box-shadow .3s, border-color .3s, transform .3s;
}
.post-card:hover {
    border-color: #d9def2;
    box-shadow: 0 14px 40px rgba(32, 33, 35, .08);
    transform: translateY(-2px);
}

.post-card__thumb {
    display: block;
    aspect-ratio: 16 / 9;
    background: var(--ds-bg-soft);
    overflow: hidden;
}
.post-card__thumb img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .5s;
}
.post-card:hover .post-card__thumb img { transform: scale(1.03); }

/* Заглушка вместо отсутствующей картинки — фирменный паттерн */
.post-card__thumb--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at 80% 20%, rgba(70, 88, 192, .18), transparent 55%),
        radial-gradient(circle at 15% 85%, rgba(22, 146, 251, .12), transparent 50%),
        var(--ds-bg-soft);
}
.post-card__thumb--placeholder img { width: 55%; height: auto; object-fit: contain; opacity: .9; }

.post-card__body {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    padding: 22px 24px 24px;
}

.post-card__meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 14px;
    margin-bottom: 12px;
    font-size: 13px;
    color: var(--ds-muted);
}
.post-card__category {
    display: inline-block;
    background: var(--ds-bg-soft);
    color: var(--ds-primary);
    font-weight: 600;
    font-size: 12px;
    letter-spacing: .04em;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: var(--ds-radius);
    text-decoration: none !important;
}
.post-card__category:hover { background: var(--ds-primary); color: #fff; }

.post-card__title {
    font-size: 19px;
    line-height: 1.35;
    margin: 0 0 10px;
    font-weight: 700;
}
.post-card__title a {
    color: var(--ds-dark);
    text-decoration: none !important;
}
.post-card__title a:hover { color: var(--ds-primary); }

.post-card__excerpt {
    font-size: 14.5px;
    line-height: 1.6;
    color: var(--ds-muted);
    margin: 0 0 16px;
}

.post-card__more {
    margin-top: auto;
    font-size: 14.5px;
    font-weight: 600;
    color: var(--ds-primary);
    text-decoration: none !important;
}
.post-card__more:hover { color: var(--ds-primary-hover); }

/* Первая (featured) карточка */
.post-card--featured { grid-column: 1 / -1; flex-direction: row; }
.post-card--featured .post-card__thumb { width: 52%; aspect-ratio: auto; min-height: 320px; }
.post-card--featured .post-card__body { width: 48%; padding: 36px 40px; justify-content: center; }
.post-card--featured .post-card__title { font-size: 28px; }
.post-card--featured .post-card__excerpt { font-size: 16px; }
@media (max-width: 991px) {
    .post-card--featured { flex-direction: column; }
    .post-card--featured .post-card__thumb,
    .post-card--featured .post-card__body { width: 100%; }
    .post-card--featured .post-card__thumb { aspect-ratio: 16/9; min-height: 0; }
    .post-card--featured .post-card__body { padding: 22px 24px 24px; }
    .post-card--featured .post-card__title { font-size: 22px; }
}

/* Пагинация */
.pagination {
    display: flex;
    justify-content: center;
    margin: 0 0 64px;
}
.pagination .nav-links {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 12px;
    border: 1px solid var(--ds-border);
    border-radius: var(--ds-radius);
    color: var(--ds-dark);
    font-size: 15px;
    font-weight: 500;
    text-decoration: none !important;
}
.pagination .page-numbers.current {
    background: var(--ds-primary);
    border-color: var(--ds-primary);
    color: #fff;
}
.pagination .page-numbers:not(.current):hover {
    border-color: var(--ds-primary);
    color: var(--ds-primary);
}

/* ==========================================================================
   Статья
   ========================================================================== */
.single-article { padding-top: 40px; }

.article-head {
    max-width: var(--ds-content);
    margin: 0 auto 32px;
}

.breadcrumbs {
    font-size: 13.5px;
    color: var(--ds-muted);
    margin-bottom: 22px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}
.breadcrumbs a { color: var(--ds-muted); }
.breadcrumbs a:hover { color: var(--ds-primary); text-decoration: none; }
.breadcrumbs .sep { color: #c3c6cc; }

.article-head__title {
    font-size: 40px;
    font-weight: 800;
    letter-spacing: -.01em;
    margin: 0 0 18px;
}

.article-head__meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px 18px;
    font-size: 14px;
    color: var(--ds-muted);
}
.article-head__meta .post-card__category { text-transform: uppercase; }

.article-thumb {
    max-width: 980px;
    margin: 0 auto 40px;
}
.article-thumb img {
    width: 100%;
    border-radius: var(--ds-radius);
    display: block;
}

.article-content {
    max-width: var(--ds-content);
    margin: 0 auto;
    font-size: 17.5px;
    line-height: 1.75;
}
.article-content > *:first-child { margin-top: 0; }
.article-content p { margin: 0 0 1.25em; }
.article-content h2 { font-size: 28px; margin: 1.6em 0 .7em; }
.article-content h3 { font-size: 22px; margin: 1.5em 0 .6em; }
.article-content h4 { font-size: 19px; margin: 1.4em 0 .6em; }
.article-content a { text-decoration: underline; text-decoration-color: rgba(70, 88, 192, .35); text-underline-offset: 3px; }
.article-content a:hover { text-decoration-color: currentColor; }
.article-content ul, .article-content ol { margin: 0 0 1.4em; padding-left: 1.4em; }
.article-content li { margin-bottom: .5em; }
.article-content li::marker { color: var(--ds-primary); font-weight: 600; }

.article-content blockquote {
    margin: 1.8em 0;
    padding: 20px 28px;
    border-left: 3px solid var(--ds-primary);
    background: var(--ds-bg-soft);
    border-radius: var(--ds-radius);
    font-size: 17px;
}
.article-content blockquote p:last-child { margin-bottom: 0; }

.article-content img {
    border-radius: var(--ds-radius);
    margin: .4em 0;
}
.article-content figure { margin: 1.8em 0; }
.article-content figcaption {
    font-size: 13.5px;
    color: var(--ds-muted);
    text-align: center;
    margin-top: 10px;
}

.article-content code {
    background: var(--ds-bg-soft);
    color: var(--ds-primary);
    border-radius: var(--ds-radius);
    padding: 2px 7px;
    font-size: .88em;
    font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.article-content pre {
    background: var(--ds-dark);
    color: #f0f2f5;
    padding: 22px 26px;
    border-radius: var(--ds-radius);
    overflow-x: auto;
    font-size: 14.5px;
    line-height: 1.6;
    margin: 1.8em 0;
}
.article-content pre code { background: none; color: inherit; padding: 0; }

.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.8em 0;
    font-size: 15.5px;
}
.article-content th, .article-content td {
    border: 1px solid var(--ds-border);
    padding: 10px 14px;
    text-align: left;
}
.article-content th { background: var(--ds-bg-soft); color: var(--ds-dark); }

.article-content .wp-block-image img { height: auto; }

/* Теги */
.article-tags {
    max-width: var(--ds-content);
    margin: 36px auto 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* Читайте также */
.related-posts {
    margin: 72px 0 0;
    padding: 56px 0 8px;
    background: var(--ds-bg-soft);
    border-top: 1px solid var(--ds-border);
}
.related-posts .posts-grid { margin-bottom: 48px; }
.related-posts .post-card { border-color: transparent; }
.section-title {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 28px;
}

@media (max-width: 767px) {
    .single-article { padding-top: 28px; }
    .article-head__title { font-size: 28px; }
    .article-content { font-size: 16px; }
    .article-content h2 { font-size: 23px; }
    .article-content h3 { font-size: 19px; }
    .related-posts { margin-top: 48px; padding-top: 40px; }
}

/* ==========================================================================
   Лид-магнит: форма заявки (в стиле form-container drsofter.ru)
   ========================================================================== */
.lead-magnet {
    margin: 64px auto 72px;
    max-width: 980px;
    padding: 0 24px;
}
.single-article .lead-magnet,
.related-posts + .lead-magnet { margin-top: 56px; }

.lead-magnet__box {
    position: relative;
    overflow: hidden;
    background: var(--ds-bg-soft);
    border-radius: var(--ds-radius);
    padding: 48px 52px;
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 48px;
}
.lead-magnet__box::before {
    content: '';
    position: absolute;
    right: -140px; top: -140px;
    width: 380px; height: 380px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(70, 88, 192, .10), transparent 70%);
    pointer-events: none;
}

.lead-magnet__title {
    font-size: 30px;
    font-weight: 700;
    margin: 0 0 14px;
}
.lead-magnet__description {
    font-size: 16.5px;
    color: var(--ds-text);
    margin: 0 0 26px;
}

.lead-magnet__points {
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 15.5px;
}
.lead-magnet__points li {
    position: relative;
    padding-left: 30px;
    margin-bottom: 12px;
}
.lead-magnet__points li::before {
    content: '';
    position: absolute;
    left: 0; top: 3px;
    width: 18px; height: 18px;
    border-radius: 50%;
    background: var(--ds-green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='8' viewBox='0 0 10 8' fill='none'%3E%3Cpath d='M1 4l2.8 2.8L9 1.2' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center no-repeat;
}

.lead-magnet__contacts {
    margin-top: 28px;
    font-size: 15px;
    color: var(--ds-muted);
}
.lead-magnet__contacts a { font-weight: 600; white-space: nowrap; }

@media (max-width: 991px) {
    .lead-magnet__box { grid-template-columns: 1fr; padding: 36px 32px; gap: 28px; }
    .lead-magnet__title { font-size: 25px; }
}
@media (max-width: 580px) {
    .lead-magnet { padding: 0 16px; margin: 44px auto 52px; }
    .lead-magnet__box { padding: 26px 20px 30px; }
}

/* Форма (floating labels как на drsofter.ru) */
.ds-form__row { margin: 0 0 16px; }

.ds-form__row-input label {
    position: relative;
    display: block;
}
.ds-form .input-label {
    pointer-events: none;
    position: absolute;
    z-index: 10;
    top: 20px; left: 20px;
    font-size: 16px;
    line-height: 1;
    font-weight: 300;
    color: var(--ds-muted);
    transition: transform .2s, font-size .2s, color .2s;
    will-change: transform;
}
.ds-form .input-text {
    box-sizing: border-box;
    position: relative;
    display: block;
    padding: 27px 20px 8px;
    border: 2px solid var(--ds-input-border);
    background: #fff;
    transition: border .2s;
    border-radius: var(--ds-radius);
}
.ds-form label.completed .input-label,
.ds-form label.focused .input-label {
    font-size: 12px;
    transform: translateZ(0) translateY(-11px);
}
.ds-form label.focused .input-text { border-color: var(--ds-primary); }
.ds-form label.error .input-text { border-color: #ff3838; }

.ds-form .text-input {
    background: transparent;
    border: none;
    width: 100%;
    outline: none !important;
    display: block;
    margin: 0; padding: 0;
    font-size: 16px;
    line-height: 1.3;
    font-weight: 500;
    font-family: inherit;
    color: var(--ds-dark);
    border-radius: 0;
    -webkit-appearance: none;
    appearance: none;
}
.ds-form textarea.text-input { resize: none; }

/* Чекбокс согласия */
.ds-form__row--agreement { margin-top: 22px; }
.checkbox-label {
    position: relative;
    display: inline-block;
    padding-left: 34px;
    font-size: 13.5px;
    line-height: 1.55;
    color: var(--ds-muted);
    cursor: pointer;
}
.agreement-checkbox {
    position: absolute;
    width: 1px; height: 1px;
    opacity: 0;
    top: 0; left: 0;
}
.checkbox-icon {
    position: absolute;
    top: 2px; left: 0;
    width: 20px; height: 20px;
    background: #fff;
    border: 1px solid var(--ds-primary);
    border-radius: var(--ds-radius);
    cursor: pointer;
}
.checkbox-icon::before {
    content: '';
    position: absolute;
    inset: -1px;
    background: var(--ds-primary) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='10' viewBox='0 0 12 10' fill='none'%3E%3Cpath d='M1.5 5l3.2 3.2L10.5 1.6' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center no-repeat;
    border-radius: var(--ds-radius);
    opacity: 0;
    transition: opacity .2s;
}
.agreement-checkbox:checked ~ .checkbox-icon::before { opacity: 1; }
.agreement-link { color: var(--ds-primary); }

.ds-form__row--btn { margin-top: 26px; }
.ds-form__row--btn .btn { min-width: 220px; }
@media (max-width: 580px) {
    .ds-form__row--btn .btn { width: 100%; }
}

.ds-form__message {
    display: none;
    margin-top: 16px;
    font-size: 15px;
    border-radius: var(--ds-radius);
    padding: 12px 16px;
}
.ds-form__message--error { display: block; background: #fdecec; color: #c0392b; }
.ds-form__message--success { display: block; background: #e8f8ef; color: #1e7e4b; }

/* CTA-вставка в середине статьи */
.article-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
    margin: 2.2em 0;
    padding: 26px 30px;
    background: var(--ds-bg-soft);
    border-left: 3px solid var(--ds-primary);
    border-radius: var(--ds-radius);
}
.article-cta__text { flex: 1 1 320px; }
.article-cta__title {
    font-size: 19px;
    font-weight: 700;
    color: var(--ds-dark);
    margin: 0 0 6px;
}
.article-cta__description {
    font-size: 15px;
    color: var(--ds-muted);
    margin: 0;
}
.article-cta .btn { flex-shrink: 0; }
@media (max-width: 580px) {
    .article-cta { padding: 20px; }
    .article-cta .btn { width: 100%; }
}

/* ==========================================================================
   Модалки (как на drsofter.ru)
   ========================================================================== */
.ds-modal {
    position: fixed;
    inset: 0;
    z-index: 2001;
    transition: opacity .4s;
}
.ds-modal.hidden { display: none; }
.ds-modal__overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .5);
    backdrop-filter: blur(3px);
}
.ds-modal__container {
    position: fixed;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 92vw;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
    background: #fff;
    border-radius: var(--ds-radius);
    padding: 30px 34px 34px;
    z-index: 2002;
}
.ds-modal__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 8px;
}
.ds-modal__title {
    font-size: 24px;
    font-weight: 700;
    color: var(--ds-dark);
}
.ds-modal__description {
    font-size: 15px;
    color: var(--ds-muted);
    margin: 0 0 22px;
}
.btn-close {
    background: none;
    border: none;
    font-size: 20px;
    line-height: 1;
    color: var(--ds-muted);
    cursor: pointer;
    padding: 4px;
    transition: .3s;
}
.btn-close:hover { color: var(--ds-primary); }
@media (max-width: 580px) {
    .ds-modal__container { padding: 22px 20px 26px; }
}

/* ==========================================================================
   Подвал
   ========================================================================== */
.site-footer {
    background: var(--ds-bg-card);
    border-top: 1px solid var(--ds-border);
    margin-top: 0;
}
.site-footer__top {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 40px;
    padding: 52px 0 40px;
}
.site-footer__brand img { width: 210px; margin-bottom: 16px; }
.site-footer__about {
    font-size: 14.5px;
    color: var(--ds-muted);
    max-width: 340px;
    margin: 0;
}
.site-footer__title {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--ds-dark);
    margin: 6px 0 18px;
}
.site-footer__nav {
    list-style: none;
    margin: 0; padding: 0;
    font-size: 15px;
}
.site-footer__nav li { margin-bottom: 10px; }
.site-footer__nav a { color: var(--ds-text); text-decoration: none !important; }
.site-footer__nav a:hover { color: var(--ds-primary); }

.site-footer__phone {
    display: block;
    font-size: 20px;
    font-weight: 700;
    color: var(--ds-dark);
    text-decoration: none !important;
    margin-bottom: 6px;
}
.site-footer__phone:hover { color: var(--ds-primary); }
.site-footer__email {
    display: inline-block;
    font-size: 15.5px;
    font-weight: 500;
    margin-bottom: 18px;
}

.contact-icons { display: flex; gap: 10px; }
.contact-icon {
    width: 40px; height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: transform .3s;
}
.contact-icon:hover { transform: translateY(-2px); }
.contact-icon svg { width: 50%; height: auto; }
.contact-icon--telegram { background: var(--ds-telegram); }
.contact-icon--whatsapp { background: var(--ds-whatsapp); }
.contact-icon--email { background: var(--ds-green); }

.site-footer__bottom {
    border-top: 1px solid var(--ds-border);
    padding: 22px 0 26px;
    font-size: 13px;
    color: var(--ds-muted);
    display: flex;
    justify-content: space-between;
    gap: 12px 32px;
    flex-wrap: wrap;
}
.site-footer__bottom a { color: var(--ds-muted); text-decoration: underline; text-decoration-color: rgba(89,90,91,.35); }
.site-footer__bottom a:hover { color: var(--ds-primary); }
.site-footer__requisites { max-width: 640px; margin: 0; }
.site-footer__links { display: flex; flex-direction: column; gap: 6px; text-align: right; }

@media (max-width: 991px) {
    .site-footer__top { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
    .site-footer__top { grid-template-columns: 1fr; gap: 32px; padding: 40px 0 32px; }
    .site-footer__bottom { flex-direction: column; }
    .site-footer__links { text-align: left; }
}

/* ==========================================================================
   Страницы, поиск, 404
   ========================================================================== */
.page-content-wrap {
    max-width: var(--ds-content);
    margin: 0 auto;
    padding: 40px 0 64px;
}

.search-form {
    display: flex;
    gap: 10px;
    max-width: 560px;
}
.search-form input[type="search"] {
    flex-grow: 1;
    height: 52px;
    padding: 0 18px;
    font-size: 16px;
    font-family: inherit;
    color: var(--ds-dark);
    border: 2px solid var(--ds-input-border);
    border-radius: var(--ds-radius);
    outline: none;
    transition: border-color .2s;
}
.search-form input[type="search"]:focus { border-color: var(--ds-primary); }
.search-form .btn { height: 52px; }

.error-404 {
    text-align: center;
    padding: 80px 0 60px;
}
.error-404__code {
    font-size: 120px;
    font-weight: 800;
    line-height: 1;
    color: var(--ds-primary);
    margin-bottom: 8px;
}
.error-404 .search-form { margin: 32px auto 0; }

.no-results { padding: 20px 0 60px; }

/* Прелоадер кнопки */
.btn--loading {
    pointer-events: none;
    opacity: .7;
}
.btn--loading::after {
    content: '';
    width: 16px; height: 16px;
    margin-left: 12px;
    border: 2px solid rgba(255,255,255,.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: ds-spin .7s linear infinite;
}
@keyframes ds-spin { to { transform: rotate(360deg); } }

/* WP-выравнивания */
.alignleft { float: left; margin: 0 24px 16px 0; }
.alignright { float: right; margin: 0 0 16px 24px; }
.aligncenter { display: block; margin: 0 auto; }
.wp-caption { max-width: 100%; }
