/*
 * RTV Syria — editorial theme.
 * Principles: white page, typographic hierarchy, hairline rules instead of cards,
 * square images, green as an accent (kickers, links, section rules), gold for fine details only.
 */
:root {
	--ink: #141414;
	--ink-2: #3D4441;
	--muted: #5E6663;
	--rule: #DAD6CC;
	--rule-strong: #141414;
	--paper: #FFFFFF;
	--sand: #F3EFE6;
	--green: #0B4840;
	--green-deep: #062523;
	--gold: #B8AB7F;
	--gold-ink: #6E5F33;
	--live: #D7263D;
	--font-head: "Noto Kufi Arabic", "IBM Plex Sans Arabic", Tahoma, sans-serif;
	--font-body: "Noto Naskh Arabic", "Times New Roman", serif;
	--container: 1240px;
}

*, *::before, *::after { box-sizing: border-box; }

body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font-family: var(--font-head);
	font-size: 16px;
	line-height: 1.7;
	-webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--green); }
p { margin: 0; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; line-height: 1.35; }

.container { max-width: var(--container); margin-inline: auto; padding-inline: 24px; }

/* Clip, not off-screen offsets: in RTL a negative inline offset widens the page and adds a horizontal scrollbar. */
.screen-reader-text,
.skip-link:not(:focus) {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}
.skip-link:focus { position: absolute; inset-inline-start: 16px; top: 16px; z-index: 100; padding: 8px 16px; background: var(--green); color: #fff; }

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

/* ===== Shared editorial pieces ===== */
.kicker { display: inline-block; font-size: 13px; font-weight: 700; color: var(--green); }
.meta { font-size: 13px; color: var(--muted); }

.section { padding-block: 48px; }
.section-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 16px;
	border-top: 3px solid var(--rule-strong);
	padding-top: 10px;
	margin-bottom: 24px;
}
.section-head h2 { font-size: 22px; font-weight: 800; }
.section-head a, .more-link { font-size: 14px; font-weight: 700; color: var(--green); }
.section-head a::after, .more-link::after { content: " ←"; }

.btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 44px;
	padding: 0 20px;
	font-family: var(--font-head);
	font-size: 15px;
	font-weight: 700;
	border: 1px solid var(--ink);
	background: var(--ink);
	color: #fff;
	cursor: pointer;
}
.btn:hover { background: var(--green); border-color: var(--green); color: #fff; }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: #fff; }

.live-dot { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--live); flex: none; }
.live-dot::after {
	content: "";
	position: absolute;
	inset: -4px;
	border-radius: 50%;
	border: 2px solid var(--live);
	opacity: 0;
	animation: rtv-pulse 1.8s ease-out infinite;
}
@keyframes rtv-pulse { 0% { transform: scale(0.5); opacity: 0.9; } 100% { transform: scale(1.6); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .live-dot::after { animation: none; } }

.media { position: relative; overflow: hidden; background: var(--sand); aspect-ratio: 16 / 9; }
.media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.media img.placeholder-logo { width: 72px; height: auto; object-fit: contain; position: absolute; inset: 0; margin: auto; opacity: 0.45; }
a:hover .media img:not(.placeholder-logo) { transform: scale(1.03); }

/* ===== Top bar ===== */
.topbar { border-bottom: 1px solid var(--rule); font-size: 13px; }
.topbar__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 40px; }
.live-strip { display: flex; align-items: center; gap: 12px; min-width: 0; }
.live-strip__label { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; color: var(--live); white-space: nowrap; }
.live-strip__list { display: flex; align-items: center; margin: 0; padding: 0; list-style: none; overflow-x: auto; scrollbar-width: none; min-width: 0; }
.live-strip__list::-webkit-scrollbar { display: none; }
.live-strip__list li + li::before { content: "·"; margin-inline: 10px; color: var(--muted); }
.live-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; white-space: nowrap; color: var(--ink-2); }
.live-link::before { content: ""; width: 8px; height: 8px; background: var(--ch); }
.topbar__date { color: var(--muted); white-space: nowrap; }

/* ===== Masthead ===== */
.masthead { background: var(--paper); }
.masthead__top { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; padding-block: 18px; }
.masthead__start { display: flex; align-items: center; gap: 8px; }
.masthead__end { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.brand { display: flex; align-items: center; gap: 14px; color: var(--green); }
.brand:hover { color: var(--green); }
.brand img { width: 58px; height: 58px; object-fit: contain; flex: none; }
.brand__name { display: flex; flex-direction: column; line-height: 1.15; }
.brand__ar { font-size: 24px; font-weight: 800; letter-spacing: -0.2px; }
.brand__en { font-family: Georgia, "Times New Roman", serif; font-size: 12px; color: var(--muted); margin-top: 4px; }
.motto { font-size: 14px; font-weight: 700; color: var(--gold-ink); }

.masthead__nav { border-top: 1px solid var(--rule-strong); border-bottom: 1px solid var(--rule); }
.site-nav ul { display: flex; justify-content: center; flex-wrap: wrap; margin: 0; padding: 0; list-style: none; }
.site-nav a { position: relative; display: block; padding: 13px 16px; font-size: 15px; font-weight: 700; color: var(--ink); white-space: nowrap; }
.site-nav a::after {
	content: "";
	position: absolute;
	inset-inline: 16px;
	bottom: -1px;
	height: 3px;
	background: var(--green);
	transform: scaleX(0);
	transition: transform .2s;
}
.site-nav a:hover { color: var(--green); }
.site-nav a:hover::after,
.site-nav .current-menu-item > a::after { transform: scaleX(1); }
.site-nav .current-menu-item > a { color: var(--green); }

.icon-btn {
	width: 40px;
	height: 40px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 1px solid var(--rule);
	background: transparent;
	color: var(--ink);
	cursor: pointer;
	list-style: none;
}
.icon-btn:hover { border-color: var(--ink); }
.icon-btn::-webkit-details-marker { display: none; }
.live-btn { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border: 1px solid var(--ink); font-size: 14px; font-weight: 800; white-space: nowrap; }
.live-btn:hover { background: var(--ink); color: #fff; }
.search-pop { position: relative; }
.search-pop[open] > .icon-btn { background: var(--ink); color: #fff; border-color: var(--ink); }
.search-pop__form {
	position: absolute;
	top: calc(100% + 10px);
	inset-inline-start: 0;
	z-index: 60;
	width: min(400px, calc(100vw - 32px));
	display: flex;
	gap: 8px;
	padding: 12px;
	background: #fff;
	border: 1px solid var(--ink);
}
.search-pop__form input { flex: 1; min-width: 0; height: 44px; border: 1px solid var(--rule); padding: 0 12px; font: inherit; }
.menu-toggle { display: none; }

/* ===== Lead ===== */
.lead { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); padding-block: 28px 40px; }
.lead__main { padding-inline-end: 28px; border-inline-end: 1px solid var(--rule); }
.lead__body { padding-top: 18px; display: flex; flex-direction: column; gap: 10px; }
.lead__title { font-size: clamp(28px, 3.4vw, 44px); font-weight: 800; line-height: 1.3; letter-spacing: -0.3px; }
.lead__excerpt { font-family: var(--font-body); font-size: 19px; line-height: 1.8; color: var(--ink-2); max-width: 62ch; }
.lead__side { padding-inline-start: 28px; display: flex; flex-direction: column; }
.side-story { padding-block: 16px; border-bottom: 1px solid var(--rule); display: flex; flex-direction: column; gap: 6px; }
.side-story:first-child { padding-top: 0; }
.side-story:last-child { border-bottom: 0; }
.side-story h3 { font-size: 18px; font-weight: 700; line-height: 1.5; }
.side-story .media { margin-bottom: 8px; }

/* ===== On air ===== */
.onair { border-block: 1px solid var(--rule); }
.onair__inner { display: grid; grid-template-columns: auto repeat(3, minmax(0, 1fr)); }
.onair__label { display: flex; align-items: center; gap: 10px; padding-inline-end: 24px; font-size: 15px; font-weight: 800; color: var(--live); white-space: nowrap; }
.onair__item { display: flex; flex-direction: column; justify-content: center; gap: 2px; padding: 16px 24px; border-inline-start: 1px solid var(--rule); }
.onair__name { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 800; }
.onair__name::before { content: ""; width: 10px; height: 10px; background: var(--ch); }
.onair__now { font-family: var(--font-body); font-size: 15px; color: var(--ink-2); }
.onair__item .more-link { font-size: 13px; margin-top: 2px; }

/* ===== Story grid ===== */
.stories { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.story { display: flex; flex-direction: column; gap: 10px; padding-inline: 20px; border-inline-start: 1px solid var(--rule); }
.stories .story:nth-child(3n + 1) { padding-inline-start: 0; border-inline-start: 0; }
.stories .story:nth-child(3n) { padding-inline-end: 0; }
.stories .story:nth-child(n + 4) { margin-top: 28px; padding-top: 28px; border-top: 1px solid var(--rule); }
.story h3 { font-size: 20px; font-weight: 700; line-height: 1.5; }
.story__excerpt { font-family: var(--font-body); font-size: 16px; color: var(--ink-2); line-height: 1.8; }

/* ===== Institutions ===== */
.institutions { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.institution { display: flex; flex-direction: column; gap: 6px; padding: 18px 20px 4px; border-top: 4px solid var(--ch, var(--green)); border-inline-start: 1px solid var(--rule); }
.institution:first-child { border-inline-start: 0; padding-inline-start: 0; }
.institution__name { font-size: 19px; font-weight: 800; }
.institution__meta { font-family: var(--font-body); font-size: 15px; color: var(--ink-2); }
.institution .more-link { margin-top: 6px; }
.institution--soon { --ch: var(--gold); }

/* ===== Numbers ===== */
.figures { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); border-block: 1px solid var(--rule); }
.figure { padding: 22px 18px; border-inline-start: 1px solid var(--rule); }
.figure:first-child { border-inline-start: 0; padding-inline-start: 0; }
.figure__n { display: block; font-size: 44px; font-weight: 800; line-height: 1.1; color: var(--green); direction: ltr; text-align: right; font-variant-numeric: lining-nums; }
.figure__label { display: block; margin-top: 6px; font-family: var(--font-body); font-size: 15px; color: var(--ink-2); }

/* ===== From our channels ===== */
.feeds { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.feed { padding-inline: 20px; border-inline-start: 1px solid var(--rule); }
.feed:first-child { padding-inline-start: 0; border-inline-start: 0; }
.feed h3 { font-size: 14px; font-weight: 800; color: var(--ch-ink); padding-bottom: 8px; border-bottom: 2px solid var(--ch); }
.feed ul { margin: 0; padding: 0; list-style: none; }
.feed li { padding-block: 12px; border-bottom: 1px solid var(--rule); font-family: var(--font-body); font-size: 17px; line-height: 1.6; }
.feed li:last-child { border-bottom: 0; }
.feed__empty { padding-top: 12px; color: var(--muted); }

/* ===== Heritage ===== */
.heritage { background: var(--sand); }
.heritage__inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 48px; padding-block: 56px; align-items: center; }
.heritage__kicker { color: var(--gold-ink); }
.heritage__title { font-size: 40px; font-weight: 800; color: var(--green); margin-block: 6px 12px; }
.heritage__text { font-family: var(--font-body); font-size: 18px; color: var(--ink-2); margin-bottom: 20px; }
.timeline { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; padding: 28px 0 0; list-style: none; }
.timeline::before { content: ""; position: absolute; top: 6px; inset-inline: 0; height: 1px; background: var(--ink); }
.timeline li { position: relative; padding-inline-end: 16px; }
.timeline li::before { content: ""; position: absolute; top: -28px; inset-inline-start: 0; width: 13px; height: 13px; background: var(--sand); border: 2px solid var(--green); border-radius: 50%; }
.timeline b { display: block; font-size: 30px; font-weight: 800; color: var(--green); line-height: 1.2; }
.timeline span { font-family: var(--font-body); font-size: 15px; color: var(--ink-2); }

/* ===== Services + tenders ===== */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; }
.link-list { margin: 0; padding: 0; list-style: none; }
.link-list li { border-bottom: 1px solid var(--rule); }
.link-list a { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding-block: 14px; }
.link-list b { font-size: 17px; font-weight: 700; }
.link-list span { font-family: var(--font-body); font-size: 15px; color: var(--muted); text-align: end; }
.link-list a:hover b { color: var(--green); }
.tender-table { width: 100%; border-collapse: collapse; }
.tender-table th { font-size: 12px; font-weight: 700; color: var(--muted); text-align: start; padding-bottom: 8px; border-bottom: 1px solid var(--ink); }
.tender-table td { padding-block: 14px; border-bottom: 1px solid var(--rule); vertical-align: top; }
.tender-table td:first-child { width: 56px; font-size: 22px; font-weight: 800; color: var(--green); }
.tender-table td:last-child { width: 110px; font-size: 14px; color: var(--ink-2); white-space: nowrap; }
.tender-table a { font-size: 16px; font-weight: 700; line-height: 1.5; }

/* ===== Frequencies ===== */
.freq-table { width: 100%; border-collapse: collapse; }
.freq-table th, .freq-table td { padding: 12px 0; border-bottom: 1px solid var(--rule); text-align: start; }
.freq-table th { font-size: 12px; color: var(--muted); font-weight: 700; border-bottom-color: var(--ink); }
.freq-table td { font-size: 15px; }
.freq-table td.mono { font-size: 17px; font-weight: 700; direction: ltr; text-align: end; font-variant-numeric: tabular-nums; }

/* ===== Footer ===== */
.site-footer { margin-top: 56px; background: var(--green-deep); color: #D5DED9; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer__cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; padding-block: 48px 32px; }
.site-footer__brand img { width: 140px; }
.site-footer__motto { margin-top: 16px; font-size: 22px; font-weight: 800; color: var(--gold); }
.site-footer__col h2 { font-size: 13px; font-weight: 800; color: #fff; padding-bottom: 10px; margin-bottom: 10px; border-bottom: 1px solid rgba(255, 255, 255, 0.15); }
.site-footer__col ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; font-size: 15px; }
.site-footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-block: 16px 28px; border-top: 1px solid rgba(255, 255, 255, 0.15); font-size: 13px; color: #A9B8B3; }

/* ===== Inner pages ===== */
.page-head { padding-block: 40px 24px; border-bottom: 1px solid var(--rule); }
.page-head h1 { font-size: clamp(28px, 3.6vw, 44px); font-weight: 800; line-height: 1.3; letter-spacing: -0.3px; max-width: 26ch; }
.page-head .lede { margin-top: 12px; font-family: var(--font-body); font-size: 19px; color: var(--ink-2); max-width: 62ch; }
.page-head .meta { margin-top: 12px; display: block; }
.breadcrumbs { font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.breadcrumbs a { color: var(--green); font-weight: 700; }
.entry { max-width: 760px; margin-inline: auto; padding-block: 32px 64px; font-family: var(--font-body); font-size: 19px; line-height: 1.95; color: var(--ink); }
.entry > * + * { margin-top: 1em; }
.entry h2 { font-family: var(--font-head); font-size: 24px; font-weight: 800; margin-top: 1.8em; padding-top: 12px; border-top: 2px solid var(--ink); }
.entry h3 { font-family: var(--font-head); font-size: 20px; margin-top: 1.5em; }
.entry a { color: var(--green); text-decoration: underline; text-underline-offset: 3px; }
.entry strong { font-weight: 700; }
.entry blockquote { margin: 1.5em 0; padding-inline-start: 20px; border-inline-start: 3px solid var(--gold); font-size: 20px; color: var(--ink-2); }
.entry ul, .entry ol { padding-inline-start: 1.3em; }
.entry table { width: 100%; border-collapse: collapse; font-family: var(--font-head); font-size: 15px; line-height: 1.6; }
.entry th, .entry td { padding: 10px 8px; border-bottom: 1px solid var(--rule); text-align: start; vertical-align: top; }
.entry th { border-bottom: 1px solid var(--ink); font-size: 13px; color: var(--muted); }
.entry .wp-block-table { margin-block: 1.5em; overflow-x: auto; }
.entry .wp-block-embed { margin-block: 1.6em; }
.entry .wp-block-embed iframe { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; border: 0; }
.entry__media { max-width: 1040px; margin: 32px auto 0; }
.entry__media img { width: 100%; height: auto; }
.tender-meta { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-block: 1px solid var(--rule); font-family: var(--font-head); }
.tender-meta div { padding: 14px 16px; border-inline-start: 1px solid var(--rule); }
.tender-meta div:first-child { border-inline-start: 0; padding-inline-start: 0; }
.tender-meta span { display: block; font-size: 12px; color: var(--muted); }
.tender-meta b { font-size: 17px; }
.child-pages { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); column-gap: 24px; border-top: 1px solid var(--ink); margin-top: 32px; font-family: var(--font-head); }
.child-pages a { padding: 14px 0; border-bottom: 1px solid var(--rule); font-size: 17px; font-weight: 700; }
.child-pages a::after { content: " ←"; color: var(--green); }
.archive-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); padding-block: 32px; }
.archive-list .story:nth-child(3n + 1) { padding-inline-start: 0; border-inline-start: 0; }
.archive-list .story:nth-child(3n) { padding-inline-end: 0; }
.archive-list .story:nth-child(n + 4) { margin-top: 28px; padding-top: 28px; border-top: 1px solid var(--rule); }
.pagination { display: flex; gap: 6px; justify-content: center; padding-block: 8px 48px; }
.pagination .page-numbers { min-width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--rule); }
.pagination .current { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ===== Responsive ===== */
@media (max-width: 1100px) {
	.figures { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.figure:nth-child(4) { border-inline-start: 0; padding-inline-start: 0; }
	.figure:nth-child(n + 4) { border-top: 1px solid var(--rule); }
	.institutions { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 24px; }
	.institution:nth-child(4) { border-inline-start: 0; padding-inline-start: 0; }
	.motto { display: none; }
}
@media (max-width: 900px) {
	.masthead__top { grid-template-columns: auto 1fr; padding-block: 12px; }
	.masthead__start { display: none; }
	.brand img { width: 44px; height: 44px; }
	.brand__ar { font-size: 19px; }
	.brand__en { display: none; }
	.menu-toggle { display: inline-flex; }
	.masthead__nav { display: none; }
	.masthead__nav.is-open { display: block; }
	.site-nav ul { flex-direction: column; }
	.site-nav a { padding: 14px 0; border-bottom: 1px solid var(--rule); }
	.site-nav a::after { display: none; }
	.lead { grid-template-columns: 1fr; }
	.lead__main { padding-inline-end: 0; border-inline-end: 0; padding-bottom: 20px; border-bottom: 1px solid var(--rule); }
	.lead__side { padding-inline-start: 0; padding-top: 16px; }
	.onair__inner { grid-template-columns: 1fr; }
	.onair__label { padding-block: 12px 4px; }
	.onair__item { border-inline-start: 0; border-top: 1px solid var(--rule); padding-inline: 0; }
	.stories, .archive-list { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 24px; }
	.stories .story, .archive-list .story { padding: 0 0 24px !important; border: 0 !important; margin-top: 0 !important; }
	.feeds { grid-template-columns: 1fr; }
	.feed { padding-inline: 0; border-inline-start: 0; margin-bottom: 24px; }
	.heritage__inner { grid-template-columns: 1fr; gap: 24px; }
	.split { grid-template-columns: 1fr; }
	.site-footer__cols { grid-template-columns: 1fr 1fr; }
	.topbar__date { display: none; }
}
@media (max-width: 560px) {
	.container { padding-inline: 16px; }
	.live-btn { display: none; }
	.brand__ar { font-size: 16px; }
	.brand img { width: 38px; height: 38px; }
	.stories, .archive-list { grid-template-columns: 1fr; }
	.institutions { grid-template-columns: 1fr 1fr; }
	.institution { border-inline-start: 0 !important; padding-inline: 0 12px !important; }
	.figures { grid-template-columns: 1fr 1fr; }
	.figure { border-inline-start: 0 !important; padding-inline-start: 0 !important; border-top: 1px solid var(--rule); }
	.figure__n { font-size: 36px; }
	.timeline { grid-template-columns: 1fr 1fr; row-gap: 20px; padding-top: 0; }
	.timeline::before, .timeline li::before { display: none; }
	.timeline li { border-top: 2px solid var(--green); padding-top: 8px; }
	.tender-meta { grid-template-columns: 1fr; }
	.tender-meta div { border-inline-start: 0; padding-inline: 0; border-top: 1px solid var(--rule); }
	.site-footer__cols { grid-template-columns: 1fr; }
	.entry { font-size: 18px; }
	.lead__title { font-size: 26px; }
}
