/* ==========================================================
   cert.css — Компоненты для статейного контента
   vnesenie-v-reestr.ru
   Основа: /css/design-tokens.css (подключать первым)
   Подключается: через шаблон news/article.php (НЕ в теле статьи)
   Обновлено: 2026-04-26
   ========================================================== */

/* ── Контейнер ─────────────────────────────────────────── */

.custom-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.custom-main-content {
    background: #fff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: var(--shadow-light, 0 32px 64px rgba(15,23,42,0.04));
    margin-top: 30px;
}

/* ── Заголовки ──────────────────────────────────────────── */

.custom-header {
    color: var(--color-on-surface, #131b2e);
    font-size: 2.5rem;
    font-family: var(--font-accent, 'Manrope', sans-serif);
    font-weight: 800;
    margin-bottom: 30px;
    line-height: 1.2;
    text-align: center;
}

.custom-section-title {
    color: var(--color-primary, #00347f);
    font-size: 1.8rem;
    font-family: var(--font-accent, 'Manrope', sans-serif);
    font-weight: 700;
    margin: 40px 0 20px 0;
    border-bottom: 3px solid var(--color-primary, #00347f);
    padding-bottom: 10px;
}

.custom-subsection {
    color: var(--color-on-surface, #131b2e);
    font-size: 1.4rem;
    font-weight: 700;
    margin: 30px 0 15px 0;
}

.custom-subheading {
    color: var(--color-on-surface-variant, #434652);
    font-size: 1.2rem;
    font-weight: 600;
    margin: 25px 0 10px 0;
}

/* ── Текстовые элементы ─────────────────────────────────── */

.custom-paragraph {
    line-height: 1.7;
    margin-bottom: 20px;
    color: var(--color-on-surface-variant, #434652);
}

.custom-list {
    margin: 20px 0;
    padding-left: 30px;
}

.custom-list-item {
    margin-bottom: 10px;
    line-height: 1.6;
    color: var(--color-on-surface-variant, #434652);
}

.custom-highlight {
    color: var(--color-primary, #00347f);
    font-weight: 600;
}

/* ── Карточки-вызовы (тёмный фон) ──────────────────────── */

.custom-challenges-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 25px;
    margin: 30px 0;
}

.custom-challenge-card {
    background: var(--gradient-hero, linear-gradient(135deg, #00347f 0%, #1e4b9e 100%));
    color: #fff;
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    box-shadow: var(--shadow-card, 0 32px 64px rgba(15,23,42,0.06));
}

.custom-challenge-card *,
.custom-challenge-card h4,
.custom-challenge-card p,
.custom-challenge-card span {
    color: #fff !important;
}

.custom-challenge-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    display: block;
    color: var(--color-surface-high, #e2e7ff) !important;
}

.custom-challenge-card h4 {
    margin: 0 0 15px 0;
    font-size: 1.2rem;
    font-weight: 700;
}

.custom-challenge-card p {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.5;
    opacity: 0.92;
}

/* ── Карточки подходов ──────────────────────────────────── */

.custom-approaches-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.custom-approach-item {
    background: var(--color-surface-lowest, #fff);
    border: 2px solid var(--color-primary, #00347f);
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-light, 0 32px 64px rgba(15,23,42,0.04));
}

.custom-approach-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-card, 0 32px 64px rgba(15,23,42,0.06));
}

.custom-approach-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
    display: block;
    color: var(--color-primary, #00347f);
}

.custom-approach-item h5 {
    color: var(--color-on-surface, #131b2e);
    margin: 0 0 10px 0;
    font-size: 1.1rem;
    font-weight: 700;
}

.custom-approach-item p {
    color: var(--color-on-surface-variant, #434652);
    margin: 0;
    font-size: 0.9rem;
}

/* ── Блоки предупреждений / инфо / успех ────────────────── */

.custom-warning-block {
    background: #fff8ee;
    border-left: 4px solid var(--color-warning, #e67e22);
    padding: 25px;
    border-radius: 0 12px 12px 0;
    margin: 30px 0;
}

.custom-warning-block h3 {
    color: var(--color-warning, #e67e22);
    margin: 0 0 12px 0;
}

.custom-warning-block p {
    color: var(--color-on-surface, #131b2e);
    margin: 0;
}

.custom-info-block {
    background: var(--color-surface-low, #f2f3ff);
    border-left: 4px solid var(--color-primary, #00347f);
    padding: 25px;
    border-radius: 0 12px 12px 0;
    margin: 30px 0;
}

.custom-info-block h3 {
    color: var(--color-primary, #00347f);
    margin: 0 0 12px 0;
}

.custom-info-block p {
    color: var(--color-on-surface, #131b2e);
    margin: 0;
}

.custom-success-box {
    background: var(--gradient-hero, linear-gradient(135deg, #00347f 0%, #1e4b9e 100%));
    color: #fff;
    padding: 30px;
    border-radius: 12px;
    margin: 30px 0;
    text-align: center;
}

.custom-success-box h3 {
    color: #fff;
    margin: 0 0 15px 0;
}

.custom-success-box p {
    color: rgba(255,255,255,0.9);
    margin: 0;
}

/* ── Шаги процесса ──────────────────────────────────────── */

.custom-process-steps {
    margin: 30px 0;
}

.custom-process-step {
    display: flex;
    align-items: flex-start;
    margin-bottom: 20px;
    padding: 25px;
    background: var(--color-surface-low, #f2f3ff);
    border-radius: 12px;
    border-left: 4px solid var(--color-primary, #00347f);
}

.custom-step-number {
    background: var(--color-primary, #00347f);
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    margin-right: 20px;
    flex-shrink: 0;
    font-family: var(--font-accent, 'Manrope', sans-serif);
}

.custom-step-content h4 {
    margin: 0 0 10px 0;
    color: var(--color-on-surface, #131b2e);
    font-weight: 700;
}

.custom-step-content p {
    margin: 0;
    color: var(--color-on-surface-variant, #434652);
}

/* ── Статистика / метрики ───────────────────────────────── */

.custom-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.custom-stat-item {
    text-align: center;
    padding: 25px;
    background: var(--gradient-hero, linear-gradient(135deg, #00347f 0%, #1e4b9e 100%));
    color: #fff;
    border-radius: 12px;
    box-shadow: var(--shadow-card, 0 32px 64px rgba(15,23,42,0.06));
}

.custom-stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 800;
    font-family: var(--font-accent, 'Manrope', sans-serif);
    color: #fff;
    margin-bottom: 8px;
}

.custom-stat-label {
    color: rgba(255,255,255,0.85);
    font-size: 0.9rem;
}

/* ── Примеры ────────────────────────────────────────────── */

.custom-examples-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 15px;
    margin: 30px 0;
}

.custom-example-item {
    background: var(--color-surface-low, #f2f3ff);
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    color: var(--color-primary, #00347f);
    font-weight: 600;
    border-left: 3px solid var(--color-primary, #00347f);
}

/* ── Таблица документов ─────────────────────────────────── */

.custom-documentation-table {
    background: var(--color-surface-low, #f2f3ff);
    border-radius: 12px;
    padding: 30px;
    margin: 30px 0;
    overflow-x: auto;
}

.custom-documentation-table table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-light, 0 32px 64px rgba(15,23,42,0.04));
}

.custom-documentation-table th {
    background: var(--color-primary, #00347f);
    color: #fff;
    padding: 14px 16px;
    text-align: left;
    font-weight: 700;
    font-size: 0.9rem;
    border: none;
}

.custom-documentation-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--color-outline-variant, #c3c6d3);
    color: var(--color-on-surface, #131b2e);
    font-size: 0.95rem;
}

.custom-documentation-table tbody tr:hover {
    background: var(--color-surface-low, #f2f3ff);
}

/* ── Шаблоны / карточки-категории ──────────────────────── */

.custom-templates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 25px;
    margin: 30px 0;
}

.custom-template-card {
    background: var(--gradient-hero, linear-gradient(135deg, #00347f 0%, #1e4b9e 100%));
    color: #fff;
    padding: 30px;
    border-radius: 12px;
}

.custom-template-card h4 {
    color: #fff;
    margin: 0 0 15px 0;
    font-size: 1.2rem;
    font-weight: 700;
}

.custom-template-card p {
    color: rgba(255,255,255,0.9);
    margin: 0 0 15px 0;
    font-size: 0.95rem;
}

.custom-template-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.custom-template-card li {
    color: rgba(255,255,255,0.9);
    margin: 8px 0;
    padding-left: 20px;
    position: relative;
}

.custom-template-card li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--color-surface-high, #e2e7ff);
    font-weight: 700;
}

/* ── Контакты ───────────────────────────────────────────── */

.custom-contacts-block {
    background: var(--color-primary, #00347f);
    padding: 25px;
    border-radius: 12px;
    margin: 30px 0;
    color: #fff;
}

.custom-contacts-block h3 {
    color: #fff;
    margin: 0 0 20px 0;
}

.custom-contacts-block p {
    margin: 10px 0;
    color: rgba(255,255,255,0.9);
}

.custom-contacts-block strong {
    color: #fff;
}

.custom-contacts-block a {
    color: var(--color-surface-high, #e2e7ff);
    text-decoration: none;
}

.custom-contacts-block a:hover {
    text-decoration: underline;
}

/* ── Сравнение ──────────────────────────────────────────── */

.custom-comparison-block {
    background: var(--color-surface-low, #f2f3ff);
    padding: 25px;
    border-radius: 12px;
    margin: 30px 0;
}

.custom-comparison-block h3 {
    color: var(--color-on-surface, #131b2e);
    margin: 0 0 20px 0;
    text-align: center;
    font-weight: 700;
}

.custom-comparison-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.custom-comparison-item {
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    border: 2px solid var(--color-primary, #00347f);
}

.custom-comparison-item h4 {
    color: var(--color-primary, #00347f);
    margin: 0 0 15px 0;
    text-align: center;
    font-weight: 700;
}

/* ── Адаптивность ───────────────────────────────────────── */

@media (max-width: 768px) {
    .custom-main-content { padding: 24px; }
    .custom-header { font-size: 1.8rem; }
    .custom-section-title { font-size: 1.4rem; }
    .custom-approaches-grid,
    .custom-challenges-grid,
    .custom-templates-grid,
    .custom-examples-section { grid-template-columns: 1fr; }
    .custom-comparison-grid { grid-template-columns: 1fr; }
    .custom-stats-grid { grid-template-columns: repeat(2, 1fr); }

    /* Таблица → карточки на мобиле */
    .custom-documentation-table { padding: 12px 8px; background: transparent; }
    .custom-documentation-table table { min-width: 100%; box-shadow: none; background: transparent; }
    .custom-documentation-table thead { display: none; }
    .custom-documentation-table tbody tr {
        display: block;
        margin-bottom: 12px;
        border: 1px solid var(--color-outline-variant, #c3c6d3);
        border-radius: 10px;
        overflow: hidden;
        background: #fff;
    }
    .custom-documentation-table tbody td {
        display: block;
        padding: 12px 14px;
        border-bottom: 1px solid var(--color-surface-low, #f2f3ff);
        font-size: 0.9rem;
    }
    .custom-documentation-table tbody td:last-child { border-bottom: none; }
    .custom-documentation-table tbody td:first-child {
        font-weight: 600;
        color: var(--color-primary, #00347f);
        background: var(--color-surface-low, #f2f3ff);
    }
}

@media (max-width: 480px) {
    .custom-container { padding: 10px; }
    .custom-main-content { padding: 16px; }
    .custom-stats-grid { grid-template-columns: 1fr; }
    .custom-approach-item,
    .custom-challenge-card,
    .custom-template-card { padding: 20px; }
}
