/*
 * AM Business — main stylesheet (Phase 1 foundation).
 * Mobile-first. Red brand kept from the current site, cleaner "business" feel.
 * Page-specific styles (homepage sections, article, archive, author) are added
 * in later phases and will live in this file in clearly-labelled blocks.
 */

/* ============================================================= *
 * 1. Design tokens
 * ============================================================= */
:root {
	/* Brand */
	--amb-red: #c90301;
	--amb-red-600: #e90606;
	--amb-red-700: #a50200;
	--amb-ink: #14161a;        /* near-black body text */
	--amb-ink-2: #3a3f47;      /* secondary text */
	--amb-muted: #6b7280;      /* meta text */
	--amb-line: #e4e7ec;       /* hairlines/borders */
	--amb-bg: #ffffff;
	--amb-bg-2: #eef1f6;       /* alternating section bg — a soft cool grey */
	--amb-bg-3: #e5e9f0;       /* deeper tint for panels/thumbnails */
	--amb-tint: #f6f8fb;       /* very light page wash behind white cards */
	--amb-card: #ffffff;
	--amb-navy: #01043d;       /* from the logo — used sparingly for depth */

	/* Type */
	--amb-serif: "Playfair Display", Georgia, "Times New Roman", serif;
	--amb-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

	/* Layout */
	--amb-max: 1400px;
	--amb-gap: 24px;
	--amb-radius: 8px;
	--amb-shadow: 0 1px 3px rgba(16, 22, 30, .08), 0 1px 2px rgba(16, 22, 30, .04);

	--amb-header-h: 60px;
	--amb-topbar-h: 40px;
}

/* Smooth the light↔dark switch so it eases instead of snapping. Scoped to the
 * surfaces that actually change colour (not "*", which would make every hover
 * sluggish). Disabled under prefers-reduced-motion at the foot of this file. */
body, .amb-topbar, .amb-card, .amb-footer, .amb-ad__tag, .amb-cat-badge,
.amb-searchform__input, .amb-page-title, .amb-card__title, .amb-prose,
.pagination .page-numbers {
	transition: background-color .35s ease, color .35s ease, border-color .35s ease;
}

/* Dark mode — toggled by adding data-theme="dark" on <html> (see main.js). */
:root[data-theme="dark"] {
	--amb-ink: #e9ebee;
	--amb-ink-2: #c3c7cd;
	--amb-muted: #9aa1ab;
	--amb-line: #2a2e35;
	--amb-bg: #0f1114;
	--amb-bg-2: #15181c;
	--amb-bg-3: #1b1f24;
	--amb-card: #15181c;
	--amb-tint: #101316;
	--amb-shadow: 0 1px 3px rgba(0, 0, 0, .5);
}

/* ============================================================= *
 * 2. Reset / base
 * ============================================================= */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
	margin: 0;
	font-family: var(--amb-sans);
	font-size: 16px;
	line-height: 1.6;
	color: var(--amb-ink);
	background: var(--amb-tint); /* soft wash so white cards/panels lift off it */
	-webkit-font-smoothing: antialiased;
}
img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--amb-red); }
h1, h2, h3, h4 { font-family: var(--amb-serif); line-height: 1.2; margin: 0 0 .5em; color: var(--amb-ink); }
button { font-family: inherit; cursor: pointer; }

.amb-container { width: 100%; max-width: var(--amb-max); margin-inline: auto; padding-inline: 16px; }

.screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.amb-skip-link:focus {
	position: fixed; top: 8px; left: 8px; z-index: 1000; width: auto; height: auto;
	clip: auto; background: var(--amb-red); color: #fff; padding: 8px 16px; border-radius: 4px;
}
.amb-dot { color: var(--amb-line); margin: 0 4px; }

/* ============================================================= *
 * 3. Header — top bar + nav
 * ============================================================= */
/* The whole header is the sticky element, offset UP by the topbar's height so
 * that on scroll the thin top utility bar slides out of view and the red nav
 * bar pins flush to the top and stays there. (A sticky child trapped inside a
 * short header only sticks while that header box is on screen — this makes the
 * header itself the sticky box, with the body as its containing block, so the
 * nav stays pinned down the whole page.) */
.amb-header { position: sticky; top: calc(-1 * var(--amb-topbar-h)); z-index: 100; }
.amb-topbar { background: var(--amb-bg-2); border-bottom: 1px solid var(--amb-line); }
.amb-topbar__inner { display: flex; align-items: center; justify-content: space-between; min-height: var(--amb-topbar-h); }
.amb-topbar__cta {
	background: var(--amb-red); color: #fff; font-weight: 700; font-size: 13px; letter-spacing: .04em;
	padding: 7px 18px; border-radius: 4px;
}
.amb-topbar__cta:hover { background: var(--amb-red-700); color: #fff; }

.amb-navbar { background: var(--amb-red); color: #fff; box-shadow: var(--amb-shadow); }
.amb-navbar__inner { display: flex; align-items: center; gap: 12px; min-height: var(--amb-header-h); }
.amb-navbar a { color: #fff; }

.amb-logo { display: flex; align-items: center; margin-right: auto; }
/* Logo shown in its own brand colours. Sits on a white chip so the green/navy
 * mark stays legible against the red nav bar (and the dark footer). */
.amb-logo__img { height: 34px; width: auto; }
.amb-logo { background: #fff; padding: 5px 10px; border-radius: 6px; }

.amb-nav__list { list-style: none; display: flex; gap: 20px; margin: 0; padding: 0; }
.amb-nav__list a { font-weight: 600; font-size: 14px; letter-spacing: .03em; text-transform: uppercase; padding: 6px 0; display: inline-block; }
.amb-nav__list a:hover { color: #ffe3e3; }

.amb-navbar__tools { display: flex; align-items: center; gap: 6px; }
.amb-theme-toggle, .amb-search-toggle, .amb-nav-toggle {
	background: transparent; border: 0; color: #fff; padding: 8px; display: inline-flex; border-radius: 4px;
}
.amb-theme-toggle:hover, .amb-search-toggle:hover, .amb-nav-toggle:hover { background: rgba(255,255,255,.15); }
.amb-icon--sun { display: none; }
:root[data-theme="dark"] .amb-icon--moon { display: none; }
:root[data-theme="dark"] .amb-icon--sun { display: block; }

/* Hamburger (hidden on desktop) */
.amb-nav-toggle { flex-direction: column; gap: 4px; display: none; }
.amb-nav-toggle__bar { width: 22px; height: 2px; background: #fff; border-radius: 2px; transition: .2s; }

/* Search slide-down */
.amb-search-panel { background: var(--amb-red-700); padding: 14px 0; }
.amb-searchform { display: flex; gap: 8px; }
.amb-searchform__input { flex: 1; border: 0; border-radius: 4px; padding: 11px 14px; font-size: 15px; background: #fff; color: var(--amb-ink); }
.amb-searchform__btn { background: var(--amb-navy); color: #fff; border: 0; border-radius: 4px; padding: 0 16px; display: inline-flex; align-items: center; }

/* ============================================================= *
 * 4. Social icons
 * ============================================================= */
.amb-social { list-style: none; display: flex; align-items: center; gap: 10px; margin: 0; padding: 0; }
.amb-social__link { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; transition: .15s; }
.amb-social--top .amb-social__link { color: var(--amb-ink-2); }
.amb-social--top .amb-social__link:hover { color: var(--amb-red); }
.amb-social--footer .amb-social__link, .amb-social--bar .amb-social__link { color: var(--amb-muted); }
.amb-social--footer .amb-social__link:hover, .amb-social--bar .amb-social__link:hover { color: var(--amb-red); }

/* ============================================================= *
 * 5. Layout + cards (generic, used by fallback templates)
 * ============================================================= */
.amb-main { min-height: 50vh; }
.amb-layout { padding-block: 32px; }
.amb-page-title { font-size: clamp(1.6rem, 4vw, 2.4rem); margin-bottom: 24px; }

.amb-cards { display: grid; grid-template-columns: 1fr; gap: var(--amb-gap); }
/* Card fills its grid cell so every card in a row is the same height; the
 * media is a fixed aspect ratio and the title is line-clamped, so cards stay
 * consistent regardless of headline length. */
.amb-card { background: var(--amb-card); border: 1px solid var(--amb-line); border-radius: var(--amb-radius); overflow: hidden; display: flex; flex-direction: column; height: 100%; box-shadow: var(--amb-shadow); transition: box-shadow .18s ease, transform .18s ease; }
.amb-card:hover { box-shadow: 0 6px 18px rgba(16, 22, 30, .1), 0 2px 6px rgba(16, 22, 30, .06); }
.amb-card__media { display: block; aspect-ratio: 3 / 2; background: var(--amb-bg-3); overflow: hidden; }
.amb-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.amb-card:hover .amb-card__media img { transform: scale(1.04); }
.amb-thumb--empty { display: block; width: 100%; height: 100%; background: linear-gradient(135deg, var(--amb-bg-3), var(--amb-bg-2)); }
.amb-card__body { padding: 14px 16px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.amb-card__title { font-size: 1.12rem; margin: 0; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.amb-card__title a:hover { color: var(--amb-red); }
.amb-card__meta { font-size: 12.5px; color: var(--amb-muted); margin-top: auto; }
.amb-byline a { color: var(--amb-ink-2); font-weight: 600; }

.amb-cat-badge {
	align-self: flex-start; background: var(--amb-red); color: #fff; font-size: 11px; font-weight: 700;
	text-transform: uppercase; letter-spacing: .04em; padding: 3px 9px; border-radius: 3px;
}
.amb-cat-badge:hover { background: var(--amb-red-700); color: #fff; }

/* ============================================================= *
 * 5b. Homepage — hero, sections, feature blocks, buttons
 * ============================================================= */

/* Buttons */
.amb-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 600; font-size: 14px; padding: 12px 26px; border-radius: 6px; border: 1px solid transparent; transition: .15s; }
.amb-btn--outline { border-color: var(--amb-line); color: var(--amb-ink); background: var(--amb-bg); }
.amb-btn--outline:hover { border-color: var(--amb-red); color: var(--amb-red); }
.amb-viewcats { text-align: center; padding-block: 8px 40px; }

/* Section wrapper + heading with the red marker */
.amb-section { padding-block: 36px; }
.amb-section--muted { background: var(--amb-bg-2); }
.amb-section__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.amb-section__title { position: relative; font-size: clamp(1.4rem, 3vw, 1.9rem); margin: 0; padding-left: 16px; }
.amb-section__title::before { content: ""; position: absolute; left: 0; top: .12em; bottom: .12em; width: 6px; border-radius: 2px; background: var(--amb-red); }
.amb-section__more { font-size: 13px; font-weight: 600; color: var(--amb-muted); white-space: nowrap; }
.amb-section__more:hover { color: var(--amb-red); }
.amb-section__more span { color: var(--amb-red); }

/* Grids. Desktop: grid-3 = 3 cols, grid-4 = 4 cols. Tablet: grid-3 = 2,
 * grid-4 = 3. Mobile: grid-3 stacks; grid-4 becomes compact horizontal cards
 * (image left + text right), echoing the hero's secondary cards but tighter,
 * since these sit lower down the page. */
.amb-grid { display: grid; gap: var(--amb-gap); grid-template-columns: 1fr; }
@media (min-width: 600px) and (max-width: 991px) {
	.amb-grid--3 { grid-template-columns: repeat(2, 1fr); }
	.amb-grid--4 { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 992px) {
	.amb-grid--3 { grid-template-columns: repeat(3, 1fr); }
	.amb-grid--4 { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 599px) {
	.amb-grid--4 { gap: 12px; }
	.amb-grid--4 .amb-card { flex-direction: row; align-items: stretch; }
	.amb-grid--4 .amb-card__media { flex: 0 0 104px; width: 104px; height: auto; aspect-ratio: 1 / 1; }
	.amb-grid--4 .amb-card__body { flex: 1; justify-content: center; padding: 8px 12px; gap: 4px; }
	.amb-grid--4 .amb-card__title { font-size: .88rem; -webkit-line-clamp: 2; }
	.amb-grid--4 .amb-card__meta { font-size: 11px; }
	.amb-grid--4 .amb-cat-badge { font-size: 9.5px; padding: 2px 6px; }
}

/* Hero */
.amb-hero { padding-block: 24px 8px; }
.amb-hero__grid { display: grid; grid-template-columns: 1fr; gap: var(--amb-gap); }
.amb-hero__main { display: flex; flex-direction: column; gap: var(--amb-gap); }

/* Two-pane lead card: text panel + image, via flexbox (reliable stretch).
 * Mobile = image on top, text below. The image is absolutely positioned and
 * object-fit:cover, so a tall/huge featured image is always cropped to fit and
 * can never balloon the block. */
.amb-lead { display: flex; flex-direction: column; background: #16181d; border-radius: var(--amb-radius); overflow: hidden; }
.amb-lead__media { order: -1; position: relative; aspect-ratio: 16 / 10; overflow: hidden; }
.amb-lead__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.amb-lead__text { display: flex; flex-direction: column; justify-content: center; gap: 12px; padding: 26px; color: #fff; }
.amb-lead__cats .amb-cat-badge { position: static; }
.amb-lead__title { color: #fff; font-size: clamp(1.4rem, 3vw, 2rem); margin: 0; line-height: 1.18; }
.amb-lead:hover .amb-lead__title { color: #ffd9d9; }
.amb-lead__excerpt { margin: 0; color: #c7ccd4; font-size: 14.5px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.amb-lead__meta { font-size: 12.5px; color: #9aa1ab; }

/* Two secondary cards — always 2-up (so they stay compact, incl. on phones)
 * and smaller than standard cards now the hero lead is taller. */
/* Three secondary cards under the hero. Narrower columns, so the image is a
 * touch shorter and the type scaled down to read cleanly at this width. */
.amb-hero__secondary { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 18px; }
.amb-hero__secondary .amb-card__media { aspect-ratio: auto; height: 130px; }
.amb-hero__secondary .amb-card__body { padding: 9px 11px 11px; gap: 5px; }
.amb-hero__secondary .amb-card__title { font-size: .92rem; line-height: 1.26; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.amb-hero__secondary .amb-card__meta { font-size: 11.5px; }
.amb-hero__secondary .amb-cat-badge { font-size: 10px; padding: 2px 7px; }
/* Phones: 3-up is too tight, so drop to a compact 1-column stack with a short,
 * wide image — the cards read clearly as secondary to the hero. */
@media (max-width: 559px) {
	.amb-hero__secondary { grid-template-columns: 1fr; gap: 12px; }
	.amb-hero__secondary .amb-card { flex-direction: row; align-items: stretch; }
	.amb-hero__secondary .amb-card__media { height: auto; width: 128px; flex: 0 0 128px; aspect-ratio: 1 / 1; }
	.amb-hero__secondary .amb-card__body { flex: 1; justify-content: center; }
	.amb-hero__secondary .amb-card__title { font-size: .92rem; }
}

/* Overlay card (used by hero feature-list image + section feature) */
.amb-hero__card { position: relative; display: block; border-radius: var(--amb-radius); overflow: hidden; aspect-ratio: 16 / 10; background: var(--amb-ink); height: 100%; }
.amb-hero__media { position: absolute; inset: 0; }
.amb-hero__media img { width: 100%; height: 100%; object-fit: cover; }
.amb-hero__overlay { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; gap: 8px; padding: 22px; color: #fff; background: linear-gradient(to top, rgba(10,12,16,.92) 8%, rgba(10,12,16,.55) 45%, rgba(10,12,16,0) 75%); }
.amb-hero__title { color: #fff; font-size: clamp(1.3rem, 2.6vw, 1.8rem); margin: 0; font-family: var(--amb-serif); line-height: 1.2; }
.amb-hero__card:hover .amb-hero__title { color: #ffd9d9; }
.amb-hero__meta { font-size: 12.5px; color: #cfd3d9; }
.amb-hero__cats .amb-cat-badge { position: static; }

.amb-hero__side { display: flex; flex-direction: column; }
.amb-hero__side-title { font-family: var(--amb-serif); font-size: 1.1rem; padding-bottom: 10px; margin: 0 0 4px; border-bottom: 2px solid var(--amb-red); }
.amb-hero__list { display: flex; flex-direction: column; flex: 1; }
/* By default the rail shows 6 stories (desktop & mobile); items 7–12 appear
 * only on tablet, where the rail drops below as a 6+6 two-column block. */
.amb-hero__list .amb-row:nth-child(n+7) { display: none; }

@media (min-width: 560px) {
	/* Side-by-side: text panel left, image right. align-items:stretch + a
	 * min-height makes both halves the same height; the image covers its half. */
	.amb-lead { flex-direction: row; align-items: stretch; min-height: 340px; }
	.amb-lead__media { order: 0; flex: 1 1 56%; aspect-ratio: auto; }
	.amb-lead__text { flex: 0 0 44%; }
}

/* Horizontal list rows. The thumbnail is a fixed, perfect square (shrunk, not
 * grown, to stay square) and the title is clamped to 2 lines so every row is a
 * consistent height and the column aligns cleanly. */
.amb-row { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--amb-line); align-items: flex-start; }
.amb-row:last-child { border-bottom: 0; }
.amb-row__media { flex: 0 0 76px; width: 76px; height: 76px; border-radius: 6px; overflow: hidden; background: var(--amb-bg-3); }
.amb-row__media img { width: 100%; height: 100%; object-fit: cover; }
.amb-row__body { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.amb-row__title { font-size: .96rem; margin: 0; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.amb-row__title a:hover { color: var(--amb-red); }
.amb-row__meta { font-size: 12px; color: var(--amb-muted); }

/* Feature block: one big story + a list of 4 (8 on tablet). 'feature' = image
 * right / list left; '--flip' = image left / list right. On desktop both sides
 * are equal height (the image covers to match the list). */
.amb-feature { display: grid; grid-template-columns: 1fr; gap: var(--amb-gap); }
.amb-feature__main { order: -1; } /* mobile: image on top */
.amb-feature__main .amb-hero__card { height: 100%; aspect-ratio: 16 / 10; min-height: 220px; }
.amb-feature__list { display: flex; flex-direction: column; justify-content: space-between; }
/* Desktop & mobile show 4 list rows; tablet reveals all 8. */
.amb-feature__list .amb-row:nth-child(n+5) { display: none; }

@media (min-width: 680px) and (max-width: 991px) {
	.amb-feature__list { display: grid; grid-template-columns: 1fr 1fr; column-gap: 28px; }
	.amb-feature__list .amb-row:nth-child(n+5) { display: flex; }
	.amb-feature__list .amb-row__title { -webkit-line-clamp: 3; }
}

/* Card size variants */
.amb-card--lg .amb-card__title { font-size: 1.45rem; -webkit-line-clamp: 3; }
.amb-card--lg .amb-card__excerpt { color: var(--amb-ink-2); font-size: 15px; margin: 0; }
.amb-card--sm .amb-card__title { font-size: 1rem; -webkit-line-clamp: 2; }
.amb-card--sm .amb-card__media { aspect-ratio: 16 / 10; }
.amb-card__excerpt { margin: 0; color: var(--amb-muted); font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Tablet: the rail has dropped below the main column, so show all 12 Latest
 * News stories as an even 6 + 6 two-column block, with a slightly looser
 * 3-line title clamp since the columns are tighter here. */
@media (min-width: 680px) and (max-width: 991px) {
	.amb-hero__list { display: grid; grid-template-columns: 1fr 1fr; column-gap: 28px; }
	.amb-hero__list .amb-row:nth-child(n+7) { display: flex; }
	.amb-hero__list .amb-row__title { -webkit-line-clamp: 3; }
}

@media (min-width: 992px) {
	.amb-hero__grid { grid-template-columns: minmax(0, 1fr) 340px; align-items: stretch; }
	/* Lead grows to fill the column so the left side (lead + 3 cards) ends
	 * level with the bottom of the 6th Latest-News card on the right. */
	.amb-hero__main .amb-lead { flex: 1 1 auto; }

	/* Feature: list left (1fr) + image right (1.6fr), equal height. */
	.amb-feature { grid-template-columns: 1fr 1.6fr; align-items: stretch; }
	.amb-feature__list { order: 1; }
	.amb-feature__main { order: 2; }
	/* Flip: image left + list right. */
	.amb-feature--flip { grid-template-columns: 1.6fr 1fr; }
	.amb-feature--flip .amb-feature__main { order: 1; }
	.amb-feature--flip .amb-feature__list { order: 2; }
}

/* Text-only list rows (no thumbnail) — sidebar Latest/Related */
.amb-row--text { align-items: flex-start; }
.amb-row--text .amb-row__title { font-size: .95rem; }
.amb-widget__list--text .amb-row { padding: 11px 0; }

/* Under-article "Top News" block (punchng-style: 1 big + 3 columns of 3) */
.amb-topnews { margin-top: 44px; padding-top: 26px; border-top: 2px solid var(--amb-red); }
.amb-topnews .amb-section__title { margin-bottom: 20px; }
.amb-topnews__grid { display: grid; grid-template-columns: 1fr; gap: 26px; }
.amb-topnews__lead .amb-topnews__media { display: block; aspect-ratio: 16 / 10; border-radius: var(--amb-radius); overflow: hidden; background: var(--amb-bg-3); margin-bottom: 10px; }
.amb-topnews__lead .amb-topnews__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.amb-topnews__lead:hover .amb-topnews__media img { transform: scale(1.04); }
.amb-topnews__title { font-size: 1.15rem; margin: 0 0 6px; line-height: 1.25; }
.amb-topnews__title a:hover { color: var(--amb-red); }
.amb-topnews__date { font-size: 12px; color: var(--amb-muted); }
.amb-topnews__col { display: flex; flex-direction: column; }
.amb-topnews__item { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--amb-line); }
.amb-topnews__item:last-child { border-bottom: 0; }
.amb-topnews__item-media { flex: 0 0 74px; aspect-ratio: 1 / 1; border-radius: 6px; overflow: hidden; background: var(--amb-bg-3); }
.amb-topnews__item-media img { width: 100%; height: 100%; object-fit: cover; }
.amb-topnews__item-title { font-size: .9rem; margin: 0; line-height: 1.3; }
.amb-topnews__item-title a:hover { color: var(--amb-red); }
@media (min-width: 680px) {
	.amb-topnews__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 992px) {
	.amb-topnews__grid { grid-template-columns: repeat(4, 1fr); }
}

/* More Post block: wide recent-stories grid + a slim advert rail on the right. */
.amb-section--more { padding-block: 36px; }
.amb-more { display: grid; grid-template-columns: 1fr; gap: var(--amb-gap); }
.amb-more__rail { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
@media (min-width: 992px) {
	.amb-more { grid-template-columns: minmax(0, 1fr) 320px; align-items: start; }
}

/* ============================================================= *
 * 6. Advert slots (placeholders until the ads pass)
 * ============================================================= */
.amb-ad { margin: 24px auto; text-align: center; }
.amb-ad__tag {
	display: inline-flex; align-items: center; justify-content: center; width: 100%;
	min-height: 90px; border: 1px dashed var(--amb-line); border-radius: var(--amb-radius);
	color: var(--amb-muted); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; background: var(--amb-bg-2);
}

/* ============================================================= *
 * 6b. Breadcrumbs
 * ============================================================= */
.amb-breadcrumbs { font-size: 12.5px; color: var(--amb-muted); display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 14px; }
.amb-breadcrumbs a:hover { color: var(--amb-red); }
.amb-breadcrumbs__sep { color: var(--amb-line); }
.amb-breadcrumbs__current { color: var(--amb-ink-2); }

/* ============================================================= *
 * 6c. Article + sidebar layout
 * ============================================================= */

/* Reading progress bar */
.amb-progress { position: sticky; top: var(--amb-header-h); left: 0; height: 3px; z-index: 90; background: transparent; }
.amb-progress__bar { display: block; height: 100%; width: 0; background: var(--amb-red); transition: width .08s linear; }

.amb-article-wrap { display: grid; grid-template-columns: 1fr; gap: 40px; padding-block: 32px; }
@media (min-width: 992px) {
	.amb-article-wrap { grid-template-columns: minmax(0, 1fr) 320px; }
	.amb-article-wrap--archive { grid-template-columns: minmax(0, 1fr) 300px; }
}
.amb-article { min-width: 0; max-width: 820px; }
.amb-article__cat { margin-bottom: 12px; }
.amb-article__title { font-size: clamp(1.8rem, 4.5vw, 2.9rem); line-height: 1.12; margin: 0 0 14px; }
.amb-article__standfirst { font-size: 1.2rem; color: var(--amb-ink-2); line-height: 1.5; margin: 0 0 20px; }
.amb-article__meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 0; border-top: 1px solid var(--amb-line); border-bottom: 1px solid var(--amb-line); }
.amb-article__avatar { border-radius: 50%; }
.amb-article__meta-text { display: flex; flex-direction: column; margin-right: auto; }
.amb-article__meta-text .amb-byline a { color: var(--amb-ink); font-weight: 700; }
.amb-article__meta-sub { font-size: 12.5px; color: var(--amb-muted); }
.amb-article__figure { margin: 24px 0; }
.amb-article__figure img { width: 100%; border-radius: var(--amb-radius); }
.amb-article__caption { font-size: 12.5px; color: var(--amb-muted); margin-top: 8px; text-align: center; }
.amb-article__body { margin-top: 24px; }
.amb-article__tags { margin: 28px 0; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.amb-tags__label { font-weight: 700; font-size: 13px; }
.amb-article__tags a { font-size: 12.5px; background: var(--amb-bg-2); border: 1px solid var(--amb-line); padding: 5px 11px; border-radius: 20px; color: var(--amb-ink-2); }
.amb-article__tags a:hover { border-color: var(--amb-red); color: var(--amb-red); }

/* Share */
.amb-share { display: flex; align-items: center; gap: 10px; }
.amb-share__label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--amb-muted); }
.amb-social--share .amb-social__link { width: 34px; height: 34px; background: var(--amb-bg-2); border: 1px solid var(--amb-line); color: var(--amb-ink-2); }
.amb-social--share .amb-social__link:hover { background: var(--amb-red); border-color: var(--amb-red); color: #fff; }
/* Brand tints on hover for the share buttons */
.amb-social--share .amb-social__link--facebook:hover { background: #1877f2; border-color: #1877f2; }
.amb-social--share .amb-social__link--whatsapp:hover { background: #25d366; border-color: #25d366; }
.amb-social--share .amb-social__link--linkedin:hover { background: #0a66c2; border-color: #0a66c2; }
.amb-social--share .amb-social__link--x:hover { background: #000; border-color: #000; }

/* Article body + sticky share rail */
.amb-article__layout { display: grid; grid-template-columns: 1fr; gap: 20px; }
.amb-share-rail { display: none; }
@media (min-width: 1100px) {
	.amb-article__layout { grid-template-columns: 52px minmax(0, 1fr); gap: 26px; }
	.amb-share-rail { display: block; }
	.amb-share--vertical { position: sticky; top: calc(var(--amb-header-h) + 24px); }
	.amb-share--vertical .amb-social--share { flex-direction: column; gap: 10px; }
	.amb-share--vertical .amb-social__link { width: 42px; height: 42px; }
}

/* Drop cap on the first paragraph */
.amb-article__body > p:first-of-type::first-letter {
	float: left; font-family: var(--amb-serif); font-weight: 700; font-size: 3.6em;
	line-height: .82; padding: 6px 10px 0 0; color: var(--amb-red);
}

/* Inline "Also read" callout */
.amb-alsoread { margin: 24px 0; padding: 12px 16px; border-left: 4px solid var(--amb-red); background: var(--amb-bg-2); border-radius: 0 6px 6px 0; }
.amb-alsoread__label { display: inline; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--amb-red); margin-right: 6px; }
.amb-alsoread__link { font-weight: 600; color: var(--amb-ink); }
.amb-alsoread__link:hover { color: var(--amb-red); text-decoration: underline; }

/* Fixed share bar (phones) */
.amb-sharebar { display: none; }
@media (max-width: 767px) {
	.amb-sharebar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 95; background: var(--amb-card); border-top: 1px solid var(--amb-line); box-shadow: 0 -2px 10px rgba(0,0,0,.08); padding: 8px 12px; }
	.amb-sharebar .amb-social--share { display: flex; justify-content: space-around; width: 100%; gap: 8px; }
	.amb-sharebar .amb-social__link { flex: 1; max-width: 64px; height: 40px; border-radius: 6px; }
	.amb-main { padding-bottom: 60px; } /* room for the fixed bar */
}

/* Author box */
.amb-authorbox { display: flex; gap: 16px; padding: 22px; background: var(--amb-bg-2); border: 1px solid var(--amb-line); border-radius: var(--amb-radius); margin: 32px 0; }
.amb-authorbox__avatar { border-radius: 50%; flex-shrink: 0; }
.amb-authorbox__eyebrow { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--amb-muted); font-weight: 700; }
.amb-authorbox__name { font-size: 1.25rem; margin: 2px 0 6px; }
.amb-authorbox__name a:hover { color: var(--amb-red); }
.amb-authorbox__bio { margin: 0; color: var(--amb-ink-2); font-size: 14.5px; }

/* Related */
.amb-related { margin-top: 40px; padding-top: 28px; border-top: 2px solid var(--amb-red); }
.amb-related .amb-section__title { margin-bottom: 20px; }

/* Sidebar / widgets */
.amb-sidebar { min-width: 0; }
.amb-widget { margin-bottom: 32px; }
.amb-widget__title { font-size: 1.05rem; padding-bottom: 10px; margin: 0 0 12px; border-bottom: 2px solid var(--amb-red); }
.amb-ad--sticky { position: sticky; top: calc(var(--amb-header-h) + 20px); }

/* Category/archive grid: 3 columns on desktop AND tablet; on mobile the cards
 * become compact horizontal rows (image left + text right), like the cards under
 * the homepage hero. */
.amb-cat-grid { display: grid; gap: var(--amb-gap); grid-template-columns: 1fr; }
@media (min-width: 680px) {
	.amb-cat-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 679px) {
	.amb-cat-grid { gap: 12px; }
	.amb-cat-grid .amb-card { flex-direction: row; align-items: stretch; }
	.amb-cat-grid .amb-card__media { flex: 0 0 116px; width: 116px; height: auto; aspect-ratio: 1 / 1; }
	.amb-cat-grid .amb-card__body { flex: 1; justify-content: center; padding: 10px 13px; gap: 5px; }
	.amb-cat-grid .amb-card__title { -webkit-line-clamp: 2; font-size: .96rem; }
	.amb-cat-grid .amb-card__excerpt { display: none; } /* keep mobile rows tight */
}

/* ============================================================= *
 * 6d. Archive + author + search + 404 headers
 * ============================================================= */
.amb-archive-head { background: var(--amb-bg-2); border-bottom: 1px solid var(--amb-line); padding-block: 30px; }
.amb-archive-head__title { font-size: clamp(1.8rem, 5vw, 2.8rem); margin: 6px 0 8px; }
.amb-archive-head__title span { color: var(--amb-red); }
.amb-archive-head__desc { color: var(--amb-ink-2); max-width: 70ch; }
.amb-archive-head__count { font-size: 13px; color: var(--amb-muted); margin: 8px 0 0; }
.amb-archive-head__searchbar { max-width: 480px; margin-top: 14px; }
.amb-archive-head__searchbar .amb-searchform__input { border: 1px solid var(--amb-line); }

.amb-author-head { background: linear-gradient(135deg, var(--amb-navy), #0a0e52); color: #fff; padding-block: 40px; }
.amb-author-head__inner { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.amb-author-head__avatar { border-radius: 50%; border: 3px solid rgba(255,255,255,.25); }
.amb-author-head__eyebrow { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; opacity: .7; font-weight: 700; }
.amb-author-head__name { color: #fff; font-size: clamp(1.6rem, 4vw, 2.4rem); margin: 4px 0 8px; }
.amb-author-head__bio { margin: 0 0 8px; max-width: 70ch; color: #dfe2ee; }
.amb-author-head__count { margin: 0; font-size: 13px; opacity: .8; }
.amb-author-posts, .amb-search-results { padding-block: 36px; }

.amb-404 { text-align: center; padding-block: 60px; }
.amb-404__code { font-family: var(--amb-serif); font-size: clamp(4rem, 14vw, 8rem); color: var(--amb-red); line-height: 1; margin: 0; }
.amb-404__title { font-size: 1.8rem; margin: 6px 0 10px; }
.amb-404__text { color: var(--amb-ink-2); max-width: 46ch; margin: 0 auto 20px; }
.amb-404__search { max-width: 420px; margin: 0 auto 20px; }
.amb-404__latest { margin-top: 56px; text-align: left; }

/* ============================================================= *
 * 7. Prose (static pages, article body)
 * ============================================================= */
/* Static content pages */
.amb-page-head { background: var(--amb-bg-2); border-bottom: 1px solid var(--amb-line); padding-block: 34px; }
.amb-page-head__title { font-size: clamp(1.9rem, 5vw, 2.9rem); margin: 6px 0 6px; }
.amb-page-head__updated { font-size: 12.5px; color: var(--amb-muted); margin: 0; }
.amb-page-body { padding-block: 40px 20px; }
.amb-prose--page { max-width: 760px; margin-inline: auto; }
.amb-prose--page h2 { font-size: 1.5rem; margin-top: 1.7em; }
.amb-prose--page h3 { font-size: 1.2rem; margin-top: 1.4em; }
.amb-prose--page ul, .amb-prose--page ol { padding-left: 1.3em; margin: 0 0 1.2em; }
.amb-prose--page li { margin-bottom: .5em; }

.amb-prose { font-size: 1.05rem; color: var(--amb-ink-2); }
.amb-prose p { margin: 0 0 1.2em; }
.amb-prose a { color: var(--amb-red); text-decoration: underline; }
.amb-prose h2, .amb-prose h3 { margin-top: 1.6em; color: var(--amb-ink); }
.amb-layout--page { max-width: 820px; }

/* ============================================================= *
 * 8. Footer
 * ============================================================= */
.amb-footer { background: #0e1013; color: #aeb4bd; margin-top: 56px; }
:root[data-theme="dark"] .amb-footer { background: #08090b; }
.amb-footer a { color: #c7cbd1; }
.amb-footer a:hover { color: #fff; }

.amb-footer__grid { display: grid; grid-template-columns: 1fr; gap: 36px; padding-block: 48px 40px; }
@media (min-width: 680px) { .amb-footer__grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 992px) { .amb-footer__grid { grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 40px; } }

.amb-footer__heading { font-family: var(--amb-sans); font-size: 12px; text-transform: uppercase; letter-spacing: .09em; color: #fff; margin: 0 0 16px; position: relative; padding-bottom: 10px; }
.amb-footer__heading::after { content: ""; position: absolute; left: 0; bottom: 0; width: 28px; height: 2px; background: var(--amb-red); }

.amb-footer__brand .amb-footer__logo { display: inline-block; background: #fff; padding: 8px 12px; border-radius: 8px; }
.amb-footer__brand .amb-logo__img { height: 46px; }
.amb-footer__about { font-size: 14px; line-height: 1.6; margin: 16px 0 18px; max-width: 42ch; }

.amb-footer__col ul, .amb-footer__list { list-style: none; margin: 0; padding: 0; }
.amb-footer__col li { margin-bottom: 11px; font-size: 14px; }
.amb-footer__col li a { display: inline-block; transition: padding-left .15s ease, color .15s ease; }
.amb-footer__col li a:hover { padding-left: 6px; }

.amb-footer__contact .amb-footer__email a { font-size: 15px; font-weight: 600; color: #fff; }
.amb-footer__contact .amb-footer__email a:hover { color: var(--amb-red-600); }
.amb-footer__fineprint { font-size: 13px; margin: 8px 0 16px; }
.amb-footer__cta { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 14px; color: #fff; }
.amb-footer__cta span { color: var(--amb-red-600); transition: transform .15s ease; }
.amb-footer__cta:hover span { transform: translateX(4px); }

.amb-social--footer { margin-top: 2px; }
.amb-social--footer .amb-social__link { width: 36px; height: 36px; background: rgba(255,255,255,.06); color: #cfd3d9; }
.amb-social--footer .amb-social__link:hover { background: var(--amb-red); color: #fff; }

.amb-footer__bar { border-top: 1px solid rgba(255,255,255,.08); }
.amb-footer__bar-inner { display: flex; flex-direction: column; gap: 12px; align-items: center; text-align: center; padding-block: 18px; }
.amb-footer__copy { margin: 0; font-size: 13px; color: #868d97; }
.amb-totop { display: inline-flex; align-items: center; gap: 6px; background: rgba(255,255,255,.06); border: 0; color: #c7cbd1; font-size: 12px; font-weight: 600; padding: 8px 14px; border-radius: 20px; }
.amb-totop:hover { background: var(--amb-red); color: #fff; }

/* ============================================================= *
 * 9. Pagination
 * ============================================================= */
.pagination, .amb-pagination { margin-top: 36px; display: flex; justify-content: center; }
.pagination .nav-links { display: flex; gap: 6px; flex-wrap: wrap; }
.pagination .page-numbers { display: inline-flex; min-width: 40px; height: 40px; align-items: center; justify-content: center; padding: 0 12px; border: 1px solid var(--amb-line); border-radius: 4px; color: var(--amb-ink-2); }
.pagination .page-numbers.current { background: var(--amb-red); border-color: var(--amb-red); color: #fff; }
.pagination .page-numbers:hover { border-color: var(--amb-red); color: var(--amb-red); }
.pagination .page-numbers.current:hover { color: #fff; }

/* ============================================================= *
 * 10. Responsive — tablet & up
 * ============================================================= */
@media (min-width: 600px) {
	.amb-cards { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 992px) {
	.amb-cards { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 680px) {
	.amb-footer__bar-inner { flex-direction: row; justify-content: space-between; text-align: left; }
}

/* Mobile nav: below 992px the menu collapses behind the hamburger. */
@media (max-width: 991px) {
	.amb-nav-toggle { display: inline-flex; }
	.amb-nav {
		position: fixed; inset: var(--amb-header-h) 0 0 auto; width: min(80vw, 320px);
		background: var(--amb-red); padding: 16px; transform: translateX(100%);
		transition: transform .25s ease; overflow-y: auto; box-shadow: -4px 0 20px rgba(0,0,0,.25);
	}
	.amb-nav.is-open { transform: translateX(0); }
	.amb-nav__list { flex-direction: column; gap: 2px; }
	.amb-nav__list a { padding: 12px 8px; border-bottom: 1px solid rgba(255,255,255,.12); width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
	* { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
