/*
Theme Name: Asia Pulse
Theme URI: https://asiapulse.market
Author: Asia Pulse
Description: Asia Pulse — The Broadsheet. Premium editorial theme for Asian market insights. Matches Design C mockup.
Version: 1.0
Tags: news, magazine, editorial, custom-menu, post-thumbnails
*/

/* ═══════════════════════════════════════════
   RESET & BASE
═══════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --navy:   #0c1f4a;
  --gold:   #b8941f;
  --red:    #c0392b;
  --cream:  #faf8f3;
  --cream2: #f2ece1;
  --surface:#f7f5f0;
  --bg:     #FAFAF6;
  --border: #d4cfc3;
  --text:   #181818;
  --muted:  #767676;
  --font:        'Inter', sans-serif;
  --font-serif:  'Source Serif 4', Georgia, 'Times New Roman', serif;
}

html { font-size: 16px; }
body {
  font-family: var(--font);
  background: #ffffff;
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

/* ═══════════════════════════════════════════
   MASTHEAD — navy banner
═══════════════════════════════════════════ */
.ap-masthead {
  background: var(--navy);
  border-bottom: 3px double var(--gold);
  padding: 14px 28px;
}
.ap-masthead-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.ap-masthead-left { flex: 0 0 60px; }
.ap-masthead-center { text-align: center; flex: 1; }
.ap-masthead-right { flex: 0 0 60px; text-align: right; }

.ap-site-title {
  font-family: var(--font-serif);
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -1px;
  line-height: 1;
  color: #fff;
}
.ap-site-title a { color: #fff; }
.ap-site-title .ap-gold { color: var(--gold); }
.ap-tagline {
  font-size: 9px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  margin-top: 4px;
}

/* ── City train ─────────────────────────────── */
.ap-city-train {
  position: relative;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: flex-start;
  margin-top: 14px;
  width: 100%;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}
.ap-station {
  flex: 1 1 0;
  min-width: 0;
  border-top: 1px solid rgba(201,168,76,0.7);
  text-align: center;
}
.ap-station-dot {
  display: block;
  width: 7px; height: 7px;
  background: var(--gold);
  border-radius: 50%;
  margin: -4px auto 0;
  position: relative;
  z-index: 2;
}
.ap-station-name {
  display: block;
  font-size: 7px;
  letter-spacing: 1px;
  color: #fff;
  text-transform: uppercase;
  font-weight: 600;
  margin-top: 5px;
  white-space: nowrap;
}
.ap-loco {
  position: absolute;
  top: -5px;
  width: 11px; height: 11px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 10px var(--gold), 0 0 20px rgba(201,168,76,0.6);
  z-index: 3;
  transform: translateX(-50%);
  animation: ap-loco 14s ease-in-out infinite;
}
@keyframes ap-loco {
  0%,  7%  { left: 8.33%;  opacity: 1; }
  17%, 24% { left: 25%;    opacity: 1; }
  34%, 41% { left: 41.67%; opacity: 1; }
  51%, 58% { left: 58.33%; opacity: 1; }
  68%, 75% { left: 75%;    opacity: 1; }
  85%, 92% { left: 91.67%; opacity: 1; }
  93%      { left: 91.67%; opacity: 0; }
  99%      { left: 8.33%;  opacity: 0; }
  100%     { left: 8.33%;  opacity: 1; }
}

.ap-nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 22px;
  color: rgba(255,255,255,0.8);
  line-height: 1;
  padding: 0;
}

/* ═══════════════════════════════════════════
   SUB-NAV — cream bar with category links
═══════════════════════════════════════════ */
.ap-subnav {
  background: #eef0f3;
  border-bottom: 1px solid #dce0e6;
  position: relative;
}
.ap-subnav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.ap-subnav ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0;
  flex-wrap: wrap;
}
.ap-subnav ul li a {
  display: block;
  padding: 9px 13px;
  font-size: 13px;
  font-weight: 500;
  color: var(--navy);
  transition: color .15s;
  white-space: nowrap;
}
.ap-subnav ul li a:hover { color: var(--red); }
.ap-subnav-subscribe {
  font-size: 10px;
  font-weight: 700;
  color: var(--navy);
  padding: 9px 0;
  white-space: nowrap;
  transition: color .15s;
}
.ap-subnav-subscribe:hover { color: var(--red); }

/* ═══════════════════════════════════════════
   MAIN WRAPPER
═══════════════════════════════════════════ */
.ap-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 28px;
}

/* ═══════════════════════════════════════════
   SECTION LABEL
═══════════════════════════════════════════ */
.ap-section-label {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--red);
  border-bottom: 3px solid var(--red);
  padding-bottom: 4px;
  margin: 20px 0 16px;
}

/* ═══════════════════════════════════════════
   HERO — featured (left 57%) + 3 recent (right)
═══════════════════════════════════════════ */
.ap-hero {
  display: flex;
  gap: 0;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}

/* LEFT — big featured article */
.ap-hero-featured {
  flex: 0 0 57%;
  padding-right: 24px;
  border-right: 1px solid var(--border);
}
.ap-hero-featured .ap-feat-img {
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  object-fit: cover;
  margin-bottom: 12px;
}
.ap-hero-featured .ap-cat {
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 8px;
  display: block;
}
.ap-hero-featured .ap-feat-title {
  font-family: var(--font-serif);
  font-size: clamp(1.4rem, 4vw, 2.2rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.5px;
  margin-bottom: 10px;
}
.ap-hero-featured .ap-feat-title a { color: var(--text); }
.ap-hero-featured .ap-feat-title a:hover { color: var(--navy); }
.ap-hero-featured .ap-feat-excerpt {
  font-size: 14px;
  color: #444;
  line-height: 1.7;
}
.ap-hero-featured .ap-feat-meta {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 10px;
}
.ap-hero-featured .ap-feat-meta .ap-reading-time {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

/* RIGHT — 3 stacked recent */
.ap-hero-recent {
  flex: 1;
  padding-left: 24px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}
.ap-recent-item {
  display: flex;
  gap: 10px;
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid #ede9e1;
}
.ap-recent-item:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.ap-recent-item > a { flex-shrink: 0; width: 90px; }
.ap-recent-item .ap-recent-img {
  width: 90px;
  height: 68px;
  object-fit: cover;
}
.ap-recent-item .ap-cat {
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 4px;
  display: block;
}
.ap-recent-item .ap-recent-title {
  font-family: var(--font-serif);
  font-size: clamp(0.9rem, 2vw, 1.05rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.2px;
  color: var(--text);
}
.ap-recent-item .ap-recent-title a { color: var(--text); }
.ap-recent-item .ap-recent-title a:hover { color: var(--navy); }
.ap-recent-item .ap-date {
  font-size: 8.5px;
  color: var(--muted);
  margin-top: 3px;
}

/* ═══════════════════════════════════════════
   THEME STRIPS
═══════════════════════════════════════════ */
.ap-strip { padding: 16px 0 24px; }
.ap-strip-top { height: 3px; margin-bottom: 0; }
.ap-strip-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 13px;
}
.ap-strip-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.ap-strip-label {
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: 700;
}
.ap-strip-line { flex: 1; height: 1px; background: var(--border); }
.ap-strip-viewall {
  font-size: 9px;
  color: var(--muted);
  transition: color .15s;
}
.ap-strip-viewall:hover { color: var(--navy); }

.ap-strip-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}
.ap-strip-grid-3 { display: grid; gap: 0; grid-template-columns: repeat(3, 1fr); }
.ap-strip-grid-2 { display: grid; gap: 0; grid-template-columns: repeat(2, 1fr); }
.ap-strip-grid-1 { display: grid; gap: 0; grid-template-columns: repeat(4, 1fr); }

.ap-card { padding-right: 14px; border-right: 1px solid #e8e4dc; }
.ap-card:last-child { padding-right: 0; border-right: none; }
.ap-card .ap-card-img {
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  object-fit: cover;
  margin-bottom: 8px;
}
.ap-card .ap-card-img-placeholder {
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  background: #e0ddd7;
  margin-bottom: 8px;
}
.ap-card .ap-card-title {
  font-family: var(--font-serif);
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.3px;
  margin-bottom: 4px;
}
.ap-card .ap-card-title a { color: var(--text); }
.ap-card .ap-card-title a:hover { color: var(--navy); }
.ap-card .ap-card-date { font-size: 9px; color: #999; }

/* ═══════════════════════════════════════════
   MOSAIC CARDS — shared base
═══════════════════════════════════════════ */
.ap-mosaic { display: grid; gap: 0; align-items: start; }
.ap-mc-img { width: 100%; object-fit: cover; display: block; height: auto; }
.ap-mc-img--wide { aspect-ratio: 16 / 9; }
.ap-mc-img--sq   { aspect-ratio: 4 / 3; }
.ap-mc__body { padding-top: 8px; }
.ap-mc .ap-cat { font-size: 9px; letter-spacing: 1.5px; text-transform: uppercase; font-weight: 700; display: block; margin-bottom: 5px; }
.ap-mc__title a { color: var(--text); }
.ap-mc__title a:hover { color: var(--navy); }
.ap-mc__title { font-family: var(--font-serif); font-weight: 800; line-height: 1.15; }
.ap-mc__title--xl { font-size: clamp(1.3rem, 3vw, 1.9rem); letter-spacing: -0.6px; }
.ap-mc__title--lg { font-size: clamp(1.15rem, 2.5vw, 1.6rem); letter-spacing: -0.4px; }
.ap-mc__title--md { font-size: clamp(1.05rem, 2.2vw, 1.4rem); letter-spacing: -0.3px; }
.ap-mc__title--sm { font-size: clamp(0.9rem, 1.8vw, 1.05rem); letter-spacing: -0.1px; }
.ap-mc__excerpt { font-size: 14px; color: #444; line-height: 1.55; margin-top: 8px; }
.ap-mc__date { font-size: 11px; color: var(--muted); margin-top: 4px; }

/* stacked row (thumbnail + text side-by-side) */
.ap-mc-row { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); align-items: flex-start; }
.ap-mc-row:first-child { padding-top: 0; }
.ap-mc-row:last-child  { border-bottom: none; padding-bottom: 0; }
.ap-mc-row__thumb { flex-shrink: 0; width: 80px; }
.ap-mc-thumb { width: 80px; height: 60px; object-fit: cover; display: block; }
.ap-mc-row__text { flex: 1; min-width: 0; }

/* ── LAYOUT ORIG: equal-width grid ── */
.ap-mosaic-orig { display: grid; gap: 14px; align-items: start; }
.ap-mosaic-orig--4 { grid-template-columns: repeat(4, 1fr); }
.ap-mosaic-orig--3 { grid-template-columns: repeat(3, 1fr); }
.ap-mosaic-orig--2 { grid-template-columns: repeat(2, 1fr); }

/* ── LAYOUT A: hero | feature(4:3+excerpt) | stacked(img+title) ── */
.ap-mosaic-a { grid-template-columns: 2fr 1.5fr 1fr; }
.ap-mosaic-a > .ap-mc { padding-right: 20px; border-right: 1px solid var(--border); }
.ap-mosaic-a > .ap-mc:last-child { padding-right: 0; border-right: none; padding-left: 16px; border-left: 1px solid var(--border); }

/* ── LAYOUT B: overlay hero | stacked sidebar ── */
.ap-mosaic-b { grid-template-columns: 3fr 2fr; }
.ap-mc--overlay { position: relative; overflow: hidden; }
.ap-mc-bg { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.ap-mc__overlay-body {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(8,16,48,0.92));
  padding: 36px 16px 16px;
}
.ap-mc--overlay .ap-cat { color: var(--gold) !important; }
.ap-mc--overlay .ap-mc__title a { color: #fff; }
.ap-mc--overlay .ap-mc__title a:hover { color: var(--gold); }
.ap-mc--sidebar { padding-left: 20px; border-left: 1px solid var(--border); }

/* ── LAYOUT D: Economist "Recent highlights" — 2-col, text-left image-right ── */
.ap-mosaic-d {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}
.ap-mc--econ {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 18px 24px 18px 0;
  border-top: 1px solid var(--border);
}
.ap-mc--econ:nth-child(odd)  { border-right: 1px solid var(--border); }
.ap-mc--econ:nth-child(even) { padding-left: 24px; padding-right: 0; }
.ap-mc--econ:nth-child(1),
.ap-mc--econ:nth-child(2)    { border-top: none; padding-top: 0; }
.ap-mc--econ__text { flex: 1; min-width: 0; }
.ap-mc--econ .ap-cat {
  font-size: 10px;
  letter-spacing: 0.5px;
  text-transform: none;
  font-weight: 700;
  margin-bottom: 6px;
}
.ap-mc--econ__img { flex-shrink: 0; width: 120px; }
.ap-mc-thumb-sq { width: 120px; height: 90px; object-fit: cover; display: block; }

/* ── LAYOUT E: Economist — big hero left + 2 stacked right ── */
.ap-mosaic-e {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 28px;
  align-items: stretch;
}
.ap-mc--ehero { display: flex; flex-direction: column; }
.ap-mc--ehero .ap-mc-img--wide { width: 100%; aspect-ratio: 16/9; object-fit: cover; display: block; }
.ap-mc--ehero .ap-mc__body { padding-top: 14px; }
.ap-mc--estack { display: flex; flex-direction: column; height: 100%; }
.ap-mc-row--econ {
  flex: 1;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.ap-mc-row--econ:last-child { border-bottom: none; padding-bottom: 0; }
.ap-mc-row__text { flex: 1; min-width: 0; }
.ap-mc-row__text .ap-mc__excerpt { font-size: 14px; color: #444; margin-top: 6px; line-height: 1.5; }
.ap-mc-row__thumb-right { flex-shrink: 0; width: 48%; }
.ap-mc-row__thumb-right .ap-mc-thumb-sq { width: 100%; height: auto; aspect-ratio: 2/1; object-fit: cover; display: block; }

/* ── LAYOUT F: Bloomberg 2-card, 40/60 split ── */
.ap-mosaic-f {
  display: grid;
  grid-template-columns: 2fr 3fr;
  gap: 0 28px;
  align-items: start;
}
/* Left column: 40% width → image ~200px tall (≈50/50 with headline) */
.ap-mc--fcard .ap-mc-img--wide { width: 100%; height: 200px; object-fit: cover; display: block; }
/* Right column: 60% width → image ~310px tall (≈60/40 with headline+excerpt) */
.ap-mc--fhero .ap-mc-img--wide { width: 100%; height: 310px; object-fit: cover; display: block; }
.ap-mc--fcard .ap-mc__body,
.ap-mc--fhero .ap-mc__body { padding-top: 14px; }
.ap-mc--fextra { display: none; } /* mobile-only — hidden on desktop */

/* ── LAYOUT C: horizontal hero + 3-card row ── */
.ap-mosaic-c { display: block; }
.ap-mc--horiz {
  display: flex; gap: 22px; align-items: flex-start;
  padding-bottom: 18px; margin-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.ap-mc--horiz__img { flex: 0 0 45%; }
.ap-mc--horiz .ap-mc__body { padding-top: 0; }
.ap-mosaic-c__row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; }
.ap-mc--cell { padding-right: 16px; border-right: 1px solid var(--border); }
.ap-mc--cell:last-child { padding-right: 0; border-right: none; }

/* ═══════════════════════════════════════════
   SINGLE POST — article page
═══════════════════════════════════════════ */
.ap-article-wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 32px 0 64px;
}
.ap-article-layout {
  display: flex;
  gap: 32px;
  align-items: flex-start;
}
.ap-article-content-col { flex: 1; min-width: 0; max-width: 720px; }
.ap-article-toc {
  width: 200px;
  flex-shrink: 0;
  position: sticky;
  top: 24px;
}
.ap-article-toc-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}
.ap-article-toc-item {
  display: block;
  font-size: 12px;
  color: #555;
  padding: 5px 0 5px 12px;
  border-left: 2px solid #e0ddd7;
  margin-bottom: 2px;
  line-height: 1.4;
  transition: all .15s;
}
.ap-article-toc-item:hover { border-left-color: var(--red); color: var(--text); }
.ap-article-toc-item.h3 { padding-left: 24px; font-size: 11px; color: #777; }

.ap-article-cat {
  font-size: 9px;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 12px;
  display: block;
}
.ap-article-title {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 5vw, 2.875rem);
  font-weight: 800;
  color: var(--text);
  line-height: 1.05;
  letter-spacing: -1px;
  margin-bottom: 14px;
}
.ap-article-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 11px;
  color: var(--muted);
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}
.ap-article-meta .ap-reading-time {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.ap-article-hero-img {
  width: 100%;
  height: auto;
  margin-bottom: 28px;
}
.ap-article-content { font-family: var(--font-serif); font-size: 1.063rem; line-height: 1.75; color: #333; }
.ap-article-content h2 { font-family: var(--font-serif); font-size: clamp(1.1rem, 2.5vw, 1.375rem); font-weight: 800; color: var(--navy); margin: 28px 0 12px; letter-spacing: -0.4px; line-height: 1.2; }
.ap-article-content h3 { font-family: var(--font-serif); font-size: clamp(1rem, 2vw, 1.125rem); font-weight: 800; margin: 22px 0 10px; letter-spacing: -0.2px; line-height: 1.2; }
.ap-article-content p { margin-bottom: 18px; }
.ap-article-content blockquote {
  border-left: none;
  border-top: 2px solid var(--red);
  padding: 16px 0 12px;
  margin: 24px 0;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.125rem;
  color: #555;
  line-height: 1.6;
}
.ap-article-content blockquote p { margin-bottom: 0; }
.ap-article-content a { color: var(--red); text-decoration: underline; text-decoration-color: rgba(192,57,43,0.25); text-underline-offset: 3px; transition: text-decoration-color .15s; }
.ap-article-content a:hover { text-decoration-color: var(--red); color: var(--red); }
.ap-article-content ul,
.ap-article-content ol { margin: 0 0 18px 24px; }
.ap-article-content li { margin-bottom: 6px; }
.ap-article-content img { max-width: 100%; margin: 16px 0; }
.ap-article-content table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 14px; }
.ap-article-content th { background: var(--navy); color: #fff; padding: 8px 10px; text-align: left; font-size: 12px; }
.ap-article-content td { padding: 7px 10px; border-bottom: 1px solid var(--border); }
.ap-article-content tr:nth-child(even) td { background: var(--cream); }

/* post navigation */
.ap-post-nav {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 0;
  border-top: 1px solid var(--border);
  margin-top: 32px;
}
.ap-post-nav a {
  font-size: 12px;
  font-weight: 700;
  color: var(--navy);
  max-width: 45%;
}
.ap-post-nav a:hover { color: var(--red); }
.ap-post-nav .ap-nav-label {
  font-size: 9px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--muted);
  display: block;
  margin-bottom: 3px;
}

/* ═══════════════════════════════════════════
   ARCHIVE PAGE
═══════════════════════════════════════════ */
.ap-archive-header {
  padding: 24px 0 16px;
  border-bottom: 2px solid var(--navy);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.ap-archive-header .ap-strip-dot { width: 10px; height: 10px; }
.ap-archive-header h1 { font-family: var(--font-serif); font-size: 26px; font-weight: 700; }
.ap-archive-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  padding-bottom: 48px;
}
.ap-archive-card { border-bottom: 1px solid var(--border); padding-bottom: 20px; }
.ap-archive-card img { width: 100%; height: 160px; object-fit: cover; margin-bottom: 10px; }
.ap-archive-card .ap-cat { font-size: 8px; letter-spacing: 1.5px; text-transform: uppercase; font-weight: 700; margin-bottom: 6px; display: block; }
.ap-archive-card .ap-title { font-family: var(--font-serif); font-size: 16px; font-weight: 700; line-height: 1.4; margin-bottom: 6px; }
.ap-archive-card .ap-title a { color: var(--text); }
.ap-archive-card .ap-title a:hover { color: var(--navy); }
.ap-archive-card .ap-date { font-size: 9px; color: var(--muted); }

/* ═══════════════════════════════════════════
   PAGINATION
═══════════════════════════════════════════ */
.ap-pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 32px 0;
}
.ap-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  font-size: 13px;
  color: var(--navy);
  border: 1px solid var(--border);
  transition: all .15s;
}
.ap-pagination .page-numbers.current,
.ap-pagination .page-numbers:hover {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}

/* ═══════════════════════════════════════════
   FOOTER
═══════════════════════════════════════════ */
.ap-footer {
  background: var(--navy);
  color: rgba(255,255,255,0.7);
  padding: 48px 28px 24px;
  margin-top: 40px;
}
.ap-footer-inner { max-width: 1200px; margin: 0 auto; }
.ap-footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 48px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  margin-bottom: 20px;
}
.ap-footer-brand .ap-footer-logo { font-size: 22px; font-weight: 700; color: #fff; margin-bottom: 8px; }
.ap-footer-brand .ap-footer-logo span { color: var(--gold); }
.ap-footer-brand p { font-size: 12px; color: rgba(255,255,255,0.45); max-width: 240px; line-height: 1.6; }

.ap-footer-subscribe-area { flex: 0 0 auto; min-width: 320px; }
.ap-footer-subscribe-area h3 { font-size: 13px; font-weight: 700; color: #fff; margin-bottom: 5px; }
.ap-footer-subscribe-area p { font-size: 12px; color: rgba(255,255,255,0.5); margin-bottom: 12px; }

/* Style the subscribe form (works with most WP email plugins) */
.ap-footer-subscribe-area form,
.ap-footer-subscribe-area .wp-block-jetpack-subscriptions__form {
  display: flex;
  gap: 0;
}
.ap-footer-subscribe-area input[type="email"],
.ap-footer-subscribe-area input[type="text"] {
  padding: 10px 14px;
  font-size: 13px;
  font-family: var(--font);
  border: none;
  background: rgba(255,255,255,0.12);
  color: #fff;
  flex: 1;
  outline: none;
  min-width: 0;
}
.ap-footer-subscribe-area input[type="email"]::placeholder { color: rgba(255,255,255,0.38); }
.ap-footer-subscribe-area input[type="submit"],
.ap-footer-subscribe-area button[type="submit"],
.ap-footer-subscribe-area .wp-block-button__link {
  background: var(--gold) !important;
  color: var(--navy) !important;
  font-family: var(--font) !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  padding: 10px 18px !important;
  border: none !important;
  cursor: pointer;
  transition: background .15s;
  border-radius: 0 !important;
  text-decoration: none !important;
}
.ap-footer-subscribe-area input[type="submit"]:hover,
.ap-footer-subscribe-area button[type="submit"]:hover { background: #d4aa28 !important; }

.ap-footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: rgba(255,255,255,0.3);
  flex-wrap: wrap;
  gap: 8px;
}
.ap-footer-bottom a { color: rgba(255,255,255,0.4); transition: color .15s; }
.ap-footer-bottom a:hover { color: rgba(255,255,255,0.75); }

/* ═══════════════════════════════════════════
   PAGE (static pages)
═══════════════════════════════════════════ */
.ap-page-wrap {
  max-width: 780px;
  margin: 0 auto;
  padding: 40px 0 64px;
}
.ap-page-wrap h1 { font-family: var(--font-serif); font-size: 32px; font-weight: 700; color: var(--navy); margin-bottom: 20px; }
.ap-page-content { font-size: 15px; line-height: 1.8; color: #333; }
.ap-page-content p { margin-bottom: 16px; }
.ap-page-content h2 { font-size: 20px; font-weight: 700; margin: 24px 0 10px; color: var(--navy); }
.ap-page-content a { color: var(--navy); border-bottom: 1px solid var(--gold); }

/* ═══════════════════════════════════════════
   MOBILE RESPONSIVE
═══════════════════════════════════════════ */
@media (max-width: 900px) {
  .ap-article-toc { display: none; }
  .ap-strip-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .ap-strip-grid-3 { grid-template-columns: repeat(2, 1fr); }
  .ap-card { padding-right: 0; border-right: none; }
  .ap-archive-grid { grid-template-columns: repeat(2, 1fr); }
  /* mosaic tablet — old layouts */
  .ap-mosaic-orig--4 { grid-template-columns: repeat(2, 1fr); }
  .ap-mosaic-a { grid-template-columns: 1fr 1fr; }
  .ap-mosaic-a > .ap-mc--stack { grid-column: 1 / -1; border-left: none; border-top: 1px solid var(--border); padding-left: 0; padding-top: 12px; margin-top: 4px; display: flex; gap: 16px; }
  .ap-mc-row { flex: 1; }
  .ap-mosaic-b { grid-template-columns: 1fr 1fr; }
  .ap-mosaic-c__row { grid-template-columns: 1fr 1fr; }

  /* ── NEW LAYOUTS: same single-column stacking as mobile ── */
  /* hide card excerpts */
  .ap-mc__excerpt { display: none; }

  /* Layout E */
  .ap-mosaic-e { grid-template-columns: 1fr; gap: 0; }
  .ap-mc--ehero { margin-bottom: 20px; }
  .ap-mc--estack { height: auto; }
  .ap-mc-row__thumb-right { flex-shrink: 0; width: 110px; }
  .ap-mc-row__thumb-right .ap-mc-thumb-sq { width: 110px; height: 82px; aspect-ratio: auto; }

  /* Layout orig: first card hero, rest rows */
  .ap-mosaic-orig { grid-template-columns: 1fr; gap: 0; }
  .ap-mc--equal { display: flex; align-items: flex-start; gap: 12px; padding: 14px 0; border-top: 1px solid var(--border); }
  .ap-mc--equal:first-child { flex-direction: column; align-items: stretch; border-top: none; padding-top: 0; }
  .ap-mc--equal:not(:first-child) > a:first-child { order: 2; flex-shrink: 0; width: 110px; }
  .ap-mc--equal:not(:first-child) .ap-mc-img--wide { width: 110px; height: 82px; object-fit: cover; aspect-ratio: auto; }
  .ap-mc--equal:not(:first-child) .ap-mc__body { order: 1; flex: 1; min-width: 0; padding-top: 0; }
  .ap-mc--equal:first-child .ap-mc-img--wide { width: 100%; height: auto; aspect-ratio: 16/9; }
  .ap-mc--equal:first-child .ap-mc__body { padding-top: 10px; }

  /* Layout D */
  .ap-mosaic-d { grid-template-columns: 1fr; }
  .ap-mc--econ { border-right: none !important; padding-left: 0 !important; padding-right: 0 !important; border-top: 1px solid var(--border) !important; }
  .ap-mc--econ-first { flex-direction: column; align-items: stretch; border-top: none !important; }
  .ap-mc--econ-first .ap-mc--econ__img { order: -1; width: 100%; }
  .ap-mc--econ-first .ap-mc-thumb-sq { width: 100%; height: auto; aspect-ratio: 16/9; }
  .ap-mc--econ-first .ap-mc--econ__text { padding-top: 10px; }
  .ap-mc--econ:not(.ap-mc--econ-first) .ap-mc--econ__img { width: 110px; }
  .ap-mc--econ:not(.ap-mc--econ-first) .ap-mc-thumb-sq { width: 110px; height: 82px; }

  /* Layout F */
  .ap-mosaic-f { grid-template-columns: 1fr; gap: 0; display: flex; flex-direction: column; align-items: stretch; }
  .ap-mc--fcard { order: 1; margin-bottom: 0; }
  .ap-mc--fcard .ap-mc-img--wide { height: auto; aspect-ratio: 16/9; }
  .ap-mc--fhero { order: 2; display: flex; flex-direction: row; align-items: flex-start; gap: 12px; padding-top: 14px; border-top: 1px solid var(--border); margin-top: 14px; }
  .ap-mc--fhero > a:first-child { order: 2; flex-shrink: 0; width: 110px; }
  .ap-mc--fhero .ap-mc-img--wide { width: 110px; height: 82px; object-fit: cover; aspect-ratio: auto; }
  .ap-mc--fhero .ap-mc__body { order: 1; flex: 1; min-width: 0; padding-top: 0; }
  .ap-mc--fhero .ap-mc__title { font-size: clamp(1.05rem, 2.2vw, 1.4rem); letter-spacing: -0.3px; }
  .ap-mc--fhero .ap-mc__title a { color: var(--text); }
  .ap-mc--fextra { display: flex; order: 3; padding-top: 14px; border-top: 1px solid var(--border); margin-top: 14px; }
}

@media (max-width: 768px) {
  /* masthead */
  .ap-masthead { padding: 11px 16px; }
  .ap-masthead-inner { flex-wrap: wrap; }
  .ap-masthead-left { display: none; }
  .ap-masthead-right { display: none; }
  .ap-nav-toggle { display: block; }
  .ap-masthead-center { order: 2; flex: 1; }
  .ap-site-title { font-size: 26px; }
  .ap-city-train { max-width: 100%; }
  .ap-station-name { font-size: 6px; letter-spacing: 0.5px; }
  .ap-station-dot { width: 6px; height: 6px; }
  .ap-loco { width: 9px; height: 9px; }

  /* subnav */
  .ap-subnav-inner { padding: 0 16px; }
  .ap-subnav ul {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--cream2);
    border-bottom: 2px solid var(--navy);
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  }
  .ap-subnav ul.is-open { display: flex; }
  .ap-subnav ul li a { padding: 11px 20px; border-bottom: 1px solid var(--border); font-size: 13px; }
  .ap-subnav-subscribe { display: none; }

  /* main */
  .ap-main { padding: 0 16px; }

  /* hero */
  .ap-hero { flex-direction: column; }
  .ap-hero-featured { flex: none; padding-right: 0; border-right: none; border-bottom: 1px solid var(--border); padding-bottom: 18px; margin-bottom: 16px; }
  .ap-hero-featured .ap-feat-img { aspect-ratio: 16/9; height: auto; }
  .ap-hero-featured .ap-feat-title { line-height: 1.25; }
  .ap-hero-recent { padding-left: 0; }

  /* strips */
  .ap-strip-grid,
  .ap-strip-grid-3,
  .ap-strip-grid-2,
  .ap-strip-grid-1 { grid-template-columns: 1fr; gap: 0; }
  .ap-mosaic-orig--4,
  .ap-mosaic-orig--3,
  .ap-mosaic-orig--2 { grid-template-columns: 1fr; }
  /* mosaic mobile: single column */
  .ap-mosaic-a, .ap-mosaic-b { grid-template-columns: 1fr; }
  .ap-mosaic-a > .ap-mc, .ap-mosaic-b > .ap-mc { padding-right: 0; border-right: none; border-left: none; padding-left: 0; border-bottom: 1px solid var(--border); padding-bottom: 14px; margin-bottom: 14px; }
  .ap-mosaic-a > .ap-mc:last-child, .ap-mosaic-b > .ap-mc:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
  .ap-mc--sidebar { border-left: none; padding-left: 0; }
  .ap-mc--horiz { flex-direction: column; }
  .ap-mc--horiz__img { flex: none; width: 100%; }
  .ap-mosaic-c__row { grid-template-columns: 1fr; }
  .ap-card {
    display: flex;
    gap: 10px;
    padding-right: 0;
    border-right: none;
    border-bottom: 1px solid #ede9e1;
    padding-bottom: 12px;
    margin-bottom: 12px;
  }
  .ap-card:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
  .ap-card > a:first-child { flex-shrink: 0; width: 90px; }
  .ap-card .ap-card-img { width: 90px; height: 68px; aspect-ratio: auto; margin-bottom: 0; }
  .ap-card .ap-card-img-placeholder { width: 90px; height: 68px; aspect-ratio: auto; margin-bottom: 0; }
  .ap-card .ap-card-title { flex: 1; min-width: 0; }
  .ap-card .ap-card-title { line-height: 1.35; }

  /* article */
  .ap-article-wrap { padding: 20px 0 48px; }
  .ap-article-content { font-size: 0.9375rem; }

  /* archive */
  .ap-archive-grid { grid-template-columns: 1fr; gap: 16px; }

  /* hide card excerpts on mobile — hero excerpt (.ap-feat-excerpt) stays visible */
  .ap-mc__excerpt { display: none; }

  /* ── UNIFIED MOBILE STRIP PATTERN ──────────────────────────────────
     All section strips: big hero image+title first, then text+thumb rows
  ── */

  /* Layout E: hero stacks on top, right cards become rows (already correct) */
  .ap-mosaic-e { grid-template-columns: 1fr; gap: 0; }
  .ap-mc--ehero { margin-bottom: 20px; }
  .ap-mc--estack { height: auto; }
  .ap-mc-row__thumb-right { flex-shrink: 0; width: 90px; }
  .ap-mc-row__thumb-right .ap-mc-thumb-sq { width: 90px; height: 68px; aspect-ratio: auto; }

  /* Layout orig: first card = big image+title, rest = text left + small image right */
  .ap-mosaic-orig { grid-template-columns: 1fr; gap: 0; }
  .ap-mc--equal { display: flex; align-items: flex-start; gap: 12px; padding: 14px 0; border-top: 1px solid var(--border); }
  .ap-mc--equal:first-child { flex-direction: column; align-items: stretch; border-top: none; padding-top: 0; }
  .ap-mc--equal:not(:first-child) > a:first-child { order: 2; flex-shrink: 0; width: 90px; }
  .ap-mc--equal:not(:first-child) .ap-mc-img--wide { width: 90px; height: 68px; object-fit: cover; aspect-ratio: auto; }
  .ap-mc--equal:not(:first-child) .ap-mc__body { order: 1; flex: 1; min-width: 0; padding-top: 0; }
  .ap-mc--equal:first-child .ap-mc-img--wide { width: 100%; height: auto; aspect-ratio: 16/9; }
  .ap-mc--equal:first-child .ap-mc__body { padding-top: 10px; }

  /* Layout D: first card = big image on top, rest = existing text+thumb rows */
  .ap-mosaic-d { grid-template-columns: 1fr; }
  .ap-mc--econ { border-right: none !important; padding-left: 0 !important; padding-right: 0 !important; border-top: 1px solid var(--border) !important; }
  .ap-mc--econ-first { flex-direction: column; align-items: stretch; border-top: none !important; }
  .ap-mc--econ-first .ap-mc--econ__img { order: -1; width: 100%; }
  .ap-mc--econ-first .ap-mc-thumb-sq { width: 100%; height: auto; aspect-ratio: 16/9; }
  .ap-mc--econ-first .ap-mc--econ__text { padding-top: 10px; }
  .ap-mc--econ:not(.ap-mc--econ-first) .ap-mc--econ__img { width: 90px; }
  .ap-mc--econ:not(.ap-mc--econ-first) .ap-mc-thumb-sq { width: 90px; height: 68px; }

  /* Layout F: fcard = big image+title, fhero = text left + small image right */
  .ap-mosaic-f { grid-template-columns: 1fr; gap: 0; display: flex; flex-direction: column; align-items: stretch; }
  .ap-mc--fcard { order: 1; margin-bottom: 0; }
  .ap-mc--fcard .ap-mc-img--wide { height: auto; aspect-ratio: 16/9; }
  .ap-mc--fhero { order: 2; display: flex; flex-direction: row; align-items: flex-start; gap: 12px; padding-top: 14px; border-top: 1px solid var(--border); margin-top: 14px; }
  .ap-mc--fhero > a:first-child { order: 2; flex-shrink: 0; width: 90px; }
  .ap-mc--fhero .ap-mc-img--wide { width: 90px; height: 68px; object-fit: cover; aspect-ratio: auto; }
  .ap-mc--fhero .ap-mc__body { order: 1; flex: 1; min-width: 0; padding-top: 0; }
  .ap-mc--fextra { display: flex; order: 3; padding-top: 14px; border-top: 1px solid var(--border); margin-top: 14px; }

  /* footer */
  .ap-footer { padding: 32px 16px 20px; }
  .ap-footer-top { flex-direction: column; gap: 24px; }
  .ap-footer-subscribe-area { min-width: unset; width: 100%; }
}
