/*
Theme Name: NB News
Theme URI: https://news.nirmalbhattarai12.com.np/
Author: Nirmal Consultant
Author URI: https://nirmalbhattarai12.com.np/
Description: A bold, modern magazine-style news theme. Breaking ticker, hero story grid, latest-news feed, category sections, trending sidebar, article pages with related posts. Customize colors via Appearance > Customize.
Version: 1.1.2
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: nbnews
*/

/* ============ Tokens ============ */
:root {
	--nb-accent: #e11d2e;
	--nb-accent-2: #f97316;
	--nb-grad: linear-gradient(135deg, #e11d2e 0%, #f97316 100%);
	--nb-ink: #0f1420;
	--nb-body: #2b3345;
	--nb-muted: #6b7280;
	--nb-line: #e8eaf0;
	--nb-bg: #ffffff;
	--nb-soft: #f4f6fb;
	--nb-dark: #0b0f19;
	--nb-dark-2: #131a2b;
	--nb-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
	--nb-shadow: 0 10px 30px rgba(15, 20, 32, 0.10);
	--nb-radius: 14px;
}

/* ============ Base ============ */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	font-family: var(--nb-sans);
	color: var(--nb-body);
	background: var(--nb-bg);
	line-height: 1.65;
	font-size: 16px;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--nb-accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.22; margin: 0 0 12px; font-weight: 800; letter-spacing: -0.02em; color: var(--nb-ink); }
p { margin: 0 0 16px; }
.nb-container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ============ Top bar + ticker ============ */
.nb-topbar { background: var(--nb-dark); color: #d1d5db; font-size: 13px; }
.nb-topbar .nb-container { display: flex; align-items: center; gap: 16px; min-height: 40px; padding-top: 4px; padding-bottom: 4px; }
.nb-date { white-space: nowrap; color: #9ca3af; font-weight: 600; }
.nb-ticker { display: flex; align-items: center; gap: 10px; overflow: hidden; flex: 1; min-width: 0; }
.nb-ticker-label {
	background: var(--nb-grad); color: #fff; font-weight: 800; font-size: 11px;
	letter-spacing: 1.5px; text-transform: uppercase; padding: 4px 12px; border-radius: 20px;
	white-space: nowrap; animation: nb-pulse 2s ease-in-out infinite;
}
@keyframes nb-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(225, 29, 46, .55); } 50% { box-shadow: 0 0 0 7px rgba(225, 29, 46, 0); } }
.nb-ticker-track { display: flex; gap: 36px; white-space: nowrap; animation: nb-tick 45s linear infinite; font-weight: 500; }
.nb-ticker:hover .nb-ticker-track { animation-play-state: paused; }
.nb-ticker-track a { color: #e5e7eb; }
.nb-ticker-track a:hover { color: #fff; }
@keyframes nb-tick { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ============ Masthead ============ */
.nb-masthead {
	background: radial-gradient(1200px 300px at 50% -80px, #1d2740 0%, var(--nb-dark) 60%);
	padding: 34px 0 28px; text-align: center; color: #fff;
}
.nb-site-title { font-size: 52px; margin: 0; letter-spacing: -0.03em; font-weight: 800; }
.nb-site-title a { color: #fff; text-decoration: none; }
.nb-site-title a:hover { color: #fff; }
.nb-site-title a span.accent { background: var(--nb-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nb-tagline { color: #aeb6c9; font-size: 13px; margin: 8px 0 0; letter-spacing: 3px; text-transform: uppercase; font-weight: 600; }

/* ============ Nav ============ */
.nb-nav { background: #fff; position: sticky; top: 0; z-index: 50; box-shadow: 0 2px 14px rgba(15, 20, 32, 0.08); }
.nb-nav .nb-container { display: flex; align-items: center; justify-content: space-between; }
.nb-menu { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; }
.nb-menu li { margin: 0; }
.nb-menu a {
	display: block; padding: 16px 18px; color: var(--nb-ink); font-weight: 700; font-size: 13.5px;
	text-transform: uppercase; letter-spacing: 0.8px; text-decoration: none; position: relative;
}
.nb-menu a::after {
	content: ""; position: absolute; left: 18px; right: 18px; bottom: 10px; height: 3px;
	background: var(--nb-grad); border-radius: 3px; transform: scaleX(0); transform-origin: left;
	transition: transform .25s ease;
}
.nb-menu a:hover { color: var(--nb-accent); text-decoration: none; }
.nb-menu a:hover::after, .nb-menu .current-menu-item a::after { transform: scaleX(1); }
.nb-menu .current-menu-item a { color: var(--nb-accent); }
.nb-search-toggle { background: var(--nb-soft); border: 0; cursor: pointer; padding: 10px; border-radius: 50%; color: var(--nb-ink); display: flex; }
.nb-search-toggle:hover { background: var(--nb-accent); color: #fff; }
.nb-search-bar { display: none; border-bottom: 1px solid var(--nb-line); background: var(--nb-soft); padding: 16px 0; }
.nb-search-bar.open { display: block; }
.nb-search-bar form { display: flex; gap: 8px; max-width: 640px; margin: 0 auto; }
.nb-search-bar input[type="search"] { flex: 1; padding: 12px 16px; border: 2px solid var(--nb-line); border-radius: 10px; font-size: 15px; font-family: inherit; }
.nb-search-bar input[type="search"]:focus { border-color: var(--nb-accent); outline: none; }
.nb-search-bar button { background: var(--nb-grad); color: #fff; border: 0; border-radius: 10px; padding: 12px 24px; font-weight: 800; cursor: pointer; font-family: inherit; }

/* ============ Hero ============ */
.nb-hero { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 18px; margin: 28px 0 8px; }
.nb-hero-main { grid-row: span 2; position: relative; min-height: 460px; border-radius: var(--nb-radius); overflow: hidden; background: var(--nb-dark-2); box-shadow: var(--nb-shadow); }
.nb-hero-side { position: relative; min-height: 221px; border-radius: var(--nb-radius); overflow: hidden; background: var(--nb-dark-2); box-shadow: var(--nb-shadow); }
.nb-hero a.hero-link { position: absolute; inset: 0; display: flex; align-items: flex-end; text-decoration: none; }
.nb-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.nb-hero a.hero-link:hover img { transform: scale(1.05); }
.nb-hero-fallback { position: absolute; inset: 0; background: linear-gradient(135deg, #1e293b, #e11d2e 160%); }
.nb-hero-shade { position: absolute; inset: 0; background: linear-gradient(to top, rgba(5,8,16,.88) 0%, rgba(5,8,16,.30) 55%, transparent 100%); }
.nb-hero-text { position: relative; padding: 24px; color: #fff; }
.nb-hero-text .kicker {
	display: inline-block; background: var(--nb-grad); color: #fff; font-size: 11px; font-weight: 800;
	letter-spacing: 1.2px; text-transform: uppercase; padding: 5px 12px; border-radius: 20px; margin-bottom: 10px;
}
.nb-hero-main .nb-hero-text h2 { font-size: 34px; color: #fff; margin: 0 0 8px; }
.nb-hero-side .nb-hero-text h3 { font-size: 18px; color: #fff; margin: 0 0 4px; }
.nb-hero-text time { font-size: 12.5px; color: #cbd2e1; font-weight: 500; }
.nb-hero a.hero-link:hover .nb-hero-text h2, .nb-hero a.hero-link:hover .nb-hero-text h3 { text-decoration: underline; text-decoration-color: var(--nb-accent-2); }

/* ============ Layout ============ */
.nb-main { display: grid; grid-template-columns: 1fr 330px; gap: 40px; margin: 30px 0 56px; }
.nb-section-head { display: flex; align-items: center; justify-content: space-between; margin: 38px 0 20px; padding-bottom: 10px; border-bottom: 2px solid var(--nb-line); }
.nb-section-head h2 { font-size: 23px; margin: 0; text-transform: uppercase; letter-spacing: 0.5px; display: flex; align-items: center; gap: 12px; }
.nb-section-head h2::before { content: ""; width: 34px; height: 6px; background: var(--nb-grad); border-radius: 4px; }
.nb-section-head a { font-size: 13px; font-weight: 700; background: var(--nb-soft); padding: 7px 14px; border-radius: 20px; color: var(--nb-ink); }
.nb-section-head a:hover { background: var(--nb-accent); color: #fff; text-decoration: none; }

/* Latest list — cards */
.nb-latest { display: grid; gap: 18px; }
.nb-news-item {
	display: grid; grid-template-columns: 250px 1fr; gap: 20px; padding: 16px;
	background: #fff; border: 1px solid var(--nb-line); border-radius: var(--nb-radius);
	transition: transform .25s ease, box-shadow .25s ease;
}
.nb-news-item:hover { transform: translateY(-3px); box-shadow: var(--nb-shadow); }
.nb-news-item:last-child { border-bottom: 1px solid var(--nb-line); }
.nb-thumb { border-radius: 10px; overflow: hidden; background: var(--nb-soft); aspect-ratio: 16/10; display: block; }
.nb-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.nb-news-item:hover .nb-thumb img, .nb-cat-card:hover .nb-thumb img { transform: scale(1.06); }
.nb-thumb-fallback { width: 100%; height: 100%; background: linear-gradient(135deg, #dbe2f1, #f3c1c7); display: flex; align-items: center; justify-content: center; font-size: 44px; font-weight: 800; color: #fff; text-shadow: 0 2px 8px rgba(0,0,0,.2); }
.nb-news-item h3 { font-size: 21px; margin: 0 0 8px; }
.nb-news-item h3 a { color: var(--nb-ink); }
.nb-news-item h3 a:hover { color: var(--nb-accent); }
.nb-meta { font-size: 13px; color: var(--nb-muted); margin-bottom: 8px; display: flex; gap: 12px; flex-wrap: wrap; align-items: center; font-weight: 500; }
.nb-meta .cat { background: var(--nb-grad); color: #fff; font-weight: 800; text-transform: uppercase; font-size: 11px; letter-spacing: 0.8px; padding: 3px 10px; border-radius: 20px; }
.nb-excerpt { color: #4b5568; font-size: 15px; margin: 0; }

/* Category blocks */
.nb-cat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.nb-cat-card { background: #fff; border: 1px solid var(--nb-line); border-radius: var(--nb-radius); overflow: hidden; transition: transform .25s ease, box-shadow .25s ease; }
.nb-cat-card:hover { transform: translateY(-4px); box-shadow: var(--nb-shadow); }
.nb-cat-card .nb-thumb { aspect-ratio: 16/9; border-radius: 0; }
.nb-cat-card .nb-card-body { padding: 16px 18px 18px; }
.nb-cat-card h3 { font-size: 17px; margin: 0 0 6px; }
.nb-cat-card h3 a { color: var(--nb-ink); }
.nb-cat-card h3 a:hover { color: var(--nb-accent); }

/* Sidebar */
.nb-sidebar .widget { margin-bottom: 32px; background: var(--nb-soft); border-radius: var(--nb-radius); padding: 20px; }
.nb-sidebar .widget-title { font-size: 15px; text-transform: uppercase; letter-spacing: 1px; margin: 0 0 14px; display: flex; align-items: center; gap: 10px; }
.nb-sidebar .widget-title::before { content: ""; width: 22px; height: 5px; background: var(--nb-grad); border-radius: 4px; }
.nb-sidebar ul { list-style: none; margin: 0; padding: 0; }
.nb-sidebar li { padding: 9px 0; border-bottom: 1px solid var(--nb-line); font-size: 14.5px; font-weight: 500; }
.nb-sidebar li:last-child { border-bottom: 0; }
.nb-sidebar li a { color: var(--nb-ink); }
.nb-sidebar li a:hover { color: var(--nb-accent); }
.nb-trending { counter-reset: trend; }
.nb-trending li { display: flex; gap: 14px; align-items: flex-start; }
.nb-trending li::before {
	counter-increment: trend; content: counter(trend); font-size: 34px; font-weight: 800; line-height: 1;
	background: var(--nb-grad); -webkit-background-clip: text; background-clip: text; color: transparent; min-width: 34px;
}

/* ============ Article ============ */
.nb-article { max-width: 800px; }
.nb-breadcrumb { font-size: 13px; color: var(--nb-muted); margin-bottom: 12px; font-weight: 600; }
.nb-article h1 { font-size: 42px; margin: 0 0 14px; letter-spacing: -0.03em; }
.nb-article .nb-meta { margin-bottom: 20px; }
.nb-featured { border-radius: var(--nb-radius); overflow: hidden; margin: 0 0 26px; box-shadow: var(--nb-shadow); }
.nb-article-body { font-size: 18px; line-height: 1.85; color: #232b3d; text-align: justify; }
.nb-article-body h2, .nb-article-body h3 { margin-top: 34px; }
.nb-article-body blockquote { border-left: 5px solid; border-image: linear-gradient(#e11d2e, #f97316) 1; margin: 26px 0; padding: 10px 0 10px 22px; font-style: italic; color: #4b5568; background: var(--nb-soft); border-radius: 0 10px 10px 0; }
.nb-tags { margin: 28px 0; font-size: 14px; }
.nb-tags a { display: inline-block; background: var(--nb-soft); border: 1px solid var(--nb-line); border-radius: 20px; padding: 5px 15px; margin: 0 6px 6px 0; color: var(--nb-ink); font-weight: 600; }
.nb-tags a:hover { background: var(--nb-accent); border-color: var(--nb-accent); color: #fff; text-decoration: none; }
.nb-author-box { display: flex; gap: 18px; background: linear-gradient(135deg, #f4f6fb, #fdf0f1); border: 1px solid var(--nb-line); border-radius: var(--nb-radius); padding: 22px; margin: 32px 0; }
.nb-author-box img { border-radius: 50%; width: 76px; height: 76px; border: 3px solid #fff; box-shadow: var(--nb-shadow); }
.nb-related { margin-top: 44px; }
.nb-related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.nb-pagination { display: flex; justify-content: space-between; gap: 12px; margin: 34px 0; font-weight: 700; }
.nb-pagination a { background: var(--nb-soft); padding: 10px 18px; border-radius: 10px; color: var(--nb-ink); }
.nb-pagination a:hover { background: var(--nb-accent); color: #fff; text-decoration: none; }

/* ============ Archive / search ============ */
.nb-archive-head { margin: 30px 0 8px; padding: 26px 28px; background: linear-gradient(135deg, var(--nb-dark) 0%, #1d2740 100%); border-radius: var(--nb-radius); color: #fff; }
.nb-archive-head h1 { font-size: 32px; margin: 0; color: #fff; }
.nb-archive-head p { color: #aeb6c9; margin: 8px 0 0; }
.nb-paging { margin: 28px 0; display: flex; gap: 8px; flex-wrap: wrap; }
.nb-paging .page-numbers { border: 1px solid var(--nb-line); border-radius: 10px; padding: 9px 15px; color: var(--nb-ink); font-weight: 700; background: #fff; }
.nb-paging .page-numbers.current { background: var(--nb-grad); color: #fff; border-color: transparent; }
.nb-paging a.page-numbers:hover { border-color: var(--nb-accent); color: var(--nb-accent); text-decoration: none; }

/* ============ Footer ============ */
.nb-footer { background: var(--nb-dark); color: #c6cddc; margin-top: 48px; border-top: 4px solid; border-image: linear-gradient(90deg, #e11d2e, #f97316) 1; border-left: 0; border-right: 0; border-bottom: 0; }
.nb-footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 34px; padding: 48px 0 32px; }
.nb-footer h4 { color: #fff; font-size: 14px; text-transform: uppercase; letter-spacing: 1.2px; margin-bottom: 16px; }
.nb-footer ul { list-style: none; margin: 0; padding: 0; }
.nb-footer li { margin-bottom: 9px; font-size: 14.5px; }
.nb-footer a { color: #c6cddc; }
.nb-footer a:hover { color: #fff; }
.nb-footer-bottom { border-top: 1px solid #232c44; padding: 18px 0; font-size: 13px; color: #8b94a9; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }

/* ============ Responsive ============ */
@media (max-width: 960px) {
	.nb-main { grid-template-columns: 1fr; }
	.nb-hero { grid-template-columns: 1fr 1fr; }
	.nb-hero-main { grid-column: span 2; min-height: 340px; }
	.nb-cat-grid, .nb-related-grid { grid-template-columns: 1fr 1fr; }
	.nb-footer-grid { grid-template-columns: 1fr 1fr; }
	.nb-site-title { font-size: 38px; }
	.nb-article h1 { font-size: 32px; }
}
@media (max-width: 640px) {
	.nb-hero { grid-template-columns: 1fr; }
	.nb-hero-main { grid-column: span 1; min-height: 300px; }
	.nb-hero-main .nb-hero-text h2 { font-size: 26px; }
	.nb-news-item { grid-template-columns: 1fr; }
	.nb-news-item .nb-thumb { aspect-ratio: 16/9; }
	.nb-cat-grid, .nb-related-grid, .nb-footer-grid { grid-template-columns: 1fr; }
	.nb-date { display: none; }
	.nb-menu a { padding: 13px 11px; font-size: 12.5px; }
	.nb-archive-head h1 { font-size: 25px; }
}
