/*
Theme Name: News Framework
Description: Theme khung cho báo điện tử. Bản thân theme không quy định giao diện cuối — giao diện do các "skin" trong thư mục /skins quyết định. Admin chọn skin trong Giao diện → News Skins, có thể gán skin riêng cho từng chuyên mục.
Version: 0.7.1
Requires PHP: 7.4
Text Domain: news-framework
*/

/* CSS nền tối thiểu (layout khung). Mỗi skin nạp style riêng đè lên lớp này. */
*,
*::before,
*::after { box-sizing: border-box; }

body {
	margin: 0;
	font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
	line-height: 1.6;
	color: #1a1a1a;
}

a { color: inherit; }

.nf-container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 16px;
}

.newscore-ad {
	margin: 16px 0;
	text-align: center;
}

/* Layout trang chủ: nội dung + sidebar (skin có thể override hoàn toàn). */
.nf-home {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 16px;
}

.nf-home.nf-has-sidebar {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 320px;
	gap: 32px;
	align-items: start;
}

.nf-module {
	margin: 0 0 32px;
}

.nf-module-title {
	margin: 0 0 16px;
	font-size: 1.25rem;
}

.nf-article-list {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 24px;
}

/* Khối Hero: tin chủ + danh sách tin phụ. */
.nf-hero {
	display: grid;
	grid-template-columns: 1.7fr 1fr;
	gap: 24px;
	align-items: start;
}

.nf-hero-lead-thumb img,
.nf-hero-side-thumb img {
	width: 100%;
	object-fit: cover;
	display: block;
}

.nf-hero-lead-title {
	font-size: 1.6rem;
	line-height: 1.25;
	margin: 8px 0;
}

.nf-hero-side {
	list-style: none;
	margin: 0;
	padding: 0;
}

.nf-hero-side-item {
	display: grid;
	grid-template-columns: 90px 1fr;
	gap: 10px;
	padding: 10px 0;
	border-bottom: 1px solid #eee;
}

.nf-hero-side-thumb img { height: 60px; }

.nf-hero-side-title { margin: 0; font-size: 0.95rem; line-height: 1.3; }

@media (max-width: 860px) {
	.nf-hero { grid-template-columns: 1fr; }
}

/* Khối "Đọc nhiều" dạng xếp hạng. */
.nf-rank-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.nf-rank-item {
	display: flex;
	gap: 12px;
	padding: 10px 0;
	border-bottom: 1px solid #eee;
}

.nf-rank-num {
	font-size: 1.4rem;
	font-weight: 700;
	line-height: 1;
	color: #c00;
	min-width: 28px;
	text-align: center;
}

.nf-rank-title {
	margin: 0;
	font-size: 1rem;
}

.nf-rank-views {
	font-size: 0.8rem;
	color: #777;
}

/* Sidebar. */
.nf-widget {
	margin: 0 0 28px;
}

.nf-widget-title {
	font-size: 1.05rem;
	margin: 0 0 12px;
	padding-bottom: 6px;
	border-bottom: 2px solid #c00;
}

@media (max-width: 860px) {
	.nf-home.nf-has-sidebar {
		grid-template-columns: 1fr;
	}
}

/* Breadcrumb. */
.nf-breadcrumb ol {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 0 0 16px;
	padding: 0;
	font-size: 13px;
	color: #777;
}
.nf-breadcrumb li + li::before { content: "›"; margin-right: 6px; color: #bbb; }
.nf-breadcrumb a { text-decoration: none; }

/* Bài liên quan. */
.nf-related { margin-top: 32px; }
.nf-related-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
	gap: 18px;
}
.nf-related-thumb img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.nf-related-item-title { font-size: 0.95rem; line-height: 1.35; margin: 8px 0 0; }

/* ---- Chia sẻ MXH ---- */
.nf-share { display: flex; align-items: center; gap: 8px; margin: 20px 0; }
.nf-share-label { font-size: 13px; color: #666; }
.nf-share-btn { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%; border: 1px solid #ddd; background: #fff; color: #444; cursor: pointer; }
.nf-share-btn:hover { background: #f3f3f3; }
.nf-share-copy.is-copied { background: #2e7d32; color: #fff; border-color: #2e7d32; }

/* ---- Hộp tác giả ---- */
.nf-author-box { display: flex; gap: 14px; margin: 24px 0; padding: 16px; border: 1px solid #eee; border-radius: 8px; background: #fafafa; }
.nf-author-box-avatar { border-radius: 50%; flex-shrink: 0; }
.nf-author-box-label { font-size: 11px; text-transform: uppercase; color: #999; }
.nf-author-box-name { margin: 2px 0 6px; font-size: 16px; }
.nf-author-box-bio { margin: 0; font-size: 14px; color: #555; }

/* ---- Điều hướng bài trước/sau ---- */
.nf-post-nav { display: flex; justify-content: space-between; gap: 16px; margin: 28px 0; }
.nf-post-nav .nav-previous, .nf-post-nav .nav-next { max-width: 48%; }
.nf-post-nav .nav-next { margin-left: auto; text-align: right; }
.nf-post-nav a { display: block; padding: 12px 16px; border: 1px solid #eee; border-radius: 8px; }
.nf-post-nav a:hover { border-color: #bbb; }
.nf-post-nav-dir { display: block; font-size: 12px; color: #999; margin-bottom: 4px; }
.nf-post-nav-title { font-weight: 600; }

/* ---- Bình luận ---- */
.nf-comments { margin: 32px 0; }
.nf-comments-title { font-size: 18px; margin: 0 0 16px; }
.nf-comment-list { list-style: none; margin: 0 0 24px; padding: 0; }
.nf-comment-list .children { list-style: none; margin-left: 28px; }
.nf-comment-list li.comment { margin: 0 0 16px; }
.nf-comments .comment-body { padding: 12px 0; border-bottom: 1px solid #eee; }
.nf-comments .comment-author { font-weight: 600; }
.nf-comments .comment-author .avatar { border-radius: 50%; vertical-align: middle; margin-right: 8px; }
.nf-comments .comment-meta { font-size: 12px; color: #999; margin: 2px 0 6px; }
.nf-comments .comment-meta a { color: #999; }
.nf-comment-form input[type="text"], .nf-comment-form input[type="email"], .nf-comment-form input[type="url"], .nf-comment-form textarea { width: 100%; max-width: 100%; padding: 10px 12px; border: 1px solid #ddd; border-radius: 6px; margin-top: 4px; }
.nf-comments-closed { color: #999; font-style: italic; }
