/*
Theme Name: NainitalNews
Theme URI: https://nainitalnews.com
Author: NainitalNews
Author URI: https://nainitalnews.com
Description: Clean, mobile-first news theme for Nainital district portal. Works best with Nainital News Pro plugin.
Version: 1.0.0
Requires at least: 5.8
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: nainitalnews
Tags: news, blog, two-columns, custom-menu, featured-images, threaded-comments, translation-ready
*/

/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
	margin: 0;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans Devanagari", sans-serif;
	font-size: 16px;
	line-height: 1.6;
	color: #1a1a1a;
	background: #f4f5f7;
}
a { color: #1a56db; text-decoration: none; }
a:hover { color: #0f3a9e; }
img { max-width: 100%; height: auto; display: block; }
h1,h2,h3,h4,h5,h6 { margin: 0 0 0.5em; line-height: 1.3; font-weight: 700; }
p { margin: 0 0 1em; }

/* ===== Header ===== */
.nn-header {
	background: #fff;
	border-bottom: 1px solid #e5e7eb;
	position: sticky;
	top: 0;
	z-index: 100;
	box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.nn-header-inner {
	max-width: 1200px;
	margin: 0 auto;
	padding: 12px 16px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
}
.nn-logo {
	font-size: 1.5rem;
	font-weight: 800;
	color: #111;
	display: flex;
	align-items: center;
	gap: 8px;
}
.nn-logo span { color: #c41e3a; }
.nn-logo small {
	display: block;
	font-size: 11px;
	font-weight: 500;
	color: #666;
	letter-spacing: 0.3px;
}
.nn-nav {
	display: flex;
	gap: 4px;
	flex-wrap: wrap;
}
.nn-nav a {
	padding: 6px 12px;
	font-size: 14px;
	font-weight: 600;
	color: #333;
	border-radius: 4px;
}
.nn-nav a:hover,
.nn-nav .current-menu-item a {
	background: #1a56db;
	color: #fff;
}
.nn-menu-toggle {
	display: none;
	background: none;
	border: 1px solid #ddd;
	padding: 8px 12px;
	border-radius: 4px;
	font-size: 18px;
	cursor: pointer;
}

/* ===== Breaking Ticker ===== */
.nn-breaking {
	background: #c41e3a;
	color: #fff;
	padding: 8px 0;
	overflow: hidden;
}
.nn-breaking-inner {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 16px;
	display: flex;
	align-items: center;
	gap: 12px;
}
.nn-breaking-label {
	background: #8b0000;
	padding: 4px 12px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.5px;
	white-space: nowrap;
	border-radius: 3px;
}
.nn-breaking-track {
	flex: 1;
	overflow: hidden;
	white-space: nowrap;
}
.nn-breaking-track a {
	color: #fff;
	font-size: 14px;
	font-weight: 500;
	margin-right: 24px;
}
.nn-breaking-track a:hover { text-decoration: underline; }

/* ===== Main Layout ===== */
.nn-container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 20px 16px;
}
.nn-main-grid {
	display: grid;
	grid-template-columns: 1fr 320px;
	gap: 28px;
}

/* ===== Featured ===== */
.nn-featured {
	background: #fff;
	border-radius: 10px;
	overflow: hidden;
	box-shadow: 0 2px 10px rgba(0,0,0,0.06);
	margin-bottom: 28px;
}
.nn-featured-img {
	position: relative;
	aspect-ratio: 16/9;
	background: #e5e7eb;
}
.nn-featured-img img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.nn-featured-content {
	padding: 20px 24px;
}
.nn-cat-badge {
	display: inline-block;
	background: #1a56db;
	color: #fff;
	font-size: 11px;
	font-weight: 600;
	padding: 3px 10px;
	border-radius: 3px;
	text-transform: uppercase;
	margin-bottom: 8px;
}
.nn-featured-title {
	font-size: 1.6rem;
	margin-bottom: 10px;
}
.nn-featured-title a { color: #111; }
.nn-featured-title a:hover { color: #1a56db; }
.nn-meta {
	font-size: 13px;
	color: #666;
	margin-bottom: 10px;
}
.nn-excerpt {
	font-size: 15px;
	color: #444;
	line-height: 1.55;
}

/* ===== Section ===== */
.nn-section {
	margin-bottom: 32px;
}
.nn-section-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	border-bottom: 3px solid #1a56db;
	padding-bottom: 8px;
	margin-bottom: 16px;
}
.nn-section-title {
	font-size: 1.2rem;
	color: #111;
	margin: 0;
}
.nn-view-all {
	font-size: 13px;
	font-weight: 600;
	color: #1a56db;
}

/* ===== News Cards Grid ===== */
.nn-cards {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 16px;
}
.nn-card {
	background: #fff;
	border-radius: 8px;
	overflow: hidden;
	box-shadow: 0 1px 6px rgba(0,0,0,0.05);
	transition: transform 0.2s, box-shadow 0.2s;
}
.nn-card:hover {
	transform: translateY(-3px);
	box-shadow: 0 4px 14px rgba(0,0,0,0.1);
}
.nn-card-thumb {
	aspect-ratio: 16/10;
	background: linear-gradient(135deg, #1a56db 0%, #0f3a9e 100%);
	position: relative;
	overflow: hidden;
}
.nn-card-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.nn-card-thumb .nn-fallback {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	font-size: 28px;
	font-weight: 800;
	opacity: 0.9;
}
.nn-card-body {
	padding: 14px;
}
.nn-card-title {
	font-size: 15px;
	line-height: 1.35;
	margin: 0 0 6px;
}
.nn-card-title a { color: #111; }
.nn-card-title a:hover { color: #1a56db; }
.nn-card-meta {
	font-size: 12px;
	color: #888;
}

/* ===== Sidebar ===== */
.nn-sidebar .nn-widget {
	background: #fff;
	border-radius: 8px;
	padding: 18px;
	margin-bottom: 20px;
	box-shadow: 0 1px 6px rgba(0,0,0,0.05);
}
.nn-widget-title {
	font-size: 1rem;
	border-bottom: 2px solid #1a56db;
	padding-bottom: 8px;
	margin-bottom: 12px;
}
.nn-trending-list {
	list-style: none;
	padding: 0;
	margin: 0;
}
.nn-trending-list li {
	display: flex;
	gap: 10px;
	padding: 8px 0;
	border-bottom: 1px solid #eee;
	font-size: 14px;
}
.nn-trending-list li:last-child { border-bottom: none; }
.nn-rank {
	background: #1a56db;
	color: #fff;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 12px;
	font-weight: 700;
	flex-shrink: 0;
}
.nn-trending-list a { color: #111; line-height: 1.4; }
.nn-trending-list a:hover { color: #1a56db; }

/* ===== Single Post ===== */
.nn-single {
	background: #fff;
	border-radius: 10px;
	padding: 28px;
	box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.nn-single-title {
	font-size: 1.9rem;
	margin-bottom: 12px;
	color: #111;
}
.nn-single-meta {
	font-size: 14px;
	color: #666;
	margin-bottom: 20px;
	padding-bottom: 16px;
	border-bottom: 1px solid #eee;
}
.nn-single-thumb {
	margin-bottom: 24px;
	border-radius: 8px;
	overflow: hidden;
}
.nn-single-content {
	font-size: 17px;
	line-height: 1.75;
	color: #222;
}
.nn-single-content p { margin-bottom: 1.2em; }
.nn-share {
	display: flex;
	gap: 10px;
	margin: 24px 0;
	flex-wrap: wrap;
}
.nn-share a {
	padding: 8px 16px;
	border-radius: 6px;
	font-size: 14px;
	font-weight: 600;
	color: #fff;
}
.nn-share .fb { background: #1877f2; }
.nn-share .wa { background: #25d366; }
.nn-related {
	margin-top: 36px;
	padding-top: 24px;
	border-top: 1px solid #eee;
}

/* ===== Category / Archive ===== */
.nn-archive-header {
	margin-bottom: 24px;
}
.nn-archive-title {
	font-size: 1.6rem;
	color: #111;
}
.nn-archive-desc {
	color: #666;
	font-size: 15px;
}

/* ===== Footer ===== */
.nn-footer {
	background: #1a1a2e;
	color: #ccc;
	padding: 40px 16px 24px;
	margin-top: 40px;
}
.nn-footer-inner {
	max-width: 1200px;
	margin: 0 auto;
	display: grid;
	grid-template-columns: 2fr 1fr 1fr;
	gap: 32px;
}
.nn-footer h4 {
	color: #fff;
	font-size: 1rem;
	margin-bottom: 12px;
}
.nn-footer a { color: #aaa; font-size: 14px; }
.nn-footer a:hover { color: #fff; }
.nn-footer-bottom {
	max-width: 1200px;
	margin: 28px auto 0;
	padding-top: 20px;
	border-top: 1px solid #333;
	text-align: center;
	font-size: 13px;
	color: #888;
}

/* ===== Page ===== */
.nn-page {
	background: #fff;
	border-radius: 10px;
	padding: 28px;
	box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.nn-page-title {
	font-size: 1.8rem;
	margin-bottom: 20px;
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
	.nn-main-grid {
		grid-template-columns: 1fr;
	}
	.nn-footer-inner {
		grid-template-columns: 1fr;
		gap: 24px;
	}
	.nn-nav {
		display: none;
	}
	.nn-nav.open {
		display: flex;
		flex-direction: column;
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		background: #fff;
		padding: 12px;
		border-bottom: 1px solid #eee;
		box-shadow: 0 4px 12px rgba(0,0,0,0.1);
	}
	.nn-menu-toggle {
		display: block;
	}
	.nn-featured-title {
		font-size: 1.3rem;
	}
	.nn-cards {
		grid-template-columns: 1fr;
	}
	.nn-single {
		padding: 20px 16px;
	}
	.nn-single-title {
		font-size: 1.5rem;
	}
}

@media (max-width: 480px) {
	.nn-logo { font-size: 1.25rem; }
	.nn-header-inner { padding: 10px 12px; }
}
