/*
Theme Name: Bach Thu Mien Bac
Theme URI: https://bachthumienbac.com
Author: Bach Thu Mien Bac
Description: Theme editorial dữ liệu xổ số miền Bắc với seed page, post, category, ảnh local và thiết lập WordPress an toàn.
Version: 1.0.0
Requires at least: 6.1
Tested up to: 6.6
Requires PHP: 8.1
Text Domain: bachthumienbac
*/

:root {
	--ink: #102033;
	--ink-soft: #2d3e53;
	--teal: #0d766f;
	--teal-dark: #07524e;
	--gold: #c17b21;
	--red: #a83e32;
	--paper: #f8f6f1;
	--surface: #ffffff;
	--line: #d9ded9;
	--muted: #687789;
	--shadow: 0 18px 46px rgba(16, 32, 51, 0.12);
	--radius: 8px;
	--container: 1180px;
}

* {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
}

body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font-family: Arial, Helvetica, sans-serif;
	font-size: 16px;
	line-height: 1.65;
	letter-spacing: 0;
	text-rendering: optimizeLegibility;
}

img {
	display: block;
	max-width: 100%;
	height: auto;
}

a {
	color: var(--teal-dark);
	text-decoration: none;
}

a:hover,
a:focus {
	color: var(--red);
}

.container {
	width: min(100% - 40px, var(--container));
	margin-inline: auto;
}

.container.narrow {
	width: min(100% - 40px, 880px);
}

.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.skip-link:focus {
	z-index: 1000;
	top: 12px;
	left: 12px;
	width: auto;
	height: auto;
	padding: 10px 14px;
	clip: auto;
	background: var(--ink);
	color: #fff;
	border-radius: 4px;
}

.top-strip {
	background: var(--ink);
	color: rgba(255, 255, 255, 0.86);
	font-size: 13px;
}

.top-strip__inner {
	min-height: 36px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
}

.top-strip a {
	color: #f7cf86;
	font-weight: 700;
}

.site-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: rgba(248, 246, 241, 0.96);
	border-bottom: 1px solid rgba(16, 32, 51, 0.1);
	backdrop-filter: saturate(160%) blur(10px);
}

.header-main {
	min-height: 82px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
}

.site-branding img {
	width: 245px;
	max-height: 65px;
	object-fit: contain;
}

.main-navigation {
	display: flex;
	align-items: center;
}

.primary-menu,
.footer-menu {
	list-style: none;
	margin: 0;
	padding: 0;
}

.primary-menu {
	display: flex;
	align-items: center;
	gap: 4px;
}

.primary-menu a {
	display: block;
	padding: 10px 13px;
	color: var(--ink);
	font-size: 14px;
	font-weight: 700;
	border-radius: 6px;
}

.primary-menu a:hover,
.primary-menu a:focus {
	background: rgba(13, 118, 111, 0.1);
	color: var(--teal-dark);
}

.menu-toggle {
	display: none;
	width: 44px;
	height: 44px;
	padding: 0;
	background: var(--ink);
	border: 0;
	border-radius: 6px;
	cursor: pointer;
}

.menu-toggle span:not(.screen-reader-text) {
	display: block;
	width: 20px;
	height: 2px;
	margin: 4px auto;
	background: #fff;
}

.site-main {
	min-height: 58vh;
}

.home-hero {
	position: relative;
	min-height: 620px;
	display: flex;
	align-items: flex-end;
	overflow: hidden;
	background: var(--ink);
	color: #fff;
}

.home-hero__media {
	position: absolute;
	inset: 0;
}

.home-hero__media::after {
	content: "";
	position: absolute;
	inset: 0;
	background:
		linear-gradient(90deg, rgba(16, 32, 51, 0.88), rgba(16, 32, 51, 0.58) 46%, rgba(16, 32, 51, 0.22)),
		linear-gradient(0deg, rgba(16, 32, 51, 0.88), rgba(16, 32, 51, 0.1) 60%);
}

.home-hero__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.home-hero__content {
	position: relative;
	z-index: 1;
	padding: 104px 0 86px;
	max-width: var(--container);
}

.home-hero h1 {
	max-width: 760px;
	margin: 10px 0 18px;
	font-size: 52px;
	line-height: 1.08;
	letter-spacing: 0;
}

.home-hero p {
	max-width: 700px;
	margin: 0 0 26px;
	color: rgba(255, 255, 255, 0.9);
	font-size: 19px;
}

.eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	color: var(--gold);
	font-size: 13px;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0;
}

.eyebrow::before {
	content: "";
	width: 24px;
	height: 2px;
	background: currentColor;
}

.hero-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}

.button,
.search-form button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 11px 18px;
	border-radius: 6px;
	border: 1px solid transparent;
	font-weight: 800;
	cursor: pointer;
}

.button-primary,
.search-form button {
	background: var(--gold);
	color: var(--ink);
}

.button-secondary {
	background: rgba(255, 255, 255, 0.08);
	color: #fff;
	border-color: rgba(255, 255, 255, 0.34);
}

.button:hover,
.button:focus,
.search-form button:hover,
.search-form button:focus {
	transform: translateY(-1px);
	box-shadow: 0 8px 20px rgba(16, 32, 51, 0.16);
}

.home-content-section,
.content-section,
.latest-posts,
.category-strip {
	padding: 70px 0;
}

.home-content-section {
	background: var(--surface);
}

.section-heading {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 24px;
	margin-bottom: 24px;
}

.section-heading p {
	margin: 0;
	color: var(--gold);
	font-size: 13px;
	font-weight: 800;
	text-transform: uppercase;
}

.section-heading h2 {
	max-width: 720px;
	margin: 0;
	font-size: 30px;
	line-height: 1.2;
	letter-spacing: 0;
}

.entry-content-wrap {
	background: transparent;
}

.entry-content {
	font-size: 18px;
	line-height: 1.8;
}

.entry-content > *:first-child {
	margin-top: 0;
}

.entry-content h2,
.entry-content h3 {
	margin: 36px 0 14px;
	line-height: 1.24;
	letter-spacing: 0;
}

.entry-content h2 {
	font-size: 28px;
}

.entry-content h3 {
	font-size: 22px;
}

.entry-content p {
	margin: 0 0 18px;
}

.entry-content ul,
.entry-content ol {
	padding-left: 24px;
}

.entry-content li {
	margin-bottom: 8px;
}

.entry-content .insight-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 18px;
	margin: 28px 0;
}

.entry-content .insight-grid > div,
.entry-content .data-panel {
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: 20px;
	background: #fbfbf8;
}

.entry-content .data-panel {
	margin: 28px 0;
	border-left: 5px solid var(--teal);
}

.entry-content strong {
	color: var(--ink);
}

.category-grid,
.post-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 22px;
}

.category-tile,
.post-card,
.widget,
.empty-state {
	background: var(--surface);
	border: 1px solid rgba(16, 32, 51, 0.1);
	border-radius: var(--radius);
	box-shadow: 0 10px 26px rgba(16, 32, 51, 0.06);
}

.category-tile {
	min-height: 184px;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	padding: 22px;
	color: var(--ink);
}

.category-tile span {
	color: var(--gold);
	font-size: 13px;
	font-weight: 800;
	text-transform: uppercase;
}

.category-tile strong {
	font-size: 22px;
	line-height: 1.22;
}

.category-tile em {
	color: var(--muted);
	font-style: normal;
}

.post-card {
	overflow: hidden;
}

.post-card__image {
	display: block;
	aspect-ratio: 16 / 10;
	background: #e9ece7;
	overflow: hidden;
}

.post-card__image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 220ms ease;
}

.post-card:hover .post-card__image img {
	transform: scale(1.035);
}

.post-card__body {
	padding: 20px;
}

.post-card h2 {
	margin: 9px 0 10px;
	font-size: 21px;
	line-height: 1.28;
	letter-spacing: 0;
}

.post-card h2 a {
	color: var(--ink);
}

.post-card p {
	margin: 12px 0 0;
	color: var(--muted);
}

.entry-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 14px;
	align-items: center;
	color: var(--muted);
	font-size: 14px;
}

.entry-meta span:not(:last-child)::after {
	content: "";
	display: inline-block;
	width: 4px;
	height: 4px;
	margin-left: 12px;
	border-radius: 50%;
	background: var(--gold);
	vertical-align: middle;
}

.entry-meta.compact {
	font-size: 13px;
}

.page-hero,
.archive-hero {
	position: relative;
	background: var(--ink);
	color: #fff;
	overflow: hidden;
}

.page-hero__inner {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(320px, 480px);
	gap: 46px;
	align-items: center;
	padding: 58px 0;
}

.page-hero h1,
.archive-hero h1,
.single-entry h1,
.not-found-section h1 {
	margin: 10px 0 14px;
	font-size: 42px;
	line-height: 1.13;
	letter-spacing: 0;
}

.page-hero p,
.archive-description {
	max-width: 720px;
	color: rgba(255, 255, 255, 0.86);
}

.page-hero__image {
	margin: 0;
	border-radius: var(--radius);
	overflow: hidden;
	box-shadow: var(--shadow);
}

.page-hero__image img {
	aspect-ratio: 4 / 3;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.compact-hero .page-hero__inner {
	grid-template-columns: 1fr;
}

.layout-with-sidebar {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 330px;
	gap: 38px;
	align-items: start;
}

.content-column {
	min-width: 0;
}

.breadcrumbs {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
	margin-bottom: 18px;
	color: rgba(255, 255, 255, 0.72);
	font-size: 13px;
	font-weight: 700;
}

.content-section .breadcrumbs,
.single-entry .breadcrumbs {
	color: var(--muted);
}

.breadcrumbs a {
	color: inherit;
}

.single-entry {
	background: var(--surface);
	border-radius: var(--radius);
	padding: 34px;
	border: 1px solid rgba(16, 32, 51, 0.1);
}

.single-entry .entry-header {
	margin-bottom: 26px;
}

.single-entry h1 {
	color: var(--ink);
}

.featured-media {
	margin: 0 0 30px;
	border-radius: var(--radius);
	overflow: hidden;
}

.featured-media img {
	width: 100%;
	aspect-ratio: 16 / 9;
	object-fit: cover;
}

.tag-list {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 30px;
	padding-top: 22px;
	border-top: 1px solid var(--line);
}

.tag-list span,
.tag-list a {
	display: inline-flex;
	align-items: center;
	min-height: 30px;
	padding: 4px 10px;
	border-radius: 999px;
	background: rgba(13, 118, 111, 0.1);
	color: var(--teal-dark);
	font-size: 13px;
	font-weight: 800;
}

.archive-hero {
	min-height: 360px;
	display: flex;
	align-items: flex-end;
}

.archive-hero__media {
	position: absolute;
	inset: 0;
}

.archive-hero__media::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(90deg, rgba(16, 32, 51, 0.9), rgba(16, 32, 51, 0.42));
}

.archive-hero__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.archive-hero__content {
	position: relative;
	z-index: 1;
	padding: 64px 0;
}

.archive-grid {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.navigation.pagination {
	margin-top: 32px;
}

.nav-links {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	min-height: 40px;
	padding: 8px 12px;
	border-radius: 6px;
	background: var(--surface);
	border: 1px solid var(--line);
	color: var(--ink);
	font-weight: 800;
}

.page-numbers.current {
	background: var(--teal);
	color: #fff;
	border-color: var(--teal);
}

.widget-area {
	display: grid;
	gap: 18px;
}

.widget {
	padding: 20px;
}

.widget-title {
	margin: 0 0 14px;
	font-size: 18px;
	line-height: 1.25;
	letter-spacing: 0;
}

.widget ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.widget li {
	padding: 9px 0;
	border-bottom: 1px solid rgba(16, 32, 51, 0.09);
}

.widget li:last-child {
	border-bottom: 0;
}

.recent-list a {
	display: block;
	color: var(--ink);
	font-weight: 800;
	line-height: 1.35;
}

.recent-list span {
	display: block;
	color: var(--muted);
	font-size: 13px;
}

.schedule-widget {
	border-top: 4px solid var(--gold);
}

.search-form {
	display: flex;
	gap: 8px;
}

.search-form label {
	flex: 1;
}

.search-field {
	width: 100%;
	min-height: 44px;
	padding: 10px 12px;
	border: 1px solid var(--line);
	border-radius: 6px;
	background: #fff;
	color: var(--ink);
	font: inherit;
}

.empty-state,
.not-found-section .narrow {
	padding: 30px;
	background: var(--surface);
	border-radius: var(--radius);
}

.not-found-section {
	padding: 86px 0;
}

.related-posts {
	margin-top: 42px;
}

.site-footer {
	background: var(--ink);
	color: rgba(255, 255, 255, 0.82);
}

.footer-main {
	padding: 54px 0;
	border-top: 4px solid var(--gold);
}

.footer-grid {
	display: grid;
	grid-template-columns: 1.4fr 1fr 1fr;
	gap: 36px;
}

.footer-about img {
	width: 245px;
	max-height: 72px;
	object-fit: contain;
	filter: brightness(0) invert(1);
}

.footer-column h2 {
	margin: 0 0 14px;
	color: #fff;
	font-size: 18px;
	letter-spacing: 0;
}

.footer-column p {
	max-width: 420px;
	margin: 16px 0 0;
}

.footer-menu li {
	margin-bottom: 8px;
}

.footer-menu a {
	color: rgba(255, 255, 255, 0.78);
}

.footer-bottom {
	border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.footer-bottom p {
	margin: 0;
	padding: 18px 0;
	text-align: center;
	color: rgba(255, 255, 255, 0.72);
	font-size: 14px;
}

@media (max-width: 1020px) {
	.menu-toggle {
		display: block;
	}

	.main-navigation {
		position: fixed;
		inset: 118px 0 auto 0;
		display: none;
		padding: 18px 20px;
		background: var(--paper);
		border-bottom: 1px solid var(--line);
		box-shadow: var(--shadow);
	}

	.nav-open .main-navigation {
		display: block;
	}

	.primary-menu {
		display: grid;
		gap: 6px;
	}

	.primary-menu a {
		padding: 12px 4px;
	}

	.layout-with-sidebar,
	.page-hero__inner,
	.footer-grid {
		grid-template-columns: 1fr;
	}

	.widget-area {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 760px) {
	.container,
	.container.narrow {
		width: min(100% - 28px, var(--container));
	}

	.top-strip__inner {
		display: block;
		padding: 8px 0;
	}

	.header-main {
		min-height: 72px;
	}

	.site-branding img,
	.footer-about img {
		width: 205px;
	}

	.main-navigation {
		inset: 108px 0 auto 0;
	}

	.home-hero {
		min-height: 560px;
	}

	.home-hero__content {
		padding: 82px 0 56px;
	}

	.home-hero h1 {
		font-size: 36px;
	}

	.home-hero p {
		font-size: 17px;
	}

	.home-content-section,
	.content-section,
	.latest-posts,
	.category-strip {
		padding: 46px 0;
	}

	.section-heading {
		display: block;
	}

	.section-heading h2 {
		margin-top: 6px;
		font-size: 25px;
	}

	.entry-content {
		font-size: 16px;
	}

	.entry-content .insight-grid,
	.category-grid,
	.post-grid,
	.archive-grid,
	.widget-area {
		grid-template-columns: 1fr;
	}

	.page-hero__inner {
		padding: 42px 0;
	}

	.page-hero h1,
	.archive-hero h1,
	.single-entry h1,
	.not-found-section h1 {
		font-size: 31px;
	}

	.single-entry {
		padding: 22px;
	}

	.search-form {
		display: grid;
	}
}
