/**
 * Newspaper Style – main styles (nâng cấp giao diện)
 * Font: Cormorant Garamond (tiêu đề), Inter (nội dung)
 */

:root {
	--np-color-bg:       #faf9f7;
	--np-color-surface:  #ffffff;
	--np-color-text:     #1a1a1a;
	--np-color-text-muted: #5c5c5c;
	--np-color-accent:   #b91c1c;
	--np-color-accent-hover: #991b1b;
	--np-color-border:   #e5e3e0;
	--np-header-bg:      #1e293b;
	--np-header-text:    #f1f5f9;
	--np-header-muted:   #94a3b8;
	--np-font-heading:   'Cormorant Garamond', Georgia, serif;
	--np-font-body:      'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
	--np-shadow-sm:      0 1px 2px rgba(0,0,0,0.06);
	--np-shadow-md:      0 4px 12px rgba(0,0,0,0.08);
	--np-shadow-hover:   0 12px 28px rgba(0,0,0,0.12);
	--np-radius:         8px;
	--np-radius-lg:      12px;
	--np-transition:     ease 0.2s;
}

/* Base */
body {
	font-family: var(--np-font-body);
	font-size: 17px;
	line-height: 1.65;
	color: var(--np-color-text);
	background: var(--np-color-bg);
}
a {
	color: var(--np-color-accent);
	text-decoration: none;
	transition: color var(--np-transition);
}
a:hover {
	color: var(--np-color-accent-hover);
}
img {
	max-width: 100%;
	height: auto;
	vertical-align: middle;
}

/* Layout */
.np-main {
	margin-top: 0;
	padding-top: 0;
	border-top: 4px solid var(--np-header-bg);
}
.np-container {
	max-width: 1140px;
	margin: 0 auto;
	padding: 0 1.25rem;
}
.np-content-wrap {
	display: flex;
	gap: 2.5rem;
	margin-top: 2rem;
	margin-bottom: 3rem;
	align-items: flex-start;
}
.np-content {
	flex: 1;
	min-width: 0;
}
.np-sidebar {
	width: 340px;
	flex-shrink: 0;
}
@media (max-width: 900px) {
	.np-content-wrap { flex-direction: column; gap: 1.5rem; }
	.np-sidebar { width: 100%; }
}

/* ========== HEADER ========== */
.np-header {
	background: var(--np-header-bg);
	color: var(--np-header-text);
	border: none;
	box-shadow: 0 -1px 0 0 var(--np-header-bg), 0 4px 0 0 var(--np-header-bg);
}
.np-header__main {
	padding: 1rem 0;
}
.np-header__inner {
	display: flex;
	align-items: center;
	gap: 2rem;
	flex-wrap: wrap;
}
.np-header__logo a {
	color: #fff;
	font-family: var(--np-font-heading);
	font-size: 1.75rem;
	font-weight: 700;
	letter-spacing: 0.02em;
}
.np-header__logo a:hover {
	color: #fff;
	opacity: 0.92;
}
.np-header__logo img {
	max-height: 44px;
	width: auto;
}
.np-menu {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	gap: 1.75rem;
	flex-wrap: wrap;
	font-size: 0.9375rem;
	font-weight: 500;
}
.np-menu a {
	color: var(--np-header-muted);
}
.np-menu a:hover {
	color: #fff;
}
.np-header__search {
	margin-left: auto;
}

/* Mobile bar & drawer: ẩn trên desktop */
.np-header__mobile-bar,
.np-header__drawer {
	display: none;
}

/* Nút hamburger (chỉ dùng trên mobile) */
.np-header__menu-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: none;
	background: transparent;
	color: var(--np-header-text);
	cursor: pointer;
	border-radius: var(--np-radius);
	transition: background var(--np-transition);
	position: relative;
	z-index: 102;
}
.np-header__menu-btn:hover {
	background: rgba(255,255,255,0.1);
}
.np-header__menu-btn-icon {
	position: relative;
	width: 22px;
	height: 2px;
	background: currentColor;
	transition: background 0.2s;
}
.np-header__menu-btn-icon::before,
.np-header__menu-btn-icon::after {
	content: '';
	position: absolute;
	left: 0;
	width: 22px;
	height: 2px;
	background: currentColor;
	transition: transform 0.25s ease;
}
.np-header__menu-btn-icon::before {
	top: -7px;
}
.np-header__menu-btn-icon::after {
	top: 7px;
}
.np-header--menu-open .np-header__menu-btn-icon {
	background: transparent;
}
.np-header--menu-open .np-header__menu-btn-icon::before {
	top: 0;
	transform: rotate(45deg);
}
.np-header--menu-open .np-header__menu-btn-icon::after {
	top: 0;
	transform: rotate(-45deg);
}

.np-search-form {
	display: flex;
	gap: 0.35rem;
}
.np-search-form__input {
	padding: 0.5rem 0.75rem;
	border: 1px solid rgba(255,255,255,0.15);
	background: rgba(255,255,255,0.06);
	color: #fff;
	border-radius: var(--np-radius);
	min-width: 180px;
	font-size: 0.875rem;
	transition: border-color var(--np-transition), background var(--np-transition);
}
.np-search-form__input::placeholder {
	color: var(--np-header-muted);
}
.np-search-form__input:focus {
	outline: none;
	border-color: var(--np-color-accent);
	background: rgba(255,255,255,0.08);
}
.np-search-form__submit {
	padding: 0.5rem 1rem;
	background: var(--np-color-accent);
	color: #fff;
	border: none;
	border-radius: var(--np-radius);
	cursor: pointer;
	font-size: 0.875rem;
	font-weight: 500;
	transition: background var(--np-transition), transform 0.15s ease;
}
.np-search-form__submit:hover {
	background: var(--np-color-accent-hover);
}

/* ========== BLOCKS ========== */
.np-block {
	margin-bottom: 3rem;
}
.np-block__title {
	font-family: var(--np-font-heading);
	font-size: 1.5rem;
	font-weight: 700;
	margin: 0 0 1.25rem;
	padding-bottom: 0.5rem;
	border-bottom: 3px solid var(--np-color-accent);
	color: var(--np-color-text);
	letter-spacing: 0.01em;
}
.np-block__grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 2rem;
}
.np-block__trending-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 2rem;
}
@media (max-width: 768px) {
	.np-block__grid,
	.np-block__trending-grid {
		grid-template-columns: 1fr;
		gap: 1.5rem;
	}
}

/* ========== CARDS ========== */
.np-card {
	background: var(--np-color-surface);
	border-radius: var(--np-radius-lg);
	overflow: hidden;
	box-shadow: var(--np-shadow-sm);
	border: 1px solid var(--np-color-border);
	transition: box-shadow var(--np-transition), transform var(--np-transition), border-color var(--np-transition);
}
.np-card:hover {
	box-shadow: var(--np-shadow-hover);
	transform: translateY(-2px);
	border-color: transparent;
}
.np-card__thumb {
	display: block;
	line-height: 0;
	overflow: hidden;
}
.np-card__thumb img {
	width: 100%;
	height: auto;
	display: block;
	transition: transform 0.35s ease;
}
.np-card:hover .np-card__thumb img {
	transform: scale(1.03);
}
.np-card__body {
	padding: 1.25rem;
}
.np-card__cat {
	display: inline-block;
	font-family: var(--np-font-body);
	font-size: 0.6875rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.12em;
	color: var(--np-color-accent);
	margin-bottom: 0.35rem;
}
.np-card__title {
	font-family: var(--np-font-body);
	font-size: 1rem;
	font-weight: 600;
	margin: 0 0 0.5rem;
	line-height: 1.4;
}
.np-card__title a {
	color: var(--np-color-text);
}
.np-card__title a:hover {
	color: var(--np-color-accent);
}
.np-card__meta {
	font-family: var(--np-font-body);
	font-size: 0.8125rem;
	color: var(--np-color-text-muted);
}
.np-card__meta a {
	color: var(--np-color-text-muted);
}
.np-card__meta a:hover {
	color: var(--np-color-accent);
}
.np-card__excerpt {
	font-family: var(--np-font-body);
	font-size: 0.9375rem;
	color: var(--np-color-text-muted);
	margin: 0.5rem 0 0;
	line-height: 1.55;
}
.np-card--large .np-card__title {
	font-size: 1.0625rem;
	font-weight: 600;
}
.np-card--large .np-card__body {
	padding: 1.5rem;
}

/* Trang tin tức / category / index / search: cách các bài viết (card) */
.np-posts,
.np-posts--archive {
	display: grid;
	grid-template-columns: 1fr;
	gap: 2rem;
	margin-top: 0.5rem;
}
@media (min-width: 769px) {
	.np-posts,
	.np-posts--archive {
		grid-template-columns: repeat(2, 1fr);
	}
}

/* ========== LATEST LIST ========== */
.np-latest-list {
	list-style: none;
	margin: 0;
	padding: 0;
}
.np-latest-list li {
	padding: 1.15rem 0;
	border-bottom: 1px solid var(--np-color-border);
	transition: background 0.15s ease;
}
.np-latest-list li:first-child {
	padding-top: 0;
}
.np-latest-list li:hover {
	background: rgba(0,0,0,0.02);
}
.np-latest-list__cat {
	font-size: 0.6875rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--np-color-accent);
	margin-right: 0.5rem;
}
.np-latest-list__title {
	font-family: var(--np-font-body);
	font-weight: 600;
	font-size: 1rem;
	color: var(--np-color-text);
	line-height: 1.4;
}
.np-latest-list__title:hover {
	color: var(--np-color-accent);
}
.np-latest-list__meta {
	font-family: var(--np-font-body);
	font-size: 0.8125rem;
	color: var(--np-color-text-muted);
	margin-left: 0.35rem;
}

/* ========== BREADCRUMB ========== */
.np-breadcrumb {
	font-size: 0.875rem;
	margin-bottom: 1.25rem;
	color: var(--np-color-text-muted);
}
.np-breadcrumb ol {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem;
}
.np-breadcrumb li:not(:last-child)::after {
	content: "›";
	margin-left: 0.35rem;
	color: #94a3b8;
}
.np-breadcrumb a {
	color: var(--np-color-text-muted);
}
.np-breadcrumb a:hover {
	color: var(--np-color-accent);
}
.np-breadcrumb [aria-current] {
	color: var(--np-color-text);
	font-weight: 500;
}

/* ========== SINGLE POST ========== */
.np-single__header {
	margin-bottom: 2rem;
}
.np-single__title {
	font-family: var(--np-font-body);
	font-size: 1.5rem;
	font-weight: 700;
	margin: 0 0 0.75rem;
	line-height: 1.35;
	color: var(--np-color-text);
}
.np-single__meta {
	font-family: var(--np-font-body);
	font-size: 0.8125rem;
	color: var(--np-color-text-muted);
	margin-bottom: 1rem;
}
.np-single__body {
	margin-bottom: 2rem;
	font-family: var(--np-font-body);
	font-size: 1rem;
	line-height: 1.65;
}
.np-single__body p {
	margin-bottom: 1.25rem;
}
.np-single__body h2 {
	font-family: var(--np-font-body);
	font-size: 1.25rem;
	font-weight: 600;
	margin: 2rem 0 0.75rem;
}
.np-single__footer {
	padding-top: 2rem;
	border-top: 2px solid var(--np-color-border);
}
.np-single__prev {
	font-size: 0.9375rem;
	color: var(--np-color-text-muted);
	margin-bottom: 1.25rem;
}
.np-single__related {
	margin-top: 2.5rem;
}
.np-single__related h3 {
	font-family: var(--np-font-body);
	font-size: 1.125rem;
	font-weight: 600;
	margin-bottom: 1rem;
	color: var(--np-color-text);
}

/* ========== SHARE ========== */
.np-share {
	display: flex;
	gap: 0.5rem;
	margin: 0.75rem 0;
	flex-wrap: wrap;
}
.np-share__link {
	font-size: 0.8125rem;
	font-weight: 500;
	padding: 0.4rem 0.75rem;
	background: var(--np-color-bg);
	border: 1px solid var(--np-color-border);
	border-radius: var(--np-radius);
	color: var(--np-color-text-muted);
	transition: background var(--np-transition), color var(--np-transition), border-color var(--np-transition);
}
.np-share__link:hover {
	background: var(--np-color-accent);
	color: #fff;
	border-color: var(--np-color-accent);
}

/* ========== AUTHOR BOX ========== */
.np-author-box {
	display: flex;
	gap: 1.25rem;
	padding: 1.5rem;
	background: var(--np-color-bg);
	border: 1px solid var(--np-color-border);
	border-radius: var(--np-radius-lg);
	margin: 1.25rem 0;
}
.np-author-box img {
	border-radius: 50%;
	width: 80px;
	height: 80px;
	object-fit: cover;
}
.np-author-box__content h4 {
	font-family: var(--np-font-body);
	font-size: 1rem;
	font-weight: 600;
	margin: 0 0 0.35rem;
}
.np-author-box__content h4 a {
	color: var(--np-color-text);
}
.np-author-box__content p {
	margin: 0;
	font-family: var(--np-font-body);
	font-size: 0.9375rem;
	color: var(--np-color-text-muted);
	line-height: 1.55;
}

/* ========== ARCHIVE HEADER ========== */
.np-archive-header {
	margin-bottom: 2rem;
}
.np-archive-header__title {
	font-family: var(--np-font-body);
	font-size: 1.5rem;
	font-weight: 700;
	margin: 0 0 0.5rem;
	color: var(--np-color-text);
	line-height: 1.35;
}
.np-archive-header__desc {
	font-family: var(--np-font-body);
	color: var(--np-color-text-muted);
	font-size: 0.9375rem;
	margin-bottom: 0.5rem;
	line-height: 1.55;
}
.np-archive-header__subcats {
	display: flex;
	gap: 0.75rem;
	flex-wrap: wrap;
	margin-top: 0.75rem;
}
.np-archive-header__subcats a {
	padding: 0.35rem 0.75rem;
	background: var(--np-color-bg);
	border-radius: var(--np-radius);
	font-size: 0.875rem;
	font-weight: 500;
}
.np-archive-header__subcats a:hover {
	background: var(--np-color-accent);
	color: #fff;
}

/* ========== SIDEBAR ========== */
.np-sidebar {
	position: sticky;
	top: 1.5rem;
}
.np-widget {
	margin-bottom: 2rem;
	padding: 1.25rem;
	background: var(--np-color-surface);
	border: 1px solid var(--np-color-border);
	border-radius: var(--np-radius-lg);
	box-shadow: var(--np-shadow-sm);
}
.np-widget-title {
	font-family: var(--np-font-body);
	font-size: 1rem;
	font-weight: 600;
	margin: 0 0 1rem;
	padding-bottom: 0.5rem;
	border-bottom: 2px solid var(--np-color-border);
	color: var(--np-color-text);
}

/* ========== FOOTER ========== */
.np-footer {
	background: var(--np-header-bg);
	color: var(--np-header-muted);
	margin-top: 3rem;
	padding: 2.5rem 0 0;
	font-size: 0.9375rem;
}
.np-footer__cols {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 2rem;
	padding-bottom: 2rem;
}
@media (max-width: 768px) {
	.np-footer__cols { grid-template-columns: 1fr 1fr; gap: 1.5rem; }
}
@media (max-width: 480px) {
	.np-footer__cols { grid-template-columns: 1fr; }
}
.np-footer-widget {
	margin-bottom: 0.5rem;
}
.np-footer-widget-title {
	color: #fff;
	font-family: var(--np-font-body);
	font-size: 1rem;
	font-weight: 600;
	margin: 0 0 0.75rem;
}
.np-footer__bottom {
	border-top: 1px solid rgba(255,255,255,0.08);
	padding: 1.25rem 0;
}
.np-footer__bottom .np-container {
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 0.75rem;
}
.np-footer__copy {
	margin: 0;
	font-size: 0.875rem;
	color: var(--np-header-muted);
}
.np-menu--footer {
	display: flex;
	gap: 1.25rem;
	list-style: none;
	margin: 0;
	padding: 0;
}
.np-menu--footer a {
	color: var(--np-header-muted);
}
.np-menu--footer a:hover {
	color: #fff;
}

/* ========== PAGINATION ========== */
.pagination {
	display: flex;
	gap: 0.35rem;
	margin: 2rem 0;
	flex-wrap: wrap;
}
.pagination a,
.pagination span {
	display: inline-block;
	padding: 0.5rem 0.9rem;
	border: 1px solid var(--np-color-border);
	border-radius: var(--np-radius);
	font-size: 0.9375rem;
	font-weight: 500;
	transition: background var(--np-transition), border-color var(--np-transition), color var(--np-transition);
}
.pagination a:hover {
	background: var(--np-color-bg);
	border-color: var(--np-color-accent);
	color: var(--np-color-accent);
}
.pagination .current {
	background: var(--np-color-accent);
	color: #fff;
	border-color: var(--np-color-accent);
}

/* ========== 404 ========== */
.np-404 {
	text-align: center;
	padding: 4rem 1.5rem;
}
.np-404__title {
	font-family: var(--np-font-body);
	font-size: 1.5rem;
	font-weight: 700;
	margin-bottom: 0.5rem;
	color: var(--np-color-text);
}
.np-404 p {
	font-family: var(--np-font-body);
	color: var(--np-color-text-muted);
	margin-bottom: 0.5rem;
}
.np-404 .np-search-form {
	justify-content: center;
	margin-top: 1.5rem;
}

/* ========== NO RESULTS ========== */
.np-no-results {
	padding: 2rem;
	text-align: center;
	background: var(--np-color-surface);
	border-radius: var(--np-radius-lg);
	border: 1px solid var(--np-color-border);
}
.np-no-results h2 {
	font-family: var(--np-font-body);
	font-size: 1.25rem;
	font-weight: 600;
	margin: 0 0 0.5rem;
}
.np-no-results p {
	font-family: var(--np-font-body);
	color: var(--np-color-text-muted);
	margin: 0;
}

/* ========== MOBILE ========== */
@media (max-width: 768px) {
	body {
		font-size: 16px;
	}
	.np-container {
		padding-left: 1rem;
		padding-right: 1rem;
	}
	/* Header mobile: chỉ thanh logo trái + nút menu phải */
	.np-header__main {
		padding: 0.5rem 0;
		position: relative;
	}
	.np-header__inner {
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 0;
	}
	.np-header__mobile-bar {
		display: flex;
		align-items: center;
		justify-content: space-between;
		width: 100%;
	}
	.np-header__mobile-logo {
		color: #fff;
		text-decoration: none;
		font-family: var(--np-font-body);
		font-weight: 600;
		font-size: 1.1rem;
		display: inline-flex;
		align-items: center;
		min-height: 44px;
		line-height: 1;
	}
	.np-header__mobile-logo:hover {
		color: #fff;
		opacity: 0.92;
	}
	.np-header__mobile-logo img,
	.np-header__mobile-logo .np-mobile-logo-img {
		height: 29px !important;
		max-height: 29px !important;
		width: auto !important;
		display: block !important;
		object-fit: contain;
	}
	.np-header__mobile-logo .np-logo-text {
		font-size: 1.1rem;
		white-space: nowrap;
	}
	.np-header__logo,
	.np-header__nav,
	.np-header__search {
		display: none !important;
	}
	/* Drawer: menu xổ xuống */
	.np-header__drawer {
		display: block;
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		max-height: 0;
		overflow: hidden;
		background: var(--np-header-bg);
		box-shadow: var(--np-shadow-md);
		transition: max-height 0.3s ease;
		z-index: 101;
	}
	.np-header--menu-open .np-header__drawer {
		max-height: 80vh;
		overflow-y: auto;
		border-top: 1px solid rgba(255,255,255,0.08);
	}
	.np-header__drawer-nav {
		padding: 1rem 1rem 0.5rem;
	}
	.np-menu--drawer {
		flex-direction: column;
		gap: 0;
		font-size: 1rem;
	}
	.np-menu--drawer li {
		border-bottom: 1px solid rgba(255,255,255,0.08);
	}
	.np-menu--drawer a {
		display: block;
		padding: 0.85rem 0;
		color: var(--np-header-text);
	}
	.np-menu--drawer a:hover {
		color: #fff;
		background: rgba(255,255,255,0.05);
		margin: 0 -1rem;
		padding-left: 1rem;
		padding-right: 1rem;
	}
	/* Cards */
	.np-card__body {
		padding: 1rem;
	}
	.np-card--large .np-card__body {
		padding: 1.25rem;
	}
	.np-card__title {
		font-size: 1rem;
	}
	.np-card--large .np-card__title {
		font-size: 1.125rem;
	}
	/* Single post */
	.np-single__title {
		font-size: 1.5rem;
		line-height: 1.3;
	}
	.np-single__body {
		font-size: 1rem;
	}
	.np-single__body h2 {
		font-size: 1.25rem;
	}
	/* Author box: stack */
	.np-author-box {
		flex-direction: column;
		align-items: center;
		text-align: center;
		padding: 1.25rem;
	}
	.np-author-box img {
		width: 64px;
		height: 64px;
	}
	/* Archive */
	.np-archive-header__title {
		font-size: 1.5rem;
	}
	.np-archive-header__subcats {
		gap: 0.5rem;
	}
	.np-archive-header__subcats a {
		font-size: 0.8125rem;
		padding: 0.4rem 0.6rem;
	}
	/* Sidebar: bỏ sticky trên mobile */
	.np-sidebar {
		position: static;
	}
	.np-widget {
		padding: 1rem;
		margin-bottom: 1.5rem;
	}
	/* Pagination: nhỏ hơn */
	.pagination a,
	.pagination span {
		padding: 0.45rem 0.75rem;
		font-size: 0.875rem;
	}
	/* 404 */
	.np-404 {
		padding: 2.5rem 1rem;
	}
	.np-404__title {
		font-size: 1.5rem;
	}
}
@media (max-width: 480px) {
	.np-container {
		padding-left: 0.875rem;
		padding-right: 0.875rem;
	}
	.np-menu {
		gap: 0.75rem;
		font-size: 0.8125rem;
	}
	.np-block__title {
		font-size: 1.25rem;
	}
	.np-single__title {
		font-size: 1.375rem;
	}
	.np-footer__bottom .np-container {
		flex-direction: column;
		text-align: center;
	}
	.np-menu--footer {
		justify-content: center;
	}
}
/* Safe area cho máy có notch */
@supports (padding: env(safe-area-inset-left)) {
	.np-container {
		padding-left: max(1rem, env(safe-area-inset-left));
		padding-right: max(1rem, env(safe-area-inset-right));
	}
	@media (max-width: 768px) {
		.np-container {
			padding-left: max(1rem, env(safe-area-inset-left));
			padding-right: max(1rem, env(safe-area-inset-right));
		}
	}
	@media (max-width: 480px) {
		.np-container {
			padding-left: max(0.875rem, env(safe-area-inset-left));
			padding-right: max(0.875rem, env(safe-area-inset-right));
		}
	}
}

/* Utility */
.screen-reader-text {
	clip: rect(1px, 1px, 1px, 1px);
	position: absolute;
	height: 1px;
	width: 1px;
	overflow: hidden;
}
