/* Tin tức: bố cục và chuyển động được chuyển thể từ theme thego. Font dùng stylesheet chung. */

.news-page {
    --news-ink: #2d2321;
    --news-muted: #6f625e;
    --news-soft: #968983;
    --news-red: #a91625;
    --news-red-dark: #74101d;
    --news-gold: #f5be35;
    --news-line: #eadfd8;
    --news-cream: #fff9f3;
    --news-radius: 24px;
    --news-ease: cubic-bezier(.2, .75, .25, 1);
    color: var(--news-ink);
    background: #fff;
    font-size: 15px;
    line-height: 1.65;
}

.news-page *,
.news-page *::before,
.news-page *::after { box-sizing: border-box; }

.news-page a { color: inherit; }
.news-page a:hover,
.news-page a:focus { color: var(--news-red); text-decoration: none; }
.news-page img { display: block; width: 100%; }
.news-container { width: min(1180px, calc(100% - 48px)); margin: 0 auto; }
.news-section { padding: 86px 0 100px; background: linear-gradient(180deg, #fff 0%, var(--news-cream) 100%); }
.news-section-heading { max-width: 720px; margin: 0 0 38px; }
.news-section-heading > span { display: inline-block; margin-bottom: 8px; color: var(--news-red); font-size: 12px; font-weight: 700; letter-spacing: .15em; text-transform: uppercase; }
.news-section-heading h2 { margin: 0 0 12px; color: var(--news-ink); font-size: clamp(30px, 4vw, 46px); font-weight: 800; letter-spacing: -.035em; line-height: 1.12; }
.news-section-heading p { max-width: 620px; margin: 0; color: var(--news-muted); font-size: 16px; }

.news-grid,
.news-related-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.news-card { display: flex; min-width: 0; overflow: hidden; flex-direction: column; border: 1px solid var(--news-line); border-radius: var(--news-radius); background: #fff; box-shadow: 0 0 0 rgba(69, 29, 24, 0); transition: transform .5s var(--news-ease), box-shadow .5s var(--news-ease), border-color .35s ease; }
.news-card:hover { transform: translateY(-7px); border-color: transparent; box-shadow: 0 25px 55px -32px rgba(72, 30, 25, .42); }
.news-card-media { position: relative; display: block; overflow: hidden; aspect-ratio: 16 / 10; background: #eee5de; }
.news-card-media picture { display: block; width: 100%; height: 100%; }
.news-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.25s var(--news-ease); }
.news-card:hover .news-card-media img { transform: scale(1.07); }
.news-card-category,
.news-detail-category { display: inline-flex; align-items: center; width: fit-content; padding: 6px 12px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.news-card-category { position: absolute; z-index: 1; top: 14px; left: 14px; max-width: calc(100% - 28px); overflow: hidden; background: rgba(255, 255, 255, .94); color: var(--news-red-dark); text-overflow: ellipsis; white-space: nowrap; box-shadow: 0 8px 20px rgba(41, 19, 16, .1); }
.news-card-body { display: flex; flex: 1; flex-direction: column; gap: 10px; padding: 21px 22px 23px; }
.news-card-meta,
.news-detail-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; color: var(--news-soft); font-size: 13px; font-weight: 600; }
.news-card-meta i,
.news-detail-meta i { width: 4px; height: 4px; flex: none; border-radius: 50%; background: var(--news-red); }
.news-card-body h2 { margin: 0; color: var(--news-ink); font-size: 19px; font-weight: 700; line-height: 1.38; }
.news-card-body h2 a { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.news-card-body p { display: -webkit-box; overflow: hidden; margin: 0; color: var(--news-muted); font-size: 14.5px; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.news-card-more { display: inline-flex; width: fit-content; align-items: center; gap: 8px; margin-top: auto; padding-top: 7px; color: var(--news-red-dark) !important; font-size: 14px; font-weight: 700; }
.news-card-more span { font-size: 18px; transition: transform .35s var(--news-ease); }
.news-card:hover .news-card-more span { transform: translateX(5px); }
.news-card-featured { grid-column: 1 / -1; flex-direction: row; }
.news-card-featured .news-card-media { min-height: 380px; flex: 1.3; aspect-ratio: auto; }
.news-card-featured .news-card-body { flex: 1; justify-content: center; padding: 40px; }
.news-card-featured .news-card-body h2 { font-size: clamp(24px, 2.4vw, 31px); }
.news-card-featured .news-card-body p { font-size: 15.5px; -webkit-line-clamp: 4; }

.news-pagination { min-height: 1px; margin-top: 48px; }
.news-pagination .pagination { display: flex !important; align-items: center; justify-content: center !important; flex-wrap: wrap; gap: 8px; margin: 0; }
.news-pagination .pagination > a { display: block; }
.news-pagination .pag_item { display: grid; width: 44px; height: 44px; margin: 0; place-items: center; border: 1px solid var(--news-line); border-radius: 12px; background: #fff; color: var(--news-ink); cursor: pointer; transition: color .25s, border-color .25s, background-color .25s, transform .25s; }
.news-pagination a:hover .pag_item { transform: translateY(-2px); border-color: var(--news-red); color: var(--news-red); }
.news-pagination .wpage { display: grid; width: 100%; height: 100%; place-items: center; }
.news-pagination .pag_num.pag_item_active { border-color: var(--news-red-dark); background: var(--news-red-dark); color: #fff; }
.news-pagination #pag_s.pag_item_active,
.news-pagination #pag_p.pag_item_active,
.news-pagination #pag_n.pag_item_active,
.news-pagination #pag_l.pag_item_active { opacity: .35; cursor: default; }
.news-loading[hidden] { display: none !important; }
.news-loading { position: fixed; z-index: 2000; inset: 0; display: grid; place-items: center; background: rgba(255, 250, 246, .7); backdrop-filter: blur(2px); }
.news-loading span { width: 48px; height: 48px; border: 4px solid rgba(169, 22, 37, .18); border-top-color: var(--news-red); border-radius: 50%; animation: news-spin .8s linear infinite; }
.news-empty,
.news-error { grid-column: 1 / -1; padding: 40px; border-radius: 18px; background: #fff; color: var(--news-muted); text-align: center; }
.news-error { color: var(--news-red); }
@keyframes news-spin { to { transform: rotate(360deg); } }

/* Chi tiết bài viết */
.news-detail-hero { padding: 126px 0 0; overflow: hidden; background: linear-gradient(180deg, #f8e9e5 0%, #fff8f0 62%, #fff 100%); }
.news-breadcrumb { display: flex; align-items: center; gap: 9px; overflow: hidden; color: var(--news-muted); font-size: 13px; white-space: nowrap; }
.news-breadcrumb a { color: var(--news-red-dark); font-weight: 600; }
.news-breadcrumb span[aria-current] { overflow: hidden; text-overflow: ellipsis; }
.news-detail-heading { max-width: 940px; margin: 24px 0 34px; }
.news-detail-category { margin-bottom: 15px; background: var(--news-red-dark); color: #fff; }
.news-detail-heading h1 { margin: 0; color: var(--news-ink); font-size: clamp(34px, 4.5vw, 56px); font-weight: 800; letter-spacing: -.04em; line-height: 1.1; text-wrap: balance; }
.news-detail-meta { margin-top: 18px; font-size: 14px; }
.news-detail-cover { overflow: hidden; margin: 0; border-radius: 30px; aspect-ratio: 21 / 9; background: #eee4dc; box-shadow: 0 35px 70px -45px rgba(65, 24, 20, .5); }
.news-detail-cover picture { display: block; width: 100%; height: 100%; }
.news-detail-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.5s var(--news-ease); }
.news-detail-cover:hover img { transform: scale(1.025); }
.news-article-section { padding: 78px 0 96px; background: #fff; }
.news-article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 58px; align-items: start; }
.news-article { min-width: 0; max-width: 780px; color: #4d423f; font-size: 17px; line-height: 1.82; }
.news-article-lead { margin: 0 0 28px; color: var(--news-ink); font-size: 20px; font-weight: 500; line-height: 1.65; }
.news-article-content { overflow-wrap: anywhere; }
.news-article-content > :first-child { margin-top: 0; }
.news-article-content p { margin: 0 0 19px; }
.news-article-content h2,
.news-article-content h3,
.news-article-content h4 { color: var(--news-ink); font-weight: 700; line-height: 1.3; }
.news-article-content h2 { margin: 38px 0 14px; font-size: clamp(24px, 2.5vw, 30px); }
.news-article-content h3 { margin: 30px 0 12px; font-size: 22px; }
.news-article-content h4 { margin: 26px 0 10px; font-size: 19px; }
.news-article-content ul,
.news-article-content ol { margin: 0 0 22px; padding-left: 24px; }
.news-article-content li { margin-bottom: 8px; }
.news-article-content a { color: var(--news-red); text-decoration: underline; text-underline-offset: 3px; }
.news-article-content img { width: auto !important; max-width: 100% !important; height: auto !important; margin: 28px auto; border-radius: 18px; }
.news-article-content iframe,
.news-article-content video { max-width: 100%; }
.news-article-content blockquote { margin: 28px 0; padding: 20px 24px; border-left: 4px solid var(--news-red); border-radius: 0 16px 16px 0; background: var(--news-cream); color: var(--news-red-dark); font-weight: 600; }
.news-article-content table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; }
.news-article-content th,
.news-article-content td { padding: 10px 12px; border: 1px solid var(--news-line); }
.news-tags { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; margin-top: 42px; padding-top: 24px; border-top: 1px solid var(--news-line); }
.news-tags strong { margin-right: 4px; color: var(--news-ink); font-size: 14px; }
.news-tags a { padding: 7px 13px; border: 1px solid var(--news-line); border-radius: 999px; background: var(--news-cream); color: var(--news-muted); font-size: 13px; font-weight: 600; transition: border-color .25s, color .25s, background-color .25s; }
.news-tags a:hover { border-color: var(--news-red); background: #fff; color: var(--news-red); }
.news-aside { position: sticky; top: 92px; display: grid; gap: 18px; }
.news-aside-card { padding: 25px; border: 1px solid var(--news-line); border-radius: 22px; background: var(--news-cream); }
.news-aside-card h2 { margin: 0 0 16px; color: var(--news-ink); font-size: 18px; font-weight: 700; }
.news-share { display: flex; flex-wrap: wrap; gap: 8px; }
.news-share a,
.news-share button { display: inline-flex; min-height: 40px; align-items: center; padding: 8px 14px; border: 1px solid var(--news-line); border-radius: 999px; background: #fff; color: var(--news-ink); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; transition: border-color .25s, color .25s, transform .25s; }
.news-share a:hover,
.news-share button:hover { transform: translateY(-2px); border-color: var(--news-red); color: var(--news-red); }
.news-copy-status { min-height: 18px; margin: 9px 0 0; color: var(--news-red); font-size: 12px; }
.news-recent-list { display: grid; gap: 15px; margin: 0; padding: 0; list-style: none; }
.news-recent-list li + li { padding-top: 15px; border-top: 1px solid var(--news-line); }
.news-recent-list a { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 12px; align-items: center; }
.news-recent-list img { width: 76px; height: 58px; border-radius: 11px; object-fit: cover; transition: transform .35s; }
.news-recent-list a:hover img { transform: scale(1.04); }
.news-recent-list strong { display: -webkit-box; overflow: hidden; color: var(--news-ink); font-size: 13.5px; font-weight: 700; line-height: 1.4; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.news-recent-list small { display: block; margin-top: 3px; color: var(--news-soft); font-size: 12px; }
.news-related-section { padding: 88px 0 100px; border-top: 1px solid var(--news-line); background: var(--news-cream); }

/* Hiệu ứng xuất hiện khi cuộn, chỉ kích hoạt sau khi JavaScript sẵn sàng. */
.news-motion-ready .news-reveal { opacity: 0; transform: translateY(38px); transition: opacity .85s var(--news-ease), transform .85s var(--news-ease); transition-delay: var(--news-delay, 0ms); }
.news-motion-ready .news-reveal.is-visible { opacity: 1; transform: none; }

@media (max-width: 900px) {
    .news-grid,
    .news-related-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px; }
    .news-card-featured { flex-direction: column; }
    .news-card-featured .news-card-media { min-height: 0; flex: none; aspect-ratio: 16 / 9; }
    .news-card-featured .news-card-body { padding: 24px; }
    .news-article-layout { grid-template-columns: minmax(0, 1fr); gap: 42px; }
    .news-article { max-width: none; }
    .news-aside { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .news-detail-cover { border-radius: 24px; aspect-ratio: 16 / 9; }
}

@media (max-width: 600px) {
    .news-container { width: min(100% - 32px, 1180px); }
    .news-section { padding: 60px 0 72px; }
    .news-section-heading { margin-bottom: 28px; }
    .news-grid,
    .news-related-grid { grid-template-columns: minmax(0, 1fr); }
    .news-card-featured .news-card-body { padding: 22px; }
    .news-card-featured .news-card-body h2 { font-size: 21px; }
    .news-detail-hero { padding-top: 102px; }
    .news-breadcrumb { font-size: 12px; }
    .news-detail-heading { margin-bottom: 26px; }
    .news-detail-heading h1 { font-size: clamp(30px, 9.5vw, 42px); }
    .news-detail-cover { width: calc(100% + 32px); margin-left: -16px; border-radius: 0; aspect-ratio: 4 / 3; }
    .news-article-section { padding: 54px 0 70px; }
    .news-article { font-size: 16px; line-height: 1.75; }
    .news-article-lead { font-size: 18px; }
    .news-aside { grid-template-columns: minmax(0, 1fr); }
    .news-related-section { padding: 62px 0 76px; }
    .news-pagination .pag_item { width: 40px; height: 40px; border-radius: 10px; }
}

@media (prefers-reduced-motion: reduce) {
    .news-page *,
    .news-page *::before,
    .news-page *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
    .news-motion-ready .news-reveal { opacity: 1; transform: none; }
}
