/* RM News 1.0.0 — modern minimal news theme */

:root {
	--accent: #2b7cd3;
	--ink: #14161a;
	--muted: #606770;
	--line: #e9ebee;
	--soft: #f5f6f8;
	--radius: 10px;
	--font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	font-family: var(--font);
	color: var(--ink);
	background: #fff;
	line-height: 1.6;
	font-size: 16px;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .5em; letter-spacing: -.01em; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.narrow-center { max-width: 640px; margin: 60px auto; text-align: center; }

/* ---------- Ticker ---------- */
.ticker { background: #14161a; color: #fff; font-size: 14px; }
.ticker-inner { display: flex; align-items: center; gap: 16px; height: 40px; }
.ticker-label {
	background: var(--accent); color: #fff; font-size: 12px; font-weight: 700;
	letter-spacing: 1px; text-transform: uppercase; padding: 4px 10px; border-radius: 4px;
	flex-shrink: 0;
}
.ticker-viewport { overflow: hidden; flex: 1; white-space: nowrap; }
.ticker-track { display: inline-flex; gap: 48px; animation: ticker 40s linear infinite; }
.ticker-viewport:hover .ticker-track { animation-play-state: paused; }
.ticker-track a { color: #fff; }
@keyframes ticker { to { transform: translateX(-50%); } }

/* ---------- Header ---------- */
.site-header {
	position: sticky; top: 0; z-index: 50; background: #fff;
	border-bottom: 1px solid var(--line);
}
.site-header.static { position: static; }
.header-inner { display: flex; align-items: center; gap: 22px; height: 70px; }
.brand { flex-shrink: 0; }
.brand img.custom-logo { height: 46px; width: auto; max-width: 230px; }
.site-title { font-size: 22px; font-weight: 800; color: var(--ink); letter-spacing: -.02em; }
.site-title:hover { text-decoration: none; }

/* Header nav: logo, links and search share one row. Links scroll
 * horizontally instead of wrapping when space runs out. */
.head-nav, .primary-nav { flex: 1; min-width: 0; display: flex; }
.head-nav, .primary-nav ul.head-menu {
	gap: 2px; overflow-x: auto; scrollbar-width: none; -ms-overflow-style: none;
}
.head-nav::-webkit-scrollbar, .primary-nav ul.head-menu::-webkit-scrollbar { display: none; }
.primary-nav ul.head-menu { display: flex; list-style: none; margin: 0; padding: 0; }
.head-link, .head-menu a {
	flex-shrink: 0; font-size: 13.5px; font-weight: 700; letter-spacing: .5px;
	text-transform: uppercase; color: var(--muted); padding: 10px 11px;
	border-radius: 7px; white-space: nowrap;
}
.head-link:hover, .head-menu a:hover { color: var(--ink); background: var(--soft); text-decoration: none; }
.head-link.current { color: var(--accent); }
.header-actions { display: flex; gap: 8px; flex-shrink: 0; }
.icon-btn {
	background: none; border: 1px solid var(--line); border-radius: 8px; cursor: pointer;
	width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center;
	color: var(--ink);
}
.icon-btn:hover { background: var(--soft); }
.menu-toggle { display: none; }

.search-overlay {
	position: absolute; top: 100%; left: 0; right: 0; background: #fff;
	border-bottom: 1px solid var(--line); padding: 20px 0; box-shadow: 0 12px 24px rgba(0,0,0,.08);
}
.search-overlay .search-form { display: flex; gap: 10px; }
.search-overlay input[type="search"] {
	flex: 1; font-size: 18px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 8px;
}
.btn, .search-overlay input[type="submit"] {
	background: var(--accent); color: #fff; border: 0; border-radius: 8px; padding: 12px 22px;
	font-weight: 700; cursor: pointer; display: inline-block;
}
.btn:hover { text-decoration: none; filter: brightness(.95); }

/* ---------- Hero ---------- */
.hero { display: grid; grid-template-columns: 1.6fr 1fr; gap: 24px; padding: 28px 0 8px; }
.hero-lead { position: relative; border-radius: var(--radius); overflow: hidden; min-height: 380px; display: flex; }
.hero-lead .hero-media { position: absolute; inset: 0; }
.hero-lead .hero-media img, .hero-lead .thumb-fallback { width: 100%; height: 100%; object-fit: cover; }
.hero-lead .hero-body {
	position: relative; margin-top: auto; padding: 28px; color: #fff;
	background: linear-gradient(transparent, rgba(0,0,0,.82)); width: 100%;
}
.hero-lead h2 { font-size: 30px; margin: .3em 0; }
.hero-lead h2 a, .hero-lead .kicker { color: #fff; }
.hero-lead h2 a:hover { text-decoration: underline; }
.hero-lead p { color: rgba(255,255,255,.85); margin: 0 0 10px; }
.hero-lead .entry-meta { color: rgba(255,255,255,.7); }
.hero-side { display: flex; flex-direction: column; gap: 16px; }
.hero-small { display: flex; gap: 14px; align-items: center; }
.hero-small .thumb { flex: 0 0 132px; border-radius: 8px; overflow: hidden; }
.hero-small img { aspect-ratio: 16/10; object-fit: cover; width: 100%; }
.hero-small h3 { font-size: 16px; margin: .25em 0 0; }
.hero-small h3 a { color: var(--ink); }

/* ---------- Sections & cards ---------- */
.section { padding: 26px 0; }
.section-head {
	display: flex; align-items: baseline; justify-content: space-between;
	border-bottom: 2px solid var(--ink); margin-bottom: 20px; padding-bottom: 8px;
}
.section-head h2 { font-size: 22px; margin: 0; }
.see-all { font-size: 14px; font-weight: 600; white-space: nowrap; }

.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.card-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.card-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.card {
	border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
	background: #fff; display: flex; flex-direction: column;
}
.card-media { display: block; aspect-ratio: 16/9; overflow: hidden; background: var(--soft); }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.card:hover .card-media img { transform: scale(1.03); }
.thumb-fallback {
	display: flex; align-items: center; justify-content: center; width: 100%; height: 100%;
	background: var(--soft); color: var(--muted); font-weight: 800; font-size: 28px;
}
.card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.kicker {
	font-size: 12px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase;
	color: var(--accent);
}
.kicker:hover { text-decoration: none; }
.card-title { font-size: 17px; margin: 0; }
.card-title a { color: var(--ink); }
.card-excerpt { color: var(--muted); font-size: 14px; margin: 0; }
.entry-meta { font-size: 13px; color: var(--muted); display: flex; gap: 10px; align-items: center; margin-top: auto; }
.meta-cat { color: var(--accent); font-weight: 600; }

/* ---------- Layout: content + sidebar ---------- */
.layout { display: grid; grid-template-columns: 1fr 320px; gap: 40px; padding: 32px 0; }
.sidebar { display: flex; flex-direction: column; gap: 24px; }
.sidebar-sticky { position: sticky; top: 96px; }
.widget { border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.widget-title { font-size: 16px; border-bottom: 2px solid var(--ink); padding-bottom: 8px; margin-bottom: 14px; }
.trending { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; counter-reset: trend; }
.trending li { display: flex; gap: 12px; align-items: flex-start; }
.trend-num {
	font-size: 26px; font-weight: 800; color: var(--line); line-height: 1; min-width: 32px;
}
.trending a { color: var(--ink); font-weight: 600; font-size: 15px; }

/* ---------- Single article ---------- */
.single-article .entry-title { font-size: 36px; margin: .3em 0 .4em; }
.single-article .featured { margin: 20px 0; }
.single-article .featured img { border-radius: var(--radius); }
.entry-content { font-size: 17.5px; line-height: 1.75; }
.entry-content p { margin: 0 0 1.4em; }
.entry-content h2, .entry-content h3 { margin: 1.6em 0 .6em; }
.entry-content img { border-radius: 8px; }
.embed-wrap { position: relative; padding-bottom: 56.25%; height: 0; margin: 1.4em 0; }
.embed-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.tag-list { margin-top: 24px; }
.tag-list a {
	display: inline-block; background: var(--soft); color: var(--muted); font-size: 13px;
	padding: 5px 12px; border-radius: 20px; margin: 0 6px 6px 0;
}
.related { padding-bottom: 0; }

/* ---------- Archive ---------- */
.archive-head { padding: 32px 0 8px; border-bottom: 2px solid var(--ink); margin-bottom: 24px; }
.archive-head h1 { font-size: 32px; margin: 0; }
.archive-head p { color: var(--muted); }
.pagination { margin: 32px 0; text-align: center; }
.pagination .page-numbers {
	display: inline-block; padding: 8px 14px; border: 1px solid var(--line); border-radius: 6px;
	margin: 0 3px; color: var(--ink);
}
.pagination .current { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ---------- Footer ---------- */
.site-footer { background: #14161a; color: #c9cdd3; margin-top: 48px; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1.2fr; gap: 36px; padding: 52px 20px 40px; }
.site-footer .site-title { color: #fff; }
.site-footer img.custom-logo { height: 44px; width: auto; max-width: 220px; }
.site-footer .tagline { color: #8a9099; font-size: 14px; margin: 10px 0 0; }
.footer-about { color: #8a9099; font-size: 14px; max-width: 280px; }
.footer-col h3 {
	color: #fff; font-size: 13px; text-transform: uppercase; letter-spacing: 1.2px;
	margin: 0 0 16px; padding-bottom: 10px; border-bottom: 2px solid #2b2f36;
}
.footer-links { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-links a { color: #c9cdd3; font-size: 14px; transition: padding .15s, color .15s; }
.footer-links a:hover { color: #fff; padding-left: 5px; text-decoration: none; }
.footer-recent span { display: block; font-size: 12px; color: #6b7280; margin-top: 2px; }
.footer-bottom { border-top: 1px solid #26292f; }
.footer-bottom-inner {
	display: flex; justify-content: space-between; align-items: center; gap: 12px;
	padding-top: 18px; padding-bottom: 18px; font-size: 13px; color: #8a9099;
}
.to-top { color: #c9cdd3; font-size: 13px; font-weight: 600; white-space: nowrap; }
.to-top:hover { color: #fff; text-decoration: none; }

/* ---------- Ads ---------- */
.rm-ad { margin: 24px auto; text-align: center; max-width: 100%; }
.rm-ad-label {
	display: block; font-size: 10px; letter-spacing: 1.5px; text-transform: uppercase;
	color: #a0a5ad; margin-bottom: 6px;
}
.rm-ad-body { display: flex; justify-content: center; }
.rm-ad-body ins, .rm-ad-body iframe { max-width: 100%; }
.ad-card { justify-content: center; align-items: center; text-align: center; background: var(--soft); padding: 20px; }
.ad-card .rm-ad { margin: 8px 0 0; }
/* Mobile sticky bottom bar */
.rm-ad-mobile_sticky {
	display: none; position: fixed; bottom: 0; left: 0; right: 0; z-index: 90;
	background: #fff; border-top: 1px solid var(--line); margin: 0; padding: 8px 40px 10px;
	box-shadow: 0 -6px 20px rgba(0,0,0,.1);
}
.rm-ad-mobile_sticky .rm-ad-close {
	position: absolute; top: 2px; right: 8px; background: none; border: 0; font-size: 20px;
	color: var(--muted); cursor: pointer; line-height: 1; padding: 4px 8px;
}
@media (max-width: 768px) {
	.rm-ad-mobile_sticky { display: block; }
	body.ad-closed .rm-ad-mobile_sticky { display: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
	.hero { grid-template-columns: 1fr; }
	.card-grid, .card-grid.cols-4, .card-grid.cols-3 { grid-template-columns: repeat(2, 1fr); }
	.layout { grid-template-columns: 1fr; }
	.sidebar-sticky { position: static; }
	.footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
	.head-nav, .primary-nav { display: none; }
	body.nav-open .head-nav, body.nav-open .primary-nav {
		display: block; position: absolute; top: 100%; left: 0; right: 0; z-index: 60;
		background: #fff; border-bottom: 1px solid var(--line); padding: 8px 20px 16px;
		box-shadow: 0 18px 30px rgba(0,0,0,.08);
	}
	body.nav-open .head-nav a, body.nav-open .head-menu a {
		display: block; padding: 13px 4px; border-bottom: 1px solid var(--line); border-radius: 0;
	}
	body.nav-open .head-nav a:last-child, body.nav-open .head-menu li:last-child a { border-bottom: 0; }
	.menu-toggle { display: inline-flex; }
	.header-inner { gap: 12px; }
	.brand { margin-right: auto; }
}
@media (max-width: 560px) {
	.card-grid, .card-grid.cols-4, .card-grid.cols-3 { grid-template-columns: 1fr; }
	.hero-lead h2 { font-size: 24px; }
	.single-article .entry-title { font-size: 28px; }
	.footer-grid { grid-template-columns: 1fr; }
	.ticker-label { display: none; }
}
