/*
Theme Name: VNFD
Theme URI: https://vietnamfootballdata.example
Author: VNFD
Description: Giao diện người đọc VNFD V1 — nền sáng, xanh than và đỏ, tiêu đề serif hỗ trợ đủ dấu tiếng Việt, hỗ trợ bài nhiều ảnh, cặp ảnh, bộ ảnh, bảng dữ liệu, xem ảnh lớn và góp ý riêng. Dùng cùng plugin VNFD Core.
Version: 1.2.1
Requires at least: 6.4
Requires PHP: 8.1
License: GPL-2.0-or-later
Text Domain: vnfd
*/

:root {
	--navy: #092b4a;
	--red: #d9232d;
	--red-dark: #b51d26;
	--text: #233647;
	--muted: #657581;
	--border: #dce3e8;
	--bg: #f3f6f7;
	--serif: Arial, "Helvetica Neue", Helvetica, sans-serif; /* Toàn site dùng Arial, kiểu thường (không nghiêng) */
	--sans: Arial, "Helvetica Neue", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: #fff; color: var(--text); font: 16px/1.65 var(--sans); -webkit-text-size-adjust: 100%; }
img { max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid #dbab32; outline-offset: 4px; }
.screen-reader-text { position: absolute !important; clip: rect(1px, 1px, 1px, 1px); width: 1px; height: 1px; overflow: hidden; }
.skip { position: absolute; top: -100px; left: 0; }
.skip:focus { top: 0; background: #fff; padding: 10px; z-index: 100; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 32px; }

/* ---------- Thanh trên, header, menu ---------- */
.topbar { background: var(--navy); color: #e6edf3; font-size: 12px; padding: 6px 0; }
.topbar .wrap { display: flex; justify-content: space-between; gap: 15px; }
.topbar a:hover { color: #fff; text-decoration: underline; }
.preview-bar { background: #fff4dd; color: #7a5300; font-size: 13px; padding: 8px 0; border-bottom: 1px solid #f0d9a8; }
.site-header { border-bottom: 1px solid var(--border); background: #fff; }
.header { display: flex; align-items: center; gap: 25px; min-height: 108px; }
.brand { display: flex; gap: 12px; align-items: center; color: var(--navy); }
.brand img { width: 75px; height: 75px; object-fit: contain; flex: none; } /* Giữ đúng tỷ lệ logo */
.brand strong { display: block; font: 700 23px/1.2 var(--serif); color: var(--navy); }
.brand em { font: normal 12px/1.4 var(--sans); color: var(--muted); }
.brand:hover strong { color: var(--red); }
.main-nav { margin-left: auto; }
.main-nav ul { display: flex; align-items: center; gap: 22px; list-style: none; margin: 0; padding: 0; }
.main-nav a { display: block; padding: 16px 0; font-size: 12px; font-weight: 700; white-space: nowrap; color: var(--navy); border-bottom: 2px solid transparent; text-transform: uppercase; letter-spacing: .3px; }
.main-nav a:hover, .main-nav .current-menu-item > a, .main-nav .current-category-ancestor > a, .main-nav .current-post-ancestor > a, .main-nav .is-current > a { color: var(--red); border-color: var(--red); }
.header-search { display: flex; }
.header-search input { width: 150px; border: 1px solid var(--border); padding: 7px 10px; font-size: 13px; }
.header-search button { border: 1px solid var(--navy); background: var(--navy); color: #fff; padding: 7px 10px; font-size: 13px; }
.menu-toggle { display: none; margin-left: auto; background: none; border: 1px solid var(--border); padding: 8px 12px; color: var(--navy); }

/* ---------- Breadcrumb ---------- */
.breadcrumb { display: flex; gap: 9px; flex-wrap: wrap; font-size: 12px; color: var(--muted); padding: 24px 0; }
.breadcrumb a:hover { color: var(--red); }
.breadcrumb .current { color: var(--navy); }

/* ---------- Thành phần chung ---------- */
.kicker { color: var(--red); font-size: 11px; letter-spacing: 1.6px; font-weight: 700; text-transform: uppercase; }
.primary-btn, .btn-primary { display: inline-block; border: 0; background: var(--red); color: #fff; padding: 11px 18px; font-size: 13px; white-space: nowrap; }
.primary-btn:hover, .btn-primary:hover { background: var(--red-dark); }
.small-btn { background: #fff; border: 1px solid var(--border); padding: 7px 12px; font-size: 12px; color: var(--navy); }
.small-btn:hover { border-color: var(--navy); }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; border-top: 3px solid var(--navy); padding-top: 14px; margin: 46px 0 22px; }
.section-head h2 { font: 700 26px/1.3 var(--serif); color: var(--navy); margin: 0; }
.section-head a { font-size: 12px; color: var(--red); font-weight: 700; }
.section-head a:hover { text-decoration: underline; }

/* ---------- Thẻ bài ---------- */
.articlegrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 33px 27px; }
.articlegrid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px 22px; }
.story { display: block; color: var(--navy); }
/* Khung ảnh đại diện: tỷ lệ cố định, ảnh thu vừa khung (không cắt), nền là chính ảnh làm mờ */
.story .thumb { display: block; width: 100%; aspect-ratio: 1.75; background: var(--bg); }
.thumb-frame { position: relative; overflow: hidden; }
.thumb-frame::before { content: ""; position: absolute; inset: -20px; background: var(--thumb-bg, none) center / cover no-repeat; filter: blur(18px) brightness(.85); opacity: .9; }
.thumb-frame .thumb-img { position: relative; display: block; width: 100%; height: 100%; object-fit: contain; }
.thumb-frame.is-placeholder .thumb-img { object-fit: cover; }
.story .kicker { display: block; margin-top: 14px; font-size: 10px; letter-spacing: 1px; }
.story h2, .story h3 { font: 700 22px/1.35 var(--serif); margin: 8px 0 10px; letter-spacing: -.3px; }
.cols-4 .story h3 { font-size: 18px; }
.story:hover h2, .story:hover h3 { color: var(--red); }
.story p { font-size: 13px; line-height: 1.65; color: var(--muted); margin: 0 0 12px; }
.storymeta { font-size: 11px; color: var(--muted); }

/* ---------- Trang chủ ---------- */
.home-hero { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 30px; padding: 30px 0 10px; }
.hero-main .thumb { aspect-ratio: 16 / 9; }
.hero-main h2 { font: 700 38px/1.2 var(--serif); letter-spacing: -.8px; margin: 12px 0 12px; }
.hero-main p { font: 18px/1.55 var(--serif); color: #4c6170; }
.hero-side { display: grid; gap: 26px; align-content: start; }
.hero-side .story h3 { font-size: 20px; }
.home-intro { background: var(--bg); padding: 25px 30px; display: flex; gap: 30px; align-items: center; margin: 46px 0 50px; }
.home-intro strong { font: 700 23px var(--serif); color: var(--navy); }
.home-intro p { font-size: 13px; color: var(--muted); margin: 6px 0 0; }

/* ---------- Trang chuyên mục / tìm kiếm ---------- */
.catintro { padding: 26px 0 24px; border-bottom: 1px solid var(--border); }
.catintro .kicker { margin-bottom: 10px; }
.catintro h1 { font: 700 39px/1.18 var(--serif); letter-spacing: -.9px; color: var(--navy); margin: 0 0 12px; }
.catintro p { max-width: 750px; font-size: 16px; color: var(--muted); margin: 0; }
.topicnav { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 23px; }
.topicnav a { background: #fff; color: var(--navy); border: 1px solid var(--border); padding: 7px 14px; font-size: 12px; }
.topicnav a[aria-current="page"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.topicnav a:hover { border-color: var(--navy); }
.searchrow { display: flex; gap: 10px; align-items: center; border-bottom: 1px solid var(--border); padding: 24px 0; }
.searchrow label { flex: 1; }
.searchrow input[type="search"] { width: 100%; border: 1px solid #bdc9d2; padding: 11px 13px; font-size: 15px; }
.searchrow .primary-btn { padding: 13px 21px; }
.resultline { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 22px 0; font-size: 13px; color: var(--muted); }
.pager { display: flex; justify-content: center; align-items: center; gap: 9px; padding: 38px 0 44px; flex-wrap: wrap; }
.pager .page-numbers { border: 1px solid var(--border); background: #fff; color: var(--navy); padding: 7px 14px; font-size: 13px; }
.pager .page-numbers.current { background: var(--navy); color: #fff; border-color: var(--navy); }
.pager .page-numbers.dots { border: 0; }
.empty { padding: 45px; background: var(--bg); grid-column: 1 / -1; }
.empty h2 { font: 700 25px var(--serif); color: var(--navy); margin: 0 0 10px; }
.empty p { font-size: 14px; color: var(--muted); }

/* ---------- Trang bài viết ---------- */
.layout { display: grid; grid-template-columns: minmax(0, 850px) 245px; gap: 55px; }
.single h1, .page-title { font: 700 43px/1.18 var(--serif); letter-spacing: -.9px; color: var(--navy); margin: 12px 0 18px; }
.summary { font: 20px/1.55 var(--serif); color: #4c6170; margin: 0 0 22px; }
.byline { display: flex; gap: 12px; flex-wrap: wrap; color: var(--muted); font-size: 12px; border-bottom: 1px solid var(--border); padding-bottom: 17px; }
.byline b { color: var(--navy); }
.tools { display: flex; align-items: center; gap: 8px; padding: 14px 0 20px; flex-wrap: wrap; }
.tools button { background: #fff; border: 1px solid var(--border); padding: 7px 12px; font-size: 12px; color: var(--navy); }
.tools button:disabled { opacity: .4; cursor: default; }
.tools .spacer { flex: 1; }
.tools .label { font-size: 12px; color: var(--muted); }
.status { font-size: 12px; color: var(--muted); margin: 0; min-height: 0; }
.lead-figure { margin: 0 0 24px; }

.articletext { font-size: 18px; line-height: 1.85; }
.articletext > * { max-width: 100%; }
.articletext p { margin: 23px 0; }
.articletext h2 { font: 700 28px/1.35 var(--serif); color: var(--navy); margin: 35px 0 14px; scroll-margin-top: 20px; }
.articletext h3 { font: 700 21px/1.4 var(--serif); color: var(--navy); }
.articletext a { color: var(--red); text-decoration: underline; text-underline-offset: 2px; }
.articletext ul, .articletext ol { padding-left: 24px; }
.articletext blockquote, .articletext .wp-block-quote { margin: 25px 0; padding: 20px 23px; background: var(--bg); border-left: 3px solid var(--red); font: 21px/1.6 var(--serif); color: var(--navy); }
.articletext blockquote p { margin: 0; }
.articletext blockquote cite { display: block; font: 13px var(--sans); color: var(--muted); margin-top: 8px; font-style: normal; }
.articletext .is-style-vnfd-note { padding: 20px 23px; background: var(--bg); border-left: 3px solid var(--red); font-size: 15px; line-height: 1.7; margin: 25px 0; }
.articletext .is-style-vnfd-note p { margin: 0 0 8px; }

/* Ảnh: giữ tỷ lệ gốc, chú thích + nguồn */
.articletext figure, .lead-figure { margin: 24px 0; }
.articletext .wp-block-image img, .lead-figure img { display: block; width: 100%; height: auto; background: var(--bg); cursor: zoom-in; }
.articletext .wp-block-image.size-medium img, .articletext .wp-block-image.size-thumbnail img { width: auto; }
.articletext .wp-block-image.aligncenter img { margin: 0 auto; width: auto; }
.zoomable { position: relative; display: block; }
.zoomlabel { position: absolute; bottom: 12px; right: 12px; background: #fffef4; padding: 4px 9px; font: 12px/1.5 var(--sans); border: 1px solid #d7dddf; color: var(--navy); pointer-events: none; }
.articletext figcaption, .lead-figure figcaption, .wp-element-caption { padding: 9px 0 0; color: var(--muted); font-size: 12px; line-height: 1.55; text-align: left; margin: 0; }
.vnfd-credit { display: block; color: #87919b; margin-top: 3px; }
/* Ảnh dọc/infographic: không quá cao, đặt giữa */
/* Ảnh dọc đứng riêng một mình (không trong cột/bộ ảnh, chưa chỉnh cỡ): giới hạn chiều cao cho dễ đọc */
.articletext > .wp-block-image.is-portrait:not(.is-resized) img, .articletext > div.wp-block-image > .is-portrait:not(.is-resized) img { width: auto; max-width: 100%; max-height: 90vh; margin: 0 auto; }
/* Ảnh đã chỉnh cỡ trong trình soạn: giữ đúng kích thước đã chỉnh (thu nhỏ theo khung nếu màn hình hẹp) */
.articletext .wp-block-image.is-resized img, .articletext .wp-block-image .is-resized img { max-width: 100%; height: auto; }
.articletext .wp-block-image .aligncenter img { margin-left: auto; margin-right: auto; }
/* Ảnh trong khối Cột: hiển thị giống trình soạn, không giới hạn chiều cao, căn đáy chú thích */
.articletext .wp-block-column .wp-block-image { margin-top: 0; }
.articletext .wp-block-column .wp-block-image:not(.is-resized) > img, .articletext .wp-block-column .wp-block-image > figure:not(.is-resized) img { max-height: none; }

/* Cặp ảnh */
.articletext .wp-block-gallery.is-style-vnfd-pair { display: grid !important; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.articletext .wp-block-gallery.is-style-vnfd-pair .wp-block-image { width: 100% !important; margin: 0 !important; }
.articletext .wp-block-gallery.is-style-vnfd-pair .wp-block-image img { height: auto !important; object-fit: contain !important; }
.articletext .wp-block-gallery.is-style-vnfd-pair .wp-block-image figcaption { position: static !important; background: none !important; color: var(--muted) !important; padding: 9px 0 0 !important; max-height: none !important; font-size: 12px !important; text-align: left !important; }

/* Bộ ảnh */
.articletext .vnfd-album, .articletext .wp-block-gallery.is-style-vnfd-album { background: var(--bg); }
.articletext .vnfd-album { padding: 23px; margin: 25px 0; }
.articletext .vnfd-album h3 { margin: 0 0 16px; font: 700 21px var(--serif); color: var(--navy); }
.articletext .wp-block-gallery.is-style-vnfd-album { display: grid !important; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 0; }
.articletext .wp-block-gallery.is-style-vnfd-album .wp-block-image { width: 100% !important; margin: 0 !important; display: block; }
.articletext .wp-block-gallery.is-style-vnfd-album .wp-block-image img { aspect-ratio: 4 / 3; object-fit: cover !important; height: auto !important; }
.articletext .wp-block-gallery.is-style-vnfd-album .wp-block-image figcaption { position: static !important; background: none !important; color: var(--muted) !important; padding: 7px 0 0 !important; font-size: 11px !important; max-height: none !important; text-align: left !important; }
.articletext .wp-block-gallery:not(.is-style-vnfd-pair):not(.is-style-vnfd-album) .wp-block-image img { cursor: zoom-in; }

/* Bảng rộng cuộn ngang, không tràn trang */
.articletext .wp-block-table { overflow-x: auto; margin: 22px 0; -webkit-overflow-scrolling: touch; }
.articletext table { border-collapse: collapse; width: 100%; font-size: 14px; line-height: 1.6; }
.articletext th, .articletext td { padding: 13px 14px; border: 0; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.articletext thead th, .articletext thead td { background: var(--navy); color: #fff; font-weight: 400; border-bottom: 0; }
.articletext .wp-block-table figcaption { padding-top: 9px; }

/* Video nhúng */
.articletext .wp-block-embed iframe { max-width: 100%; }
.articletext .wp-block-embed.is-type-video .wp-block-embed__wrapper { position: relative; padding-top: 56.25%; }
.articletext .wp-block-embed.is-type-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; }

.source { border-top: 1px solid var(--border); padding-top: 20px; margin-top: 35px; font-size: 13px; color: var(--muted); }
.source strong { color: var(--navy); }
.source p { white-space: pre-line; }
.tags { display: flex; gap: 9px; flex-wrap: wrap; margin: 20px 0; }
.tags a { background: var(--bg); padding: 5px 11px; font-size: 12px; color: var(--navy); }
.tags a:hover { color: var(--red); }
.feedbackbar { display: flex; align-items: center; justify-content: space-between; gap: 25px; border: 1px solid var(--border); padding: 22px; margin: 28px 0 40px; }
.feedbackbar h3 { font: 700 20px var(--serif); margin: 0 0 5px; color: var(--navy); }
.feedbackbar p { font-size: 12px; color: var(--muted); margin: 0; }

.sidebar { padding-top: 6px; }
.sidebar section { border-top: 3px solid var(--navy); padding: 18px 0; margin-bottom: 28px; }
.sidebar .sticky { position: sticky; top: 20px; }
.sidebar h2 { font: 700 20px var(--serif); color: var(--navy); margin: 0 0 16px; }
.sidebar ol { padding-left: 19px; margin: 0; font-size: 13px; line-height: 1.6; }
.sidebar li { margin-bottom: 12px; }
.sidebar a:hover { color: var(--red); }
.readnext { display: block; margin: 15px 0 22px; }
.readnext strong { font: 700 17px/1.45 var(--serif); display: block; color: var(--navy); margin-bottom: 6px; }
.readnext:hover strong { color: var(--red); }
.readnext span { font-size: 11px; color: var(--muted); text-transform: uppercase; }
.sidebar .asideabout { background: var(--bg); border-top: 0; padding: 20px; }
.asideabout p { font-size: 13px; color: var(--muted); margin: 0; }

.related { border-top: 1px solid var(--border); padding: 30px 0 40px; }
.related > h2 { font: 700 28px var(--serif); color: var(--navy); margin: 0 0 22px; }
.relatedgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 27px; }
.relatedgrid .story .thumb { aspect-ratio: 16 / 9; }

/* Trang thông tin */
.page-content { max-width: 820px; padding-bottom: 50px; }
.page-content .articletext { font-size: 17px; }
.inline-feedback { border: 1px solid var(--border); padding: 25px; margin: 30px 0 50px; max-width: 640px; }

/* ---------- Chân trang ---------- */
.site-footer { background: var(--navy); color: #d9e2e9; font-size: 12px; padding: 26px 0; margin-top: 30px; }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; align-items: center; }
.footlinks { display: flex; flex-wrap: wrap; gap: 18px; list-style: none; margin: 0; padding: 0; }
.footlinks a:hover, .footlinks button:hover { color: #fff; text-decoration: underline; }
.footlinks button { padding: 0; color: inherit; background: none; border: 0; font-size: 12px; }
.footnote { opacity: .85; }

/* ---------- Hộp thoại: xem ảnh lớn & góp ý ---------- */
dialog { border: 0; padding: 0; max-width: calc(100% - 32px); box-shadow: 0 15px 80px #0005; }
dialog::backdrop { background: #041a2cdb; }
.lightbox { background: #081c2b; color: #fff; width: min(1100px, calc(100% - 28px)); max-height: 94vh; }
.lighthead { display: flex; justify-content: space-between; align-items: center; gap: 15px; padding: 14px 20px; border-bottom: 1px solid #2a4050; font-size: 12px; }
.lighthead button, .lightcontrols button { color: #fff; border: 1px solid #556774; background: transparent; padding: 6px 12px; font-size: 13px; }
.lightcontrols button:disabled { opacity: .35; cursor: default; }
.viewer { padding: 20px; overflow: auto; max-height: 72vh; text-align: center; }
.viewer img { max-width: 100%; max-height: 66vh; width: auto; height: auto; display: block; margin: auto; }
.viewer.full img { max-width: none; max-height: none; }
.lightcontrols { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 0 20px 18px; flex-wrap: wrap; }
.lightcontrols p { font-size: 12px; color: #bccbd5; margin: 0; flex: 1; }
.dialogform { width: 560px; background: #fff; color: var(--text); }
.dialogform .lighthead { color: var(--navy); border-color: var(--border); }
.dialogform .lighthead button { color: var(--navy); border-color: var(--border); }
.formbody { padding: 25px; }
.formbody h2 { font: 700 26px var(--serif); color: var(--navy); margin: 0 0 12px; }
.formbody p { font-size: 13px; color: var(--muted); }
.fb-form label { display: block; font-size: 13px; margin-top: 12px; color: var(--navy); }
.fb-form label small { color: var(--muted); }
.fb-form input, .fb-form textarea { display: block; width: 100%; margin-top: 5px; border: 1px solid #b8c6cf; padding: 10px; font-size: 16px; color: var(--text); }
.fb-form .field-error { color: #b0241c; font-size: 12px; margin-top: 4px; display: block; }
.fb-form [aria-invalid="true"] { border-color: #b0241c; }
.fb-form .primary-btn { margin-top: 17px; }
.fb-form .hp { position: absolute; left: -5000px; width: 1px; height: 1px; overflow: hidden; }
.fb-status { margin-top: 12px; font-size: 14px !important; }
.fb-status.ok { color: #276244 !important; }
.fb-status.err { color: #b0241c !important; }

/* ---------- Responsive ---------- */
@media (max-width: 1150px) {
	.header { flex-wrap: wrap; padding-top: 15px; padding-bottom: 9px; gap: 6px 20px; }
	.main-nav { width: 100%; margin-left: 0; order: 3; }
	.main-nav ul { justify-content: space-between; gap: 14px; }
	.header-search { margin-left: auto; }
	.layout { grid-template-columns: minmax(0, 1fr) 220px; gap: 30px; }
	.single h1, .page-title { font-size: 38px; }
	.articlegrid.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 850px) {
	.articlegrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.home-hero { grid-template-columns: 1fr; }
	.hero-side { grid-template-columns: 1fr 1fr; }
	.catintro h1 { font-size: 34px; }
}
@media (max-width: 800px) {
	.sidebar { display: none; }
	.layout { display: block; }
	.wrap { padding: 0 23px; }
	.single h1, .page-title { font-size: 36px; }
	.articletext { font-size: 17px; }
	.articletext .wp-block-gallery.is-style-vnfd-album { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 580px) {
	.wrap { padding: 0 18px; }
	.topbar { font-size: 10px; }
	.topbar .extra { display: none; }
	.brand img { width: 58px; height: 58px; }
	.brand strong { font-size: 20px; }
	.brand em { font-size: 11px; }
	.header { min-height: 90px; gap: 10px; }
	.header-search { display: none; }
	.menu-toggle { display: block; }
	.main-nav { display: none; padding: 6px 0 10px; }
	.main-nav.open { display: block; }
	.main-nav ul { flex-wrap: wrap; gap: 0; }
	.main-nav li { width: 50%; }
	.main-nav a { padding: 12px 0; }
	.main-nav .mobile-search { display: flex; width: 100%; padding-top: 8px; }
	.breadcrumb { padding: 18px 0; font-size: 11px; }
	.single h1, .page-title { font-size: 32px; letter-spacing: -.4px; }
	.hero-main h2 { font-size: 29px; }
	.hero-side { grid-template-columns: 1fr; }
	.summary { font-size: 18px; }
	.tools { gap: 6px; }
	.tools button { padding: 9px 10px; }
	.tools .spacer { display: none; }
	.byline { gap: 7px; font-size: 11px; }
	.articletext { line-height: 1.8; }
	.articletext h2 { font-size: 25px; }
	/* Cặp ảnh xếp dọc trên màn hình nhỏ */
	.articletext .wp-block-gallery.is-style-vnfd-pair { grid-template-columns: 1fr; gap: 14px; }
	.articletext .vnfd-album { padding: 15px; }
	.articletext .wp-block-gallery.is-style-vnfd-album { gap: 13px; }
	.feedbackbar { display: block; padding: 20px; }
	.feedbackbar button { margin-top: 15px; }
	.articlegrid, .articlegrid.cols-4 { grid-template-columns: 1fr; gap: 29px; }
	.story h2 { font-size: 24px; }
	.relatedgrid { grid-template-columns: 1fr; gap: 23px; }
	.relatedgrid .story { display: grid; grid-template-columns: 115px 1fr; gap: 15px; }
	.relatedgrid .story .thumb { aspect-ratio: 1.15; }
	.relatedgrid .story h3 { font-size: 18px; margin-top: 0; }
	.relatedgrid .story .kicker { margin-top: 0; }
	.catintro h1 { font-size: 32px; }
	.searchrow { flex-wrap: wrap; padding: 20px 0; }
	.searchrow label { flex-basis: 100%; }
	.searchrow input[type="search"] { font-size: 16px; }
	.searchrow .primary-btn { flex: 1; }
	.home-intro { display: block; padding: 22px; }
	.lightcontrols p { flex-basis: 100%; order: 2; }
	.viewer { padding: 12px; }
	.kicker { font-size: 10px; }
	.formbody { padding: 20px; }
	.section-head h2 { font-size: 23px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
@media print {
	.topbar, .site-header, .sidebar, .tools, .related, .site-footer, .feedbackbar, dialog, .zoomlabel, .preview-bar, #wpadminbar { display: none !important; }
	.layout { display: block; }
	.wrap { padding: 0; }
	.articletext { font-size: 12pt; }
	figure, .wp-block-gallery { break-inside: avoid; }
	.single h1 { font-size: 26pt; }
}

/* ---------- Theo dõi VNFD: Facebook & YouTube ---------- */
.topbar-links { display: flex; gap: 14px; align-items: center; }
.topbar-links a { font-weight: 700; }
.social-follow { margin: 10px 0 30px; }
.social-follow--article { border-top: 1px solid var(--border); padding-top: 4px; }
.social-follow .section-head { align-items: center; }
.social-links { display: flex; gap: 8px; }
.social-btn { display: inline-block; color: #fff !important; padding: 6px 12px; font-size: 12px; font-weight: 700; }
.social-btn--fb { background: #1877f2; }
.social-btn--yt { background: #d9232d; }
.social-btn:hover { opacity: .88; text-decoration: none !important; }
.social-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.social-card { background: var(--bg); padding: 18px; }
.social-card h3 { font: 700 18px/1.3 var(--serif); color: var(--navy); margin: 0 0 12px; }
.social-card p { margin: 10px 0 0; font-size: 13px; }
.social-card p a { color: var(--red); font-weight: 700; }
.social-video { position: relative; padding-top: 56.25%; background: #000; }
.social-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.social-fb { display: block; width: 100%; max-width: 500px; border: 0; overflow: hidden; background: #fff; margin: 0 auto; }
.social-follow--article .social-grid { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }
@media (max-width: 850px) { .social-grid, .social-follow--article .social-grid { grid-template-columns: 1fr; } }
@media (max-width: 580px) { .topbar-links .extra { display: none; } .social-follow .section-head { flex-wrap: wrap; gap: 10px; } .social-card { padding: 14px; } }
@media print { .social-follow { display: none !important; } }
/* Nhãn "Xem lớn" bám đúng ảnh căn giữa/đã chỉnh cỡ; infographic dài mở theo chiều ngang trong trình xem */
.articletext .aligncenter .zoomable, .articletext .is-resized .zoomable { display: table; margin: 0 auto; }
.viewer.tall img { max-height: none; width: min(100%, 900px); max-width: 100%; }
/* Đường dẫn dài trong bài không làm tràn trang; khung bài Facebook nhúng */
.articletext { overflow-wrap: anywhere; }
.articletext .vnfd-fb-embed { margin: 28px auto; max-width: 500px; text-align: center; }
.articletext .vnfd-fb-embed iframe { display: block; width: 100%; max-width: 500px; border: 0; overflow: hidden; background: #fff; margin: 0 auto; }
.articletext .vnfd-fb-embed figcaption { text-align: center; }
/* =====================================================================
   Bố cục kiểu trang báo (góp ý VNFD 16/10/2026)
   ===================================================================== */

/* Đầu trang gọn hơn, menu dính khi cuộn */
.header { min-height: 78px; gap: 22px; }
.brand img { width: 58px; height: 58px; }
.brand strong { font-size: 20px; }
.site-header { position: sticky; top: var(--wp-admin--admin-bar--height, 0px); z-index: 60; transition: box-shadow .2s; }
body.is-scrolled .site-header { box-shadow: 0 2px 10px rgba(9, 43, 74, .12); }
@media (min-width: 581px) {
	body.is-scrolled .header { min-height: 0; padding-top: 0; padding-bottom: 0; }
	body.is-scrolled .brand em, body.is-scrolled .header-search { display: none; }
	body.is-scrolled .brand img { width: 34px; height: 34px; }
	body.is-scrolled .brand strong { font-size: 16px; }
	body.is-scrolled .main-nav a { padding: 12px 0; }
}
@media (max-width: 1150px) { body.is-scrolled .brand { display: none; } body.is-scrolled .main-nav { margin: 0; } }
@media (max-width: 580px) { body.is-scrolled .header { min-height: 56px; } body.is-scrolled .brand img { width: 38px; height: 38px; } body.is-scrolled .brand em { display: none; } }

/* Trang chủ: 1 tin chính + 2 tin phụ nằm trọn màn hình đầu */
.home-hero { grid-template-columns: minmax(0, 1.85fr) minmax(0, 1fr); gap: 24px; padding: 18px 0 6px; }
.home-hero .hero-main .thumb { aspect-ratio: auto; height: clamp(220px, calc(100vh - 300px), 430px); }
.home-hero .hero-main h2 { font-size: 26px; line-height: 1.25; letter-spacing: -.4px; margin: 8px 0 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.home-hero .hero-main p { font: 15px/1.55 var(--sans); margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.home-hero .hero-main .kicker, .home-hero .hero-side .kicker { margin-top: 10px; }
.home-hero .hero-side { gap: 18px; }
.home-hero .hero-side .thumb { aspect-ratio: auto; height: clamp(110px, calc((100vh - 300px) / 2 - 30px), 190px); }
@media (max-width: 850px) { .home-hero .hero-main .thumb { height: auto; aspect-ratio: 16 / 9; } .home-hero .hero-side .thumb { height: auto; aspect-ratio: 16 / 9; } }
.home-hero .hero-side h3 { font-size: 17px; line-height: 1.35; margin: 6px 0 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.home .section-head { margin: 26px 0 16px; }
.home .section-head h2 { font-size: 22px; }

/* Thẻ bài khung cố định: 3 bài một hàng, ảnh – tiêu đề – tóm tắt cùng kích thước, dài quá thì "…" */
.fixed-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px 24px; }
.fixed-cards .story { display: flex; flex-direction: column; }
.fixed-cards .story .thumb { aspect-ratio: 16 / 9; }
.fixed-cards .story .kicker { margin-top: 10px; }
.fixed-cards .story h2, .fixed-cards .story h3 { font-size: 18px; line-height: 1.35; margin: 6px 0 8px; height: calc(1.35em * 3); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.fixed-cards .story p { font-size: 13.5px; line-height: 1.6; height: calc(1.6em * 3); margin: 0 0 8px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 850px) { .fixed-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 580px) {
	.fixed-cards { grid-template-columns: 1fr; }
	.fixed-cards .story h2, .fixed-cards .story h3, .fixed-cards .story p { height: auto; }
}
.infinite-status { text-align: center; color: var(--muted); font-size: 13px; padding: 26px 0 36px; }

/* Trang chuyên mục: đầu trang gọn trên một hàng, không có ô tìm kiếm riêng */
.listing .catbar { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; padding: 14px 0 12px; border-bottom: 1px solid var(--border); }
.listing .catbar .breadcrumb { padding: 0 0 6px; }
.listing .catbar h1 { font-size: 28px; line-height: 1.2; color: var(--navy); margin: 0 0 4px; letter-spacing: -.4px; }
.listing .catbar p { font-size: 14px; color: var(--muted); margin: 0; max-width: 560px; }
.listing .catbar .topicnav { margin: 0; justify-content: flex-end; max-width: 60%; gap: 8px; }
.listing .resultline { padding: 10px 0 14px; }
.catintro--compact { padding: 14px 0 10px; }
.catintro--compact h1 { font-size: 28px; margin-bottom: 4px; }
@media (max-width: 850px) { .listing .catbar { flex-direction: column; align-items: flex-start; } .listing .catbar .topicnav { max-width: 100%; justify-content: flex-start; } }

/* Trang bài: tiêu đề vừa phải, chữ nhỏ hơn, căn đều hai bên */
.single h1 { font-size: 32px; line-height: 1.25; margin: 8px 0 12px; }
.single .summary { font-size: 17px; margin-bottom: 14px; }
.single .breadcrumb { padding: 14px 0; }
.articletext { font-size: 16px; line-height: 1.75; }
.articletext p { margin: 14px 0; text-align: justify; }
.articletext h2 { font-size: 22px; margin: 26px 0 10px; }
.articletext h3 { font-size: 18px; }
.articletext figure, .lead-figure { margin: 18px 0; }
.tools { padding: 10px 0 12px; }
@media (max-width: 580px) { .single h1 { font-size: 26px; } }

/* Thích / Không thích / Chia sẻ */
.reactbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 14px 0; margin: 26px 0 0; }
.reactbar__label { font-weight: 700; color: var(--navy); font-size: 14px; margin-right: 4px; }
.react-btn { display: inline-flex; align-items: center; gap: 6px; background: #fff; border: 1px solid var(--border); color: var(--navy); padding: 7px 12px; font-size: 13px; border-radius: 18px; line-height: 1.2; }
.react-btn b { font-weight: 700; }
.react-btn:hover { border-color: var(--navy); }
.react-btn--like.is-on { background: #e8f1ff; border-color: #1877f2; color: #0b4fb3; }
.react-btn--fb { background: #1877f2; border-color: #1877f2; color: #fff !important; }
.reactbar__share { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-left: auto; }
.reactbar__sharelabel { font-size: 13px; color: var(--muted); }
.reactbar__sharelabel b { color: var(--navy); }
.reactbar__status { flex-basis: 100%; font-size: 12px; color: #276244; min-height: 0; }
.reactbar__status:empty { display: none; }
.reactbar + .feedbackbar { margin-top: 18px; }
@media (max-width: 580px) { .reactbar__share { margin-left: 0; } }

/* Cuối trang chủ: theo dõi YouTube/Facebook + giới thiệu, gọn và cân đối */
.social-follow--home .social-grid { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, .9fr); gap: 20px; }
.social-card { padding: 14px; }
.social-card h3 { font-size: 16px; margin-bottom: 10px; }
.social-card--about .about-text { font-size: 13.5px; color: var(--text); line-height: 1.6; margin: 0 0 10px; }
.about-links { list-style: none; margin: 0; padding: 0; font-size: 13.5px; }
.about-links li { border-top: 1px solid var(--border); padding: 8px 0; }
.about-links a { color: var(--navy); font-weight: 700; }
.about-links a:hover { color: var(--red); }
@media (max-width: 1000px) { .social-follow--home .social-grid { grid-template-columns: 1fr 1fr; } .social-card--about { grid-column: 1 / -1; } }
@media (max-width: 640px) { .social-follow--home .social-grid { grid-template-columns: 1fr; } }
.listing .catbar .breadcrumb .count { color: var(--muted); }
.listing .catbar { margin-bottom: 16px; }
.listing .fixed-cards .story .thumb { aspect-ratio: 2 / 1; }
@media (max-width: 850px) {
	.home-hero { grid-template-columns: 1fr; gap: 18px; }
	.home-hero .hero-side { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 580px) {
	.header { flex-wrap: nowrap; }
	.brand em { display: none; }
	.brand strong { font-size: 18px; }
	.home-hero .hero-main h2 { font-size: 22px; }
	.home-hero .hero-side h3 { font-size: 15px; }
	.home-hero .hero-side { gap: 14px; }
}.menu-toggle { white-space: nowrap; flex: none; }

/* "Theo dõi VNFD" gọn trong chân trang (mọi trang) */
.site-footer { padding: 0 0 22px; }
.site-footer > .wrap:last-child { padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, .15); }
.footer-follow { padding: 24px 0 22px; }
.footer-follow__grid { display: grid !important; grid-template-columns: minmax(0, 1fr) 320px 340px; gap: 24px; align-items: start; }
.footer-follow__about h2 { font: 700 18px/1.3 var(--sans); color: #fff; margin: 0 0 8px; }
.footer-follow__about p { font-size: 13px; color: #c7d5df; margin: 0 0 12px; line-height: 1.55; }
.footer-follow__buttons { display: flex; gap: 8px; flex-wrap: wrap; }
.footer-follow__yt .social-video { border-radius: 2px; overflow: hidden; }
.footer-follow__fb .social-fb { width: 100%; max-width: 340px; height: 130px; background: transparent; }
@media (max-width: 900px) { .footer-follow__grid { grid-template-columns: 1fr 1fr; } .footer-follow__about { grid-column: 1 / -1; } }
@media (max-width: 580px) { .footer-follow__grid { grid-template-columns: 1fr; } }
/* Chân trang một hàng: liên kết bên trái — "Theo dõi VNFD" + video + Facebook thu nhỏ bên phải */
.site-footer { padding: 0; }
.site-footer .footer-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-top: 18px; padding-bottom: 18px; border-top: 1px solid rgba(255, 255, 255, .15); border-bottom: 1px solid rgba(255, 255, 255, .15); }
.site-footer .footlinks { font-size: 14px; gap: 22px; }
.footer-follow { display: flex; align-items: center; gap: 18px; padding: 0; }
.footer-follow__text h2 { font: 700 20px/1.25 var(--sans); color: #fff; margin: 0 0 6px; }
.footer-follow__text p { font-size: 14px; color: #c7d5df; margin: 0; }
.footer-follow__yt iframe, .footer-follow__fb iframe { display: block; border: 0; background: #fff; }
.footer-follow__yt iframe { width: 140px; height: 79px; }
.footer-follow__fb iframe { width: 180px; height: 80px; overflow: hidden; }
.site-footer .footer-note { padding-top: 12px; padding-bottom: 16px; border-top: 0 !important; font-size: 12px; }
@media (max-width: 1000px) { .site-footer .footer-row { flex-direction: column; align-items: flex-start; } }
@media (max-width: 580px) { .footer-follow { flex-wrap: wrap; } .footer-follow__text { flex-basis: 100%; } }
/* Điện thoại: chữ logo co lại / rút gọn "…" để không đè nút Menu */
@media (max-width: 580px) {
	.header { flex-wrap: nowrap; gap: 10px; min-height: 64px; }
	.brand { flex: 1 1 auto; min-width: 0; gap: 8px; }
	.brand > span { min-width: 0; }
	.brand img { width: 44px; height: 44px; }
	.brand strong { font-size: clamp(14px, 4.4vw, 18px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
	.menu-toggle { flex: 0 0 auto; margin-left: auto; padding: 7px 10px; font-size: 14px; }
}
/* Điện thoại: bấm Menu → danh sách sổ xuống, nền xanh than nổi lên trên nội dung trang */
@media (max-width: 580px) {
	.site-header { position: sticky; }
	.main-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; width: auto; margin: 0; padding: 6px 0 10px; background: var(--navy); box-shadow: 0 12px 24px rgba(4, 26, 44, .35); z-index: 80; order: initial; }
	.main-nav.open { display: block; }
	.main-nav ul { display: block; flex-wrap: nowrap; gap: 0; }
	.main-nav li { width: auto; border-bottom: 1px solid rgba(255, 255, 255, .12); }
	.main-nav li:last-child { border-bottom: 0; }
	.main-nav a { display: block; padding: 12px 18px; font-size: 13px; letter-spacing: .4px; color: #fff; border-bottom: 0; white-space: normal; }
	.main-nav a:hover, .main-nav .is-current > a, .main-nav .current-menu-item > a { color: #fff; background: var(--red); border-color: transparent; }
	.menu-toggle[aria-expanded="true"] { background: var(--navy); color: #fff; border-color: var(--navy); }
}
/* Điện thoại: "Bài viết liên quan" ảnh trên, tiêu đề dưới trải hết bề ngang, chữ nhỏ gọn */
@media (max-width: 580px) {
	.related > h2 { font-size: 22px; margin-bottom: 16px; }
	.relatedgrid { gap: 20px; }
	.relatedgrid .story { display: block; }
	.relatedgrid .story .thumb { aspect-ratio: 16 / 9; }
	.relatedgrid .story .kicker { margin-top: 8px; }
	.relatedgrid .story h3 { font-size: 16px; line-height: 1.4; margin: 4px 0 4px; }
	.relatedgrid .story .storymeta { font-size: 11px; }
}
/* "Bài viết liên quan" (mọi màn hình): tiêu đề nhỏ, tối đa 3 dòng, khung cố định; dài quá thì "…" */
.related > h2 { font-size: 22px; }
.relatedgrid .story h3 { font-size: 16px; line-height: 1.4; margin: 6px 0 6px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
@media (min-width: 581px) { .relatedgrid .story h3 { height: calc(1.4em * 3); } }
/* Bài Facebook nhúng trong bài viết: chỉ hiện khung cố định (tên trang + tiêu đề bài), bấm "Xem trên Facebook" để đọc đủ */
.articletext .vnfd-fb-embed { position: relative; max-width: 500px; margin: 22px auto; border: 1px solid var(--border); border-radius: 6px; overflow: hidden; background: #fff; }
.articletext .vnfd-fb-embed iframe { height: 132px !important; max-height: 132px; overflow: hidden; }
.articletext .vnfd-fb-embed--video iframe { height: 132px !important; }
.articletext .vnfd-fb-embed::after { content: ""; position: absolute; left: 0; right: 0; bottom: 34px; height: 18px; background: linear-gradient(rgba(255, 255, 255, 0), #fff); pointer-events: none; }
.articletext .vnfd-fb-embed figcaption { padding: 7px 12px; margin: 0; border-top: 1px solid var(--border); font-size: 13px; text-align: right; }
.articletext .vnfd-fb-embed figcaption a { color: #1877f2; font-weight: 700; text-decoration: none; }.articletext p a[href^="http"] { word-break: break-all; }

/* Nút theo dõi Facebook / đăng ký YouTube trong thanh tương tác cuối bài (chỉ chữ, không nhúng ảnh) */
.react-btn--follow-fb { border-color: #1877f2; color: #1877f2 !important; font-weight: 700; }
.react-btn--follow-fb:hover { background: #1877f2; color: #fff !important; }
.react-btn--follow-yt { border-color: #d9232d; color: #d9232d !important; font-weight: 700; }
.react-btn--follow-yt:hover { background: #d9232d; color: #fff !important; }