/*
Theme Name:  Nawai News
Description: News theme for Nawai.pk (English and Urdu). Homepage sections, breaking-news ticker and category blocks; right-to-left ready.
Version:     1.0.0
Author:      Nawai
Requires PHP: 8.1
Text Domain: nawai-news
*/

/* ---------------------------------------------------------------------
   Tokens (accent/dark are overridden from the Customizer in functions.php)
   ------------------------------------------------------------------ */
:root {
	--accent: #d3203a;
	--accent-dark: #a8172c;
	--dark: #111b27;
	--text: #1f2933;
	--muted: #6b7682;
	--line: #e3e6ea;
	--bg: #ffffff;
	--bg-alt: #f4f5f7;
	--radius: 4px;
	--wrap: 1240px;
	--font-head: "Oswald", "Arial Narrow", Arial, sans-serif;
	--font-body: "Merriweather Sans", "Segoe UI", Arial, sans-serif;
	--lh-head: 1.25;
	--lh-body: 1.7;
	--head-case: none;
}
html[lang^="ur"] {
	--font-head: "Noto Nastaliq Urdu", "Jameel Noori Nastaleeq", serif;
	--font-body: "Noto Nastaliq Urdu", "Jameel Noori Nastaleeq", serif;
	--lh-head: 1.95;
	--lh-body: 2.25;
}

/* ---------------------------------------------------------------------
   Base
   ------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font-family: var(--font-body);
	font-size: 16px;
	line-height: var(--lh-body);
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
h1, h2, h3, h4 { font-family: var(--font-head); line-height: var(--lh-head); margin: 0; font-weight: 600; color: var(--dark); }
html[lang^="ur"] h1, html[lang^="ur"] h2, html[lang^="ur"] h3, html[lang^="ur"] h4 { font-weight: 700; }
.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: 16px; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link:focus { position: fixed; inset-block-start: 8px; inset-inline-start: 8px; z-index: 1000; width: auto; height: auto; clip: auto; background: #fff; padding: 8px 12px; }

/* ---------------------------------------------------------------------
   Top bar
   ------------------------------------------------------------------ */
.topbar { background: var(--dark); color: #c9d1d9; font-size: 13px; }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 38px; }
.topbar a { color: #c9d1d9; }
.topbar a:hover { color: #fff; }
.topbar__right { display: flex; align-items: center; gap: 14px; }
.social { display: flex; gap: 10px; }
.social svg { width: 15px; height: 15px; fill: currentColor; display: block; }
.lang-switch a { border: 1px solid #3a4756; padding: 1px 10px; border-radius: 20px; }
html[lang^="ur"] .topbar { font-size: 14px; }

/* ---------------------------------------------------------------------
   Header
   ------------------------------------------------------------------ */
.site-header { border-block-end: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-block: 18px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand img, .brand .custom-logo { max-height: 72px; width: auto; }
.brand__name { font-family: var(--font-head); font-size: 40px; font-weight: 700; color: var(--dark); line-height: 1.1; letter-spacing: .5px; }
.brand__name span { color: var(--accent); }
.brand__tag { font-size: 13px; color: var(--muted); margin-top: 2px; }
.header-banner img { max-height: 90px; width: auto; }

/* ---------------------------------------------------------------------
   Main navigation
   ------------------------------------------------------------------ */
.mainnav { background: var(--accent); position: sticky; top: 0; z-index: 50; box-shadow: 0 2px 6px rgba(0,0,0,.12); }
.admin-bar .mainnav { top: 32px; }
.mainnav .wrap { display: flex; align-items: stretch; }
.mainnav ul { list-style: none; margin: 0; padding: 0; }
.menu { display: flex; flex-wrap: wrap; flex: 1; }
.menu > li { position: relative; }
.menu > li > a {
	display: block; padding: 0 15px; line-height: 48px; color: #fff;
	font-family: var(--font-head); font-size: 15px; text-transform: uppercase; letter-spacing: .4px; font-weight: 500;
}
html[lang^="ur"] .menu > li > a { font-size: 16px; line-height: 50px; text-transform: none; letter-spacing: 0; }
.menu > li > a:hover, .menu > li.current-menu-item > a, .menu > li.current-cat > a, .menu > li.current-menu-ancestor > a { background: var(--accent-dark); color: #fff; }
.menu .sub-menu {
	display: none; position: absolute; inset-inline-start: 0; top: 100%; min-width: 220px; background: #fff;
	box-shadow: 0 8px 20px rgba(0,0,0,.15); border-block-start: 3px solid var(--accent); z-index: 60;
}
.menu li:hover > .sub-menu, .menu li:focus-within > .sub-menu { display: block; }
.menu .sub-menu a { display: block; padding: 9px 16px; font-size: 14px; border-block-end: 1px solid var(--line); color: var(--text); }
.menu .sub-menu a:hover { background: var(--bg-alt); color: var(--accent); }
.menu .sub-menu .sub-menu { inset-inline-start: 100%; top: 0; }
.nav-tools { display: flex; align-items: center; }
.nav-btn { background: none; border: 0; color: #fff; width: 48px; height: 48px; cursor: pointer; display: grid; place-items: center; }
.nav-btn:hover { background: var(--accent-dark); }
.nav-btn svg { width: 20px; height: 20px; fill: currentColor; }
.nav-toggle { display: none; }
.search-panel { display: none; background: var(--dark); padding: 12px 0; }
.search-panel.is-open { display: block; }
.search-form { display: flex; gap: 8px; }
.search-form input[type="search"] { flex: 1; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--radius); font: inherit; font-size: 15px; }
.search-form button { background: var(--accent); color: #fff; border: 0; padding: 0 20px; border-radius: var(--radius); font: inherit; cursor: pointer; }

/* ---------------------------------------------------------------------
   Breaking-news ticker
   ------------------------------------------------------------------ */
.ticker { border-block-end: 1px solid var(--line); background: #fff; }
.ticker .wrap { display: flex; align-items: center; gap: 0; overflow: hidden; }
.ticker__label {
	flex: none; background: var(--dark); color: #fff; font-family: var(--font-head); font-size: 13px; text-transform: uppercase;
	letter-spacing: .5px; padding: 0 14px; line-height: 40px; position: relative; z-index: 2;
}
html[lang^="ur"] .ticker__label { font-size: 14px; line-height: 44px; text-transform: none; }
.ticker__label::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-inline-end: 8px; animation: blink 1.2s infinite; }
.ticker__viewport { flex: 1; overflow: hidden; position: relative; mask-image: linear-gradient(90deg, transparent, #000 3%, #000 97%, transparent); }
.ticker__track { display: inline-flex; gap: 40px; white-space: nowrap; padding-inline-start: 40px; animation: ticker 120s linear infinite; font-size: 14px; }
html[dir="rtl"] .ticker__track { animation-name: ticker-rtl; }
.ticker__track a::before { content: "■"; color: var(--accent); font-size: 9px; margin-inline-end: 10px; vertical-align: middle; }
.ticker:hover .ticker__track { animation-play-state: paused; }
@keyframes ticker { to { transform: translateX(-50%); } }
@keyframes ticker-rtl { to { transform: translateX(50%); } }
@keyframes blink { 50% { opacity: .2; } }

/* ---------------------------------------------------------------------
   Cards
   ------------------------------------------------------------------ */
.thumb { position: relative; overflow: hidden; background: var(--bg-alt); border-radius: var(--radius); aspect-ratio: 16 / 10; }
.thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
a:hover .thumb img, .card:hover .thumb img { transform: scale(1.04); }
.thumb--empty { display: grid; place-items: center; background: linear-gradient(135deg, var(--dark), #2b3a4a); }
.thumb--empty span { font-family: var(--font-head); color: rgba(255,255,255,.25); font-size: 34px; font-weight: 700; }
.cat-chip {
	display: inline-block; background: var(--accent); color: #fff !important; font-family: var(--font-head); font-size: 11px;
	text-transform: uppercase; letter-spacing: .5px; padding: 2px 8px; border-radius: 2px; line-height: 1.7;
}
html[lang^="ur"] .cat-chip { font-size: 12px; text-transform: none; letter-spacing: 0; line-height: 2; }
.meta { color: var(--muted); font-size: 12px; display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; }
html[lang^="ur"] .meta { font-size: 13px; }
.meta svg { width: 12px; height: 12px; fill: currentColor; vertical-align: -1px; margin-inline-end: 4px; }

.card { display: flex; flex-direction: column; gap: 10px; }
.card__title { font-size: 17px; }
.card__title a:hover { color: var(--accent); }
.card__excerpt { color: var(--muted); font-size: 14px; margin: 0; }

.card--overlay { position: relative; display: block; border-radius: var(--radius); overflow: hidden; }
.card--overlay .thumb { aspect-ratio: 16 / 10; border-radius: 0; }
.card--overlay .card__body {
	position: absolute; inset: auto 0 0 0; padding: 60px 18px 16px; color: #fff;
	background: linear-gradient(transparent, rgba(0,0,0,.85));
	display: flex; flex-direction: column; gap: 8px; align-items: flex-start;
}
.card--overlay .card__title { color: #fff; font-size: 20px; }
.card--overlay .card__title a:hover { color: #fff; text-decoration: underline; }
.card--overlay .meta { color: #d5dbe1; }
.card--lead .card__title { font-size: 30px; }
.card--lead .thumb { aspect-ratio: 16 / 9.6; }
html[lang^="ur"] .card--lead .card__title { font-size: 28px; }

.card--row { flex-direction: row; gap: 12px; align-items: flex-start; }
.card--row .thumb { flex: none; width: 110px; aspect-ratio: 4 / 3; }
.card--row .card__title { font-size: 15px; }
html[lang^="ur"] .card--row .card__title { font-size: 15px; }
.card--row .card__body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }

/* ---------------------------------------------------------------------
   Homepage
   ------------------------------------------------------------------ */
.home-hero { padding-block: 24px; }
.hero-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; }
.hero-side { display: grid; grid-template-rows: 1fr 1fr; gap: 20px; }
.hero-side .card--overlay .thumb { aspect-ratio: auto; height: 100%; min-height: 180px; }
.hero-side .card--overlay { height: 100%; }
.card--overlay > a { display: block; height: 100%; }
.hero-grid > .card--lead .thumb { aspect-ratio: auto; height: 100%; min-height: 380px; }
.hero-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 20px; }

.layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 32px; padding-block: 12px 40px; }

.block { margin-block-end: 36px; }
.block__head { display: flex; align-items: center; justify-content: space-between; border-block-end: 2px solid var(--dark); margin-block-end: 18px; }
.block__title {
	background: var(--dark); color: #fff; font-size: 16px; text-transform: uppercase; letter-spacing: .5px;
	padding: 6px 16px; position: relative;
}
html[lang^="ur"] .block__title { font-size: 18px; text-transform: none; letter-spacing: 0; padding: 4px 16px 6px; }
.block__title a { color: #fff; }
.block__title::after { content: ""; position: absolute; inset-block: 0; inset-inline-end: -12px; width: 12px; background: var(--accent); }
.block__more { font-size: 13px; color: var(--muted); font-family: var(--font-head); text-transform: uppercase; }
html[lang^="ur"] .block__more { text-transform: none; }
.block__more:hover { color: var(--accent); }
.block--accent .block__head { border-color: var(--accent); }
.block--accent .block__title { background: var(--accent); }
.block--accent .block__title::after { background: var(--dark); }

.split { display: grid; grid-template-columns: 1.15fr 1fr; gap: 22px; }
.split__list { display: flex; flex-direction: column; gap: 16px; }
.split .card--big .card__title { font-size: 22px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px; }

.photo-strip { background: var(--dark); padding-block: 30px 34px; margin-block: 8px 30px; }
.photo-strip .block { margin: 0; }
.photo-strip .block__head { border-color: #3a4756; }
.photo-strip .block__title { background: var(--accent); }
.photo-strip .block__title::after { background: #fff; }
.photo-strip .block__more { color: #aab4be; }
.photo-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.photo-grid .card--overlay .card__title { font-size: 15px; }
.photo-grid .card--overlay .card__body { padding: 40px 12px 12px; }

/* ---------------------------------------------------------------------
   Sidebar
   ------------------------------------------------------------------ */
.sidebar { display: flex; flex-direction: column; gap: 32px; }
.sidebar .block { margin: 0; }
.latest-list { list-style: none; margin: 0; padding: 0; counter-reset: n; }
.latest-list li { display: flex; gap: 12px; padding-block: 12px; border-block-end: 1px solid var(--line); counter-increment: n; }
.latest-list li::before {
	content: counter(n); flex: none; width: 30px; font-family: var(--font-head); font-size: 26px; line-height: 1; color: var(--accent); font-weight: 700;
}
html[lang^="ur"] .latest-list li::before { content: counter(n, arabic-indic); font-size: 24px; line-height: 1.4; }
.latest-list a { font-family: var(--font-head); font-size: 15px; line-height: var(--lh-head); font-weight: 500; color: var(--dark); }
.latest-list a:hover { color: var(--accent); }
.latest-list .meta { margin-top: 4px; }
.side-box { background: var(--bg-alt); padding: 18px; border-radius: var(--radius); }

/* ---------------------------------------------------------------------
   Archive / single
   ------------------------------------------------------------------ */
.page-head { background: var(--bg-alt); border-block-end: 1px solid var(--line); padding-block: 26px; margin-block-end: 28px; }
.page-head h1 { font-size: 32px; }
.page-head p { color: var(--muted); margin: 6px 0 0; }
.crumbs { font-size: 13px; color: var(--muted); margin-block-end: 8px; }
.crumbs a:hover { color: var(--accent); }
.crumbs span { margin-inline: 6px; }

.pagination { margin-top: 32px; }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 6px; }
.pagination .page-numbers { display: inline-block; min-width: 40px; text-align: center; padding: 6px 12px; border: 1px solid var(--line); border-radius: var(--radius); font-size: 14px; }
.pagination .page-numbers.current, .pagination a.page-numbers:hover { background: var(--accent); border-color: var(--accent); color: #fff; }

.article { min-width: 0; }
.article__head { margin-block-end: 18px; display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.article__title { font-size: 36px; }
html[lang^="ur"] .article__title { font-size: 32px; }
.article__meta { font-size: 13px; }
.article__figure { margin: 0 0 22px; }
.article__figure img { width: 100%; border-radius: var(--radius); }
.article__figure figcaption { font-size: 13px; color: var(--muted); padding-top: 8px; }
.article__content { font-size: 18px; line-height: 1.8; }
html[lang^="ur"] .article__content { font-size: 20px; line-height: 2.3; }
.article__content > * { margin-block: 0 1.1em; }
.article__content div { margin-block-end: 1.1em; }
.article__content a { color: var(--accent); text-decoration: underline; }
.article__content img { border-radius: var(--radius); }
.article__content iframe, .article__content .wp-block-embed { max-width: 100%; }
.nawai-app-credit { font-size: 14px; color: var(--muted); border-block-start: 1px solid var(--line); padding-top: 12px; }
.share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-block: 24px; padding-block: 14px; border-block: 1px solid var(--line); }
.share__label { font-family: var(--font-head); font-size: 14px; margin-inline-end: 4px; }
.share a, .share button {
	display: inline-flex; align-items: center; gap: 6px; color: #fff; font-size: 13px; padding: 7px 12px; border-radius: var(--radius);
	border: 0; cursor: pointer; font-family: inherit;
}
.share svg { width: 14px; height: 14px; fill: currentColor; }
.share .fb { background: #1877f2; } .share .x { background: #000; } .share .wa { background: #25d366; } .share .copy { background: var(--muted); }
.share a:hover, .share button:hover { opacity: .85; color: #fff; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-block-end: 24px; }
.tags a { background: var(--bg-alt); padding: 3px 10px; font-size: 13px; border-radius: 20px; }

.page-content { font-size: 17px; }
.notfound { text-align: center; padding-block: 60px; }
.notfound h1 { font-size: 80px; color: var(--accent); }

/* ---------------------------------------------------------------------
   Footer
   ------------------------------------------------------------------ */
.site-footer { background: var(--dark); color: #aab4be; font-size: 14px; margin-top: 20px; }
.site-footer a { color: #d5dbe1; }
.site-footer a:hover { color: #fff; }
.footer-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; padding-block: 44px 30px; }
.footer-title { color: #fff; font-size: 16px; text-transform: uppercase; letter-spacing: .5px; margin-block-end: 16px; padding-block-end: 10px; border-block-end: 2px solid var(--accent); display: inline-block; }
html[lang^="ur"] .footer-title { text-transform: none; font-size: 18px; }
.footer-brand { font-family: var(--font-head); font-size: 32px; color: #fff; font-weight: 700; margin-block-end: 10px; }
.footer-brand span { color: var(--accent); }
.footer-links { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 20px; }
.footer-links li { padding-block: 4px; break-inside: avoid; }
.footer-bottom { border-block-start: 1px solid #263342; padding-block: 16px; font-size: 13px; }
.footer-bottom .wrap { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.site-footer .social svg { width: 18px; height: 18px; }
.site-footer .social { gap: 14px; margin-top: 16px; }

/* ---------------------------------------------------------------------
   Responsive
   ------------------------------------------------------------------ */
@media (max-width: 1100px) {
	.layout { grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; }
	.card--lead .card__title { font-size: 24px; }
}
@media (max-width: 900px) {
	.layout { grid-template-columns: 1fr; }
	.hero-grid { grid-template-columns: 1fr; }
	.hero-side { grid-template-rows: none; grid-template-columns: 1fr 1fr; }
	.hero-row, .grid-4, .photo-grid { grid-template-columns: repeat(2, 1fr); }
	.grid-3 { grid-template-columns: repeat(2, 1fr); }
	.footer-top { grid-template-columns: 1fr 1fr; }
	.header-banner { display: none; }

	.nav-toggle { display: grid; }
	.mainnav .wrap { flex-wrap: wrap; justify-content: space-between; }
	.menu { display: none; order: 3; flex-basis: 100%; flex-direction: column; padding-block-end: 8px; }
	.mainnav.is-open .menu { display: flex; }
	.menu > li > a { line-height: 44px; border-block-start: 1px solid rgba(255,255,255,.15); }
	.menu .sub-menu { position: static; display: block; box-shadow: none; border: 0; background: rgba(0,0,0,.12); }
	.menu .sub-menu a { color: #fff; border-color: rgba(255,255,255,.1); padding-inline-start: 30px; }
	.menu .sub-menu a:hover { background: transparent; color: #fff; }
	.mainnav .nav-tools { margin-inline-start: auto; }
	.mainnav .mobile-brand { display: flex; }
}
.mobile-brand { display: none; align-items: center; color: #fff; font-family: var(--font-head); font-size: 20px; font-weight: 700; padding-inline: 4px; }
@media (max-width: 600px) {
	.topbar__date { display: none; }
	.topbar .wrap { justify-content: flex-end; }
	.site-header .wrap { justify-content: center; padding-block: 14px; }
	.brand__name { font-size: 32px; }
	.split, .grid-2 { grid-template-columns: 1fr; }
	.hero-side, .hero-row, .grid-3, .grid-4 { grid-template-columns: 1fr; }
	.photo-grid { grid-template-columns: 1fr 1fr; }
	.card--lead .card__title { font-size: 21px; }
	.article__title { font-size: 26px; }
	html[lang^="ur"] .article__title { font-size: 25px; }
	.article__content { font-size: 17px; }
	.footer-top { grid-template-columns: 1fr; gap: 28px; }
	.page-head h1 { font-size: 26px; }
}
@media (prefers-reduced-motion: reduce) {
	.ticker__track { animation: none; }
	.thumb img { transition: none; }
}

.footer-bottom ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 14px; }

