/**
 * NOTARIATUS — СТИЛИ СТРАНИЦЫ СТАТЬИ (/interest/<slug>)
 * Стандарт: NOTARIATUS DESIGN SYSTEM 2026
 */

:root {
    --art-primary: #b21b3c;
    --art-primary-hover: #961330;
    --art-primary-light: #fdf2f4;
    --art-primary-border: #fecdd3;
    
    --art-dark: #0f172a;
    --art-slate: #1e293b;
    --art-gray: #64748b;
    --art-gray-light: #94a3b8;
    --art-gray-subtle: #f1f5f9;
    
    --art-bg-canvas: #f4f7fb;
    --art-bg-card: #ffffff;
    --art-border: #e5eaf2;
    --art-border-hover: #cbd5e1;
    
    --art-radius-lg: 18px;
    --art-radius-md: 14px;
    --art-radius-sm: 8px;
    --art-radius-pill: 9999px;
    
    --art-shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.04);
    --art-shadow-md: 0 6px 20px rgba(15, 23, 42, 0.06);
    --art-shadow-hover: 0 12px 28px rgba(15, 23, 42, 0.09);
    --art-transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

html {
    scroll-behavior: smooth;
}

/* Обертка страницы статьи */
.article-view-wrapper {
    background-color: var(--art-bg-canvas);
    min-height: 80vh;
    padding: 24px 0 60px;
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
    color: var(--art-slate);
    -webkit-font-smoothing: antialiased;
}

.article-view-container {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 16px;
    box-sizing: border-box;
}

/* Главная карточка статьи */
.article-view-card {
    background: #ffffff;
    border: 1px solid var(--art-border);
    border-radius: var(--art-radius-lg);
    box-shadow: var(--art-shadow-sm);
    padding: 38px 46px 48px;
    margin-bottom: 36px;
    box-sizing: border-box;
    width: 100%;
}

/* ==========================================================================
   1. ШАПКА СТАТЬИ И МЕТА-ПАНЕЛЬ
   ========================================================================== */

.article-header {
    margin-bottom: 28px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--art-border);
}

.article-header__top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 14px;
}

.article-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: var(--art-radius-pill);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* Тематические классы бейджей */
.badge--inheritance { background: #fef3c7; color: #b45309; border: 1px solid #fde68a; }
.badge--power-of-attorney { background: #dbeafe; color: #1d4ed8; border: 1px solid #bfdbfe; }
.badge--realty { background: #fdf2f4; color: #b21b3c; border: 1px solid #fecdd3; }
.badge--family { background: #f3e8ff; color: #7e22ce; border: 1px solid #e9d5ff; }
.badge--gosuslugi { background: #e0f2fe; color: #0369a1; border: 1px solid #bae6fd; }
.badge--tariffs { background: #d1fae5; color: #047857; border: 1px solid #a7f3d0; }
.badge--general { background: #f1f5f9; color: #334155; border: 1px solid #e2e8f0; }

.article-title {
    font-size: 30px;
    font-weight: 800;
    line-height: 1.28;
    color: var(--art-dark);
    margin: 0 0 16px;
    letter-spacing: -0.015em;
}

/* Мета-строка статьи */
.article-meta-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 13px;
    color: var(--art-gray);
    font-weight: 500;
}

.article-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.article-meta-item svg {
    color: var(--art-gray-light);
    flex-shrink: 0;
}

/* Карточка эксперта / автора статьи */
.article-author-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: var(--art-radius-md);
    margin-top: 20px;
    width: 100%;
    box-sizing: border-box;
}

.article-author-card__avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
    flex-shrink: 0;
}

.article-author-card__info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.article-author-card__label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--art-primary);
    display: flex;
    align-items: center;
    gap: 5px;
}

.article-author-card__name {
    font-size: 14.5px;
    font-weight: 700;
    color: var(--art-dark);
}

.article-author-card__role {
    font-size: 12.5px;
    color: var(--art-gray);
    line-height: 1.35;
}

/* ==========================================================================
   2. СОДЕРЖАНИЕ СТАТЬИ (TABLE OF CONTENTS / TOC)
   ========================================================================== */

.article-toc {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: var(--art-radius-md);
    margin: 26px 0 32px;
    overflow: hidden;
    transition: var(--art-transition);
    width: 100%;
    box-sizing: border-box;
}

.article-toc__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 13px 20px;
    background: #f1f5f9;
    cursor: pointer;
    user-select: none;
}

.article-toc__title {
    font-size: 14.5px;
    font-weight: 700;
    color: var(--art-dark);
    display: flex;
    align-items: center;
    gap: 8px;
}

.article-toc__title svg {
    color: var(--art-primary);
    flex-shrink: 0;
}

.article-toc__toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--art-gray);
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    transition: color 0.2s;
}

.article-toc__toggle:hover {
    color: var(--art-primary);
}

.article-toc__toggle-icon {
    transition: transform 0.25s ease;
}

.article-toc.is-collapsed .article-toc__toggle-icon {
    transform: rotate(-90deg);
}

.article-toc.is-collapsed .article-toc__body {
    display: none;
}

.article-toc__body {
    padding: 14px 20px 16px;
}

.article-toc__list {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.article-toc__list > li {
    list-style: none !important;
    padding: 0 !important;
    border: none !important;
}

.article-toc__list > li::before {
    display: none !important;
    content: none !important;
}

.article-toc__item--h2 {
    margin: 12px 0 4px 0 !important;
    padding: 0 !important;
    border: none !important;
}

.article-toc__item--h2:first-child {
    margin-top: 0 !important;
}

.article-toc__item--h2 > .article-toc__link {
    display: flex;
    align-items: baseline;
    gap: 8px;
    font-size: 14.5px;
    font-weight: 700;
    line-height: 1.45;
    color: var(--art-dark) !important;
    text-decoration: none !important;
    padding: 3px 0;
    transition: color 0.18s ease;
}

.article-toc__item--h2 > .article-toc__link:hover {
    color: var(--art-primary) !important;
    text-decoration: underline !important;
}

.article-toc__num {
    color: var(--art-primary);
    font-weight: 800;
    font-size: 14px;
    flex-shrink: 0;
    min-width: 24px;
}

.article-toc__item--h3 {
    margin: 4px 0 4px 26px !important;
    padding: 0 !important;
    border: none !important;
}

.article-toc__item--h3 > .article-toc__link {
    display: flex;
    align-items: baseline;
    gap: 8px;
    font-size: 13.5px;
    font-weight: 400;
    line-height: 1.45;
    color: #475569 !important;
    text-decoration: none !important;
    padding: 2px 0;
    transition: color 0.18s ease;
}

.article-toc__item--h3 > .article-toc__link:hover {
    color: var(--art-primary) !important;
    text-decoration: underline !important;
}

.article-toc__subnum {
    color: #64748b;
    font-weight: 600;
    font-size: 12.5px;
    flex-shrink: 0;
    min-width: 28px;
    transition: color 0.18s ease;
}

.article-toc__item--h3 > .article-toc__link:hover .article-toc__subnum {
    color: var(--art-primary);
}

/* ==========================================================================
   3. ТИПОГРАФИКА ТЕЛА СТАТЬИ
   ========================================================================== */

.article-body {
    width: 100%;
    margin: 0;
    font-size: 17px;
    line-height: 1.72;
    color: var(--art-slate);
    word-break: break-word;
    box-sizing: border-box;
}

.article-body p {
    margin: 0 0 20px;
}

.article-body h2 {
    font-size: 23px;
    font-weight: 800;
    line-height: 1.34;
    color: var(--art-dark);
    margin: 36px 0 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid #f1f5f9;
    letter-spacing: -0.01em;
    scroll-margin-top: 30px;
}

.article-body h3 {
    font-size: 19px;
    font-weight: 700;
    line-height: 1.38;
    color: #1e293b;
    margin: 28px 0 12px;
    scroll-margin-top: 30px;
}

.article-body a {
    color: var(--art-primary);
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.2s;
}

.article-body a:hover {
    color: var(--art-primary-hover);
}

/* ==========================================================================
   4. СПИСКИ (НУМЕРОВАННЫЕ И МАРКИРОВАННЫЕ)
   ========================================================================== */

/* Нумерованные списки с кастомными бейджами */
.article-body ol {
    list-style: none;
    counter-reset: art-counter;
    padding: 0;
    margin: 20px 0 26px;
}

.article-body ol > li {
    position: relative;
    padding-left: 40px;
    margin-bottom: 14px;
    line-height: 1.65;
}

.article-body ol > li:last-child {
    margin-bottom: 0;
}

.article-body ol > li::before {
    counter-increment: art-counter;
    content: counter(art-counter);
    position: absolute;
    left: 0;
    top: 2px;
    width: 26px;
    height: 26px;
    border-radius: 7px;
    background: var(--art-primary-light);
    border: 1px solid var(--art-primary-border);
    color: var(--art-primary);
    font-size: 13px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

/* Маркированные списки с аккуратными рубиновыми точками */
.article-body ul {
    list-style: none;
    padding: 0;
    margin: 20px 0 26px;
}

.article-body ul > li {
    position: relative;
    padding-left: 24px;
    margin-bottom: 10px;
    line-height: 1.65;
}

.article-body ul > li:last-child {
    margin-bottom: 0;
}

.article-body ul > li::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 10px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--art-primary);
}

/* ==========================================================================
   5. ТАБЛИЦЫ
   ========================================================================== */

.article-table-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 24px 0 30px;
    border: 1px solid #e2e8f0;
    border-radius: var(--art-radius-md);
    background: #ffffff;
    box-shadow: var(--art-shadow-sm);
}

.article-body table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14.5px;
    line-height: 1.5;
    text-align: left;
}

.article-body thead th,
.article-body table th {
    background: #0f172a;
    color: #ffffff;
    padding: 13px 18px;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.02em;
    border: none;
}

.article-body tbody td,
.article-body table td {
    padding: 12px 18px;
    border-bottom: 1px solid #e2e8f0;
    color: #334155;
    vertical-align: top;
}

.article-body tbody tr:nth-child(even) {
    background: #f8fafc;
}

.article-body tbody tr:hover {
    background: #f1f5f9;
}

.article-body tbody tr:last-child td {
    border-bottom: none;
}

/* ==========================================================================
   6. ЦИТАТЫ И АКЦЕНТНЫЕ ВРЕЗКИ
   ========================================================================== */

.article-body blockquote {
    position: relative;
    margin: 26px 0 30px;
    padding: 20px 24px 20px 28px;
    background: var(--art-primary-light);
    border-left: 4px solid var(--art-primary);
    border-radius: 0 var(--art-radius-md) var(--art-radius-md) 0;
    font-size: 16.5px;
    line-height: 1.65;
    color: var(--art-dark);
    font-style: italic;
    box-sizing: border-box;
}

.article-body blockquote p:last-child {
    margin-bottom: 0;
}

.article-body blockquote cite {
    display: block;
    margin-top: 10px;
    font-size: 13px;
    font-style: normal;
    font-weight: 600;
    color: var(--art-gray);
}

/* Акцентная инфо-врезка */
.article-callout {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-left: 4px solid #0284c7;
    border-radius: 0 var(--art-radius-md) var(--art-radius-md) 0;
    padding: 18px 22px;
    margin: 24px 0 28px;
    font-size: 15px;
    line-height: 1.6;
    color: #0c4a6e;
}

/* ==========================================================================
   7. ВСТРОЕННЫЕ ИЗОБРАЖЕНИЯ
   ========================================================================== */

.article-figure {
    margin: 28px auto;
    text-align: center;
}

.article-figure img,
.article-body img {
    max-width: 100%;
    height: auto;
    border-radius: var(--art-radius-md);
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.07);
    border: 1px solid #e2e8f0;
    display: block;
    margin: 0 auto;
}

.article-figure__caption,
.rev_photo {
    font-size: 13px;
    color: var(--art-gray);
    margin-top: 8px;
    font-style: italic;
    text-align: center;
}

/* ==========================================================================
   8. КНОПКИ ДЕЙСТВИЯ И ВСТРОЕННЫЕ CTA
   ========================================================================== */

.pricebtnp {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 22px;
    background: var(--art-primary);
    color: #ffffff !important;
    border-radius: var(--art-radius-sm);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none !important;
    box-shadow: 0 4px 14px rgba(178, 27, 60, 0.25);
    transition: var(--art-transition);
    margin: 12px 0;
}

.pricebtnp:hover {
    background: var(--art-primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(178, 27, 60, 0.35);
    color: #ffffff !important;
}

/* ==========================================================================
   9. НИЖНИЙ БАННЕР ОНЛАЙН-КОНСУЛЬТАЦИИ И ХЛЕБНЫЕ КРОШКИ
   ========================================================================== */

.article-cta-banner {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    border-radius: var(--art-radius-lg);
    padding: 34px 40px;
    margin: 36px 0 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    box-shadow: var(--art-shadow-md);
    color: #ffffff;
}

.article-cta-banner__title {
    font-size: 21px;
    font-weight: 800;
    margin: 0 0 8px;
    color: #ffffff;
}

.article-cta-banner__desc {
    font-size: 14px;
    line-height: 1.55;
    color: #cbd5e1;
    margin: 0;
}

.article-cta-banner__actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.article-cta-banner__btn-primary {
    display: inline-flex;
    align-items: center;
    padding: 12px 22px;
    background: var(--art-primary);
    color: #ffffff;
    border-radius: var(--art-radius-sm);
    font-size: 13.5px;
    font-weight: 700;
    text-decoration: none;
    transition: var(--art-transition);
    white-space: nowrap;
    box-shadow: 0 4px 14px rgba(178, 27, 60, 0.35);
}

.article-cta-banner__btn-primary:hover {
    background: var(--art-primary-hover);
    transform: translateY(-2px);
}

.article-cta-banner__btn-secondary {
    display: inline-flex;
    align-items: center;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    border-radius: var(--art-radius-sm);
    font-size: 13.5px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--art-transition);
    white-space: nowrap;
}

.article-cta-banner__btn-secondary:hover {
    background: rgba(255, 255, 255, 0.18);
}

/* Блок «Другие статьи» */
.article-related-section {
    margin-top: 40px;
}

.article-related-section__title {
    font-size: 22px;
    font-weight: 800;
    color: var(--art-dark);
    margin: 0 0 20px;
    letter-spacing: -0.01em;
}

/* Нижние хлебные крошки */
.articles-bottom-breadcrumbs {
    padding: 18px 0 0;
    margin-top: 24px;
    border-top: 1px solid var(--art-border);
}

.articles-breadcrumbs-list {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 12.5px;
    color: var(--art-gray);
}

.articles-breadcrumbs-list li {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.articles-breadcrumbs-list li:not(:last-child)::after {
    content: '›';
    font-size: 14px;
    color: var(--art-gray-light);
}

.articles-breadcrumbs-list a {
    color: var(--art-gray);
    text-decoration: none;
    transition: color 0.2s;
}

.articles-breadcrumbs-list a:hover {
    color: var(--art-primary);
    text-decoration: underline;
}

.articles-breadcrumbs-list li:last-child {
    color: var(--art-slate);
    font-weight: 600;
}

/* ==========================================================================
   10. АДАПТИВНОСТЬ ДЛЯ МОБИЛЬНЫХ УСТРОЙСТВ
   ========================================================================== */

@media (max-width: 768px) {
    .article-view-wrapper {
        padding: 16px 0 40px;
    }

    .article-view-container {
        padding: 0 12px;
    }

    .article-view-card {
        padding: 22px 16px 28px;
        border-radius: var(--art-radius-md);
        margin-bottom: 24px;
    }

    .article-title {
        font-size: 22px;
        line-height: 1.25;
        margin-bottom: 12px;
    }

    .article-meta-bar {
        gap: 10px;
        font-size: 12px;
    }

    .article-body {
        font-size: 16px;
        line-height: 1.68;
    }

    .article-body h2 {
        font-size: 20px;
        margin: 28px 0 14px;
    }

    .article-body h3 {
        font-size: 17px;
        margin: 22px 0 10px;
    }

    .article-toc {
        margin: 20px 0 24px;
    }

    .article-toc__header {
        padding: 11px 14px;
    }

    .article-toc__body {
        padding: 12px 14px;
    }

    .article-author-card {
        padding: 12px 14px;
        gap: 12px;
    }

    .article-author-card__avatar {
        width: 42px;
        height: 42px;
    }

    .article-author-card__name {
        font-size: 13.5px;
    }

    .article-author-card__role {
        font-size: 12px;
    }

    .article-cta-banner {
        flex-direction: column;
        align-items: flex-start;
        padding: 24px 18px;
        gap: 18px;
    }

    .article-cta-banner__actions {
        width: 100%;
        flex-direction: column;
        gap: 10px;
    }

    .article-cta-banner__btn-primary,
    .article-cta-banner__btn-secondary {
        width: 100%;
        justify-content: center;
        box-sizing: border-box;
    }
}
