/*
Theme Name: 24 News Master Kadence Child No Sidebar
Theme URI: https://24newsmaster.com/
Description: Lightweight no-sidebar Kadence child theme for 24 News Master. Magazine/news layout optimized for green Lighthouse scores.
Author: Muneeb Khatri / ChatGPT
Template: kadence
Version: 1.2.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: nm-kadence-child
*/

:root {
	--nm-bg: #f7f8fa;
	--nm-card: #ffffff;
	--nm-text: #111318;
	--nm-muted: #5f6875;
	--nm-border: #e7ebf0;
	--nm-accent: #d71920;
	--nm-accent-dark: #a90f17;
	--nm-dark: #111827;
	--nm-radius: 12px;
	--nm-shadow: 0 4px 14px rgba(17,24,39,.06);
}

html {
	scroll-behavior: smooth;
}

body {
	background: var(--nm-bg);
	color: var(--nm-text);
	font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
	text-rendering: optimizeLegibility;
}

a {
	text-underline-offset: 3px;
}

.site-header,
#masthead {
	box-shadow: 0 1px 8px rgba(17,24,39,.05);
}

.main-navigation a,
.header-navigation a {
	font-weight: 750;
	letter-spacing: -.01em;
}

.nm-wrap {
	max-width: 1180px;
	margin: 0 auto;
	padding: 24px 16px 44px;
}

.nm-section {
	margin-bottom: 30px;
}

.nm-section-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	margin-bottom: 14px;
	border-bottom: 2px solid var(--nm-border);
	padding-bottom: 9px;
}

.nm-section-title {
	font-size: clamp(20px, 2vw, 25px);
	line-height: 1.16;
	margin: 0;
	font-weight: 900;
	letter-spacing: -.03em;
}

.nm-section-title::before {
	content: "";
	display: inline-block;
	width: 9px;
	height: 22px;
	background: var(--nm-accent);
	border-radius: 6px;
	vertical-align: -4px;
	margin-right: 8px;
}

.nm-more-link {
	font-size: 13px;
	font-weight: 850;
	color: var(--nm-accent);
	text-decoration: none;
	white-space: nowrap;
}

.nm-more-link:hover,
.nm-title a:hover,
.nm-mini-title a:hover {
	color: var(--nm-accent-dark);
}

.nm-grid {
	display: grid;
	gap: 18px;
}

.nm-hero-grid {
	grid-template-columns: minmax(0, 1.35fr) minmax(280px, .9fr);
	align-items: stretch;
}

.nm-side-hero-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 14px;
}

.nm-content-grid {
	grid-template-columns: minmax(0, 1fr);
	align-items: start;
}

.nm-card,
.nm-list-card,
.nm-widget-card {
	background: var(--nm-card);
	border: 1px solid var(--nm-border);
	border-radius: var(--nm-radius);
	box-shadow: var(--nm-shadow);
	overflow: hidden;
}

.nm-card {
	position: relative;
	display: flex;
	flex-direction: column;
	min-height: 100%;
}

.nm-card-media {
	position: relative;
	background: #202938;
	overflow: hidden;
	aspect-ratio: 16 / 9;
	text-decoration: none;
}

.nm-card-media img,
.nm-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.nm-placeholder {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 30px;
	font-weight: 900;
	color: rgba(255,255,255,.78);
	letter-spacing: -.05em;
}

.nm-cat {
	display: inline-flex;
	align-items: center;
	font-size: 11px;
	font-weight: 900;
	line-height: 1;
	letter-spacing: .04em;
	text-transform: uppercase;
	color: #fff;
	background: var(--nm-accent);
	border-radius: 999px;
	padding: 7px 9px 6px;
	text-decoration: none;
}

.nm-card-media .nm-cat {
	position: absolute;
	left: 12px;
	top: 12px;
	z-index: 2;
}

.nm-card-body {
	padding: 15px;
	flex: 1;
	display: flex;
	flex-direction: column;
}

.nm-title {
	font-weight: 900;
	line-height: 1.16;
	letter-spacing: -.03em;
	margin: 0 0 8px;
}

.nm-title a {
	color: var(--nm-text);
	text-decoration: none;
}

.nm-meta {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 6px;
	font-size: 12px;
	font-weight: 700;
	color: var(--nm-muted);
	margin-bottom: 9px;
}

.nm-meta a {
	color: var(--nm-muted);
	text-decoration: none;
}

.nm-excerpt {
	font-size: 14px;
	line-height: 1.65;
	color: var(--nm-muted);
	margin: 0;
}

.nm-hero-card .nm-card-media {
	aspect-ratio: 16 / 10;
}

.nm-hero-card .nm-title {
	font-size: clamp(27px, 4vw, 42px);
}

.nm-small-card .nm-card-body {
	padding: 12px;
}

.nm-small-card .nm-title {
	font-size: 16px;
}

.nm-small-card .nm-meta,
.nm-small-card .nm-excerpt {
	display: none;
}

.nm-category-grid {
	grid-template-columns: repeat(4, minmax(0, 1fr));
}

.nm-category-grid .nm-title {
	font-size: 18px;
}

.nm-latest-list {
	display: grid;
	gap: 14px;
}

.nm-list-card {
	display: grid;
	grid-template-columns: 230px minmax(0, 1fr);
	align-items: stretch;
}

.nm-list-card .nm-card-media {
	aspect-ratio: auto;
	height: 100%;
	min-height: 156px;
	border-radius: 0;
}

.nm-list-card .nm-card-body {
	padding: 17px;
}

.nm-list-card .nm-title {
	font-size: 22px;
}

.nm-sidebar {
	display: grid;
	gap: 16px;
	position: sticky;
	top: 20px;
}

.nm-widget-card {
	padding: 17px;
}

.nm-widget-title {
	font-size: 18px;
	font-weight: 900;
	letter-spacing: -.03em;
	margin: 0 0 13px;
	padding-bottom: 10px;
	border-bottom: 2px solid var(--nm-border);
}

.nm-widget-title::after {
	content: "";
	display: block;
	width: 40px;
	height: 3px;
	background: var(--nm-accent);
	border-radius: 999px;
	margin-top: 8px;
}

.nm-mini-list {
	display: grid;
	gap: 13px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.nm-mini-item {
	display: grid;
	grid-template-columns: 78px minmax(0, 1fr);
	gap: 11px;
	align-items: center;
}

.nm-mini-thumb {
	width: 78px;
	height: 60px;
	border-radius: 9px;
	overflow: hidden;
	background: #202938;
}

.nm-mini-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.nm-mini-title {
	font-size: 14px;
	font-weight: 850;
	line-height: 1.25;
	margin: 0 0 5px;
}

.nm-mini-title a {
	text-decoration: none;
	color: var(--nm-text);
}

.nm-socials {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 9px;
}

.nm-socials a {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 42px;
	border-radius: 10px;
	background: #f1f3f6;
	font-size: 13px;
	font-weight: 900;
	color: var(--nm-text);
	text-decoration: none;
}

.nm-socials a:hover {
	background: var(--nm-accent);
	color: #fff;
}

.nm-cats {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 8px;
}

.nm-cats li a {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
	padding: 10px 12px;
	border-radius: 10px;
	background: #f6f7f9;
	color: var(--nm-text);
	font-size: 14px;
	font-weight: 800;
	text-decoration: none;
}

.nm-cats li a:hover {
	background: var(--nm-dark);
	color: #fff;
}

.nm-empty {
	background: #fff;
	border: 1px dashed var(--nm-border);
	border-radius: var(--nm-radius);
	padding: 22px;
	color: var(--nm-muted);
}

.nm-site-footer-note {
	background: var(--nm-dark);
	color: rgba(255,255,255,.76);
	padding: 26px 16px;
	margin-top: 18px;
}

.nm-site-footer-note .nm-wrap {
	padding: 0 16px;
}

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

.nm-footer-grid h3 {
	color: #fff;
	font-size: 18px;
	margin: 0 0 10px;
}

.nm-footer-grid p,
.nm-footer-grid a {
	color: rgba(255,255,255,.76);
	font-size: 14px;
	line-height: 1.7;
}

.nm-footer-grid ul {
	list-style: none;
	padding: 0;
	margin: 0;
	display: grid;
	gap: 7px;
}

@media (min-width: 721px) {
	.nm-main-column .nm-section:not(:first-child),
	.nm-sidebar .nm-widget-card:nth-child(n+2) {
		content-visibility: auto;
		contain-intrinsic-size: 420px;
	}
}

@media (max-width: 1024px) {
	.nm-hero-grid,
	.nm-content-grid {
		grid-template-columns: 1fr;
	}

	.nm-sidebar {
		position: static;
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

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

@media (max-width: 720px) {
	.nm-wrap {
		padding-left: 14px;
		padding-right: 14px;
	}

	.nm-side-hero-grid,
	.nm-category-grid,
	.nm-sidebar,
	.nm-footer-grid {
		grid-template-columns: 1fr;
	}

	.nm-list-card {
		grid-template-columns: 1fr;
	}

	.nm-list-card .nm-card-media {
		aspect-ratio: 16 / 9;
		min-height: auto;
	}

	.nm-list-card .nm-title {
		font-size: 20px;
	}
}

/* No-sidebar homepage version */
.nm-sidebar { display: none !important; }
.nm-content-grid { grid-template-columns: minmax(0, 1fr) !important; }
