/*
Theme Name: BD Times News
Theme URI: https://bdtimesnews.com/
Author: BD Times News
Author URI: https://bdtimesnews.com/
Description: Custom theme for BD Times News — a clean, minimal English-first business news portal mixing TBS-style category pages with the bdnews24-style homepage (hero lead + secondary stories, numbered Most Read, Long Read). Brand colours are taken from the site logo: navy #262a68 and red #ec2028. Fonts: Playfair Display headlines, Roboto body, SolaimanLipi for Bangla.
Version: 1.0.1
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: bdtimesnews
Tags: news, newspaper, blog, two-columns, right-sidebar, custom-menu, featured-images, translation-ready

Changelog:
= 1.0.1 =
* FIX: main-menu sub-menus are now proper hover/focus dropdowns (hidden by
  default, absolute below the parent item) instead of flowing inline and
  stretching the navy bar to ~290px.
* FIX: homepage now has a standalone "Latest" section first (5 newest posts
  not already in the hero), so all 10 sections appear.
* FIX: category sections query only their own category (children excluded,
  topped up from children only if short) and are hard-capped at 5 posts —
  Economy no longer pulls its 6 child categories into the section.
* FIX: language button and header date now share one strict toggle state
  and are marked notranslate, so GTranslate's client-side translation can
  no longer desync them.
*/

/* ============ Variables & base ============ */
:root {
  --navy: #262a68;
  --navy-deep: #1b1e4d;
  --navy-soft: #3a3f85;
  --red: #ec2028;
  --red-dark: #c8102e;
  --red-soft: #fdeeee;
  --ink: #111111;
  --body: #333333;
  --muted: #666666;
  --line: #e5e5e5;
  --mist: #eef0f6;
  --bg: #ffffff;
  --serif: "Playfair Display", "Noto Serif Bengali", Georgia, serif;
  --sans: "Roboto", "Noto Sans Bengali", "SolaimanLipi", Arial, sans-serif;
  --bangla: "SolaimanLipi", "Noto Sans Bengali", sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--body);
  background: var(--bg);
}
img { max-width: 100%; height: auto; }
a { color: var(--navy); text-decoration: none; }
a:hover { color: var(--red); }
h1, h2, h3, h4 { font-family: var(--serif); color: var(--ink); line-height: 1.25; margin: 0 0 12px; }
p { margin: 0 0 16px; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font-family: inherit; cursor: pointer; }
.container { max-width: 1280px; margin: 0 auto; padding: 0 16px; }
.clearfix::after { content: ""; display: table; clear: both; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* ============ Top bar ============ */
.topbar { border-bottom: 1px solid var(--line); font-size: 14px; }
.topbar .container { display: flex; align-items: center; justify-content: space-between; min-height: 44px; gap: 12px; }
.topbar-date { color: var(--body); white-space: nowrap; }
.topbar-right { display: flex; align-items: center; gap: 10px; }
.social-icons { display: flex; gap: 6px; }
.social-icons a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--navy); color: #fff; font-size: 13px; font-weight: 700;
}
.social-icons a:hover { background: var(--red); color: #fff; }
.social-icons a svg { width: 14px; height: 14px; fill: #fff; }
.lang-btn {
  background: var(--navy); color: #fff; border: 0; border-radius: 6px;
  font-size: 15px; font-weight: 700; padding: 8px 18px; line-height: 1.2;
}
.lang-btn:hover { background: var(--red); color: #fff; }
.lang-btn[lang="bn"] { font-family: var(--bangla); }

/* ============ Masthead ============ */
.masthead { text-align: center; padding: 22px 16px 18px; }
.masthead .site-logo img { width: 472px; max-width: 90vw; height: auto; display: inline-block; }
.masthead .site-tagline { color: var(--muted); letter-spacing: .35em; font-size: 12px; text-transform: uppercase; margin-top: 6px; }

/* ============ Main navigation ============ */
.mainnav { background: var(--navy); position: relative; z-index: 50; }
.mainnav .container { display: flex; align-items: stretch; padding: 0; }
.nav-home {
  display: inline-flex; align-items: center; justify-content: center;
  width: 52px; min-height: 48px; color: #fff; flex: 0 0 auto;
}
.nav-home svg { width: 22px; height: 22px; fill: #fff; }
.nav-home:hover { background: var(--red); }
.nav-toggle {
  display: none; background: transparent; border: 0; color: #fff;
  font-size: 24px; line-height: 1; padding: 10px 14px; margin-left: auto;
}
.nav-toggle .bar { display: block; width: 24px; height: 3px; background: #fff; margin: 5px 0; }
.mainnav ul.menu { display: flex; flex-wrap: wrap; align-items: stretch; }
.mainnav ul.menu > li { display: flex; position: relative; }
.mainnav ul.menu a {
  display: flex; align-items: center; padding: 12px 16px;
  color: #fff; font-size: 15px; font-weight: 500; white-space: nowrap;
}
.mainnav ul.menu a:hover { background: var(--red); color: #fff; }
/* Active category: whole item solid red, white text. No underline, no purple box. */
.mainnav ul.menu > li.current-menu-item > a,
.mainnav ul.menu > li.current-category-ancestor > a,
.mainnav ul.menu > li.current-post-ancestor > a,
.mainnav ul.menu > li.current_page_item > a {
  background: var(--red); color: #fff; border-bottom: 0;
}
/* Sub-menus: hidden by default, absolute dropdowns below the parent item.
   They must NEVER flow inline inside the bar (that stretched it to ~290px). */
.mainnav ul.menu > li.menu-item-has-children > a::after {
  content: "\25BE"; margin-left: 7px; font-size: 11px; line-height: 1;
}
.mainnav ul.menu .sub-menu {
  display: none;
  position: absolute; top: 100%; left: 0;
  min-width: 220px;
  background: var(--navy-deep);
  box-shadow: 0 10px 24px rgba(0,0,0,.28);
  z-index: 1000;
  padding: 0;
}
.mainnav ul.menu .sub-menu li { display: block; position: relative; }
.mainnav ul.menu .sub-menu a {
  display: block; padding: 11px 18px; font-size: 14px;
  border-top: 1px solid rgba(255,255,255,.1); white-space: nowrap;
}
.mainnav ul.menu .sub-menu a:hover { background: var(--red); color: #fff; }
/* Open on hover (desktop), keyboard focus, or the .sub-open class set by JS
   (touch / hamburger menu). */
.mainnav ul.menu > li:hover > .sub-menu,
.mainnav ul.menu > li:focus-within > .sub-menu,
.mainnav ul.menu > li.sub-open > .sub-menu { display: block; }
/* Third-level sub-menus fly out to the right of their parent item. */
.mainnav ul.menu .sub-menu .sub-menu { top: 0; left: 100%; }
.nav-search { margin-left: auto; display: flex; align-items: center; padding: 0 10px; }
.nav-search button { background: transparent; border: 0; color: #fff; font-size: 18px; padding: 8px; }
.nav-search button:hover { color: #fff; background: var(--red); }
.nav-search-form { display: none; background: var(--navy-deep); padding: 10px 0; }
.nav-search-form.open { display: block; }
.nav-search-form form { display: flex; gap: 8px; }
.nav-search-form input[type="search"] {
  flex: 1; padding: 10px 12px; border: 1px solid #ccc; border-radius: 4px; font-size: 15px;
}
.nav-search-form input[type="submit"] {
  background: var(--red); color: #fff; border: 0; border-radius: 4px; padding: 10px 18px; font-weight: 700;
}

/* ============ Breaking ticker ============ */
.ticker { display: flex; align-items: stretch; border-bottom: 1px solid var(--line); }
.ticker-label {
  background: var(--red); color: #fff; font-weight: 700; font-size: 13px;
  letter-spacing: .08em; text-transform: uppercase;
  display: flex; align-items: center; padding: 8px 14px; flex: 0 0 auto;
}
.ticker-items { overflow: hidden; flex: 1; display: flex; align-items: center; padding: 0 12px; min-height: 38px; }
.ticker-items a { color: var(--ink); font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ticker-items a:hover { color: var(--red); }
.ticker-dot { color: var(--red); margin-right: 8px; }

/* ============ Layout ============ */
.site-main { padding: 20px 0 8px; }
.layout { display: flex; gap: 28px; align-items: flex-start; }
.layout-main { flex: 1; min-width: 0; }
.layout-rail { flex: 0 0 320px; width: 320px; }
@media (max-width: 1024px) {
  .layout { flex-direction: column; }
  .layout-rail { flex: 1 1 auto; width: 100%; }
}

/* ============ Section titles ============ */
.section-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  border-bottom: 2px solid var(--ink); padding-bottom: 6px; margin: 34px 0 16px;
}
.section-head h2, .section-head .section-title {
  font-family: var(--serif); font-weight: 800; font-size: 22px;
  text-transform: uppercase; letter-spacing: .02em; color: var(--ink); margin: 0;
}
.section-head h2 a { color: var(--ink); }
.section-head h2 a:hover { color: var(--red); }
.section-head .more-link { font-size: 14px; font-weight: 700; color: var(--red); white-space: nowrap; }
.section-head .more-link:hover { text-decoration: underline; }

/* ============ Hero ============ */
.hero { margin-top: 8px; }
.hero-lead { display: flex; gap: 24px; align-items: flex-start; }
.hero-lead-text { flex: 1 1 55%; min-width: 0; }
.hero-lead-text .kicker, .kicker {
  color: var(--red); font-size: 12px; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase;
}
.hero-lead-text h1, .hero-lead-text h2 {
  font-family: var(--serif); font-weight: 800; font-size: 34px; line-height: 1.2; margin: 8px 0 10px;
}
.hero-lead-text h1 a, .hero-lead-text h2 a { color: var(--ink); }
.hero-lead-text h1 a:hover, .hero-lead-text h2 a:hover { color: var(--red); }
.hero-lead-text .excerpt { color: var(--body); font-size: 16px; }
.hero-lead-media { flex: 1 1 45%; min-width: 0; }
.hero-lead-media img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; }
.hero-secondary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 24px; }
.hero-secondary .sec-item img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; margin-bottom: 8px; }
.hero-secondary .sec-item h3 { font-size: 19px; font-weight: 700; }
.hero-secondary .sec-item h3 a { color: var(--ink); }
.hero-secondary .sec-item h3 a:hover { color: var(--red); }
.hero-secondary .sec-item .excerpt { font-size: 14px; color: var(--muted); }
.hero-headlines { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 24px; margin-top: 20px; }
.hero-headlines a {
  display: block; padding: 10px 0; border-top: 1px solid var(--line);
  font-family: var(--serif); font-weight: 700; font-size: 16px; color: var(--ink);
}
.hero-headlines a:hover { color: var(--red); }
.all-news-btn { text-align: center; margin: 26px 0 6px; }
.all-news-btn a {
  display: inline-block; background: var(--navy); color: #fff; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase; font-size: 14px;
  padding: 12px 34px; border-radius: 3px;
}
.all-news-btn a:hover { background: var(--red); color: #fff; }

/* ============ Post cards ============ */
.post-meta { font-size: 13px; color: var(--muted); margin-top: 6px; }
.post-meta .byline { text-transform: uppercase; font-weight: 700; color: var(--body); }
.cat-lead { display: flex; gap: 20px; align-items: flex-start; margin-bottom: 18px; }
.cat-lead-media { flex: 0 0 46%; }
.cat-lead-media img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; }
.cat-lead-text { flex: 1; min-width: 0; }
.cat-lead-text h3 { font-size: 24px; font-weight: 800; }
.cat-lead-text h3 a { color: var(--ink); }
.cat-lead-text h3 a:hover { color: var(--red); }
.cat-lead-text .excerpt { color: var(--body); font-size: 15px; }
.small-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px 24px; }
.small-item { display: flex; gap: 12px; align-items: flex-start; }
.small-item .thumb { flex: 0 0 96px; }
.small-item .thumb img { width: 96px; height: 64px; object-fit: cover; display: block; }
.small-item h4 { font-size: 16px; font-weight: 700; margin: 0; }
.small-item h4 a { color: var(--ink); }
.small-item h4 a:hover { color: var(--red); }
.small-item.text-only h4 { font-size: 17px; }

/* ============ Rail blocks ============ */
.rail-block { margin-bottom: 28px; }
.rail-block h3.rail-title {
  font-family: var(--serif); font-weight: 800; font-size: 18px; text-transform: uppercase;
  border-bottom: 2px solid var(--ink); padding-bottom: 6px; margin-bottom: 12px;
}
.numbered-list { counter-reset: n; }
.numbered-list li { display: flex; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.numbered-list li:last-child { border-bottom: 0; }
.numbered-list .num {
  font-family: var(--serif); font-weight: 800; font-size: 22px; color: var(--red);
  min-width: 34px; line-height: 1.1;
}
.numbered-list a { color: var(--ink); font-weight: 700; font-size: 15px; font-family: var(--serif); }
.numbered-list a:hover { color: var(--red); }
.latest-list li { padding: 9px 0 9px 14px; border-bottom: 1px solid var(--line); position: relative; }
.latest-list li:last-child { border-bottom: 0; }
.latest-list li::before {
  content: ""; position: absolute; left: 0; top: 16px; width: 7px; height: 7px;
  border-radius: 50%; background: var(--red);
}
.latest-list a { color: var(--ink); font-weight: 700; font-size: 15px; font-family: var(--serif); }
.latest-list a:hover { color: var(--red); }

/* ============ Coloured zones ============ */
.zone { padding: 18px 20px 22px; margin-top: 34px; }
.zone-dark { background: var(--navy-deep); }
.zone-dark .section-head { border-bottom-color: #fff; margin-top: 0; }
.zone-dark .section-head h2, .zone-dark .section-head .section-title { color: #fff; }
.zone-dark .section-head h2 a { color: #fff; }
.zone-dark .cat-lead-text h3 a, .zone-dark .small-item h4 a { color: #fff; }
.zone-dark .cat-lead-text .excerpt, .zone-dark .post-meta { color: #c9cbe8; }
.zone-dark .small-item h4 a:hover, .zone-dark .cat-lead-text h3 a:hover { color: #ff9aa0; }
.zone-mist { background: var(--mist); }
.zone-redsoft { background: var(--red-soft); }

/* ============ Features row (4 columns) ============ */
.features-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 8px; }
.features-row .feat-col h3 {
  font-size: 18px; font-weight: 800; text-transform: uppercase;
  border-bottom: 2px solid var(--ink); padding-bottom: 6px; margin-bottom: 12px;
}
.features-row .feat-col h3 a { color: var(--ink); }
.features-row .feat-col h3 a:hover { color: var(--red); }
.features-row .feat-col img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; margin-bottom: 8px; }
.features-row .feat-col h4 { font-size: 16px; font-weight: 700; }
.features-row .feat-col h4 a { color: var(--ink); }
.features-row .feat-col h4 a:hover { color: var(--red); }
.features-row .feat-col ul li { padding: 7px 0; border-top: 1px solid var(--line); }
.features-row .feat-col ul li a { color: var(--ink); font-weight: 700; font-size: 14px; font-family: var(--serif); }
.features-row .feat-col ul li a:hover { color: var(--red); }

/* ============ By The Numbers ============ */
.by-numbers { border: 1px solid var(--line); border-radius: 6px; padding: 16px 18px; background: #fff; }
.by-numbers h3.rail-title { border-bottom-color: var(--red); }
.by-numbers .bn-row { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.by-numbers .bn-row:last-child { border-bottom: 0; }
.by-numbers .bn-label { color: var(--muted); }
.by-numbers .bn-value { font-weight: 700; color: var(--ink); text-align: right; }
.by-numbers .bn-note { font-size: 12px; color: var(--muted); margin-top: 10px; }

/* ============ In Case You Missed It ============ */
.missed-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.missed-grid .miss-item img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; margin-bottom: 8px; }
.missed-grid .miss-item h4 { font-size: 16px; font-weight: 700; }
.missed-grid .miss-item h4 a { color: var(--ink); }
.missed-grid .miss-item h4 a:hover { color: var(--red); }

/* ============ Ads ============ */
.ad-slot { text-align: center; margin: 18px auto; }
.ad-label { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.ad-slot .ad-box {
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
  background: var(--navy); color: #fff; border-radius: 4px; padding: 12px 16px;
  max-width: 100%; overflow: hidden;
}
.ad-slot .ad-box .ad-brand { font-weight: 800; letter-spacing: .05em; font-size: 15px; }
.ad-slot .ad-box .ad-tagline { font-size: 11px; letter-spacing: .25em; opacity: .85; }
.ad-slot .ad-box .ad-bn { font-family: var(--bangla); font-size: 17px; margin: 6px 0 2px; }
.ad-slot .ad-box .ad-cta { font-size: 13px; }
.ad-slot .ad-box .ad-size { font-size: 11px; opacity: .75; margin-top: 4px; }
.ad-t1 .ad-box { width: 970px; height: 90px; max-width: 100%; }
.ad-b1 .ad-box { width: 970px; height: 250px; max-width: 100%; }
.ad-r1 .ad-box, .ad-r2 .ad-box, .ad-r3 .ad-box { width: 300px; height: 250px; max-width: 100%; }
.ad-sticky {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 0; z-index: 999;
  margin: 0; width: 728px; max-width: 100%;
}
.ad-sticky .ad-box { width: 728px; height: 90px; max-width: 100%; flex-direction: row; gap: 14px; }
.ad-sticky .ad-close {
  position: absolute; top: -12px; right: 6px; width: 28px; height: 28px;
  background: var(--red); color: #fff; border: 0; border-radius: 50%;
  font-size: 16px; line-height: 1;
}
.ad-sticky.hidden { display: none; }
body.has-sticky-ad { padding-bottom: 96px; }

/* ============ Category pages ============ */
.page-head { margin: 6px 0 18px; }
.page-head .browse-label { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.page-head h1 {
  font-family: var(--serif); font-weight: 800; font-size: 34px; text-transform: uppercase; margin: 4px 0 0;
}
.cat-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 20px; }
.cat-chips a {
  display: inline-block; padding: 7px 14px; border: 1px solid var(--navy); border-radius: 20px;
  color: var(--navy); font-size: 14px; font-weight: 500;
}
.cat-chips a:hover, .cat-chips a.on { background: var(--red); border-color: var(--red); color: #fff; }
.cat-list .cat-list-item { display: flex; gap: 18px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.cat-list .cat-list-item .thumb { flex: 0 0 220px; }
.cat-list .cat-list-item .thumb img { width: 220px; height: 124px; object-fit: cover; display: block; }
.cat-list .cat-list-item h3 { font-size: 21px; font-weight: 700; }
.cat-list .cat-list-item h3 a { color: var(--ink); }
.cat-list .cat-list-item h3 a:hover { color: var(--red); }
.cat-list .cat-list-item .excerpt { color: var(--body); font-size: 15px; }
.cat-list .cat-list-item.is-hidden { display: none; }
.show-more-wrap { text-align: center; margin: 22px 0; }
.show-more-btn {
  background: var(--navy); color: #fff; border: 0; border-radius: 3px;
  font-weight: 700; font-size: 14px; padding: 11px 30px; text-transform: uppercase; letter-spacing: .05em;
}
.show-more-btn:hover { background: var(--red); }
.pagination { text-align: center; margin: 24px 0; font-size: 15px; }
.pagination .page-numbers { display: inline-block; padding: 7px 13px; border: 1px solid var(--line); margin: 0 2px; color: var(--ink); }
.pagination .page-numbers.current, .pagination .page-numbers:hover { background: var(--red); border-color: var(--red); color: #fff; }

/* ============ Single article ============ */
.breadcrumb { font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--red); }
.article-head { max-width: 730px; margin: 0 auto 18px; }
.article-head h1 { font-family: var(--serif); font-weight: 800; font-size: 36px; line-height: 1.2; }
.article-head .standfirst { font-size: 18px; color: var(--body); }
.article-meta { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; font-size: 13px; color: var(--muted); margin: 12px 0; }
.article-meta .byline { text-transform: uppercase; font-weight: 700; color: var(--body); }
.share-buttons { display: flex; gap: 8px; margin: 12px 0; }
.share-buttons a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 50%; background: var(--navy); color: #fff;
  font-size: 13px; font-weight: 700;
}
.share-buttons a:hover { background: var(--red); color: #fff; }
.share-buttons a svg { width: 16px; height: 16px; fill: #fff; }
.article-featured { max-width: 860px; margin: 0 auto 18px; }
.article-featured img { width: 100%; display: block; }
.article-featured figcaption { font-size: 13px; color: var(--muted); padding: 8px 0; border-bottom: 1px solid var(--line); }
.article-body { max-width: 730px; margin: 0 auto; font-size: 18px; line-height: 1.9; }
.article-body p:first-of-type::first-letter {
  font-family: var(--serif); font-weight: 800; font-size: 52px; line-height: 1;
  float: left; padding: 6px 10px 0 0; color: var(--navy);
}
.article-body h2, .article-body h3 { font-family: var(--serif); font-weight: 800; }
.article-body img { max-width: 100%; height: auto; }
.article-body blockquote {
  border-left: 4px solid var(--red); margin: 20px 0; padding: 6px 0 6px 18px;
  font-family: var(--serif); font-size: 21px; font-style: italic; color: var(--ink);
}
.article-body a { color: var(--navy); text-decoration: underline; }
.article-body a:hover { color: var(--red); }
.also-read {
  border: 1px solid var(--line); border-left: 4px solid var(--red);
  padding: 12px 16px; margin: 20px 0; font-size: 16px; background: #fafafa;
}
.also-read strong { color: var(--red); text-transform: uppercase; font-size: 13px; letter-spacing: .08em; }
.article-tags { max-width: 730px; margin: 24px auto 0; font-size: 14px; }
.article-tags a {
  display: inline-block; padding: 5px 12px; margin: 0 6px 6px 0;
  border: 1px solid var(--line); border-radius: 20px; color: var(--body);
}
.article-tags a:hover { border-color: var(--red); color: var(--red); }
.author-box {
  max-width: 730px; margin: 28px auto 0; padding: 16px 18px;
  border: 1px solid var(--line); background: #fafafa; display: flex; gap: 16px; align-items: center;
}
.author-box .avatar { width: 64px; height: 64px; border-radius: 50%; background: var(--navy); color: #fff;
  display: flex; align-items: center; justify-content: center; font-family: var(--serif); font-weight: 800; font-size: 26px; flex: 0 0 64px; }
.author-box .author-name { font-weight: 800; text-transform: uppercase; font-size: 15px; }
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.related-grid .rel-item img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; margin-bottom: 8px; }
.related-grid .rel-item h4 { font-size: 17px; font-weight: 700; }
.related-grid .rel-item h4 a { color: var(--ink); }
.related-grid .rel-item h4 a:hover { color: var(--red); }

/* ============ Search & 404 ============ */
.search-results .search-item { padding: 16px 0; border-bottom: 1px solid var(--line); }
.search-results .search-item h3 { font-size: 21px; font-weight: 700; }
.search-results .search-item h3 a { color: var(--ink); }
.search-results .search-item h3 a:hover { color: var(--red); }
.not-found { text-align: center; padding: 60px 0; }
.not-found h1 { font-size: 44px; }

/* ============ Footer ============ */
.site-footer { background: var(--navy-deep); color: #d7d9ee; margin-top: 40px; }
.site-footer a { color: #d7d9ee; }
.site-footer a:hover { color: #fff; }
.footer-top { display: flex; gap: 40px; padding: 44px 0 30px; }
.footer-brand { flex: 0 0 300px; }
.footer-brand .foot-logo { background: #fff; display: inline-block; padding: 10px 14px; border-radius: 4px; }
.footer-brand .foot-logo img { width: 240px; max-width: 100%; display: block; }
.footer-brand .foot-desc { font-size: 14px; line-height: 1.7; margin: 18px 0; color: #c9cbe8; }
.footer-brand .social-icons { margin-bottom: 18px; }
.footer-brand .social-icons a { background: transparent; border: 1px solid #8a8fb8; }
.footer-brand .social-icons a:hover { background: var(--red); border-color: var(--red); }
.footer-contact { font-size: 14px; line-height: 1.9; color: #c9cbe8; }
.footer-links { flex: 1; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.footer-links h4 {
  font-family: var(--sans); font-size: 14px; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: #8fb4ff; margin-bottom: 14px;
}
.footer-links li { margin-bottom: 9px; }
.footer-links li a { font-size: 14px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.15); padding: 18px 0; font-size: 13px; color: #aab0d6; }
.footer-bottom .container { display: flex; flex-wrap: wrap; gap: 10px 24px; align-items: center; justify-content: space-between; }
.footer-bottom .credits { flex: 1; min-width: 260px; text-align: center; }
.footer-bottom .tagline { letter-spacing: .2em; font-weight: 700; color: #d7d9ee; white-space: nowrap; }

/* ============ Responsive ============ */
@media (max-width: 1024px) {
  .footer-top { flex-direction: column; }
  .footer-brand { flex: 1 1 auto; }
  .features-row, .missed-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-lead-text h1, .hero-lead-text h2 { font-size: 28px; }
}
@media (max-width: 767px) {
  body { font-size: 15px; }
  .topbar-date { font-size: 12px; }
  .social-icons a { width: 28px; height: 28px; }
  .masthead { padding: 14px 12px 12px; }
  .masthead .site-logo img { width: 320px; }
  .mainnav .container { flex-wrap: wrap; }
  .nav-toggle { display: block; }
  .mainnav ul.menu {
    display: none; flex-direction: column; width: 100%; flex-basis: 100%;
  }
  .mainnav ul.menu.open { display: flex; }
  .mainnav ul.menu > li { display: block; }
  .mainnav ul.menu a { padding: 13px 18px; font-size: 16px; border-top: 1px solid rgba(255,255,255,.12); }
  /* Mobile: sub-menus are static, stacked, and open ONLY via the JS
     tap-to-toggle (.sub-open). Hover must not open them on touch screens. */
  .mainnav ul.menu .sub-menu {
    position: static; display: none; min-width: 0;
    background: var(--navy-deep); box-shadow: none;
  }
  .mainnav ul.menu > li:hover > .sub-menu,
  .mainnav ul.menu > li:focus-within > .sub-menu { display: none; }
  .mainnav ul.menu > li.sub-open > .sub-menu { display: block; }
  .mainnav ul.menu .sub-menu a { padding: 11px 18px 11px 34px; font-size: 15px; }
  .mainnav ul.menu .sub-menu .sub-menu { left: 0; }
  .mainnav ul.menu .sub-menu .sub-menu a { padding-left: 52px; }
  .nav-search { display: none; }
  .hero-lead { flex-direction: column; }
  .hero-lead-text h1, .hero-lead-text h2 { font-size: 26px; }
  .hero-secondary { grid-template-columns: 1fr; }
  .hero-headlines { grid-template-columns: 1fr; }
  .small-list { grid-template-columns: 1fr; }
  .cat-lead { flex-direction: column; }
  .cat-lead-media { flex: 1 1 auto; }
  .cat-list .cat-list-item { flex-direction: column; }
  .cat-list .cat-list-item .thumb { flex: 1 1 auto; }
  .cat-list .cat-list-item .thumb img { width: 100%; height: auto; aspect-ratio: 16 / 9; }
  .features-row, .missed-grid, .related-grid { grid-template-columns: 1fr; }
  .footer-links { grid-template-columns: repeat(2, 1fr); }
  .article-head h1 { font-size: 28px; }
  .article-body { font-size: 17px; line-height: 1.8; }
  .page-head h1 { font-size: 26px; }
  .ad-t1 .ad-box { width: 300px; height: 100px; }
  .ad-b1 .ad-box { width: 300px; height: 250px; }
  .ad-sticky .ad-box { width: 360px; height: 60px; }
  .ad-sticky .ad-box .ad-bn, .ad-sticky .ad-box .ad-cta { display: none; }
  .ad-sticky .ad-close { width: 30px; height: 30px; }
  .footer-bottom .container { flex-direction: column; text-align: center; }
  .footer-bottom .credits { text-align: center; }
}
