/* ============================================================
   Moyne Ross — Shared insights article overrides
   ------------------------------------------------------------
   Loaded AFTER each article's inline <style> block so these
   rules win on equal specificity. Brings the insight nav in
   line with the main site and widens the reading column.
   ============================================================ */

:root {
  --nav-height: 72px;
}

/* --- Body offset for fixed nav --- */
body { padding-top: var(--nav-height); }

/* --- Fixed nav matching main site --- */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  max-width: none;
  margin: 0;
  height: var(--nav-height);
  padding: 0 48px;
  background: rgba(26, 37, 48, 0.92);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}
nav.scrolled {
  background: rgba(20, 29, 38, 0.97);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

/* Uppercase wordmark matching main site */
.nav-logo { gap: 12px; }
.nav-logo img { height: 36px; width: 36px; object-fit: cover; border-radius: 4px; }
.nav-logo-text {
  font-family: 'DM Sans', system-ui, sans-serif !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  letter-spacing: 3.5px !important;
  text-transform: uppercase !important;
  color: var(--text) !important;
}

/* Nav links underline hover matching main site */
.nav-links { gap: 32px; }
.nav-links a { font-weight: 500; letter-spacing: 0.5px; position: relative; }
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 1px;
  background: var(--teal);
  transition: width 0.3s ease;
}
.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }
.nav-cta::after,
.nav-portal-link::after { display: none !important; }

/* Progress bar sits above the fixed nav */
.progress { z-index: 101; }

/* --- Wider reading column on desktop --- */
.breadcrumb,
.article-header,
.article-body,
.share-row,
.article-cta { max-width: 760px; }

/* Slightly wider hero & related grid */
.hero-img { max-width: 1040px; }
.related { max-width: 1200px; }

/* --- Mobile --- */
@media (max-width: 900px) {
  :root { --nav-height: 64px; }
  nav { padding: 0 20px; }
  .nav-links {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100vh;
    background: var(--bg);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 24px;
    z-index: 100;
  }
  .nav-links.open { display: flex; }
  .nav-links:not(.open) { display: none; }

  /* Harmonised mobile nav sizing — keeps Engage / Insights / Log in visually consistent
     and makes the Take a Look pill feel balanced rather than oversized */
  .nav-links a { font-size: 17px !important; font-weight: 500 !important; letter-spacing: 0.3px !important; }
  .nav-portal-link { font-size: 17px !important; font-weight: 500 !important; letter-spacing: 0.3px !important; }
  .nav-cta { padding: 10px 24px !important; font-size: 15px !important; font-weight: 600 !important; }

  /* ----- Insights hub (insights.html) mobile polish ----- */
  .page-header {
    padding: 24px 20px 20px !important;
    text-align: left !important;
  }
  .page-header h1 { font-size: 26px !important; line-height: 1.2; }
  .page-header p { font-size: 14px !important; }

  .magazine {
    grid-template-columns: 1fr !important;
    padding: 24px 20px 0 !important;
    gap: 28px !important;
  }
  /* Put the hero first, then left stacked cards, then sidebar */
  .mag-centre { order: 0; }
  .mag-left   { order: 1; gap: 20px !important; }
  .mag-right  { order: 2; }

  .mag-hero-img  { height: 220px !important; }
  .mag-hero-title,
  .mag-hero-excerpt,
  .mag-hero-meta { text-align: left !important; }
  .mag-hero-title { font-size: 24px !important; line-height: 1.25; }
  .mag-hero-excerpt { font-size: 15px !important; }

  .mag-left-img { height: 200px !important; }
  .mag-left-title { font-size: 17px !important; }

  /* Sidebar: vertical list, not horizontal scroll */
  .mag-sidebar-title { margin-bottom: 14px !important; }
  .mag-sidebar-list {
    flex-direction: column !important;
    overflow: visible !important;
    gap: 16px !important;
    padding-bottom: 0 !important;
  }
  .mag-sidebar-item { width: auto !important; }
  .sidebar-item-thumb { width: 56px !important; height: 56px !important; }
  .sidebar-item-title { font-size: 14px !important; }

  /* Recent posts: two up on tablets, one up on phones */
  .recent-grid { grid-template-columns: 1fr !important; gap: 20px !important; }
  .recent-section { padding: 32px 20px 0 !important; }
  .recent-section h2 { font-size: 20px !important; margin-bottom: 16px !important; }
  .recent-card-img { height: 200px !important; }

  .insights-cta { padding: 0 20px !important; margin-top: 36px !important; }
  .insights-cta-inner { padding: 28px 20px !important; }
  .insights-cta-inner h3 { font-size: 20px !important; }
}
