/* XayNhaMoi Core Plugin – CSS v1.1.0
   ================================================== */

/* ── Grid ─────────────────────────────────────────── */
.xnm-grid {
    display: grid;
    gap: 1.5rem;
}
.xnm-col-2 { grid-template-columns: repeat(2, 1fr); }
.xnm-col-3 { grid-template-columns: repeat(3, 1fr); }
.xnm-col-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 1024px) {
    .xnm-col-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
    .xnm-col-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
    .xnm-col-2,
    .xnm-col-3,
    .xnm-col-4 { grid-template-columns: 1fr; }
}

/* ── Card ─────────────────────────────────────────── */
.xnm-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,.08);
    transition: box-shadow .25s ease, transform .25s ease;
    display: flex;
    flex-direction: column;
}
.xnm-card:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,.14);
    transform: translateY(-2px);
}

.xnm-card__thumb {
    display: block;
    overflow: hidden;
}
.xnm-card__thumb img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    transition: transform .35s ease;
}
.xnm-card:hover .xnm-card__thumb img {
    transform: scale(1.04);
}

.xnm-card__body {
    padding: 1rem 1.15rem 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.xnm-card__title {
    font-size: 1rem;
    margin: 0 0 .4rem;
    line-height: 1.4;
    flex: 1;
}
.xnm-card__title a {
    color: inherit;
    text-decoration: none;
}
.xnm-card__title a:hover { color: #c0392b; }

.xnm-card__excerpt {
    font-size: .88rem;
    color: #555;
    margin: 0 0 .65rem;
    line-height: 1.55;
}

.xnm-card__meta {
    font-size: .78rem;
    color: #999;
    margin-top: auto;
}

/* Small card variant */
.xnm-card--sm .xnm-card__thumb img { height: 130px; }
.xnm-card--sm .xnm-card__title     { font-size: .9rem; }
.xnm-card--guide .xnm-card__thumb img { height: 170px; }

/* ── Bảng thông số ───────────────────────────────── */
.xnm-thong-so-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: .92rem;
    background: #fff;
}
.xnm-thong-so-table th,
.xnm-thong-so-table td {
    padding: .6rem .9rem;
    border: 1px solid #e0e0e0;
    text-align: left;
    transition: background .15s;
}
.xnm-thong-so-table th {
    background: #f7f7f7;
    font-weight: 600;
    width: 45%;
    color: #333;
}
.xnm-thong-so-table tr.xnm-row-hover th,
.xnm-thong-so-table tr.xnm-row-hover td {
    background: #fff8f0;
}

/* ── Widget Bài Nổi Bật ─────────────────────────── */
.xnm-widget-bai-noi-bat {
    list-style: none;
    margin: 0;
    padding: 0;
}
.xnm-widget-bai-noi-bat li {
    padding: .55rem 0;
    border-bottom: 1px solid #f2f2f2;
    display: flex;
    flex-direction: column;
    gap: .15rem;
}
.xnm-widget-bai-noi-bat li:last-child { border-bottom: none; }
.xnm-widget-bai-noi-bat a {
    font-size: .9rem;
    text-decoration: none;
    color: #222;
    line-height: 1.4;
}
.xnm-widget-bai-noi-bat a:hover { color: #c0392b; }
.xnm-widget-bai-noi-bat .xnm-date { font-size: .75rem; color: #bbb; }

/* ── Bài mới list ────────────────────────────────── */
.xnm-bai-moi-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.xnm-bai-moi-item {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: .5rem;
    padding: .5rem 0;
    border-bottom: 1px solid #f2f2f2;
    font-size: .9rem;
}
.xnm-bai-moi-item:last-child { border-bottom: none; }
.xnm-bai-moi-item a { color: #222; text-decoration: none; flex: 1; }
.xnm-bai-moi-item a:hover { color: #c0392b; }
.xnm-bai-moi-item time {
    font-size: .75rem;
    color: #bbb;
    white-space: nowrap;
}

/* ── Bài liên quan ───────────────────────────────── */
.xnm-related-posts {
    margin: 2.5rem 0 1rem;
    padding-top: 1.5rem;
    border-top: 2px solid #f0f0f0;
}
.xnm-related-title {
    font-size: 1.1rem;
    margin: 0 0 1rem;
    color: #333;
}

/* ── Misc ────────────────────────────────────────── */
.xnm-empty { color: #aaa; font-style: italic; }
