/* ============================================================
   ФОРУМ
   ============================================================ */

.forum-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    background: #fff;
    border: 1px solid #e3edf9;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(74, 127, 199, 0.05);
}
.forum-table thead th {
    background: #f0f5fc;
    color: #2c5aa0;
    font-weight: 600;
    font-size: 12px;
    padding: 9px 14px;
    text-align: left;
    border-bottom: 2px solid #d4e2f3;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
}
.forum-table tbody td {
    padding: 9px 14px;
    border-bottom: 1px solid #eef2f7;
    vertical-align: middle;
}
.forum-table tbody tr:last-child td { border-bottom: none; }
.forum-table-grouped tbody tr:not(.forum-cat-row):nth-child(even) td { background: #fafbfd; }
.forum-table-grouped tbody tr:not(.forum-cat-row):hover td { background: #f0f5fc; }
.forum-table-grouped .forum-cat-row td {
    background: linear-gradient(180deg, #4a7fc7, #3a6fb1) !important;
    color: #fff !important;
    font-weight: 600;
    font-size: 14px;
    padding: 9px 14px;
    letter-spacing: 0.4px;
    border-bottom: 1px solid #2c5aa0;
}
.forum-table-grouped .forum-cat-row td i { margin-right: 8px; opacity: 0.9; }

.forum-title-link { color: #2c5aa0; font-weight: 600; text-decoration: none; }
.forum-title-link:hover { text-decoration: underline; }
.forum-desc { color: #6a7a8f; font-size: 12px; margin-top: 3px; line-height: 1.4; }
.forum-num { text-align: center; color: #455a64; font-variant-numeric: tabular-nums; font-weight: 600; }
.forum-last { font-size: 12px; color: #6a7a8f; line-height: 1.4; }
.forum-last a { color: #4a7fc7; text-decoration: none; }
.forum-last a:hover { text-decoration: underline; }
.forum-last-meta { margin-top: 3px; color: #90a4ae; }

.forum-breadcrumbs { font-size: 13px; color: #6a7a8f; margin: 0 0 10px; line-height: 1.5; }
.forum-breadcrumbs a { color: #4a7fc7; text-decoration: none; }
.forum-breadcrumbs a:hover { text-decoration: underline; }
.forum-breadcrumbs span { color: #2c5aa0; font-weight: 600; }

.forum-head {
    display: flex; justify-content: space-between; align-items: center;
    gap: 15px; margin-bottom: 12px; flex-wrap: wrap;
}
.forum-desc-block {
    color: #6a7a8f;
    font-size: 13px;
    margin: 0 0 14px;
    padding: 10px 14px;
    background: #f8fafd;
    border-left: 3px solid #4a7fc7;
    border-radius: 4px;
    line-height: 1.5;
}
.forum-topic-meta {
    font-size: 12px;
    color: #6a7a8f;
    margin-bottom: 15px;
    padding: 8px 12px;
    background: #f8fafd;
    border-radius: 4px;
    line-height: 1.5;
}
.forum-topic-meta b { color: #2c5aa0; }

.forum-posts { display: flex; flex-direction: column; gap: 14px; }
.forum-post {
    background: #fff;
    border: 1px solid #e3edf9;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(74, 127, 199, 0.04);
}
.forum-post-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 14px;
    background: #f0f5fc;
    border-bottom: 1px solid #d4e2f3;
    font-size: 13px;
    gap: 10px; flex-wrap: wrap;
}
.forum-post-author { color: #2c5aa0; font-weight: 600; }
.forum-post-author i { margin-right: 6px; color: #4a7fc7; }
.forum-post-date { color: #6a7a8f; font-size: 12px; white-space: nowrap; }
.forum-post-body {
    padding: 14px 18px;
    font-size: 14px;
    line-height: 1.65;
    color: #333;
    word-wrap: break-word;
    overflow-wrap: break-word;
}
.forum-post-body p { margin: 0 0 10px; }
.forum-post-body p:last-child { margin-bottom: 0; }
.forum-post-body a { color: #1976d2; }
.forum-post-body img { max-width: 100%; height: auto; border-radius: 6px; }
.forum-post-body ul, .forum-post-body ol { padding-left: 24px; margin: 8px 0; }
.forum-post-body code { background: #f5f7fa; padding: 1px 6px; border-radius: 3px; font-size: 12px; }
.forum-post-body blockquote {
    margin: 8px 0; padding: 8px 14px;
    border-left: 3px solid #b0bec5;
    background: #f8fafd;
    color: #546e7a;
    font-style: italic;
}
.forum-post-body table { border-collapse: collapse; max-width: 100%; margin: 8px 0; }
.forum-post-body table td, .forum-post-body table th { border: 1px solid #d8e0eb; padding: 6px 10px; }
.forum-reply-cta { margin-top: 20px; text-align: right; }

.forum-form-note {
    color: #6a7a8f;
    font-size: 12px;
    margin: 0 0 10px;
    padding: 8px 12px;
    background: #f8fafd;
    border-radius: 4px;
}
.forum-form textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #cdd9e8;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.55;
    font-family: Verdana, Tahoma, Arial, sans-serif;
    resize: vertical;
    box-sizing: border-box;
    min-height: 180px;
}
.forum-form textarea:focus {
    outline: none;
    border-color: #4a7fc7;
    box-shadow: 0 0 0 2px rgba(74, 127, 199, 0.12);
}

.forum-row-sticky td { background: #fffaf0 !important; }
.forum-row-sticky:hover td { background: #fff4d9 !important; }

@media (max-width: 900px) {
    .forum-table { font-size: 13px; }
    .forum-table thead th { padding: 7px 10px; font-size: 11px; }
    .forum-table tbody td { padding: 7px 10px; }
    .forum-table-grouped .forum-cat-row td { padding: 8px 10px; font-size: 13px; }
    .forum-post-body { padding: 12px 14px; font-size: 13px; }
    .forum-post-head { font-size: 12px; padding: 7px 12px; }
}
@media (max-width: 700px) {
    .forum-table thead { display: none; }
    .forum-table, .forum-table tbody, .forum-table tr, .forum-table td { display: block; width: 100%; }
    .forum-table tbody tr { padding: 8px 12px; border-bottom: 3px solid #e3edf9; }
    .forum-table tbody tr:last-child { border-bottom: none; }
    .forum-table tbody td { padding: 3px 0; border-bottom: none; text-align: left; }
    .forum-table-grouped .forum-cat-row td {
        display: block;
        margin: -8px -12px 8px;
        padding: 9px 12px;
        border-radius: 0;
    }
    .forum-num {
        display: inline-block !important;
        width: auto !important;
        text-align: left !important;
        margin-right: 15px;
        color: #4a7fc7;
        font-size: 12px;
    }
    .forum-head { flex-direction: column; align-items: flex-start; }
    .forum-head .btn-admin-primary, .forum-head .btn-admin-secondary {
        width: 100%; text-align: center; justify-content: center;
    }
    .forum-post-head { flex-direction: column; align-items: flex-start; }
    .forum-post-body { padding: 10px 12px; font-size: 13px; }
    .forum-form textarea { min-height: 140px; font-size: 13px; }
}
@media (max-width: 480px) {
    .forum-post-body { font-size: 12px; line-height: 1.55; }
    .forum-topic-meta, .forum-desc-block, .forum-breadcrumbs { font-size: 11px; }
    .forum-cat-row td { font-size: 12px !important; }
}
@media print {
    .forum-head .btn-admin-primary,
    .forum-head .btn-admin-secondary,
    .forum-reply-cta,
    .news-pagination,
    .forum-breadcrumbs { display: none !important; }
    .forum-post { box-shadow: none; border-color: #ccc; page-break-inside: avoid; }
}
