﻿/* ============================================
   СТРАНИЦА "ПОЛЕЗНОЕ" - ОПТИМИЗИРОВАННЫЕ СТИЛИ
   ============================================ */

/* --- Общий контейнер страницы --- */
.useful-page {
    max-width: 1800px;
    margin: 30px auto;
    padding: 0 20px;
    min-height: 500px;
}

/* --- Две колонки: оглавление + контент --- */
.useful-container {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

/* ===== ЛЕВАЯ КОЛОНКА - ОГЛАВЛЕНИЕ ===== */
.useful-sidebar {
    flex: 0 0 300px;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e8e8e8;
    overflow: hidden;
    align-self: flex-start;
    position: sticky;
    top: 100px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.useful-sidebar-header {
    background: linear-gradient(to right, #fafafa, #fff5f5);
    padding: 14px 20px;
    border-bottom: 2px solid #cc0000;
}

    .useful-sidebar-header h3 {
        margin: 0;
        font-size: 14px;
        font-weight: 700;
        color: #333;
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .useful-sidebar-header .sidebar-icon {
        width: 18px;
        height: 18px;
        stroke: #cc0000;
        fill: none;
        flex-shrink: 0;
    }

.useful-menu {
    list-style: none;
    margin: 0;
    padding: 8px 0;
}

    .useful-menu li {
        margin: 0;
        border-bottom: 1px solid #f0f0f0;
    }

        .useful-menu li:last-child {
            border-bottom: none;
        }

    .useful-menu a {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 12px 20px;
        color: #444;
        text-decoration: none;
        font-size: 14px;
        font-weight: 500;
        transition: all 0.2s ease;
        border-left: 3px solid transparent;
    }

        .useful-menu a:hover {
            background: #fff5f5;
            color: #cc0000;
            border-left-color: #cc0000;
        }

    .useful-menu li.active a {
        background: #fff0f0;
        color: #cc0000;
        border-left-color: #cc0000;
        font-weight: 600;
    }

    /* Иконки в меню */
    .useful-menu .menu-icon {
        width: 18px;
        height: 18px;
        stroke: #666;
        fill: none;
        flex-shrink: 0;
        transition: stroke 0.2s;
    }

    .useful-menu a:hover .menu-icon {
        stroke: #cc0000;
    }

    .useful-menu li.active a .menu-icon {
        stroke: #cc0000;
    }

/* ===== ПРАВАЯ КОЛОНКА - КОНТЕНТ СТАТЬИ ===== */
.useful-content {
    flex: 1;
    min-width: 0;
    background: #fff;
    border-radius: 16px;
    border: 1px solid #e8e8e8;
    padding: 35px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* --- Стили для статей --- */
.article {
    display: block;
}

    /* Заголовок статьи (не больше слогана в шапке - 16px) */
    /* Заголовок статьи с розовым фоном (как активный пункт меню) */
    .article h1 {
        font-size: 18px;
        font-weight: 700;
        color: #cc0000;
        margin: 0 0 20px 0;
        padding: 14px 18px;
        background: #fff0f0;
        border-left: 4px solid #cc0000;
        border-radius: 8px;
        line-height: 1.4;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    }

/* Мета-информация */
.article-meta {
    color: #888;
    font-size: 11px;
    margin-bottom: 16px;
    padding-bottom: 6px;
    border-bottom: 1px dashed #e0e0e0;
}

/* Подзаголовки */
.article h2 {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    margin: 20px 0 8px 0;
}

.article h3 {
    font-size: 14px;
    font-weight: 600;
    color: #444;
    margin: 15px 0 6px 0;
}

/* Параграфы */
.article p {
    font-size: 13px;
    line-height: 1.55;
    color: #333;
    margin-bottom: 12px;
}

/* Списки */
.article ul,
.article ol {
    margin: 8px 0 12px;
    padding-left: 20px;
}

.article li {
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 4px;
    color: #444;
}

    .article li strong {
        color: #cc0000;
    }

/* Выделенные блоки */
.article .note-block {
    background: #f5f9ff;
    border-left: 4px solid #2196F3;
    padding: 10px 14px;
    margin: 14px 0;
    border-radius: 6px;
    font-size: 12px;
    line-height: 1.5;
}

.article .warning-block {
    background: #fff8e7;
    border-left: 4px solid #ff9800;
    padding: 10px 14px;
    margin: 14px 0;
    border-radius: 6px;
    font-size: 12px;
    line-height: 1.5;
}

.article .important-block {
    background: #fff0f0;
    border-left: 4px solid #cc0000;
    padding: 10px 14px;
    margin: 14px 0;
    border-radius: 6px;
    font-size: 12px;
    line-height: 1.5;
}

/* Таблицы */
.article table {
    width: 100%;
    border-collapse: collapse;
    margin: 14px 0;
    font-size: 12px;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.article th {
    background: #cc0000;
    color: white;
    font-weight: 600;
    padding: 8px 10px;
    text-align: left;
    font-size: 12px;
}

.article td {
    padding: 6px 10px;
    border: 1px solid #e8e8e8;
    background: white;
    color: #333;
    font-size: 12px;
}

.article tr:nth-child(even) td {
    background: #fafafa;
}

.article tr:hover td {
    background: #fff5f5;
}

/* Кнопки (если будут в статьях) */
.article .btn {
    display: inline-block;
    background: #cc0000;
    color: white;
    padding: 6px 16px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    font-size: 12px;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
}

    .article .btn:hover {
        background: #990000;
        transform: translateY(-1px);
    }

/* ===== АДАПТИВНОСТЬ ===== */
@media (max-width: 992px) {
    .useful-container {
        flex-direction: column;
    }

    .useful-sidebar {
        flex: auto;
        position: static;
        top: 0;
    }

    .useful-menu {
        display: flex;
        flex-wrap: wrap;
        gap: 5px;
        padding: 15px;
    }

        .useful-menu li {
            flex: 1 1 auto;
            min-width: 200px;
            border-bottom: none;
        }

        .useful-menu a {
            border-left: none;
            border-bottom: 3px solid transparent;
            justify-content: center;
            background: #f8f8f8;
            border-radius: 8px;
            padding: 8px 12px;
            font-size: 13px;
        }

            .useful-menu a:hover,
            .useful-menu li.active a {
                border-left-color: transparent;
                border-bottom-color: #cc0000;
            }

        .useful-menu .menu-icon {
            width: 16px;
            height: 16px;
        }

    .useful-content {
        padding: 20px;
    }

    .article h1 {
        font-size: 15px;
    }

    .article h2 {
        font-size: 14px;
    }

    .article h3 {
        font-size: 13px;
    }
}

@media (max-width: 576px) {
    .useful-content {
        padding: 12px;
    }

    .article table {
        font-size: 11px;
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .article th,
    .article td {
        padding: 6px 8px;
    }

    .article h1 {
        font-size: 14px;
    }

    .article h2 {
        font-size: 13px;
    }

    .article p,
    .article li,
    .article .note-block,
    .article .warning-block,
    .article .important-block {
        font-size: 12px;
    }
}
