/* Trang tin tức & chi tiết bài */

.news-page-main {
    min-height: calc(100vh - 180px);
    padding: 2.5rem 0 4rem;
    background: var(--bg-light);
}

.news-page-header {
    text-align: center;
    max-width: 40rem;
    margin: 0 auto 2.5rem;
}

.news-page-header h1 {
    font-size: clamp(1.85rem, 4vw, 2.5rem);
    font-weight: 900;
    letter-spacing: -0.03em;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.news-page-header p {
    color: var(--text-secondary);
    font-size: 1.05rem;
}

.news-grid {
    display: grid;
    gap: 1.25rem;
    max-width: 900px;
    margin: 0 auto;
}

.news-card {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 0;
    background: var(--bg-white);
    border-radius: 1rem;
    padding: 0;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    color: inherit;
    overflow: hidden;
    transition:
        transform 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.news-card:not(.news-card--has-thumb) {
    padding: 1.5rem 1.75rem;
    flex-direction: column;
}

.news-card-thumb {
    flex-shrink: 0;
    width: 8.5rem;
    min-height: 6rem;
    background: #f1f5f9;
}

.news-card-thumb img {
    width: 100%;
    height: 100%;
    min-height: 6rem;
    object-fit: cover;
    display: block;
}

.news-card-body {
    padding: 1.35rem 1.5rem;
    min-width: 0;
    flex: 1;
}

.news-card:not(.news-card--has-thumb) .news-card-body {
    padding: 0;
}

.news-card:hover {
    transform: translateY(-3px);
    border-color: rgba(37, 99, 235, 0.25);
    box-shadow: var(--shadow-md);
}

.news-card-title {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
    line-height: 1.3;
}

.news-card-meta {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.65rem;
}

.news-card-excerpt {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.news-empty {
    text-align: center;
    padding: 3rem 1.5rem;
    color: var(--text-secondary);
    background: var(--bg-white);
    border-radius: 1rem;
    border: 1px dashed var(--border-color);
}

/* Chi tiết */
.news-article {
    max-width: 46rem;
    margin: 0 auto;
    background: var(--bg-white);
    border-radius: 1rem;
    padding: 2rem 2.25rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.news-article-cover {
    margin: 0 0 1.25rem;
    border-radius: 0.75rem;
    overflow: hidden;
    background: #f1f5f9;
}

.news-article-cover img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 22rem;
    object-fit: cover;
}

.news-article h1 {
    font-size: clamp(1.5rem, 3.5vw, 2rem);
    font-weight: 900;
    letter-spacing: -0.03em;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    line-height: 1.25;
}

.news-article-meta {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--border-color);
}

.news-article-body {
    font-size: 1.05rem;
    line-height: 1.85;
    color: var(--text-primary);
    white-space: normal;
    word-break: break-word;
}

.news-article-body > *:first-child {
    margin-top: 0;
}

.news-article-body p {
    margin: 0 0 1.1em;
}

.news-article-body h2,
.news-article-body h3,
.news-article-body h4 {
    font-weight: 800;
    line-height: 1.3;
    margin: 1.5em 0 0.5em;
    color: var(--text-primary);
}

.news-article-body h2 {
    font-size: 1.45rem;
}

.news-article-body h3 {
    font-size: 1.2rem;
}

.news-article-body h4 {
    font-size: 1.05rem;
}

.news-article-body ul,
.news-article-body ol {
    margin: 0 0 1.1em;
    padding-left: 1.35rem;
}

.news-article-body li {
    margin-bottom: 0.35em;
}

.news-article-body blockquote {
    margin: 1.1em 0;
    padding: 0.75rem 1rem;
    border-left: 4px solid var(--primary-color);
    background: rgba(37, 99, 235, 0.06);
    border-radius: 0 0.5rem 0.5rem 0;
    color: var(--text-secondary);
}

.news-article-body pre {
    margin: 1em 0;
    padding: 1rem;
    background: #0f172a;
    color: #e2e8f0;
    border-radius: 0.5rem;
    overflow-x: auto;
    font-size: 0.88rem;
}

.news-article-body code {
    font-size: 0.9em;
    background: rgba(15, 23, 42, 0.06);
    padding: 0.12em 0.35em;
    border-radius: 0.25rem;
}

.news-article-body pre code {
    background: none;
    padding: 0;
    font-size: inherit;
}

.news-article-body a {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.news-article-body img {
    max-width: 100%;
    height: auto;
    border-radius: 0.6rem;
    margin: 1.15em 0;
    display: block;
    box-shadow: var(--shadow-sm);
}

.news-back {
    display: inline-block;
    margin-bottom: 1.5rem;
    font-weight: 600;
    color: var(--primary-color);
    text-decoration: none;
}

.news-back:hover {
    color: var(--primary-dark);
}

.news-error {
    max-width: 40rem;
    margin: 2rem auto;
    padding: 1.5rem;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 0.75rem;
    color: #991b1b;
}

@media (max-width: 640px) {
    .news-article {
        padding: 1.35rem 1.15rem;
    }

    .news-card--has-thumb {
        flex-direction: column;
    }

    .news-card--has-thumb .news-card-thumb {
        width: 100%;
        min-height: 10rem;
    }

    .news-card--has-thumb .news-card-thumb img {
        min-height: 10rem;
    }

    .news-card-body {
        padding: 1.15rem 1.2rem;
    }
}
