﻿/* ===== HOMEPAGE — TIN TỔNG HỢP ===== */

.home-banner {
    margin-bottom: 2rem;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--surface);
}

.home-banner-link {
    display: block;
}

.home-banner img {
    width: 100%;
    height: auto; 
    object-fit: cover;
}

.home-top-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    margin-bottom: 2.5rem;
    align-items: start;
}

.home-bottom-grid {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 2.5rem;
    align-items: start;
}

.home-panel {
    min-width: 0;
}

.home-panel-header {
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--text);
}

.home-panel-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.01em;
    line-height: 1.3;
}

.home-panel-subtitle {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
    font-weight: 400;
}

.home-empty,
.home-loading {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
    padding: 0.5rem 0;
}

/* Điểm tin 5 phút */
.brief-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.brief-item {
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-light);
}

.brief-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.brief-title {
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.45;
    margin-bottom: 0.4rem;
}

.brief-title a {
    color: var(--text);
}

.brief-title a:hover {
    color: var(--link-hover);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.brief-summary {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.55;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.brief-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Gợi ý cho bạn */
.suggestions-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.suggestion-item {
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 0.85rem;
    align-items: start;
}

.suggestion-thumb {
    display: block;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid var(--border-light);
}

.suggestion-thumb img {
    width: 100px;
    height: 72px;
    object-fit: cover;
}

.suggestion-title {
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 0.3rem;
}

.suggestion-title a {
    color: var(--text);
}

.suggestion-title a:hover {
    text-decoration: underline;
    text-underline-offset: 2px;
}

.suggestion-summary {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 0.35rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.suggestion-meta {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.suggestion-tags {
    margin-top: 0.35rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

/* Tin mới */
.latest-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.75rem 1.5rem;
}

.latest-card {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.latest-thumb {
    display: block;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid var(--border-light);
}

.latest-thumb img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    transition: opacity 0.2s;
}

.latest-thumb:hover img {
    opacity: 0.92;
}

.latest-title {
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.4;
}

.latest-title a {
    color: var(--text);
}

.latest-title a:hover {
    text-decoration: underline;
    text-underline-offset: 2px;
}

.latest-summary {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.latest-meta {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.latest-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.tag-hash {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text);
    text-decoration: none;
}

a.tag-hash:hover {
    text-decoration: underline;
    text-underline-offset: 2px;
}

.meta-sep {
    margin: 0 0.35rem;
    opacity: 0.5;
}

/* Chuyên mục hôm nay */
.category-today-list {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.category-today-list a {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.35rem 0.5rem;
    color: var(--text);
    font-size: 0.9rem;
    line-height: 1.4;
    padding: 0.35rem 0;
    border-bottom: 1px solid var(--border-light);
    transition: color 0.15s;
}

.category-today-list li:last-child a {
    border-bottom: none;
}

.category-today-list a:hover {
    color: var(--link);
    text-decoration: none;
}

.cat-name {
    font-weight: 700;
}

.cat-count {
    font-size: 0.82rem;
    color: var(--text-muted);
    font-weight: 400;
}

@media (max-width: 1024px) {
    .home-top-grid,
    .home-bottom-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .latest-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .suggestion-item {
        grid-template-columns: 80px 1fr;
    }

    .suggestion-thumb img {
        width: 80px;
        height: 58px;
    }

    .latest-thumb img {
        height: 140px;
    }
}
