/* ============================================
   GetPravo — Стили контента блога
   ============================================ */

/* === Карточки в списке постов === */
.card-body,
.card-body p,
.card-body div,
.card-body span,
.card-body small,
.card-body ul,
.card-body ol,
.card-body li,
article,
article p,
article div,
article span,
article small,
article ul,
article ol,
article li {
    color: #1a1a1a !important;
    line-height: 1.4;
}

.card-body h2,
.card-body h3,
.card-body h4,
.card-body h5,
.card-body h6 {
    color: #1a3a5c !important;
}

.card-body strong,
.card-body b,
article strong,
article b {
    color: #1a1a1a !important;
    font-weight: 700;
}

.card-body em,
.card-body i:not(.bi),
article em,
article i:not(.bi) {
    color: #333 !important;
}

.card-body small,
article small,
.card-body .small,
article .small {
    color: #333 !important;
    font-size: 0.875rem;
    line-height: 1.5;
}

.card-body .tags a {
    color: #2c5282 !important;
    transition: color 0.2s ease;
}

.card-body .tags a:hover {
    color: #1a3a5c !important;
}

/* === Метаинформация постов === */
.post-meta {
    color: #333 !important;
}

.post-meta i.bi-calendar-event {
    color: #2c5282 !important;
}

.post-meta i.bi-person,
.post-meta i.bi-person-circle {
    color: #1a3a5c !important;
}

.post-meta i.bi-eye {
    color: #0d6efd !important;
}

/* === Превью текста поста === */
.post-preview,
.post-preview p,
.post-preview div,
.post-preview span,
.post-preview strong,
.post-preview em {
    color: #1a1a1a !important;
    line-height: 1.4;
}

/* === Заголовок страницы поста === */
.container h1 {
    color: #1a3a5c;
    font-weight: 700;
    font-size: 2rem;
    line-height: 1.3;
    border-bottom: 2px solid #2c5282;
    padding-bottom: 0.75rem;
}

/* === Основной контейнер текста поста (detail page) === */
.post-content {
    font-size: 1.05rem;
    line-height: 1.4;
    color: #1a1a1a;
    max-width: 800px;
    letter-spacing: 0.01em;
}

.post-content,
.post-content p,
.post-content div,
.post-content span,
.post-content small,
.post-content ul,
.post-content ol,
.post-content li {
    color: #1a1a1a !important;
}

.post-content p {
    margin-bottom: 0.75rem;
    text-align: justify;
    hyphens: auto;
}

.post-content div {
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.post-content small {
    color: #333 !important;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Заголовки внутри поста */
.post-content h2,
.post-content h3,
.post-content h4,
.post-content h5 {
    color: #1a3a5c;
    margin-top: 1.25rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
    line-height: 1.25;
}

.post-content h2 {
    font-size: 1.5rem;
    border-bottom: 2px solid #2c5282;
    padding-bottom: 0.4rem;
}

.post-content h3 { font-size: 1.3rem; }
.post-content h4 { font-size: 1.15rem; }
.post-content h5 { font-size: 1.05rem; }

/* Списки */
.post-content ul,
.post-content ol {
    margin-bottom: 0.75rem;
    padding-left: 1.25rem;
    color: #1a1a1a !important;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.post-content li {
    margin-bottom: 0.35rem;
    line-height: 1.4;
    color: #1a1a1a !important;
    text-align: justify;
    hyphens: auto;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.post-content ul li { list-style-type: disc; }
.post-content ol li { list-style-type: decimal; }

/* Выделение текста */
.post-content strong,
.post-content b {
    color: #1a1a1a !important;
    font-weight: 700;
}

.post-content em,
.post-content i:not(.bi) {
    font-style: italic;
    color: #333 !important;
}

/* Цитаты */
.post-content blockquote {
    border-left: 4px solid #2c5282;
    padding: 0.75rem 1rem;
    margin: 1rem 0;
    background: linear-gradient(135deg, #f0f4f8 0%, #fff 100%);
    border-radius: 0 6px 6px 0;
    font-style: italic;
    color: #333 !important;
}

.post-content blockquote p:last-child {
    margin-bottom: 0;
}

/* Заметки и важные блоки */
.post-content .note,
.post-content .info-box {
    background: linear-gradient(135deg, #e8f4f8 0%, #f0f9ff 100%);
    border-left: 4px solid #3498db;
    padding: 0.75rem 1rem;
    margin: 0.75rem 0;
    border-radius: 0 6px 6px 0;
    color: #1a1a1a !important;
}

.post-content .note p,
.post-content .note small,
.post-content .info-box p,
.post-content .info-box small {
    color: #333 !important;
    margin-bottom: 0;
}

.post-content .warning {
    background: linear-gradient(135deg, #fef9e7 0%, #fffdf5 100%);
    border-left: 4px solid #f39c12;
    color: #1a1a1a !important;
}

/* Код */
.post-content code {
    background: #f4f4f4;
    padding: 0.15rem 0.4rem;
    border-radius: 3px;
    font-family: 'Ubuntu Mono', Consolas, monospace;
    font-size: 0.9em;
    color: #1a3a5c;
}

.post-content pre {
    background: #2d2d2d;
    color: #f8f8f2;
    padding: 0.75rem;
    border-radius: 6px;
    overflow-x: auto;
    margin: 0.75rem 0;
    font-size: 0.9rem;
    line-height: 1.4;
}

.post-content pre code {
    background: transparent;
    color: inherit;
    padding: 0;
}

/* Ссылки в контенте */
.post-content a {
    color: #2c5282;
    text-decoration: underline;
    text-decoration-color: rgba(44, 82, 130, 0.3);
    text-underline-offset: 2px;
    transition: all 0.2s ease;
}

.post-content a:hover {
    color: #1a3a5c;
    text-decoration-color: #1a3a5c;
}

/* Изображения в посте */
.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin: 0.75rem 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Таблицы в посте */
.post-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 0.75rem 0;
    font-size: 0.95rem;
}

.post-content th,
.post-content td {
    padding: 0.5rem 0.75rem;
    border: 1px solid #ddd;
    text-align: left;
}

.post-content th {
    background: #1a3a5c;
    color: #fff;
    font-weight: 600;
}

.post-content tr:nth-child(even) {
    background: #f9f9f9;
}

.post-content h2 + p,
.post-content h3 + p,
.post-content h4 + p,
.post-content h5 + p {
    margin-top: 0;
}

.post-content hr {
    border: none;
    border-top: 1px solid #ddd;
    margin: 1rem 0;
}

/* === Мобильная адаптация === */
@media (max-width: 768px) {
    .post-content {
        font-size: 0.95rem;
        line-height: 1.45;
    }

    .post-content h2 { font-size: 1.3rem; }
    .post-content h3 { font-size: 1.15rem; }
    .post-content h4 { font-size: 1.05rem; }
    .post-content h5 { font-size: 1rem; }

    .post-content blockquote,
    .post-content .note {
        padding: 0.5rem 0.75rem;
        margin: 0.5rem 0;
    }

    .post-content ul,
    .post-content ol {
        padding-left: 1rem;
    }
}


/* ============================================
   Стили для юридических документов / анализов
   ============================================ */

.legal-document {
    font-size: 1.05rem;
    line-height: 1.6;
    color: #1a1a1a;
}

.legal-document .section-title {
    color: var(--gl-primary, #1a3a5c);
    font-size: 1.4rem;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--gl-primary, #2c5282);
}

.legal-document .fact-block {
    background: linear-gradient(135deg, #f8f9fa 0%, #fff 100%);
    border-left: 4px solid #dc3545;
    padding: 1rem 1.25rem;
    margin: 1rem 0;
    border-radius: 0 8px 8px 0;
}

.legal-document .fact-block ol,
.legal-document .fact-block ul {
    margin-bottom: 0;
    padding-left: 1.25rem;
}

.legal-document .fact-block li {
    margin-bottom: 0.5rem;
}

.legal-document .recommendation-block {
    background: linear-gradient(135deg, #e8f5e9 0%, #f1f8e9 100%);
    border-left: 4px solid #28a745;
    padding: 1rem 1.25rem;
    margin: 1rem 0;
    border-radius: 0 8px 8px 0;
}

.legal-document .recommendation-block ul {
    margin-bottom: 0;
    padding-left: 1.25rem;
}

.legal-document .recommendation-block li {
    margin-bottom: 0.5rem;
}

/* Цитаты в юридических документах — единый размер с основным текстом */
.legal-document blockquote,
.legal-document .blockquote {
    font-size: 1.05rem;
    margin-bottom: 1rem;
}

.legal-document blockquote p,
.legal-document .blockquote p {
    font-size: inherit;
    margin-bottom: 0.5rem;
}

/* === Мобильная адаптация для юридических документов === */
@media (max-width: 768px) {
    .legal-document {
        font-size: 0.95rem;
    }

    .legal-document .section-title {
        font-size: 1.2rem;
    }

    .legal-document .fact-block,
    .legal-document .recommendation-block {
        padding: 0.75rem 1rem;
    }

    .legal-document blockquote,
    .legal-document .blockquote {
        font-size: 0.95rem;
    }
}
