/*
Theme Name: The National Times
Theme URI: https://example.com/national-times
Author: Custom Build
Description: A clean, fast news and magazine theme built for daily reporting. Deep green masthead, editorial serif headlines, and layouts that stay readable on any phone. Includes one-click starter content under Appearance.
Version: 1.3
Requires at least: 5.9
Tested up to: 6.6
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: national-times
Tags: news, magazine, blog, two-columns, right-sidebar, custom-menu, custom-logo, featured-images, translation-ready
*/

/* ---------------------------------------------------------
   1. Tokens
--------------------------------------------------------- */
:root {
	--forest: #0b3b2e;
	--forest-deep: #072a21;
	--forest-tint: #e8efea;
	--gold: #c6a44e;
	--live: #c0342c;
	--ink: #14201b;
	--body-ink: #2b3a34;
	--muted: #61716a;
	--rule: #dde3dd;
	--paper: #ffffff;
	--wash: #f2f4f0;

	--serif: "Newsreader", Georgia, "Noto Nastaliq Urdu", serif;
	--sans: "IBM Plex Sans", "Segoe UI", system-ui, "Noto Nastaliq Urdu", sans-serif;

	--wrap: 1180px;
	--gap: 28px;
	--radius: 3px;
}

/* ---------------------------------------------------------
   2. Base
--------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

body {
	margin: 0;
	background: var(--wash);
	color: var(--body-ink);
	font-family: var(--sans);
	font-size: 17px;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
}

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

a { color: var(--forest); text-decoration: none; }
a:hover { color: var(--live); }

h1, h2, h3, h4 {
	font-family: var(--serif);
	color: var(--ink);
	line-height: 1.18;
	margin: 0 0 .5em;
	font-weight: 600;
	letter-spacing: -0.01em;
}

p { margin: 0 0 1.15em; }

:focus-visible {
	outline: 3px solid var(--gold);
	outline-offset: 2px;
}

.wrap {
	width: 100%;
	max-width: var(--wrap);
	margin: 0 auto;
	padding: 0 20px;
}

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

.skip-link {
	position: absolute; left: -9999px; top: 0;
	background: var(--gold); color: var(--forest-deep);
	padding: 10px 18px; z-index: 999; font-weight: 600;
}
.skip-link:focus { left: 12px; top: 12px; }

/* ---------------------------------------------------------
   3. Header
--------------------------------------------------------- */
.utility-bar {
	background: var(--forest-deep);
	color: rgba(255,255,255,.75);
	font-size: 13px;
}
.utility-bar .wrap {
	display: flex; align-items: center; justify-content: space-between;
	gap: 16px; min-height: 38px; flex-wrap: wrap;
}
.utility-date { letter-spacing: .01em; }
.utility-right { display: flex; align-items: center; gap: 18px; }

.topbar-menu { display: flex; list-style: none; margin: 0; padding: 0; gap: 16px; }
.topbar-menu a { color: rgba(255,255,255,.75); font-size: 13px; }
.topbar-menu a:hover { color: var(--gold); }

.social-links { display: flex; gap: 12px; align-items: center; }
.social-links a { color: rgba(255,255,255,.75); display: inline-flex; }
.social-links a:hover { color: var(--gold); }
.social-links svg { width: 16px; height: 16px; fill: currentColor; }

.masthead { background: var(--forest); color: #fff; }
.masthead .wrap {
	display: flex; align-items: center; justify-content: space-between;
	gap: 24px; padding-top: 26px; padding-bottom: 26px;
}
.site-branding { min-width: 0; }
.site-title {
	font-family: var(--serif);
	font-size: clamp(30px, 5vw, 46px);
	font-weight: 700;
	line-height: 1.05;
	margin: 0;
	letter-spacing: -0.02em;
}
.site-title a { color: #fff; }
.site-title a:hover { color: var(--gold); }
.site-tagline {
	margin: 8px 0 0;
	font-family: var(--sans);
	font-size: 13.5px;
	color: rgba(255,255,255,.7);
	letter-spacing: .02em;
}
.custom-logo { max-height: 64px; width: auto; }

.masthead-aside { text-align: right; flex-shrink: 0; }
.masthead-aside .search-form { display: flex; }
.masthead-aside .search-form input[type="search"] {
	border: 1px solid rgba(255,255,255,.25);
	background: rgba(255,255,255,.08);
	color: #fff;
	padding: 9px 12px;
	font-family: var(--sans); font-size: 14px;
	border-radius: var(--radius) 0 0 var(--radius);
	width: 190px;
}
.masthead-aside .search-form input[type="search"]::placeholder { color: rgba(255,255,255,.5); }
.masthead-aside .search-form button {
	border: 0; background: var(--gold); color: var(--forest-deep);
	padding: 9px 16px; font-family: var(--sans); font-weight: 600; font-size: 14px;
	border-radius: 0 var(--radius) var(--radius) 0; cursor: pointer;
}

/* Primary nav */
.primary-nav {
	background: var(--forest);
	border-top: 1px solid rgba(255,255,255,.14);
}
.primary-nav .wrap { display: flex; align-items: center; gap: 12px; }
.primary-menu {
	display: flex; list-style: none; margin: 0; padding: 0;
	flex-wrap: wrap; flex: 1;
}
.primary-menu li { position: relative; }
.primary-menu > li > a {
	display: block;
	color: rgba(255,255,255,.92);
	font-family: var(--sans);
	font-size: 14.5px;
	font-weight: 500;
	padding: 14px 15px;
	letter-spacing: .01em;
}
.primary-menu > li > a:hover,
.primary-menu > li.current-menu-item > a {
	color: var(--forest-deep);
	background: var(--gold);
}
.primary-menu .sub-menu {
	position: absolute; left: 0; top: 100%;
	background: var(--forest-deep);
	list-style: none; margin: 0; padding: 6px 0;
	min-width: 200px; display: none; z-index: 50;
	border-top: 2px solid var(--gold);
}
.primary-menu li:hover > .sub-menu,
.primary-menu li:focus-within > .sub-menu { display: block; }
.primary-menu .sub-menu a {
	display: block; padding: 9px 16px; color: rgba(255,255,255,.85); font-size: 14px;
}
.primary-menu .sub-menu a:hover { color: var(--gold); }

.nav-toggle {
	display: none;
	background: transparent; border: 1px solid rgba(255,255,255,.3);
	color: #fff; padding: 8px 14px; margin: 8px 0;
	font-family: var(--sans); font-size: 14px; border-radius: var(--radius);
	cursor: pointer;
}

/* ---------------------------------------------------------
   4. Breaking strip
--------------------------------------------------------- */
.breaking {
	background: var(--paper);
	border-bottom: 1px solid var(--rule);
}
.breaking .wrap { display: flex; align-items: center; gap: 18px; min-height: 52px; }
.breaking-label {
	display: inline-flex; align-items: center; gap: 8px;
	background: var(--live); color: #fff;
	font-family: var(--sans); font-weight: 600; font-size: 13px;
	padding: 5px 12px; border-radius: var(--radius);
	flex-shrink: 0;
}
.breaking-dot {
	width: 7px; height: 7px; border-radius: 50%; background: #fff;
	animation: pulse 1.8s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .25; } }
.breaking-list {
	display: flex; gap: 28px; list-style: none; margin: 0; padding: 0;
	overflow: hidden; white-space: nowrap;
}
.breaking-list a {
	font-family: var(--serif); font-size: 16.5px; color: var(--ink);
}
.breaking-list a:hover { color: var(--live); }

/* ---------------------------------------------------------
   5. Shared story pieces
--------------------------------------------------------- */
.kicker {
	display: inline-block;
	font-family: var(--sans);
	font-size: 12px; font-weight: 600;
	letter-spacing: .04em;
	color: var(--live);
	margin-bottom: 8px;
}
.kicker a { color: inherit; }

.meta {
	font-family: var(--sans);
	font-size: 13px;
	color: var(--muted);
	display: flex; flex-wrap: wrap; align-items: center; gap: 14px;
}
.meta .sep { width: 1px; height: 12px; background: var(--rule); }

.thumb {
	display: block; overflow: hidden; background: var(--forest-tint);
	border-radius: var(--radius);
}
.thumb img { width: 100%; transition: transform .45s ease; }
.card:hover .thumb img { transform: scale(1.04); }
@media (prefers-reduced-motion: reduce) {
	.thumb img, .card:hover .thumb img { transition: none; transform: none; }
	.breaking-dot { animation: none; }
}

/* ---------------------------------------------------------
   6. Hero
--------------------------------------------------------- */
.hero { padding: 34px 0 8px; }
.hero-grid {
	display: grid;
	grid-template-columns: 1.62fr 1fr;
	gap: var(--gap);
	align-items: start;
}
.lead-story { background: var(--paper); border-radius: var(--radius); overflow: hidden; }
.lead-story .thumb { border-radius: 0; }
.lead-story .lead-body { padding: 24px 26px 28px; }
.lead-title {
	font-size: clamp(27px, 3.4vw, 40px);
	font-weight: 700;
	margin-bottom: .35em;
}
.lead-title a { color: var(--ink); }
.lead-title a:hover { color: var(--forest); }
.lead-excerpt {
	font-family: var(--serif);
	font-size: 18px;
	color: var(--body-ink);
	max-width: 62ch;
	line-height: 1.6;
	margin-bottom: 14px;
}

.top-stories {
	background: var(--paper);
	border-radius: var(--radius);
	padding: 6px 22px 10px;
}
.top-stories h2 {
	font-size: 19px;
	padding: 16px 0 12px;
	border-bottom: 2px solid var(--forest);
	margin: 0 0 6px;
}
.story-line {
	display: flex; gap: 14px; align-items: flex-start;
	padding: 16px 0;
	border-bottom: 1px solid var(--rule);
}
.top-stories .story-line:last-child { border-bottom: 0; }
.story-line .thumb { width: 94px; flex-shrink: 0; }
.story-line h3 {
	font-size: 17.5px; font-weight: 600; margin: 0 0 6px; line-height: 1.3;
}
.story-line h3 a { color: var(--ink); }
.story-line h3 a:hover { color: var(--live); }

/* ---------------------------------------------------------
   7. Section blocks & cards
--------------------------------------------------------- */
.block { padding: 30px 0; }
.block-head {
	display: flex; align-items: baseline; justify-content: space-between;
	gap: 16px;
	border-bottom: 2px solid var(--forest);
	padding-bottom: 10px;
	margin-bottom: 22px;
}
.block-head h2 { font-size: 24px; margin: 0; }
.block-head .more { font-family: var(--sans); font-size: 14px; font-weight: 500; }

.card-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
	gap: var(--gap);
}
.card {
	background: var(--paper);
	border-radius: var(--radius);
	overflow: hidden;
	display: flex; flex-direction: column;
}
.card .thumb { border-radius: 0; }
.card-body { padding: 18px 20px 22px; }
.card h3 { font-size: 20px; margin-bottom: 10px; line-height: 1.28; }
.card h3 a { color: var(--ink); }
.card h3 a:hover { color: var(--forest); }
.card p { font-family: var(--serif); font-size: 16px; color: var(--muted); margin-bottom: 12px; }

/* ---------------------------------------------------------
   8. Content + sidebar layout
--------------------------------------------------------- */
.layout {
	display: grid;
	grid-template-columns: minmax(0,1fr) 320px;
	gap: 40px;
	padding: 34px 0 50px;
	align-items: start;
}
.layout-full { grid-template-columns: minmax(0,1fr); }

.page-head {
	background: var(--paper);
	border-left: 4px solid var(--gold);
	padding: 20px 24px;
	border-radius: var(--radius);
	margin-bottom: 26px;
}
.page-head h1 { font-size: 30px; margin: 0; }
.page-head p { margin: 8px 0 0; color: var(--muted); font-size: 15px; }

/* Article */
.article {
	background: var(--paper);
	border-radius: var(--radius);
	padding: 34px 38px 40px;
}
.article-title { font-size: clamp(28px, 4vw, 42px); font-weight: 700; margin-bottom: 14px; }
.article-meta { margin-bottom: 22px; padding-bottom: 18px; border-bottom: 1px solid var(--rule); }
.article-figure { margin: 0 0 26px; }
.article-figure img { width: 100%; border-radius: var(--radius); }
.article-figure figcaption { font-size: 13.5px; color: var(--muted); padding-top: 8px; }

.entry-content {
	font-family: var(--serif);
	font-size: 19px;
	line-height: 1.75;
	color: var(--body-ink);
	max-width: 70ch;
}
.entry-content h2 { font-size: 27px; margin-top: 1.5em; }
.entry-content h3 { font-size: 22px; margin-top: 1.4em; }
.entry-content a { text-decoration: underline; text-underline-offset: 3px; }
.entry-content blockquote {
	margin: 1.6em 0;
	padding: 4px 0 4px 22px;
	border-left: 3px solid var(--gold);
	font-size: 21px;
	color: var(--ink);
}
.entry-content ul, .entry-content ol { padding-left: 1.3em; margin-bottom: 1.2em; }
.entry-content li { margin-bottom: .5em; }
.entry-content img { border-radius: var(--radius); }
.entry-content figcaption { font-family: var(--sans); font-size: 13.5px; color: var(--muted); }

.tag-row { margin-top: 30px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.tag-row a {
	font-family: var(--sans); font-size: 13px;
	background: var(--forest-tint); color: var(--forest);
	padding: 5px 11px; border-radius: 20px;
}
.tag-row a:hover { background: var(--forest); color: #fff; }

.post-nav {
	display: grid; grid-template-columns: 1fr 1fr; gap: 20px;
	margin-top: 26px;
}
.post-nav a {
	background: var(--paper); border-radius: var(--radius);
	padding: 18px 20px; display: block;
}
.post-nav span { display: block; font-family: var(--sans); font-size: 12.5px; color: var(--muted); margin-bottom: 6px; }
.post-nav strong { font-family: var(--serif); font-weight: 600; font-size: 17px; color: var(--ink); }
.post-nav .next { text-align: right; }

/* Sidebar */
.sidebar { position: sticky; top: 20px; }
.widget {
	background: var(--paper);
	border-radius: var(--radius);
	padding: 22px 24px 26px;
	margin-bottom: 24px;
}
.widget-title, .widget h2 {
	font-size: 18px;
	margin: 0 0 16px;
	padding-bottom: 10px;
	border-bottom: 2px solid var(--forest);
}
.widget ul { list-style: none; margin: 0; padding: 0; }
.widget li {
	padding: 9px 0;
	border-bottom: 1px solid var(--rule);
	font-size: 15.5px;
}
.widget li:last-child { border-bottom: 0; }
.widget a { color: var(--ink); }
.widget a:hover { color: var(--live); }

.search-form { display: flex; }
.search-form input[type="search"] {
	flex: 1; min-width: 0;
	border: 1px solid var(--rule); border-right: 0;
	padding: 10px 12px; font-family: var(--sans); font-size: 15px;
	border-radius: var(--radius) 0 0 var(--radius);
}
.search-form button {
	border: 0; background: var(--forest); color: #fff;
	padding: 10px 18px; font-family: var(--sans); font-weight: 500; font-size: 14px;
	border-radius: 0 var(--radius) var(--radius) 0; cursor: pointer;
}
.search-form button:hover { background: var(--live); }

/* Ranked list widget style */
.ranked { counter-reset: rank; }
.ranked li { display: flex; gap: 12px; align-items: baseline; }
.ranked li::before {
	counter-increment: rank;
	content: counter(rank);
	font-family: var(--sans); font-weight: 700; font-size: 15px;
	color: var(--gold); flex-shrink: 0;
}

/* ---------------------------------------------------------
   9. Comments
--------------------------------------------------------- */
.comments-area {
	background: var(--paper); border-radius: var(--radius);
	padding: 30px 38px 36px; margin-top: 26px;
}
.comments-area h2, .comments-area h3 { font-size: 22px; }
.comment-list { list-style: none; margin: 0 0 30px; padding: 0; }
.comment-list li { padding: 18px 0; border-bottom: 1px solid var(--rule); }
.comment-list .children { list-style: none; padding-left: 26px; }
.comment-author img { border-radius: 50%; margin-right: 10px; }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
	width: 100%; border: 1px solid var(--rule); padding: 11px 13px;
	font-family: var(--sans); font-size: 15px; border-radius: var(--radius);
}
.comment-form .submit {
	background: var(--forest); color: #fff; border: 0;
	padding: 12px 26px; font-family: var(--sans); font-weight: 600;
	border-radius: var(--radius); cursor: pointer;
}
.comment-form .submit:hover { background: var(--live); }

/* ---------------------------------------------------------
   10. Pagination, empty states
--------------------------------------------------------- */
.pagination { margin-top: 34px; }
.pagination .page-numbers {
	display: inline-block; padding: 9px 15px; margin-right: 6px;
	background: var(--paper); color: var(--ink);
	font-family: var(--sans); font-size: 15px; border-radius: var(--radius);
}
.pagination .page-numbers.current,
.pagination .page-numbers:hover { background: var(--forest); color: #fff; }

.empty-state {
	background: var(--paper); border-radius: var(--radius);
	padding: 46px 40px; text-align: center;
}
.empty-state h2 { font-size: 26px; }
.empty-state p { max-width: 46ch; margin: 0 auto 18px; color: var(--muted); }
.button {
	display: inline-block; background: var(--forest); color: #fff;
	font-family: var(--sans); font-weight: 600; font-size: 15px;
	padding: 12px 24px; border-radius: var(--radius);
}
.button:hover { background: var(--live); color: #fff; }

/* ---------------------------------------------------------
   11. Footer
--------------------------------------------------------- */
.site-footer { background: var(--forest-deep); color: rgba(255,255,255,.72); margin-top: 20px; }
.footer-top {
	display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
	gap: 36px; padding: 46px 0 40px;
}
.site-footer .widget { background: transparent; padding: 0; margin: 0; }
.site-footer .widget-title, .site-footer .widget h2 {
	color: #fff; border-bottom: 1px solid rgba(255,255,255,.2); font-size: 17px;
}
.site-footer .widget li { border-bottom: 1px solid rgba(255,255,255,.1); }
.site-footer a { color: rgba(255,255,255,.72); }
.site-footer a:hover { color: var(--gold); }
.footer-about h3 { color: #fff; font-size: 22px; }
.footer-about p { font-size: 15px; max-width: 40ch; }

.footer-bottom {
	border-top: 1px solid rgba(255,255,255,.14);
	padding: 18px 0;
	display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
	font-size: 13.5px;
}
.footer-menu { display: flex; list-style: none; margin: 0; padding: 0; gap: 18px; }

/* ---------------------------------------------------------
   12. Responsive
--------------------------------------------------------- */
@media (max-width: 980px) {
	.hero-grid { grid-template-columns: 1fr; }
	.layout { grid-template-columns: 1fr; gap: 28px; }
	.sidebar { position: static; }
	.article, .comments-area { padding: 26px 22px 30px; }
}

@media (max-width: 760px) {
	body { font-size: 16px; }
	.masthead .wrap { flex-direction: column; align-items: flex-start; gap: 16px; padding: 22px 20px; }
	.masthead-aside { width: 100%; }
	.masthead-aside .search-form input[type="search"] { width: 100%; }
	.masthead-aside .search-form { width: 100%; }
	.nav-toggle { display: block; }
	.primary-menu {
		display: none; flex-direction: column; width: 100%;
		border-top: 1px solid rgba(255,255,255,.14);
	}
	.primary-menu.is-open { display: flex; }
	.primary-nav .wrap { flex-direction: column; align-items: stretch; }
	.primary-menu .sub-menu { position: static; display: block; background: transparent; border-top: 0; padding-left: 14px; }
	.breaking .wrap { flex-direction: column; align-items: flex-start; gap: 10px; padding-top: 12px; padding-bottom: 12px; }
	.breaking-list { flex-direction: column; gap: 6px; white-space: normal; }
	.breaking-list li:nth-child(n+3) { display: none; }
	.breaking-list a { font-size: 15.5px; }
	.entry-content { font-size: 17.5px; }
	.post-nav { grid-template-columns: 1fr; }
	.post-nav .next { text-align: left; }
	.utility-bar .wrap { justify-content: center; }
}

/* WordPress core alignment classes */
.alignleft { float: left; margin: 6px 24px 16px 0; }
.alignright { float: right; margin: 6px 0 16px 24px; }
.aligncenter { margin: 0 auto 20px; }
.wp-caption { max-width: 100%; }
.sticky .lead-title::after { content: ""; }
