/* === TIN VUI — VIETNAMESE POSITIVE NEWS === */

/* ================================================================
   1. ROOT VARIABLES, RESET, BODY, CONTAINER, HIDDEN
   ================================================================ */

:root {
    --primary: #1a1a2e;
    --accent: #e8590c;
    --accent-dark: #c9480a;
    --accent-light: #fff4ef;
    --bg: #ffffff;
    --bg-alt: #f7f7f8;
    --text: #333333;
    --text-light: #6c757d;
    --border: #e9ecef;
    --font-body: 'Be Vietnam Pro', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-heading: 'Be Vietnam Pro', -apple-system, BlinkMacSystemFont, sans-serif;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
    /* Category colors */
    --cat-cong-dong: #e8590c;
    --cat-suc-khoe: #2b8a3e;
    --cat-khoa-hoc: #1971c2;
    --cat-moi-truong: #099268;
    --cat-the-gioi: #7048e8;
    --cat-viet-nam: #e03131;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    font-size: 16px;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

img {
    max-width: 100%;
    height: auto;
}

.hidden {
    display: none !important;
}

/* ================================================================
   2. NAV
   ================================================================ */

.site-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border);
    transition: box-shadow 0.3s var(--ease);
}

.nav-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
}

.nav-logo {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-logo-icon {
    width: 32px;
    height: 32px;
}

.nav-logo:hover {
    text-decoration: none;
    color: var(--accent);
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    color: var(--text);
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--accent);
    text-decoration: none;
}

.nav-links a.active {
    color: var(--accent);
    border-bottom: 2px solid var(--accent);
    padding-bottom: 2px;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.4rem;
    cursor: pointer;
    color: var(--text);
    padding: 0.25rem;
}

.nav-icon-btn {
    background: none;
    border: 1px solid var(--border);
    border-radius: 50%;
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text);
    transition: color 0.2s, border-color 0.2s, background 0.2s;
    padding: 0;
    flex-shrink: 0;
}

.nav-icon-btn:hover {
    color: var(--accent);
    border-color: var(--accent);
    background: var(--accent-light);
}

.nav-right-mobile {
    display: none;
    align-items: center;
    gap: 0.5rem;
}

/* ================================================================
   3. HERO CARD (Latest Article — Featured Card, NOT bg image)
   ================================================================ */

.hero-latest {
    padding: 2rem 0;
    background: var(--bg-alt);
}

.hero-latest .container {
    max-width: 1100px;
}

.hero-latest-card {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 0;
    background: var(--bg);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.3s var(--ease), transform 0.3s var(--ease);
}

.hero-latest-card:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    transform: translateY(-3px);
    text-decoration: none;
}

.hero-latest-thumb {
    overflow: hidden;
    min-height: 340px;
}

.hero-latest-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s var(--ease);
}

.hero-latest-card:hover .hero-latest-thumb img {
    transform: scale(1.04);
}

.hero-latest-body {
    padding: 2.5rem 2.5rem 2.5rem 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero-latest-label {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent);
    margin-bottom: 0.75rem;
}

.hero-latest-title {
    font-family: var(--font-heading);
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
    color: var(--primary);
    line-height: 1.3;
    margin-bottom: 0.75rem;
}

.hero-latest-card:hover .hero-latest-title {
    color: var(--accent);
}

.hero-latest-excerpt {
    color: var(--text-light);
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 1.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hero-latest-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.85rem;
    color: var(--text-light);
}

.hero-latest-readmore {
    color: var(--accent);
    font-weight: 600;
    font-size: 0.95rem;
    margin-top: auto;
}

/* ================================================================
   4. ARTICLE GRID & CARDS
   ================================================================ */

.article-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.article-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.article-card-link:hover {
    text-decoration: none;
}

.article-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: box-shadow 0.3s var(--ease), transform 0.3s var(--ease);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.article-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-3px);
}

.card-thumbnail {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.card-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s var(--ease);
}

.article-card:hover .card-thumbnail img {
    transform: scale(1.05);
}

.card-body {
    padding: 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.6rem;
    font-size: 0.85rem;
}

.card-meta time {
    color: var(--text-light);
}

.card-meta-right {
    color: var(--text-light);
    white-space: nowrap;
}

/* Category Badges — base */
.category-badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    background: var(--accent-light);
    color: var(--accent);
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

/* Category Badge — per-category color classes */
.badge-cong-dong {
    background: rgba(232, 89, 12, 0.1);
    color: var(--cat-cong-dong);
}

.badge-suc-khoe {
    background: rgba(43, 138, 62, 0.1);
    color: var(--cat-suc-khoe);
}

.badge-khoa-hoc {
    background: rgba(25, 113, 194, 0.1);
    color: var(--cat-khoa-hoc);
}

.badge-moi-truong {
    background: rgba(9, 146, 104, 0.1);
    color: var(--cat-moi-truong);
}

.badge-the-gioi {
    background: rgba(112, 72, 232, 0.1);
    color: var(--cat-the-gioi);
}

.badge-viet-nam {
    background: rgba(224, 49, 49, 0.1);
    color: var(--cat-viet-nam);
}

.card-title {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.5rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-excerpt {
    color: var(--text-light);
    font-size: 0.9rem;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.card-footer {
    padding: 0.85rem 1.25rem;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.read-more {
    color: var(--accent);
    font-weight: 600;
    font-size: 0.88rem;
    transition: color 0.2s;
}

.read-more:hover {
    text-decoration: none;
}

/* ================================================================
   5. CATEGORY SECTIONS (Homepage)
   ================================================================ */

.category-section {
    padding: 3rem 0;
}

.category-section:nth-child(even) {
    background: var(--bg-alt);
}

.category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border);
}

.category-header h2 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.category-header h2::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 1.25em;
    background: var(--accent);
    border-radius: 2px;
}

.category-header a {
    color: var(--accent);
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
    transition: color 0.2s;
}

.category-header a:hover {
    text-decoration: underline;
}

.category-articles {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

/* ================================================================
   6. TOPIC HERO (Category Pages Header)
   ================================================================ */

.topic-hero {
    padding: 3.5rem 0 2.5rem;
    text-align: center;
    background: var(--bg-alt);
    border-bottom: 1px solid var(--border);
}

.topic-hero h1 {
    font-family: var(--font-heading);
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.topic-hero-icon {
    font-size: 2.75rem;
    margin-bottom: 0.75rem;
}

.topic-hero-desc {
    font-size: 1.05rem;
    color: var(--text);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ================================================================
   7. TOPIC PAGE — VNEXPRESS STYLE
   ================================================================ */

/* Featured hero article */
.topic-featured {
    padding: 1.5rem 0 1rem;
}

.featured-article {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    text-decoration: none;
    color: inherit;
    background: var(--bg);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: box-shadow 0.3s var(--ease), transform 0.2s var(--ease);
}

.featured-article:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
    text-decoration: none;
}

.featured-thumb {
    aspect-ratio: 16 / 10;
    overflow: hidden;
}

.featured-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s var(--ease);
}

.featured-article:hover .featured-thumb img {
    transform: scale(1.05);
}

.featured-body {
    padding: 1.5rem 1.5rem 1.5rem 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.featured-title {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--primary);
    margin: 0.5rem 0 0.75rem;
    line-height: 1.3;
}

.featured-excerpt {
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0 0 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Article list below featured */
.topic-list-section {
    padding: 0 0 2rem;
}

.topic-article-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.list-article {
    display: flex;
    gap: 1.25rem;
    padding: 1.25rem 0;
    border-bottom: 1px solid var(--border);
    text-decoration: none;
    color: inherit;
    transition: background 0.2s var(--ease);
}

.list-article:first-child {
    border-top: 1px solid var(--border);
}

.list-article:hover {
    background: var(--bg-alt);
    text-decoration: none;
}

.list-thumb {
    flex-shrink: 0;
    width: 200px;
    height: 130px;
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.list-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s var(--ease);
}

.list-article:hover .list-thumb img {
    transform: scale(1.05);
}

.list-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.list-title {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--primary);
    margin: 0 0 0.4rem;
    line-height: 1.35;
}

.list-article:hover .list-title {
    color: var(--accent);
}

.list-excerpt {
    color: var(--text-light);
    font-size: 0.88rem;
    line-height: 1.5;
    margin: 0 0 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.list-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-light);
}

.read-more-sm {
    color: var(--accent);
    font-weight: 600;
}

/* ================================================================
   8. ARTICLE PAGE
   ================================================================ */

/* Progress bar */
.progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: var(--accent);
    z-index: 200;
    transition: width 0.1s linear;
    pointer-events: none;
}

/* Article hero image */
.article-hero-img {
    width: 100%;
    max-height: 420px;
    overflow: hidden;
}

.article-hero-img img {
    width: 100%;
    height: 420px;
    object-fit: cover;
    display: block;
}

/* Article body */
.article-full {
    max-width: 760px;
    margin: 0 auto;
    padding: 3rem 1.5rem 4rem;
}

.article-header {
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 0.85rem;
}

.article-category {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    background: var(--accent-light);
    color: var(--accent);
    border-radius: 4px;
    font-weight: 600;
}

.article-date {
    color: var(--text-light);
}

.article-reading-time {
    color: var(--text-light);
    font-size: 0.85rem;
}

.article-reading-time::before {
    content: '\00b7';
    margin-right: 0.5rem;
}

.article-title {
    font-family: var(--font-heading);
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1.3;
    margin-bottom: 0.75rem;
}

.article-excerpt {
    color: var(--text-light);
    font-size: 1.1rem;
    line-height: 1.6;
}

/* Article content typography */
.article-content {
    line-height: 1.85;
    font-size: 1.05rem;
}

.article-content h2 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    margin: 2.5rem 0 1rem;
}

.article-content h3 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    margin: 1.5rem 0 0.75rem;
}

.article-content p {
    margin-bottom: 1.25rem;
}

.article-content ul,
.article-content ol {
    padding-left: 1.5rem;
    margin-bottom: 1.25rem;
}

.article-content li {
    margin-bottom: 0.4rem;
}

.article-content blockquote {
    border-left: 4px solid var(--accent);
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    background: var(--accent-light);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    color: var(--text);
    font-style: italic;
}

.article-content img {
    border-radius: var(--radius-sm);
    margin: 1.5rem 0;
}

/* Source attribution — PROMINENT bar */
.source-attribution {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-left: 4px solid var(--accent);
    padding: 1rem 1.5rem;
    margin: 2rem 0;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-size: 0.92rem;
    color: var(--text);
}

.source-attribution svg,
.source-attribution .source-icon {
    flex-shrink: 0;
    color: var(--accent);
    font-size: 1.1rem;
}

.source-attribution strong {
    color: var(--primary);
    font-weight: 700;
}

.source-attribution a {
    color: var(--accent);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.source-attribution a:hover {
    color: var(--accent-dark);
}

.source-info {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.source-label {
    color: var(--text-muted);
    font-weight: 500;
}

/* ================================================================
   9. SHARE BUTTONS
   ================================================================ */

.article-share {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.share-label {
    font-size: 0.9rem;
    color: var(--text-light);
    font-weight: 600;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text);
    text-decoration: none;
    font-size: 0.85rem;
    font-family: var(--font-body);
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.share-btn:hover {
    text-decoration: none;
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-light);
}

.share-fb:hover {
    color: #1877f2;
    border-color: #1877f2;
    background: rgba(24, 119, 242, 0.06);
}

.share-x:hover {
    color: #000;
    border-color: #000;
    background: rgba(0, 0, 0, 0.04);
}

.share-copy:hover {
    color: var(--accent);
    border-color: var(--accent);
}

.copy-text {
    font-size: 0.85rem;
}

/* ================================================================
   10. RELATED ARTICLES
   ================================================================ */

.related-articles {
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.related-heading {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1.25rem;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

.related-card {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    text-decoration: none;
    color: var(--text);
    transition: box-shadow 0.2s var(--ease), transform 0.2s var(--ease);
    background: var(--bg);
}

.related-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    text-decoration: none;
}

.related-thumb {
    aspect-ratio: 16 / 10;
    overflow: hidden;
}

.related-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s var(--ease);
}

.related-card:hover .related-thumb img {
    transform: scale(1.05);
}

.related-info {
    padding: 1rem;
}

.related-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--primary);
    line-height: 1.4;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-read {
    font-size: 0.85rem;
    color: var(--accent);
    font-weight: 600;
}

/* ================================================================
   11. FILTER TABS
   ================================================================ */

.filter-tabs {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.filter-tab {
    padding: 0.5rem 1.25rem;
    border: 1px solid var(--border);
    border-radius: 25px;
    background: var(--bg);
    color: var(--text-light);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s var(--ease);
    font-family: var(--font-body);
}

.filter-tab:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.filter-tab.active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

/* ================================================================
   12. SHOW MORE
   ================================================================ */

.hidden-card {
    display: none;
}

.show-more-wrap {
    text-align: center;
    margin: 2rem 0 0;
}

.btn-show-more {
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--font-body);
    transition: background 0.2s var(--ease), transform 0.2s var(--ease);
}

.btn-show-more:hover {
    background: var(--accent-dark);
    transform: translateY(-1px);
}

/* ================================================================
   13. FOOTER
   ================================================================ */

.site-footer {
    background: var(--primary);
    color: rgba(255, 255, 255, 0.8);
    padding: 3.5rem 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 2.5rem;
    padding-bottom: 2.5rem;
}

.footer-logo {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 700;
    color: white;
    text-decoration: none;
    display: block;
    margin-bottom: 0.75rem;
}

.footer-logo:hover {
    color: var(--accent-light);
    text-decoration: none;
}

.footer-tagline {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.6;
}

.footer-heading {
    font-family: var(--font-heading);
    color: white;
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: white;
    text-decoration: none;
}

.footer-email {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    font-weight: 600;
}

.footer-email:hover {
    color: white;
    text-decoration: none;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.25rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
}

/* ================================================================
   14. BUTTONS
   ================================================================ */

.btn {
    display: inline-block;
    padding: 0.75rem 1.75rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s var(--ease), transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
    font-family: var(--font-body);
}

.btn:hover {
    text-decoration: none;
}

.btn-accent {
    background: var(--accent);
    color: white;
}

.btn-accent:hover {
    background: var(--accent-dark);
    color: white;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-lg {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    border-radius: var(--radius-md);
    box-shadow: 0 4px 20px rgba(232, 89, 12, 0.3);
}

.btn-lg:hover {
    box-shadow: 0 6px 28px rgba(232, 89, 12, 0.45);
}

/* ================================================================
   15. SCROLL REVEAL
   ================================================================ */

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

.reveal-d1 { transition-delay: 0.1s; }
.reveal-d2 { transition-delay: 0.2s; }
.reveal-d3 { transition-delay: 0.3s; }
.reveal-d4 { transition-delay: 0.4s; }
.reveal-d5 { transition-delay: 0.5s; }

/* ================================================================
   16. SEARCH MODAL
   ================================================================ */

.search-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 300;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    align-items: flex-start;
    justify-content: center;
    padding-top: 10vh;
}

.search-overlay.open {
    display: flex;
}

.search-modal {
    background: var(--bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 90%;
    max-width: 600px;
    max-height: 70vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: searchIn 0.2s var(--ease);
}

@keyframes searchIn {
    from {
        opacity: 0;
        transform: translateY(-16px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.search-header {
    display: flex;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
    gap: 0.75rem;
}

.search-header svg {
    flex-shrink: 0;
    color: var(--text-light);
}

.search-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 1.05rem;
    font-family: var(--font-body);
    background: transparent;
    color: var(--text);
}

.search-input::placeholder {
    color: var(--text-light);
}

.search-close {
    background: none;
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 0.15rem 0.5rem;
    font-size: 0.75rem;
    color: var(--text-light);
    cursor: pointer;
    font-family: var(--font-body);
    transition: border-color 0.2s, color 0.2s;
}

.search-close:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.search-results {
    overflow-y: auto;
    padding: 0.5rem;
    flex: 1;
}

.search-result-item {
    display: block;
    padding: 0.85rem 1rem;
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: inherit;
    transition: background 0.15s var(--ease);
}

.search-result-item:hover {
    background: var(--bg-alt);
    text-decoration: none;
}

.search-result-title {
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 0.2rem;
    font-size: 0.95rem;
}

.search-result-meta {
    font-size: 0.8rem;
    color: var(--text-light);
}

.search-result-excerpt {
    font-size: 0.85rem;
    color: var(--text-light);
    line-height: 1.5;
    margin-top: 0.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.search-hint {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--text-light);
    font-size: 0.9rem;
}

.search-empty {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--text-light);
}

/* ================================================================
   17. BACK TO TOP
   ================================================================ */

.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 1.5rem;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--accent);
    color: white;
    border: none;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    z-index: 90;
    transition: background 0.2s var(--ease), transform 0.2s var(--ease), opacity 0.3s var(--ease);
    opacity: 0;
}

.back-to-top.visible {
    display: flex;
    opacity: 1;
}

.back-to-top:hover {
    background: var(--accent-dark);
    transform: translateY(-2px);
}

/* ================================================================
   18. READING TIME (card + article)
   ================================================================ */

/* Already defined in sections 4 and 8 — additional shared styles */

/* ================================================================
   19. DARK MODE
   ================================================================ */

[data-theme="dark"] {
    --primary: #e4e4ec;
    --accent: #ff8c42;
    --accent-dark: #e8590c;
    --accent-light: #2a1d14;
    --bg: #0f0f14;
    --bg-alt: #16161e;
    --text: #d1d1d8;
    --text-light: #8b8b99;
    --border: #2a2a38;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.6);
    /* Category colors — brighter for dark bg */
    --cat-cong-dong: #ff8c42;
    --cat-suc-khoe: #51cf66;
    --cat-khoa-hoc: #4dabf7;
    --cat-moi-truong: #38d9a9;
    --cat-the-gioi: #9775fa;
    --cat-viet-nam: #ff6b6b;
}

[data-theme="dark"] .site-nav {
    background: rgba(15, 15, 20, 0.95);
}

[data-theme="dark"] .nav-links {
    background: var(--bg);
}

[data-theme="dark"] .article-card,
[data-theme="dark"] .related-card,
[data-theme="dark"] .share-btn {
    background: var(--bg-alt);
}

[data-theme="dark"] .hero-latest-card {
    background: var(--bg-alt);
}

[data-theme="dark"] .featured-article {
    background: var(--bg-alt);
}

[data-theme="dark"] .list-article:hover {
    background: var(--bg-alt);
}

[data-theme="dark"] .filter-tab {
    background: var(--bg-alt);
    border-color: var(--border);
    color: var(--text-light);
}

[data-theme="dark"] .source-attribution {
    background: var(--bg-alt);
    border-color: var(--border);
}

[data-theme="dark"] .article-content blockquote {
    background: var(--bg-alt);
}

[data-theme="dark"] .search-close {
    color: var(--text-light);
    border-color: var(--border);
}

/* Dark mode badge adjustments */
[data-theme="dark"] .badge-cong-dong {
    background: rgba(255, 140, 66, 0.15);
    color: var(--cat-cong-dong);
}

[data-theme="dark"] .badge-suc-khoe {
    background: rgba(81, 207, 102, 0.15);
    color: var(--cat-suc-khoe);
}

[data-theme="dark"] .badge-khoa-hoc {
    background: rgba(77, 171, 247, 0.15);
    color: var(--cat-khoa-hoc);
}

[data-theme="dark"] .badge-moi-truong {
    background: rgba(56, 217, 169, 0.15);
    color: var(--cat-moi-truong);
}

[data-theme="dark"] .badge-the-gioi {
    background: rgba(151, 117, 250, 0.15);
    color: var(--cat-the-gioi);
}

[data-theme="dark"] .badge-viet-nam {
    background: rgba(255, 107, 107, 0.15);
    color: var(--cat-viet-nam);
}

[data-theme="dark"] .category-badge {
    background: rgba(255, 140, 66, 0.15);
    color: var(--accent);
}

[data-theme="dark"] .article-category {
    background: rgba(255, 140, 66, 0.15);
    color: var(--accent);
}

/* Dark mode theme toggle icons */
[data-theme="dark"] .nav-theme-btn .icon-moon,
[data-theme="dark"] .nav-theme-btn-m .icon-moon {
    display: none;
}

[data-theme="dark"] .nav-theme-btn .icon-sun,
[data-theme="dark"] .nav-theme-btn-m .icon-sun {
    display: block !important;
}

[data-theme="dark"] img {
    opacity: 0.88;
}

/* Dark mode footer — stays dark, subtle adjustments */
[data-theme="dark"] .site-footer {
    background: #0a0a0e;
}

[data-theme="dark"] .share-fb:hover {
    color: #4dabf7;
    border-color: #4dabf7;
    background: rgba(77, 171, 247, 0.1);
}

[data-theme="dark"] .share-x:hover {
    color: #d1d1d8;
    border-color: #d1d1d8;
    background: rgba(209, 209, 216, 0.08);
}

/* ================================================================
   20. RESPONSIVE
   ================================================================ */

/* --- TABLET: 1024px --- */
@media (max-width: 1024px) {
    .article-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .category-articles {
        grid-template-columns: repeat(2, 1fr);
    }

    .related-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero-latest-card {
        grid-template-columns: 1fr;
    }

    .hero-latest-thumb {
        min-height: 280px;
    }

    .hero-latest-body {
        padding: 1.5rem 2rem 2rem;
    }

    .featured-article {
        grid-template-columns: 1fr;
    }

    .featured-body {
        padding: 1.25rem;
    }

    .featured-title {
        font-size: 1.35rem;
    }

    .list-thumb {
        width: 160px;
        height: 105px;
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
}

/* --- MOBILE: 768px --- */
@media (max-width: 768px) {
    /* Mobile nav */
    .nav-toggle {
        display: block;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        background: var(--bg);
        border-bottom: 1px solid var(--border);
        flex-direction: column;
        padding: 1rem 1.5rem;
        gap: 1rem;
        box-shadow: var(--shadow-md);
        align-items: flex-start;
    }

    .nav-links.open {
        display: flex;
        animation: slideDown 0.3s var(--ease);
    }

    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-8px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .nav-right-mobile {
        display: flex;
    }

    .nav-links .nav-icon-btn {
        display: none;
    }

    .nav-toggle {
        display: block;
        background: none;
        border: none;
        font-size: 1.4rem;
        cursor: pointer;
        color: var(--text);
        padding: 0.25rem;
    }

    /* Hero card — stack vertically */
    .hero-latest-card {
        grid-template-columns: 1fr;
    }

    .hero-latest-thumb {
        min-height: 220px;
    }

    .hero-latest-body {
        padding: 1.25rem 1.5rem 1.5rem;
    }

    .hero-latest-title {
        font-size: 1.35rem;
    }

    /* Article grids — single column */
    .article-grid {
        grid-template-columns: 1fr;
    }

    .category-articles {
        grid-template-columns: 1fr;
    }

    .related-grid {
        grid-template-columns: 1fr;
    }

    .card-thumbnail {
        height: 180px;
    }

    /* Topic hero */
    .topic-hero h1 {
        font-size: 1.75rem;
    }

    .topic-hero {
        padding: 2.5rem 0 2rem;
    }

    /* Topic page featured */
    .featured-title {
        font-size: 1.2rem;
    }

    .featured-excerpt {
        -webkit-line-clamp: 3;
        font-size: 0.9rem;
    }

    /* Topic list */
    .list-article {
        gap: 0.75rem;
        padding: 1rem 0;
    }

    .list-thumb {
        width: 120px;
        height: 80px;
    }

    .list-title {
        font-size: 1rem;
    }

    .list-excerpt {
        display: none;
    }

    /* Article page */
    .article-full {
        padding: 2rem 1rem 3rem;
    }

    .article-title {
        font-size: 1.65rem;
    }

    .article-hero-img img {
        height: 250px;
    }

    /* Category section */
    .category-section {
        padding: 2rem 0;
    }

    .category-header h2 {
        font-size: 1.25rem;
    }

    /* Share buttons wrap */
    .article-share {
        flex-wrap: wrap;
    }

    /* Footer — single column */
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        text-align: center;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 0.25rem;
        text-align: center;
    }

    /* Filter tabs scroll */
    .filter-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 0.75rem;
    }

    .filter-tab {
        flex-shrink: 0;
    }
}

/* --- SMALL MOBILE: 480px --- */
@media (max-width: 480px) {
    .hero-latest-thumb {
        min-height: 180px;
    }

    .hero-latest-title {
        font-size: 1.15rem;
    }

    .hero-latest-excerpt {
        -webkit-line-clamp: 2;
        font-size: 0.9rem;
    }

    .card-title {
        font-size: 0.95rem;
    }

    .article-title {
        font-size: 1.4rem;
    }
}

/* ================================================================
   UTILITY: SECTIONS & HELPERS
   ================================================================ */

.section {
    padding: 4rem 0;
}

.section-alt {
    background: var(--bg-alt);
}

.section-heading {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 2rem;
    text-align: center;
    position: relative;
    padding-bottom: 0.75rem;
}

.section-heading::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--accent);
    border-radius: 2px;
}

/* Article nav — back to home */
.article-nav {
    margin-top: 3rem;
    text-align: center;
}

.back-home {
    display: inline-block;
    background: var(--primary);
    color: white;
    text-decoration: none;
    padding: 0.7rem 1.5rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    transition: background 0.2s var(--ease);
}

.back-home:hover {
    background: #2a2a4e;
    color: white;
    text-decoration: none;
}

/* Hopeful ending callout (Tin Vui signature) */
.hopeful-ending {
    background: var(--accent-light);
    border-left: 4px solid var(--accent);
    padding: 1rem 1.25rem;
    margin: 2rem 0;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-style: italic;
    color: var(--text);
    line-height: 1.7;
}

/* Pagination (if needed) */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 0.5rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
    text-decoration: none;
    transition: all 0.2s var(--ease);
}

.pagination a:hover {
    border-color: var(--accent);
    color: var(--accent);
    text-decoration: none;
}

.pagination .current {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

/* All articles page header */
.all-articles-header {
    padding: 2.5rem 0 1.5rem;
    text-align: center;
}

.all-articles-header h1 {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.all-articles-header p {
    color: var(--text-light);
    font-size: 1rem;
}

/* Fade-up animation for hero elements */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Print styles */
@media print {
    .site-nav,
    .site-footer,
    .back-to-top,
    .progress-bar,
    .article-share,
    .search-overlay {
        display: none !important;
    }

    .article-full {
        max-width: 100%;
        padding: 0;
    }

    body {
        font-size: 12pt;
        color: #000;
        background: #fff;
    }
}
