/* ARB News Homepage 1.1
   Colours come from CSS variables the plugin sets inline, so both the Design
   settings and the theme palette work without touching this file.
   No JavaScript is used anywhere. */

.arbh {
	--arbh-accent: #2b6cb0;
	--arbh-border: #e6ebf1;
	--arbh-muted: #5a6472;
	--arbh-radius: 6px;
	--arbh-card-title: 15px;
	--arbh-lead-title: 24px;
	--arbh-head-title: 30px;
	--arbh-cols: 3;
	--arbh-cols-mobile: 2;
	--arbh-speed: 75s;
	--arbh-sec: var(--arbh-accent);
}

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

.arbh a { text-decoration: none; color: inherit; }
.arbh a:hover { color: var(--arbh-sec); }
.arbh a:focus-visible {
	outline: 2px solid var(--arbh-sec);
	outline-offset: 2px;
}

.arbh ul,
.arbh ol { list-style: none; margin: 0; padding: 0; }
.arbh img { display: block; width: 100%; height: auto; }

.arbh .arbh-thumb {
	aspect-ratio: 16 / 9;
	object-fit: cover;
	border-radius: var(--arbh-radius);
	background: var(--arbh-border);
}
.arbh .arbh-thumb-empty {
	display: block;
	width: 100%;
	aspect-ratio: 16 / 9;
	background: var(--arbh-border);
	border-radius: var(--arbh-radius);
}
.arbh .arbh-date {
	display: block;
	font-size: 12px;
	color: var(--arbh-muted);
}

/* ---------- Headline ---------- */

.arbh-masthead { margin-bottom: 22px; }
.arbh-h1 {
	font-size: var(--arbh-head-title);
	line-height: 1.22;
	margin: 0 0 6px;
}
.arbh-sub {
	margin: 0;
	font-size: 15px;
	line-height: 1.5;
	color: var(--arbh-muted);
	max-width: 62ch;
}

/* ---------- Ticker ---------- */

.arbh-ticker {
	display: flex;
	align-items: center;
	gap: 14px;
	border: 1px solid var(--arbh-border);
	border-left: 4px solid var(--arbh-accent);
	border-radius: 0 var(--arbh-radius) var(--arbh-radius) 0;
	padding: 10px 14px;
	margin-bottom: 26px;
	overflow: hidden;
}
.arbh-ticker-label {
	flex: 0 0 auto;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: .08em;
	color: var(--arbh-accent);
	white-space: nowrap;
}
.arbh-ticker-viewport {
	flex: 1 1 auto;
	min-width: 0;
	overflow: hidden;
}
.arbh-ticker-track {
	display: flex;
	gap: 1.75rem;
	width: max-content;
}
.arbh-ticker-item { flex: 0 0 auto; }
.arbh-ticker-item a {
	font-size: 16px;
	font-weight: 600;
	white-space: nowrap;
}
.arbh-ticker-item + .arbh-ticker-item { position: relative; }
.arbh-ticker-item + .arbh-ticker-item::before {
	content: "";
	position: absolute;
	left: -.9rem;
	top: 50%;
	width: 3px;
	height: 3px;
	border-radius: 50%;
	background: var(--arbh-muted);
	opacity: .45;
	transform: translateY(-50%);
}

.arbh-ticker.is-scrolling .arbh-ticker-track {
	animation: arbh-scroll var(--arbh-speed) linear infinite;
	will-change: transform;
}
.arbh-ticker.is-scrolling:hover .arbh-ticker-track,
.arbh-ticker.is-scrolling:focus-within .arbh-ticker-track {
	animation-play-state: paused;
}
@keyframes arbh-scroll {
	from { transform: translateX(0); }
	to   { transform: translateX(-50%); }
}

.arbh-ticker:not(.is-scrolling) .arbh-ticker-viewport {
	overflow-x: auto;
	scrollbar-width: none;
}
.arbh-ticker:not(.is-scrolling) .arbh-ticker-viewport::-webkit-scrollbar { display: none; }

/* ---------- Quick links ---------- */

.arbh-links { margin-bottom: 30px; }
.arbh-links ul {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}
.arbh-links a {
	display: inline-block;
	font-size: 13px;
	font-weight: 500;
	line-height: 1.2;
	padding: 8px 14px;
	border: 1px solid var(--arbh-border);
	border-radius: 999px;
	transition: border-color .15s ease, color .15s ease, background-color .15s ease;
}
.arbh-links a:hover {
	border-color: var(--arbh-sec);
	color: var(--arbh-sec);
}

/* ---------- Hero ---------- */

.arbh-hero {
	display: grid;
	grid-template-columns: minmax(0, 1.9fr) minmax(0, 1fr);
	gap: 28px;
	align-items: start;
	margin-bottom: 40px;
}
.arbh-lead-media { display: block; margin-bottom: 12px; }
.arbh-lead .arbh-thumb { aspect-ratio: 16 / 9; }
.arbh-eyebrow {
	display: inline-block;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .07em;
	text-transform: uppercase;
	color: var(--arbh-accent);
	margin-bottom: 6px;
}
.arbh-lead-title {
	font-size: var(--arbh-lead-title);
	line-height: 1.28;
	margin: 0 0 6px;
}

.arbh-side-item {
	padding-bottom: 14px;
	margin-bottom: 14px;
	border-bottom: 1px solid var(--arbh-border);
}
.arbh-side-item:last-child {
	padding-bottom: 0;
	margin-bottom: 0;
	border-bottom: 0;
}
.arbh-side-link {
	display: grid;
	grid-template-columns: 82px minmax(0, 1fr);
	gap: 12px;
	align-items: start;
}
.arbh-side-media .arbh-thumb { aspect-ratio: 4 / 3; }
.arbh-side-title {
	font-size: 13.5px;
	line-height: 1.35;
	font-weight: 600;
}

/* ---------- Sections ---------- */

.arbh-section { margin-bottom: 38px; }

/* Sections below the fold render only when scrolled near. */
.arbh-section + .arbh-section { content-visibility: auto; contain-intrinsic-size: auto 420px; }

.arbh-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 16px;
	padding-bottom: 8px;
	margin-bottom: 20px;
	border-bottom: 2px solid var(--arbh-border);
}
.arbh-head-title {
	position: relative;
	padding-left: 12px;
	margin: 0;
	font-size: 19px;
	line-height: 1.25;
}
.arbh-head-title::before {
	content: "";
	position: absolute;
	left: 0;
	top: .12em;
	bottom: .12em;
	width: 4px;
	border-radius: 2px;
	background: var(--arbh-sec);
}
.arbh-viewall {
	flex: 0 0 auto;
	font-size: 13px;
	font-weight: 500;
	color: var(--arbh-muted);
	white-space: nowrap;
}
.arbh-viewall:hover { color: var(--arbh-sec); }

/* ---------- Grid ---------- */

.arbh-grid {
	display: grid;
	grid-template-columns: repeat(var(--arbh-cols), minmax(0, 1fr));
	gap: 26px 22px;
}
.arbh-card-media {
	display: block;
	margin-bottom: 9px;
	overflow: hidden;
	border-radius: var(--arbh-radius);
}
.arbh-card-media .arbh-thumb {
	transition: transform .3s ease;
	border-radius: 0;
}
.arbh-card:hover .arbh-card-media .arbh-thumb { transform: scale(1.04); }
.arbh-card-title {
	font-size: var(--arbh-card-title);
	line-height: 1.35;
	font-weight: 600;
	margin: 0 0 5px;
}

/* ---------- Most read ---------- */

.arbh-read-list {
	columns: 2;
	column-gap: 34px;
	counter-reset: arbh;
}
.arbh-read-list li {
	counter-increment: arbh;
	break-inside: avoid;
	position: relative;
	padding: 10px 0 10px 36px;
	border-bottom: 1px solid var(--arbh-border);
	font-size: 15px;
	line-height: 1.4;
}
.arbh-read-list li::before {
	content: counter(arbh);
	position: absolute;
	left: 0;
	top: 9px;
	width: 25px;
	text-align: center;
	font-size: 17px;
	font-weight: 700;
	color: var(--arbh-sec);
	opacity: .55;
}

/* =========================================================
   Presets
   ========================================================= */

/* Clean — single accent, no fills. */
.arbh-preset-clean { --arbh-sec: var(--arbh-accent); }
.arbh-preset-clean .arbh-section { --arbh-sec: var(--arbh-accent) !important; }
.arbh-preset-clean .arbh-links a { --arbh-sec: var(--arbh-accent) !important; }
.arbh-preset-clean .arbh-head-title::before { width: 3px; }

/* Bold — filled heading bar. */
.arbh-preset-bold .arbh-head {
	border-bottom: 0;
	padding: 0;
	margin-bottom: 20px;
	align-items: center;
}
.arbh-preset-bold .arbh-head-title {
	padding: 9px 14px;
	color: #fff;
	background: var(--arbh-sec);
	border-radius: var(--arbh-radius);
	font-size: 17px;
}
.arbh-preset-bold .arbh-head-title::before { display: none; }
.arbh-preset-bold .arbh-eyebrow {
	padding: 3px 8px;
	color: #fff;
	background: var(--arbh-accent);
	border-radius: 3px;
}
.arbh-preset-bold .arbh-ticker { border-radius: var(--arbh-radius); }

/* Colourful — per-section colour on bar, label and hover. */
.arbh-preset-colorful .arbh-head {
	border-bottom-color: color-mix(in srgb, var(--arbh-sec) 22%, transparent);
}
.arbh-preset-colorful .arbh-head-title { color: var(--arbh-sec); }
.arbh-preset-colorful .arbh-eyebrow {
	padding: 3px 8px;
	border-radius: 3px;
	color: var(--arbh-accent);
	background: color-mix(in srgb, var(--arbh-accent) 12%, transparent);
}
.arbh-preset-colorful .arbh-links a:hover {
	background: color-mix(in srgb, var(--arbh-sec) 8%, transparent);
}
.arbh-preset-colorful .arbh-read {
	padding: 20px 22px;
	border-radius: var(--arbh-radius);
	background: color-mix(in srgb, var(--arbh-border) 45%, transparent);
}
.arbh-preset-colorful .arbh-read .arbh-head { margin-bottom: 14px; }

/* Fallback for browsers without color-mix(). */
@supports not (color: color-mix(in srgb, red 50%, transparent)) {
	.arbh-preset-colorful .arbh-head { border-bottom-color: var(--arbh-border); }
	.arbh-preset-colorful .arbh-eyebrow { background: transparent; padding: 0; }
	.arbh-preset-colorful .arbh-read { background: transparent; padding: 0; }
}

/* =========================================================
   Responsive
   ========================================================= */

@media (max-width: 1024px) {
	.arbh { --arbh-cols: 3; }
	.arbh-hero {
		grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
		gap: 22px;
	}
	.arbh-h1 { font-size: calc(var(--arbh-head-title) - 4px); }
}

@media (max-width: 860px) {
	.arbh { --arbh-cols: 2; }
	.arbh-hero {
		grid-template-columns: minmax(0, 1fr);
		gap: 26px;
	}
	.arbh-side {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 0 20px;
	}
	.arbh-side-item:nth-last-child(2) {
		padding-bottom: 0;
		margin-bottom: 0;
		border-bottom: 0;
	}
}

@media (max-width: 600px) {
	.arbh { --arbh-cols: var(--arbh-cols-mobile); }
	.arbh-h1 { font-size: calc(var(--arbh-head-title) - 8px); }
	.arbh-sub { font-size: 14px; }
	.arbh-lead-title { font-size: calc(var(--arbh-lead-title) - 5px); }
	.arbh-card-title { font-size: calc(var(--arbh-card-title) - 1px); }
	.arbh-head-title { font-size: 17px; }
	.arbh-ticker-item a { font-size: 15px; }
	.arbh-read-list { columns: 1; }
	.arbh-side {
		grid-template-columns: minmax(0, 1fr);
		gap: 0;
	}
	.arbh-side-item:nth-last-child(2) {
		padding-bottom: 14px;
		margin-bottom: 14px;
		border-bottom: 1px solid var(--arbh-border);
	}
	.arbh-side-link { grid-template-columns: 92px minmax(0, 1fr); }
	.arbh-section { margin-bottom: 30px; }
	.arbh-preset-colorful .arbh-read { padding: 16px; }
}

@media (max-width: 400px) {
	.arbh-grid { gap: 20px 14px; }
	.arbh-ticker { gap: 10px; padding: 9px 11px; }
}

@media (prefers-reduced-motion: reduce) {
	.arbh-ticker.is-scrolling .arbh-ticker-track { animation: none; }
	.arbh-ticker.is-scrolling .arbh-ticker-viewport {
		overflow-x: auto;
		scrollbar-width: none;
	}
	.arbh-card-media .arbh-thumb,
	.arbh-card:hover .arbh-card-media .arbh-thumb {
		transition: none;
		transform: none;
	}
	.arbh-links a { transition: none; }
}

@media print {
	.arbh-ticker,
	.arbh-links { display: none; }
}

/* =========================================================
   1.2 — list layout, text-only layout, ad slots
   ========================================================= */

/* List: thumbnail beside the title, stacked rows. */
.arbh-rows { display: grid; gap: 0; }
.arbh-row {
	display: grid;
	grid-template-columns: 190px minmax(0, 1fr);
	gap: 18px;
	align-items: start;
	padding: 16px 0;
	border-bottom: 1px solid var(--arbh-border);
}
.arbh-rows .arbh-row:first-child { padding-top: 0; }
.arbh-rows .arbh-row:last-child { border-bottom: 0; padding-bottom: 0; }
.arbh-row-media {
	display: block;
	overflow: hidden;
	border-radius: var(--arbh-radius);
}
.arbh-row-media .arbh-thumb {
	border-radius: 0;
	transition: transform .3s ease;
}
.arbh-row:hover .arbh-row-media .arbh-thumb { transform: scale(1.04); }
.arbh-row-body .arbh-card-title { margin: 0 0 5px; }

/* Text only: no images at all, one line per post. */
.arbh-compact li {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 16px;
	padding: 11px 0 11px 16px;
	position: relative;
	border-bottom: 1px solid var(--arbh-border);
	font-size: 15px;
	line-height: 1.4;
}
.arbh-compact li:last-child { border-bottom: 0; }
.arbh-compact li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 1.15em;
	width: 5px;
	height: 5px;
	border-radius: 50%;
	background: var(--arbh-sec);
	opacity: .6;
}
.arbh-compact .arbh-date { flex: 0 0 auto; white-space: nowrap; }

/* Ad slot. */
.arbh-ad {
	margin: 0 0 34px;
	text-align: center;
	min-height: 1px;
	overflow: hidden;
}
.arbh-ad :is(ins, iframe, img) { max-width: 100%; }

@media (max-width: 600px) {
	.arbh-row {
		grid-template-columns: 118px minmax(0, 1fr);
		gap: 13px;
		padding: 13px 0;
	}
	.arbh-compact li {
		flex-direction: column;
		gap: 3px;
		padding-top: 10px;
		padding-bottom: 10px;
	}
	.arbh-compact li::before { top: 1.05em; }
	.arbh-ad { margin-bottom: 26px; }
}

@media (prefers-reduced-motion: reduce) {
	.arbh-row-media .arbh-thumb,
	.arbh-row:hover .arbh-row-media .arbh-thumb { transition: none; transform: none; }
}
