/* ============================================================
   forum/list.css — Trang danh sách cộng đồng
   Palette: navy #0a2d6e | blue #0d5db5 | cyan #29b6f6 | red #e53935
   ============================================================ */

/* ── Wrapper ─────────────────────────────────────────────── */
.rtm-forum {
    background: #f0f7ff;
    min-height: 80vh;
    padding: 0 0 60px;
}

/* ── Top bar ─────────────────────────────────────────────── */
.rtm-forum__top {
    background: #ffffff;
    border-bottom: 2px solid #c5d8f0;
    padding: 10px 0;
    margin-top: 0;
}

.site-main > .rtm-forum__top:first-child {
    margin-top: 0;
}

.rtm-forum__topbar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    max-width: 800px;
    margin: 0 auto;
}

.rtm-forum__search-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    background: #e8f4fd;
    border: 2px solid #90c4e8;
    border-radius: 999px;
    padding: 7px 16px;
    gap: 8px;
    max-width: 560px;
    transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.rtm-forum__search-wrap:focus-within {
    background: #fff;
    border-color: #29b6f6;
    box-shadow: 0 0 0 3px rgba(41, 182, 246, 0.12);
}

.rtm-forum__search-wrap svg {
    color: #9ca3af;
    flex-shrink: 0;
}

.rtm-forum__search-wrap input {
    border: none;
    background: transparent;
    outline: none;
    flex: 1;
    font-size: 14px;
    color: #374151;
    font-family: inherit;
}

.rtm-forum__search-wrap input::placeholder {
    color: #9ca3af;
}

/* Post button — RED */
.rtm-forum__post-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: #e53935;
    color: #fff;
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: 0 4px 14px rgba(229, 57, 53, 0.35);
    transition: background 0.2s, transform 0.2s;
}

.rtm-forum__post-btn:hover {
    background: #c62828;
    color: #fff;
    transform: translateY(-1px);
}

/* ── Tabs ────────────────────────────────────────────────── */
.rtm-forum__tabs {
    display: flex;
    gap: 0;
    background: #fff;
    border-bottom: 1px solid #c5d8f0;
    overflow-x: auto;
    scrollbar-width: none;
}

.rtm-forum__tabs::-webkit-scrollbar { display: none; }

.rtm-forum__tab {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 13px 18px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    color: #5a6a8a;
    white-space: nowrap;
    border-bottom: 2.5px solid transparent;
    transition: color 0.15s, background 0.15s, border-color 0.15s;
    flex-shrink: 0;
}

.rtm-forum__tab:hover {
    color: #0d5db5;
    background: transparent;
}

.rtm-forum__tab.is-active {
    color: #ffffff;
    border-bottom-color: #0d5db5;
    background: #0d5db5;
    font-weight: 700;
}

/* ── Body grid ───────────────────────────────────────────── */
.rtm-forum__body {
    display: grid;
    grid-template-columns: 1fr 290px;
    gap: 20px;
    padding: 20px 0;
}

/* ── Announce bar ────────────────────────────────────────── */
.rtm-forum__announce {
    background: #fff;
    border-radius: 14px;
    margin-bottom: 14px;
    overflow: hidden;
    border: 1px solid #c5d8f0;
    box-shadow: 0 2px 10px rgba(13, 93, 181, 0.05);
}

.rtm-forum__announce-head {
    background: linear-gradient(90deg, #0a2d6e, #0d5db5);
    padding: 10px 16px;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ── Post card ───────────────────────────────────────────── */
.rtm-forum__post {
    background: #fff;
    border-radius: 14px;
    margin-bottom: 10px;
    padding: 18px 20px;
    border: 1px solid #c5d8f0;
    display: flex;
    gap: 14px;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
    box-shadow: 0 2px 10px rgba(13, 93, 181, 0.05);
}

.rtm-forum__post:hover {
    border-color: #29b6f6;
    box-shadow: 0 4px 20px rgba(13, 93, 181, 0.1);
    transform: translateY(-1px);
}

/* Avatar — blue gradient */
.rtm-forum__post-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0d5db5, #29b6f6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 16px;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(13, 93, 181, 0.25);
}

.rtm-forum__post-body {
    flex: 1;
    min-width: 0;
}

/* Category badge */
.rtm-forum__post-cat {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    margin-bottom: 7px;
    background: #e8f4fd;
    color: #0d5db5;
    border: 1px solid #c5d8f0;
}

.rtm-forum__post-title {
    font-size: 15px;
    font-weight: 700;
    color: #0a2d6e;
    text-decoration: none;
    display: block;
    margin-bottom: 6px;
    line-height: 1.45;
}

.rtm-forum__post-title:hover { color: #0d5db5; }

.rtm-forum__post-excerpt {
    font-size: 13px;
    color: #5a6a8a;
    line-height: 1.65;
    margin-bottom: 8px;
}

/* Hashtags */
.rtm-forum__post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 8px;
}

.rtm-forum__post-tag {
    background: #f0f7ff;
    color: #3a5a8a;
    padding: 2px 9px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    border: 1px solid #c5d8f0;
}

.rtm-forum__post-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    color: #9ca3af;
    flex-wrap: wrap;
}

.rtm-forum__post-meta span {
    display: flex;
    align-items: center;
    gap: 3px;
}

.rtm-forum__post-images {
    display: flex;
    gap: 6px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.rtm-forum__post-images img {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #c5d8f0;
}

/* Empty state */
.rtm-forum__empty {
    text-align: center;
    padding: 48px 20px;
    background: #fff;
    border-radius: 14px;
    color: #9ca3af;
    border: 1px solid #c5d8f0;
}

/* ── Sidebar ─────────────────────────────────────────────── */
.rtm-forum__sidebar {}

.rtm-forum__widget {
    background: #fff;
    border-radius: 14px;
    padding: 16px 18px;
    margin-bottom: 14px;
    border: 1px solid #c5d8f0;
    box-shadow: 0 2px 10px rgba(13, 93, 181, 0.05);
}

.rtm-forum__widget-title {
    font-size: 12px;
    font-weight: 700;
    color: #0a2d6e;
    margin: 0 0 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid #29b6f6;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Trending */
.rtm-forum__trending-item {
    display: flex;
    gap: 10px;
    padding: 9px 0;
    border-bottom: 1px solid #f0f7ff;
    align-items: flex-start;
}

.rtm-forum__trending-item:last-child { border-bottom: none; }

.rtm-forum__trending-num {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    background: #0d5db5;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Top 1 — red */
.rtm-forum__trending-num:first-child,
.rtm-forum__trending-num.top { background: #e53935; }

.rtm-forum__trending-title {
    font-size: 13px;
    color: #374151;
    text-decoration: none;
    line-height: 1.4;
}

.rtm-forum__trending-title:hover { color: #0d5db5; }

/* Warning widget items */
.rtm-forum__warn-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 0;
    border-bottom: 1px solid #f0f7ff;
    text-decoration: none;
    transition: background 0.15s;
}

.rtm-forum__warn-item:last-child { border-bottom: none; }

.rtm-forum__warn-item:hover { background: #fdecea; border-radius: 8px; padding-left: 6px; }

.rtm-forum__warn-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #fdecea;
    border: 1px solid #f9baba;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.rtm-forum__warn-name {
    font-size: 13px;
    font-weight: 600;
    color: #0a2d6e;
    line-height: 1.3;
}

.rtm-forum__warn-rating {
    font-size: 11px;
    color: #e53935;
    font-weight: 600;
    margin-top: 2px;
}

/* ── Pagination ──────────────────────────────────────────── */
.rtm-forum__pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 18px;
}

.rtm-forum__pagination a,
.rtm-forum__pagination span {
    padding: 7px 13px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}

.rtm-forum__pagination a {
    background: #fff;
    color: #0d5db5;
    border: 1px solid #c5d8f0;
    transition: border-color 0.15s, background 0.15s;
}

.rtm-forum__pagination a:hover {
    border-color: #0d5db5;
    background: #e8f4fd;
}

.rtm-forum__pagination .current {
    background: #0d5db5;
    color: #fff;
    border: 1px solid #0d5db5;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 768px) {
    .rtm-forum__body {
        grid-template-columns: 1fr;
    }

    .rtm-forum__sidebar { display: none; }

    .rtm-forum__tabs { padding: 0; }

    .rtm-forum__tab { padding: 11px 14px; font-size: 12px; }
}

/* Bỏ padding-top của site-main khi trang forum */
.page-template-page-cong-dong-tham-my .site-main,
body:has(.rtm-forum__top) .site-main {
    padding-top: 0 !important;
}