/**
 * Báo Chí News – base.css
 * CSS nền tảng dùng chung cho 10 skin. Mỗi skin ghi đè biến trong :root
 * (assets/css/skins/skin-*.css). Giá trị mặc định ở đây = giao diện 1 (Lao Động).
 */

:root {
	/* Màu sắc */
	--c-primary: #1667b5;        /* Xanh Lao Động */
	--c-primary-dark: #0d4a8f;
	--c-accent: #d21f2b;         /* Đỏ nhấn */
	--c-bg: #ffffff;
	--c-surface: #ffffff;
	--c-alt: #f4f6f8;
	--c-text: #1f2430;
	--c-muted: #6b7280;
	--c-border: #e2e5ea;
	--c-nav-bg: var(--c-primary);
	--c-nav-text: #ffffff;
	--c-topbar-bg: var(--c-primary-dark);
	--c-topbar-text: #dbe7f5;
	--c-footer-bg: #0d3a6e;
	--c-footer-text: #cfdcec;
	--c-title: #14213d;
	--c-section-title: var(--c-primary);

	/* Chữ */
	--font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--font-heading: var(--font-body);
	--fs-base: 16px;

	/* Hình khối */
	--radius: 4px;
	--radius-lg: 6px;
	--shadow: none;
	--card-bg: transparent;
	--card-pad: 0px;
	--section-title-border: 3px solid var(--c-accent);
	--container: 1200px;
}

/* ==== Reset & nền tảng ==== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	font-family: var(--font-body);
	font-size: var(--fs-base);
	line-height: 1.6;
	color: var(--c-text);
	background: var(--c-bg);
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--c-accent); }
ul, ol { margin: 0; padding: 0; }
h1, h2, h3, h4, h5, h6 {
	font-family: var(--font-heading);
	color: var(--c-title);
	line-height: 1.3;
	margin: 0 0 .5em;
}
p { margin: 0 0 1em; }
button { font: inherit; cursor: pointer; }
input, textarea { font: inherit; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 16px; }

.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	clip: rect(1px, 1px, 1px, 1px);
	overflow: hidden;
}
.skip-link:focus {
	position: fixed; top: 8px; left: 8px;
	width: auto; height: auto; clip: auto;
	background: var(--c-primary); color: #fff;
	padding: 8px 14px; z-index: 9999; border-radius: var(--radius);
}

/* ==== Topbar ==== */
.topbar {
	background: var(--c-topbar-bg);
	color: var(--c-topbar-text);
	font-size: 13px;
}
.topbar-inner {
	display: flex; align-items: center; justify-content: space-between;
	min-height: 34px; gap: 16px;
}
.topbar-date { text-transform: capitalize; }
.topbar-menu { display: flex; gap: 18px; list-style: none; }
.topbar-menu a:hover { color: #fff; }

/* ==== Masthead ==== */
.masthead { background: var(--c-surface); border-bottom: 1px solid var(--c-border); }
.masthead-inner {
	display: flex; align-items: center; justify-content: space-between;
	gap: 24px; padding: 18px 16px;
}
.site-branding { min-width: 0; }
.site-title {
	font-family: var(--font-heading);
	font-size: 34px; font-weight: 800; letter-spacing: .5px;
	color: var(--c-primary); text-transform: uppercase;
	display: inline-block; line-height: 1.1;
}
.site-title:hover { color: var(--c-primary); }
.site-tagline { margin: 2px 0 0; font-size: 12.5px; color: var(--c-muted); }
.custom-logo { max-height: 60px; width: auto; }

.masthead-search .search-form { display: flex; }
.search-field {
	border: 1px solid var(--c-border); border-right: 0;
	border-radius: var(--radius) 0 0 var(--radius);
	padding: 7px 12px; width: 210px; max-width: 100%;
	background: var(--c-bg); color: var(--c-text);
}
.search-field:focus { outline: 2px solid var(--c-primary); outline-offset: -1px; }
.search-submit {
	border: 0; background: var(--c-primary); color: #fff;
	padding: 0 14px; border-radius: 0 var(--radius) var(--radius) 0;
	display: inline-flex; align-items: center;
}
.search-submit:hover { background: var(--c-accent); }

/* ==== Menu chính ==== */
.main-nav { background: var(--c-nav-bg); color: var(--c-nav-text); }
.nav-inner { display: flex; align-items: stretch; position: relative; }
.nav-home {
	display: flex; align-items: center; padding: 0 14px;
	color: var(--c-nav-text); border-right: 1px solid rgba(255,255,255,.15);
}
.nav-home:hover { color: #fff; background: rgba(0,0,0,.15); }
.primary-menu { display: flex; flex-wrap: wrap; list-style: none; }
.primary-menu li { position: relative; }
.primary-menu > li > a {
	display: block; padding: 12px 14px;
	color: var(--c-nav-text);
	font-size: 14.5px; font-weight: 700; text-transform: uppercase;
}
.primary-menu > li > a:hover,
.primary-menu > li.current-menu-item > a,
.primary-menu > li.current-cat > a { background: rgba(0,0,0,.18); color: #fff; }

/* Menu con */
.primary-menu .sub-menu, .primary-menu .children {
	position: absolute; top: 100%; left: 0; z-index: 100;
	min-width: 220px; list-style: none;
	background: var(--c-surface); border: 1px solid var(--c-border);
	box-shadow: 0 8px 20px rgba(0,0,0,.12);
	display: none;
}
.primary-menu li:hover > .sub-menu,
.primary-menu li:focus-within > .sub-menu,
.primary-menu li:hover > .children,
.primary-menu li:focus-within > .children { display: block; }
.primary-menu .sub-menu a, .primary-menu .children a {
	display: block; padding: 9px 14px;
	color: var(--c-text); font-size: 14px;
	border-bottom: 1px solid var(--c-border);
}
.primary-menu .sub-menu a:hover, .primary-menu .children a:hover { background: var(--c-alt); color: var(--c-accent); }

.nav-toggle { display: none; background: none; border: 0; padding: 10px 12px; }
.nav-toggle-bar { display: block; width: 22px; height: 2px; background: var(--c-nav-text); margin: 5px 0; }

/* ==== Ticker tin nóng ==== */
.breaking-ticker {
	background: var(--c-surface);
	border-bottom: 1px solid var(--c-border);
	font-size: 14px;
}
.ticker-inner { display: flex; align-items: center; gap: 12px; min-height: 38px; }
.ticker-label {
	background: var(--c-accent); color: #fff;
	font-size: 11.5px; font-weight: 800; letter-spacing: 1px;
	padding: 3px 10px; border-radius: var(--radius);
	flex: none;
}
.ticker-viewport { overflow: hidden; flex: 1; }
.ticker-track {
	display: flex; gap: 42px; list-style: none; white-space: nowrap;
	animation: baochi-ticker 35s linear infinite;
	width: max-content;
}
.breaking-ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-track a { font-weight: 600; }
.ticker-track li::before { content: "•"; color: var(--c-accent); margin-right: 8px; }
@keyframes baochi-ticker {
	from { transform: translateX(100%); }
	to   { transform: translateX(-100%); }
}
@media (prefers-reduced-motion: reduce) {
	.ticker-track { animation: none; }
}

/* ==== Bố cục chung ==== */
.site-main { padding: 22px 16px 40px; }
.home-layout, .archive-layout, .single-layout {
	display: grid; grid-template-columns: minmax(0, 1fr) 320px;
	gap: 32px; margin-top: 26px;
}
.archive-layout, .single-layout { margin-top: 8px; }
/* Sidebar bên trái (skin 10) */
.sidebar-left .home-layout,
.sidebar-left .archive-layout,
.sidebar-left .single-layout { grid-template-columns: 320px minmax(0, 1fr); }
.sidebar-left .site-sidebar { order: -1; }

/* ==== Card chung ==== */
.card { background: var(--card-bg); border-radius: var(--radius-lg); box-shadow: var(--shadow); overflow: hidden; }
.card .card-body { padding: var(--card-pad); }
.card-title a:hover { color: var(--c-accent); }
.post-thumb { display: block; overflow: hidden; border-radius: var(--radius); }
.card .post-thumb img, .thumb-placeholder { width: 100%; transition: transform .35s ease; }
.card:hover .post-thumb img { transform: scale(1.04); }
.thumb-placeholder {
	display: block; aspect-ratio: 16 / 9;
	background: linear-gradient(135deg, var(--c-alt), var(--c-border));
}
.cat-badge {
	display: inline-block;
	color: var(--c-accent);
	font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .6px;
	margin: 8px 0 4px;
}
a.cat-badge:hover { text-decoration: underline; }
.post-meta { font-size: 12.5px; color: var(--c-muted); display: flex; gap: 10px; margin-top: 6px; }
.card-excerpt { color: var(--c-muted); font-size: 14.5px; margin: 6px 0 0; }

.card-large .card-title { font-size: 24px; margin: 2px 0 0; }
.card-medium .card-title { font-size: 16.5px; margin: 2px 0 0; }
.card-small { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 12px; align-items: start; }
.card-small .post-thumb { aspect-ratio: 3 / 2; }
.card-small .post-thumb img { height: 100%; object-fit: cover; }
.card-small .card-title { font-size: 15px; font-weight: 700; margin: 0; }
.card-small .post-meta { margin-top: 4px; }

/* Card overlay */
.card-overlay { position: relative; }
.overlay-link { display: block; position: relative; height: 100%; }
.card-overlay img, .card-overlay .thumb-placeholder { width: 100%; height: 100%; object-fit: cover; }
.overlay-shade {
	position: absolute; inset: 0;
	background: linear-gradient(to top, rgba(0,0,0,.82) 0%, rgba(0,0,0,.25) 55%, rgba(0,0,0,.05) 100%);
}
.overlay-content {
	position: absolute; left: 0; right: 0; bottom: 0;
	padding: 14px 16px; color: #fff;
}
.overlay-content .cat-badge { color: #ffd166; margin: 0 0 4px; display: block; }
.overlay-content .card-title { display: block; font-weight: 800; font-size: 16px; line-height: 1.35; }
.overlay-content .post-date { display: block; font-size: 12px; opacity: .75; margin-top: 4px; }
.card-overlay:hover .overlay-content .card-title { text-decoration: underline; }

/* ==== Hero classic (kiểu Lao Động) ==== */
.hero-classic .hero-grid {
	display: grid; grid-template-columns: minmax(0, 1.9fr) minmax(0, 1fr);
	gap: 28px;
}
.hero-classic .hero-side { display: grid; gap: 16px; align-content: start; }
.hero-classic .hero-side .card-small { padding-bottom: 14px; border-bottom: 1px solid var(--c-border); }
.hero-classic .hero-side .card-small:last-child { border-bottom: 0; padding-bottom: 0; }
.hero-classic .hero-bottom {
	display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 24px; margin-top: 24px; padding-top: 22px;
	border-top: 1px solid var(--c-border);
}

/* ==== Hero mosaic ==== */
.hero-mosaic .mosaic-grid {
	display: grid; gap: 12px;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	grid-auto-rows: 150px;
}
.hero-mosaic .card-overlay:first-child { grid-column: span 2; grid-row: span 2; }
.hero-mosaic .card-overlay:first-child .card-title { font-size: 24px; }

/* ==== Hero overlay ==== */
.hero-overlay .hero-cover .card-overlay { height: 440px; }
.hero-overlay .hero-cover .card-title { font-size: 30px; max-width: 780px; }
.hero-overlay .hero-bottom {
	display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 24px; margin-top: 24px;
}

/* ==== Khối chuyên mục trang chủ ==== */
.home-section { margin-bottom: 38px; }
.section-header {
	display: flex; align-items: center; justify-content: space-between;
	border-bottom: var(--section-title-border);
	margin-bottom: 18px;
}
.section-title {
	font-size: 20px; font-weight: 800; text-transform: uppercase;
	color: var(--c-section-title); margin: 0; padding-bottom: 8px;
}
.section-title a { color: inherit; }
.section-title a:hover { color: var(--c-accent); }
.section-more { font-size: 13px; font-weight: 600; color: var(--c-muted); }
.section-more:hover { color: var(--c-accent); }

.section-grid-a { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 26px; }
.section-grid-a .section-list { display: grid; gap: 14px; align-content: start; }
.section-grid-a .section-list .card-small { padding-bottom: 12px; border-bottom: 1px solid var(--c-border); }
.section-grid-a .section-list .card-small:last-child { border-bottom: 0; }
.section-grid-a .card-large .card-title { font-size: 20px; }

.section-grid-b { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; }

/* ==== Sidebar ==== */
.site-sidebar { min-width: 0; }
.widget { margin-bottom: 30px; }
.widget-title {
	font-size: 16px; font-weight: 800; text-transform: uppercase;
	color: var(--c-section-title);
	border-bottom: var(--section-title-border);
	padding-bottom: 8px; margin-bottom: 14px;
}
.widget ul { list-style: none; }
.widget ul li { padding: 7px 0; border-bottom: 1px solid var(--c-border); font-size: 14.5px; }
.widget ul li:last-child { border-bottom: 0; }

.most-read-list { list-style: none; counter-reset: mostread; }
.most-read-list li {
	counter-increment: mostread;
	display: flex; gap: 12px; align-items: baseline;
	padding: 9px 0; border-bottom: 1px solid var(--c-border);
	font-size: 14.5px; font-weight: 600;
}
.most-read-list li:last-child { border-bottom: 0; }
.most-read-list li::before {
	content: counter(mostread);
	font-size: 22px; font-weight: 800; font-style: italic;
	color: var(--c-border); line-height: 1; flex: none;
	color: var(--c-accent); opacity: .55; min-width: 20px;
}

/* ==== Trang danh mục / lưu trữ ==== */
.breadcrumb { font-size: 13px; color: var(--c-muted); margin-bottom: 14px; }
.breadcrumb a:hover { color: var(--c-accent); }
.breadcrumb .sep { margin: 0 6px; }
.archive-header { border-bottom: var(--section-title-border); margin-bottom: 8px; }
.archive-title {
	font-size: 26px; text-transform: uppercase; color: var(--c-section-title);
	margin: 0; padding-bottom: 10px;
}
.archive-description { color: var(--c-muted); font-size: 14.5px; padding-bottom: 10px; }

.archive-list, .category-posts { display: grid; gap: 24px; }
.card-archive {
	display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 18px;
	padding-bottom: 22px; border-bottom: 1px solid var(--c-border);
}
.card-archive .card-title { font-size: 19px; margin: 0; }
.category-posts .card-large { padding-bottom: 24px; border-bottom: 1px solid var(--c-border); }

.pagination { margin-top: 28px; }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 8px; }
.pagination .page-numbers {
	display: inline-block; padding: 7px 13px;
	border: 1px solid var(--c-border); border-radius: var(--radius);
	font-size: 14px; font-weight: 600;
}
.pagination .page-numbers.current { background: var(--c-primary); border-color: var(--c-primary); color: #fff; }
.pagination a.page-numbers:hover { border-color: var(--c-accent); color: var(--c-accent); }

/* ==== Bài viết ==== */
.single-article { min-width: 0; }
.entry-title { font-size: 30px; margin: 6px 0 10px; }
.entry-meta { font-size: 13.5px; color: var(--c-muted); display: flex; gap: 8px; align-items: center; margin-bottom: 14px; }
.entry-author { font-weight: 700; color: var(--c-text); }
.entry-sapo { font-size: 17.5px; font-weight: 600; line-height: 1.55; color: var(--c-text); }
.entry-thumbnail { margin: 0 0 20px; }
.entry-thumbnail img { border-radius: var(--radius); }
.entry-thumbnail figcaption { font-size: 13px; color: var(--c-muted); text-align: center; padding-top: 8px; font-style: italic; }
.entry-content { font-size: 17px; line-height: 1.75; }
.entry-content > * + * { margin-top: 1em; }
.entry-content img { border-radius: var(--radius); margin: 0 auto; }
.entry-content a { color: var(--c-primary); text-decoration: underline; }
.entry-content a:hover { color: var(--c-accent); }
.entry-content blockquote {
	border-left: 4px solid var(--c-accent);
	background: var(--c-alt);
	margin: 1.2em 0; padding: 14px 18px;
	font-style: italic;
}
.entry-tags { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 8px; }
.entry-tags a {
	display: inline-block; font-size: 12.5px; font-weight: 600;
	background: var(--c-alt); border: 1px solid var(--c-border);
	padding: 4px 12px; border-radius: 20px;
}
.entry-tags a:hover { border-color: var(--c-accent); color: var(--c-accent); }

.related-posts { margin-top: 34px; border-top: var(--section-title-border); padding-top: 16px; }
.related-posts .section-title { font-size: 18px; }
.related-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; margin-top: 12px; }

/* ==== Bình luận ==== */
.comments-area { margin-top: 36px; border-top: 1px solid var(--c-border); padding-top: 22px; }
.comments-title { font-size: 19px; }
.comment-list { list-style: none; }
.comment-list .comment { padding: 14px 0; border-bottom: 1px solid var(--c-border); }
.comment-list .children { list-style: none; padding-left: 34px; }
.comment-author img { border-radius: 50%; float: left; margin-right: 10px; }
.comment-metadata { font-size: 12.5px; color: var(--c-muted); }
.comment-form label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 4px; }
.comment-form input[type="text"], .comment-form input[type="email"],
.comment-form input[type="url"], .comment-form textarea {
	width: 100%; border: 1px solid var(--c-border); border-radius: var(--radius);
	padding: 9px 12px; margin-bottom: 12px;
	background: var(--c-bg); color: var(--c-text);
}
.comment-form .submit, .button {
	background: var(--c-primary); color: #fff; border: 0;
	padding: 10px 22px; border-radius: var(--radius);
	font-weight: 700; display: inline-block;
}
.comment-form .submit:hover, .button:hover { background: var(--c-accent); color: #fff; }

/* ==== 404 ==== */
.error-404 { text-align: center; padding: 60px 0; max-width: 480px; margin: 0 auto; }
.error-code { font-size: 96px; margin: 0; color: var(--c-primary); }
.error-404 .search-form { justify-content: center; display: flex; margin: 18px 0; }

/* ==== Footer ==== */
.site-footer { background: var(--c-footer-bg); color: var(--c-footer-text); margin-top: 30px; }
.footer-widgets {
	display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 32px; padding-top: 34px; padding-bottom: 10px;
}
.site-footer .widget-title { color: #fff; border-bottom-color: rgba(255,255,255,.25); }
.site-footer .widget ul li { border-bottom-color: rgba(255,255,255,.12); }
.site-footer a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.15); }
.footer-bottom-inner {
	display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
	gap: 10px; padding-top: 16px; padding-bottom: 16px; font-size: 13.5px;
}
.footer-site-name { font-weight: 800; text-transform: uppercase; color: #fff; margin-right: 10px; }
.footer-menu { display: flex; flex-wrap: wrap; gap: 18px; list-style: none; }
.copyright { margin: 0; opacity: .8; }

/* ==== Kiểu header: centered ==== */
.header-centered .masthead-inner { flex-direction: column; gap: 10px; text-align: center; padding: 26px 16px 18px; }
.header-centered .nav-inner { justify-content: center; }

/* ==== Kiểu header: compact (dính khi cuộn) ==== */
.header-compact .masthead-inner { padding: 10px 16px; }
.header-compact .site-title { font-size: 24px; }
.header-compact .site-tagline { display: none; }
.header-compact .main-nav { position: sticky; top: 0; z-index: 500; }

/* Admin bar */
.admin-bar .header-compact .main-nav { top: 32px; }

/* ==== Responsive ==== */
@media (max-width: 1023px) {
	.home-layout, .archive-layout, .single-layout,
	.sidebar-left .home-layout, .sidebar-left .archive-layout, .sidebar-left .single-layout {
		grid-template-columns: minmax(0, 1fr);
	}
	.sidebar-left .site-sidebar { order: 0; }
	.section-grid-b, .related-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.hero-mosaic .mosaic-grid { grid-auto-rows: 130px; }
}

@media (max-width: 767px) {
	.masthead-inner { flex-wrap: wrap; gap: 12px; }
	.masthead-search { width: 100%; }
	.masthead-search .search-form { width: 100%; }
	.search-field { flex: 1; width: auto; }

	.nav-toggle { display: block; }
	.primary-menu {
		display: none; position: absolute; top: 100%; left: 0; right: 0;
		flex-direction: column; background: var(--c-nav-bg); z-index: 600;
		box-shadow: 0 12px 24px rgba(0,0,0,.2);
	}
	.nav-open .primary-menu { display: flex; }
	.primary-menu > li > a { border-bottom: 1px solid rgba(255,255,255,.12); }
	.primary-menu .sub-menu, .primary-menu .children { position: static; display: block; box-shadow: none; }

	.hero-classic .hero-grid, .section-grid-a { grid-template-columns: minmax(0, 1fr); }
	.hero-classic .hero-bottom, .hero-overlay .hero-bottom { grid-template-columns: minmax(0, 1fr); gap: 16px; }
	.hero-mosaic .mosaic-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 120px; }
	.hero-overlay .hero-cover .card-overlay { height: 320px; }
	.hero-overlay .hero-cover .card-title { font-size: 22px; }

	.card-large .card-title { font-size: 20px; }
	.entry-title { font-size: 24px; }
	.card-archive { grid-template-columns: minmax(0, 1fr); }
	.footer-widgets { grid-template-columns: minmax(0, 1fr); }
	.topbar-menu { display: none; }
}

@media (max-width: 560px) {
	.section-grid-b, .related-grid { grid-template-columns: minmax(0, 1fr); }
	.hero-mosaic .mosaic-grid { grid-template-columns: minmax(0, 1fr); grid-auto-rows: auto; }
	.hero-mosaic .card-overlay { min-height: 200px; }
	.hero-mosaic .card-overlay:first-child { grid-column: auto; grid-row: auto; min-height: 260px; }
}
