/* =============================================================================
   CNA / CNAP — style.css
   Central Crime News Agency of Pakistan
   Production CSS — No external dependencies
   ============================================================================= */

/* --- Google Fonts Import (self-host in production for CLS-free performance) --- */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700;900&family=Source+Serif+4:ital,wght@0,300;0,400;0,600;1,400&family=IBM+Plex+Sans:wght@400;500;600;700&display=swap');

/* ============================================================
   1. DESIGN TOKENS
   ============================================================ */
:root {
  /* Brand colors */
  --navy:        #0b132b;
  --navy-deep:   #060c1a;
  --navy-mid:    #0e1c35;
  --navy-light:  #1d2f50;
  --crimson:     #d90429;
  --crimson-dk:  #b5021f;
  --crimson-lt:  #ff2347;
  --white:       #ffffff;
  --off-white:   #f5f6f8;
  --light:       #e8eaf0;
  --muted:       #9aa3b0;
  --ink:         #1a2233;
  --ink-lt:      #3a4a5e;

  /* Typography */
  --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body:    'Source Serif 4', Georgia, serif;
  --font-ui:      'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Spacing */
  --gap:    16px;
  --gap-lg: 24px;
  --gap-xl: 40px;

  /* Layout */
  --max-w:        1200px;
  --sidebar-w:    300px;
  --nav-h:        52px;
  --header-h:     72px;

  /* Transitions */
  --trans: .18s ease;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  background: var(--navy-deep);
  color: var(--off-white);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
a:hover { text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
button { font-family: inherit; cursor: pointer; }
ul, ol { list-style: none; }

/* ============================================================
   3. LAYOUT UTILITIES
   ============================================================ */
.container {
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--gap);
}

/* ============================================================
   4. AD SLOTS — CLS-PREVENTION WRAPPERS
   ============================================================ */
.ad-wrap {
  background: var(--navy-mid);
  border: 1px solid var(--navy-light);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.ad-leaderboard {
  width: 100%;
  min-height: 90px; /* desktop leaderboard height */
  margin-bottom: 0;
}

.ad-leaderboard-feed {
  width: 100%;
  min-height: 90px;
  margin: var(--gap-lg) 0;
  border-radius: 4px;
}

.ad-sidebar {
  width: 100%;
  min-height: 250px;
  border-radius: 4px;
  margin-bottom: var(--gap-lg);
}

.ad-inline {
  margin: var(--gap-xl) auto;
  width: 300px;
  min-height: 250px;
  border-radius: 4px;
}

.ad-sticky {
  min-height: 600px;
}

.ad-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  position: relative;
}

.ad-300x250 { min-height: 250px; }
.ad-300x600 { min-height: 600px; }
.ad-728x90  { min-height: 90px;  }

.ad-label {
  position: absolute;
  top: 4px;
  right: 8px;
  font-size: .65rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .08em;
  font-family: var(--font-ui);
  pointer-events: none;
}

/* Mobile ad adjustments */
@media (max-width: 767px) {
  .ad-leaderboard  { min-height: 50px; }
  .ad-728x90       { min-height: 50px; }
}

/* ============================================================
   5. SITE HEADER
   ============================================================ */
.site-header {
  background: var(--navy);
  border-bottom: 3px solid var(--crimson);
  position: sticky;
  top: 0;
  z-index: 900;
}

.header-inner {
  max-width: var(--max-w);
  margin-inline: auto;
  padding: 0 var(--gap);
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--gap);
}

.logo {
  display: flex;
  flex-direction: column;
  line-height: 1;
  flex-shrink: 0;
}

.logo-cna {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--crimson);
  letter-spacing: -.02em;
  line-height: 1;
}

.logo-sub {
  font-size: .65rem;
  color: var(--muted);
  font-family: var(--font-ui);
  text-transform: uppercase;
  letter-spacing: .12em;
  margin-top: 2px;
}

.header-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

.header-date {
  font-size: .78rem;
  color: var(--muted);
  font-family: var(--font-ui);
  white-space: nowrap;
}

.rss-btn {
  background: var(--crimson);
  color: var(--white);
  font-size: .72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: .06em;
  white-space: nowrap;
  transition: background var(--trans);
}
.rss-btn:hover { background: var(--crimson-dk); }

@media (max-width: 480px) {
  .logo-sub { display: none; }
  .header-date { display: none; }
  .logo-cna { font-size: 1.8rem; }
}

/* ============================================================
   6. NAVIGATION — CSS-ONLY, JS-FREE
   ============================================================ */

/* Hide the real checkbox toggles */
.nav-toggle-cb,
.sub-toggle-cb { display: none; }

.site-nav {
  background: var(--navy-mid);
  border-bottom: 1px solid var(--navy-light);
  position: relative;
  z-index: 800;
}

.nav-inner {
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--gap);
  display: flex;
  align-items: center;
  min-height: var(--nav-h);
}

/* Desktop nav list */
.nav-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0;
  width: 100%;
}

.nav-item {
  position: relative;
}

.nav-link {
  display: block;
  padding: 14px 12px;
  font-size: .8rem;
  font-weight: 600;
  font-family: var(--font-ui);
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--light);
  white-space: nowrap;
  transition: color var(--trans);
  line-height: 1;
}

.nav-item:hover > .nav-link,
.nav-item:focus-within > .nav-link { color: var(--crimson); }

/* Dropdown submenu */
.sub-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200px;
  background: var(--navy);
  border: 1px solid var(--navy-light);
  border-top: 2px solid var(--crimson);
  box-shadow: 0 8px 24px rgba(0,0,0,.5);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity var(--trans), visibility var(--trans), transform var(--trans);
  z-index: 850;
}

.nav-item:hover > .sub-menu,
.nav-item:focus-within > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.sub-menu li a {
  display: block;
  padding: 10px 16px;
  font-size: .8rem;
  color: var(--muted);
  transition: color var(--trans), background var(--trans);
  font-family: var(--font-ui);
  border-bottom: 1px solid var(--navy-mid);
}
.sub-menu li:last-child a { border-bottom: none; }
.sub-menu li a:hover { color: var(--white); background: var(--navy-mid); }

/* Burger icon — hidden on desktop */
.burger { display: none; }
.sub-arrow { display: none; }
.nav-overlay { display: none; }

/* ============================================================
   6b. MOBILE NAV — CSS checkbox sidebar
   ============================================================ */
@media (max-width: 900px) {

  .burger {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 20px;
    cursor: pointer;
    padding: 0;
    margin-right: 16px;
    flex-shrink: 0;
    z-index: 950;
  }
  .burger span {
    display: block;
    height: 2px;
    background: var(--white);
    border-radius: 2px;
    transition: background var(--trans);
  }
  .nav-toggle-cb:checked ~ nav .burger span { background: var(--crimson); }

  /* Overlay */
  .nav-overlay {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.6);
    z-index: 790;
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s, visibility .25s;
    cursor: pointer;
  }
  .nav-toggle-cb:checked ~ .nav-overlay {
    opacity: 1;
    visibility: visible;
  }

  /* Sidebar panel */
  .site-nav {
    position: fixed;
    top: 0;
    left: -100%;
    width: min(300px, 85vw);
    height: 100vh;
    overflow-y: auto;
    background: var(--navy);
    border-right: 2px solid var(--crimson);
    border-bottom: none;
    z-index: 800;
    transition: left .3s cubic-bezier(.4,0,.2,1);
    padding-top: 60px;
  }
  .nav-toggle-cb:checked ~ nav.site-nav {
    left: 0;
  }

  .nav-inner {
    flex-direction: column;
    align-items: stretch;
    padding: 0;
    min-height: unset;
  }

  .nav-list {
    flex-direction: column;
    gap: 0;
    width: 100%;
  }

  .nav-item { position: relative; }

  .nav-link {
    display: block;
    padding: 13px 20px;
    font-size: .85rem;
    border-bottom: 1px solid var(--navy-light);
  }

  .sub-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 0;
    right: 0;
    width: 48px;
    height: 48px;
    color: var(--muted);
    font-size: .65rem;
    cursor: pointer;
    border-left: 1px solid var(--navy-light);
    transition: color var(--trans), transform var(--trans);
  }

  /* Mobile submenu: controlled by nested checkbox */
  .sub-menu {
    position: static;
    max-height: 0;
    overflow: hidden;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    border-top: none;
    background: var(--navy-deep);
    transition: max-height .3s ease;
  }

  .sub-toggle-cb:checked ~ .sub-menu {
    max-height: 400px;
  }
  .sub-toggle-cb:checked ~ .sub-arrow {
    color: var(--crimson);
    transform: rotate(180deg);
  }

  .sub-menu li a {
    padding: 10px 20px 10px 32px;
    border-bottom: 1px solid var(--navy-light);
    font-size: .8rem;
  }

  /* Close × button inside mobile nav */
  .nav-inner::before {
    content: '×';
    position: absolute;
    top: 12px;
    right: 16px;
    font-size: 1.8rem;
    color: var(--muted);
    cursor: pointer;
    line-height: 1;
  }
}

/* ============================================================
   7. BREAKING NEWS TICKER
   ============================================================ */
.ticker-wrap {
  background: var(--crimson);
  display: flex;
  align-items: center;
  overflow: hidden;
  height: 36px;
}

.ticker-label {
  background: var(--navy-deep);
  color: var(--crimson);
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: 0 14px;
  height: 100%;
  display: flex;
  align-items: center;
  white-space: nowrap;
  flex-shrink: 0;
  font-family: var(--font-ui);
}

.ticker-track {
  overflow: hidden;
  flex: 1;
}

.ticker-inner {
  display: flex;
  align-items: center;
  animation: ticker-scroll 45s linear infinite;
  will-change: transform;
}

@keyframes ticker-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.ticker-item {
  color: var(--white);
  font-size: .78rem;
  font-weight: 600;
  white-space: nowrap;
  padding-inline: 20px;
  font-family: var(--font-ui);
  transition: opacity var(--trans);
}
.ticker-item:hover { opacity: .8; }

.ticker-sep {
  color: rgba(255,255,255,.4);
  font-size: .5rem;
  flex-shrink: 0;
}

/* ============================================================
   8. SECTION HEADER
   ============================================================ */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px var(--gap) 16px;
  border-bottom: 2px solid var(--navy-light);
  margin-bottom: var(--gap-lg);
}
.section-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--white);
}
.section-parent { color: var(--muted); font-weight: 400; }
.section-clear {
  font-size: .78rem;
  color: var(--crimson);
  border: 1px solid var(--crimson);
  padding: 4px 10px;
  border-radius: 3px;
  white-space: nowrap;
  transition: background var(--trans), color var(--trans);
}
.section-clear:hover { background: var(--crimson); color: var(--white); }

/* ============================================================
   9. HOMEPAGE LAYOUT
   ============================================================ */
.homepage-main { padding-top: var(--gap-lg); padding-bottom: var(--gap-xl); }

.home-layout {
  display: grid;
  grid-template-columns: 1fr var(--sidebar-w);
  gap: var(--gap-xl);
  align-items: start;
}

@media (max-width: 960px) {
  .home-layout { grid-template-columns: 1fr; }
  .home-sidebar { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); }
}
@media (max-width: 600px) {
  .home-sidebar { grid-template-columns: 1fr; }
}

/* ============================================================
   10. FEATURED STORY BLOCK
   ============================================================ */
.featured-block {
  position: relative;
  border-radius: 6px;
  overflow: hidden;
  background: var(--navy-mid);
  margin-bottom: var(--gap-lg);
  border: 1px solid var(--navy-light);
}

.featured-img-link { display: block; }
.featured-img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
}

.featured-img-placeholder {
  width: 100%;
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, var(--navy-mid) 0%, var(--navy-light) 100%);
}

.featured-body {
  padding: 20px;
}

.featured-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.featured-title {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 10px;
  color: var(--white);
}
.featured-title a { color: inherit; }
.featured-title a:hover { color: var(--crimson); }

.featured-excerpt {
  color: var(--muted);
  font-size: .9rem;
  margin-bottom: 12px;
  line-height: 1.5;
  font-family: var(--font-body);
}

@media (min-width: 700px) {
  .featured-title { font-size: 2.1rem; }
}

/* ============================================================
   11. ARTICLE GRID
   ============================================================ */
.art-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--gap);
}

@media (max-width: 560px) { .art-grid { grid-template-columns: 1fr; } }

.art-card {
  background: var(--navy-mid);
  border: 1px solid var(--navy-light);
  border-radius: 5px;
  overflow: hidden;
  transition: border-color var(--trans), transform var(--trans);
}
.art-card:hover {
  border-color: var(--crimson);
  transform: translateY(-2px);
}

.art-card-img-link { display: block; }

.art-card-img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
}

.art-card-img-placeholder {
  width: 100%;
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}
.art-card-img-placeholder span {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 900;
  color: var(--crimson);
  opacity: .5;
}

.art-card-body { padding: 14px; }
.art-card-meta { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }

.art-card-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 6px;
  color: var(--white);
}
.art-card-title a { color: inherit; }
.art-card-title a:hover { color: var(--crimson); }

.art-card-excerpt {
  font-size: .8rem;
  color: var(--muted);
  line-height: 1.4;
  margin-bottom: 8px;
  font-family: var(--font-body);
}

/* ============================================================
   12. BADGES & BYLINES
   ============================================================ */
.art-cat-badge {
  background: var(--crimson);
  color: var(--white);
  font-size: .65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  padding: 2px 7px;
  border-radius: 2px;
  font-family: var(--font-ui);
  transition: background var(--trans);
  white-space: nowrap;
}
.art-cat-badge:hover { background: var(--crimson-dk); }
.art-cat-badge--sm { font-size: .6rem; padding: 2px 6px; }

.breaking-badge {
  background: var(--crimson);
  color: var(--white);
  font-size: .6rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .1em;
  padding: 2px 7px;
  border-radius: 2px;
  animation: blink-badge 1.4s infinite;
  font-family: var(--font-ui);
}
.breaking-badge--sm { font-size: .55rem; }

@keyframes blink-badge {
  0%, 100% { opacity: 1; }
  50%       { opacity: .6; }
}

.art-byline, .art-byline--sm {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .75rem;
  color: var(--muted);
  font-family: var(--font-ui);
  flex-wrap: wrap;
}
.art-byline .sep, .art-byline--sm .sep { color: var(--navy-light); }

/* ============================================================
   13. CATEGORY BAR (article page)
   ============================================================ */
.cat-bar {
  background: var(--navy-mid);
  border-bottom: 1px solid var(--navy-light);
  padding: 8px 0;
}
.cat-bar .container {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: .78rem;
  color: var(--muted);
  font-family: var(--font-ui);
}
.cat-bar a { color: var(--muted); }
.cat-bar a:hover { color: var(--crimson); }
.cat-bar .sep { color: var(--navy-light); }

/* ============================================================
   14. ARTICLE READING VIEW
   ============================================================ */
.article-main { padding-top: var(--gap-lg); padding-bottom: var(--gap-xl); }

.article-layout {
  display: grid;
  grid-template-columns: 1fr var(--sidebar-w);
  gap: var(--gap-xl);
  align-items: start;
}

@media (max-width: 900px) { .article-layout { grid-template-columns: 1fr; } }

.article-body {
  background: var(--navy-mid);
  border: 1px solid var(--navy-light);
  border-radius: 6px;
  overflow: hidden;
}

.article-head {
  padding: 28px 28px 0;
  border-bottom: 1px solid var(--navy-light);
  margin-bottom: 0;
  padding-bottom: 20px;
}

.article-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4vw, 2.5rem);
  font-weight: 900;
  color: var(--white);
  line-height: 1.2;
  margin-bottom: 12px;
}

.article-deck {
  font-family: var(--font-body);
  font-size: 1.1rem;
  color: var(--light);
  line-height: 1.5;
  margin-bottom: 14px;
  font-style: italic;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: .8rem;
  color: var(--muted);
  font-family: var(--font-ui);
  margin-bottom: 14px;
}
.article-meta span { display: flex; align-items: center; gap: 4px; }
.article-meta .meta-sep { color: var(--navy-light); }

.article-figure {
  margin: 0;
}
.article-figure img {
  width: 100%;
  display: block;
}

.article-content {
  padding: 28px;
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--light);
}

.article-content p        { margin-bottom: 1.2em; }
.article-content h2       { font-family: var(--font-display); font-size: 1.5rem; color: var(--white); margin: 1.6em 0 .6em; }
.article-content h3       { font-family: var(--font-display); font-size: 1.2rem; color: var(--white); margin: 1.4em 0 .5em; }
.article-content ul,
.article-content ol       { margin: 1em 0 1em 1.5em; }
.article-content li       { margin-bottom: .5em; }
.article-content blockquote {
  border-left: 4px solid var(--crimson);
  margin: 1.5em 0;
  padding: .8em 1.2em;
  background: rgba(217,4,41,.06);
  color: var(--light);
  font-style: italic;
  border-radius: 0 4px 4px 0;
}
.article-content a        { color: var(--crimson); text-decoration: underline; text-underline-offset: 3px; }
.article-content a:hover  { color: var(--crimson-lt); }
.article-content strong   { color: var(--white); }
.article-content img      { border-radius: 4px; margin: 1.2em 0; max-width: 100%; }

.article-tags {
  padding: 16px 28px;
  border-top: 1px solid var(--navy-light);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.tags-label { font-size: .75rem; color: var(--muted); font-family: var(--font-ui); text-transform: uppercase; letter-spacing: .06em; }
.tag-pill {
  background: var(--navy-light);
  color: var(--light);
  font-size: .72rem;
  padding: 3px 10px;
  border-radius: 20px;
  font-family: var(--font-ui);
  transition: background var(--trans), color var(--trans);
}
.tag-pill:hover { background: var(--crimson); color: var(--white); }

/* ============================================================
   15. SHARE BAR
   ============================================================ */
.share-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.share-bottom {
  padding: 16px 28px;
  border-top: 1px solid var(--navy-light);
  margin-bottom: 0;
}
.share-label {
  font-size: .75rem;
  color: var(--muted);
  font-family: var(--font-ui);
  text-transform: uppercase;
  letter-spacing: .06em;
}
.share-btn {
  font-size: .72rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 3px;
  font-family: var(--font-ui);
  transition: opacity var(--trans);
}
.share-btn:hover { opacity: .85; }
.share-fb { background: #1877f2; color: #fff; }
.share-tw { background: #1da1f2; color: #fff; }
.share-wa { background: #25d366; color: #fff; }

/* ============================================================
   16. SIDEBAR WIDGETS
   ============================================================ */
.article-sidebar, .home-sidebar {
  display: flex;
  flex-direction: column;
  gap: var(--gap-lg);
}

.sidebar-widget {
  background: var(--navy-mid);
  border: 1px solid var(--navy-light);
  border-radius: 5px;
  overflow: hidden;
}

.widget-title {
  background: var(--navy);
  border-bottom: 2px solid var(--crimson);
  padding: 12px 16px;
  font-family: var(--font-ui);
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--white);
}

/* Recent items */
.recent-item {
  padding: 12px 16px;
  border-bottom: 1px solid var(--navy-light);
}
.recent-item:last-child { border-bottom: none; }
.recent-time {
  font-size: .68rem;
  color: var(--crimson);
  font-family: var(--font-ui);
  margin-bottom: 3px;
  font-weight: 600;
}
.recent-title {
  display: block;
  font-size: .83rem;
  color: var(--light);
  line-height: 1.4;
  margin-bottom: 4px;
  font-family: var(--font-ui);
  transition: color var(--trans);
}
.recent-title:hover { color: var(--crimson); }
.recent-cat {
  font-size: .65rem;
  color: var(--muted);
  font-family: var(--font-ui);
  text-transform: uppercase;
  letter-spacing: .06em;
}

/* Related items */
.related-item {
  display: flex;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--navy-light);
  align-items: flex-start;
}
.related-item:last-child { border-bottom: none; }
.related-item img { border-radius: 3px; flex-shrink: 0; }
.related-info { flex: 1; min-width: 0; }
.related-info a {
  display: block;
  font-size: .82rem;
  color: var(--light);
  line-height: 1.4;
  margin-bottom: 4px;
  font-family: var(--font-ui);
  transition: color var(--trans);
}
.related-info a:hover { color: var(--crimson); }
.related-info time {
  font-size: .68rem;
  color: var(--muted);
  font-family: var(--font-ui);
}

/* Category list */
.cat-list {
  padding: 8px 0;
}
.cat-list li a {
  display: block;
  padding: 8px 16px;
  font-size: .82rem;
  color: var(--muted);
  font-family: var(--font-ui);
  border-bottom: 1px solid var(--navy-light);
  transition: color var(--trans), padding-left var(--trans);
}
.cat-list li:last-child a { border-bottom: none; }
.cat-list li a:hover { color: var(--crimson); padding-left: 24px; }

/* ============================================================
   17. BUTTONS
   ============================================================ */
.btn-load-more {
  display: inline-block;
  background: transparent;
  border: 2px solid var(--crimson);
  color: var(--crimson);
  font-size: .82rem;
  font-weight: 700;
  font-family: var(--font-ui);
  padding: 10px 28px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: .08em;
  transition: background var(--trans), color var(--trans);
}
.btn-load-more:hover { background: var(--crimson); color: var(--white); }

.btn-outline {
  display: inline-block;
  border: 1px solid var(--navy-light);
  color: var(--muted);
  padding: 8px 20px;
  border-radius: 4px;
  font-size: .82rem;
  font-family: var(--font-ui);
  transition: border-color var(--trans), color var(--trans);
}
.btn-outline:hover { border-color: var(--crimson); color: var(--crimson); }

/* ============================================================
   18. EMPTY STATE
   ============================================================ */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
  font-family: var(--font-ui);
}
.empty-state p { margin-bottom: 16px; }

/* ============================================================
   19. SITE FOOTER
   ============================================================ */
.site-footer {
  background: var(--navy);
  border-top: 3px solid var(--crimson);
  padding: var(--gap-xl) 0 var(--gap-lg);
  margin-top: var(--gap-xl);
}

.footer-inner {
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--gap);
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: var(--gap-xl);
}

@media (max-width: 700px) {
  .footer-inner { grid-template-columns: 1fr; gap: var(--gap-lg); }
}

.footer-brand .logo-cna { font-size: 2rem; }
.footer-brand p {
  font-size: .82rem;
  color: var(--muted);
  margin: 8px 0;
  font-family: var(--font-ui);
  line-height: 1.5;
}
.footer-brand a { color: var(--crimson); }

.footer-cats h4 {
  font-family: var(--font-ui);
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--muted);
  margin-bottom: 12px;
}
.footer-cats ul li a {
  display: block;
  font-size: .82rem;
  color: var(--muted);
  padding: 3px 0;
  font-family: var(--font-ui);
  transition: color var(--trans);
}
.footer-cats ul li a:hover { color: var(--crimson); }

.footer-legal {
  font-size: .78rem;
  color: var(--muted);
  font-family: var(--font-ui);
  line-height: 1.7;
}
.footer-legal a { color: var(--muted); }
.footer-legal a:hover { color: var(--crimson); }

/* ============================================================
   20. PERFORMANCE — CRITICAL RENDERING PATH
   ============================================================ */

/* Prevent layout shift for images before they load */
img { color: transparent; }

/* Prevent invisible text during font load */
@font-face { font-display: swap; }

/* ============================================================
   21. PRINT STYLES
   ============================================================ */
@media print {
  .site-nav, .ticker-wrap, .ad-wrap, .share-bar,
  .home-sidebar, .article-sidebar, .site-footer { display: none !important; }
  body { background: #fff; color: #000; font-size: 12pt; }
  .article-title { color: #000; }
  .article-content { color: #111; }
  a { color: #c00; }
}
