/*
Theme Name: The Record UNN
Theme URI: https://recordunn.thejacksonites.com/
Author: The Jacksonites Digital Revamp
Description: Modern broadsheet and digital newsroom theme for The Record Newspaper (Est. 1961) — Department of Mass Communication, University of Nigeria, Nsukka.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
Text Domain: record-unn
*/

:root {
  --rn-navy-deep: #071327;
  --rn-ink: #111318;
  --rn-ink-soft: #2e3440;
  --rn-muted: #5c6472;
  --rn-crimson: #b91c1c;
  --rn-crimson-dark: #991b1b;
  --rn-emerald: #0e6b47;
  --rn-gold: #c89b3c;
  --rn-paper: #ffffff;
  --rn-paper-warm: #f7f6f2;
  --rn-rule: #e2e4e9;
  --rn-rule-dark: #111318;
  --rn-font-serif: 'Newsreader', Georgia, 'Times New Roman', serif;
  --rn-font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --rn-container: 1260px;
}

*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--rn-font-sans);
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--rn-ink);
  background: var(--rn-paper);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.18s ease, background-color 0.18s ease, border-color 0.18s ease;
}

a:hover {
  color: var(--rn-crimson);
}

.rn-container {
  width: 100%;
  max-width: var(--rn-container);
  margin: 0 auto;
  padding: 0 22px;
}

/* ==========================================================================
   Unified Ecosystem Network Bar
   ========================================================================== */
.rn-ecosystem-bar {
  background: var(--rn-navy-deep);
  color: rgba(255, 255, 255, 0.82);
  font-size: 12.5px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.rn-ecosystem-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 40px;
  flex-wrap: wrap;
  padding: 6px 0;
}

.rn-ecosystem-links {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.rn-ecosystem-label {
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 10.5px;
  color: var(--rn-gold);
  margin-right: 8px;
}

.rn-ecosystem-links a {
  color: rgba(255, 255, 255, 0.78);
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 500;
}

.rn-ecosystem-links a:hover,
.rn-ecosystem-links a.is-active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
}

.rn-ecosystem-links a.is-active {
  background: var(--rn-crimson);
  font-weight: 600;
}

.rn-ecosystem-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.rn-ecosystem-actions a {
  color: rgba(255, 255, 255, 0.85);
  font-weight: 600;
  font-size: 12px;
}

.rn-ecosystem-actions a:hover {
  color: var(--rn-gold);
}

/* ==========================================================================
   Broadsheet Masthead & Navigation
   ========================================================================== */
.rn-masthead-wrap {
  background: #ffffff;
  border-bottom: 1px solid var(--rn-rule);
}

.rn-dateline-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  font-size: 12px;
  color: var(--rn-muted);
  border-bottom: 1px solid var(--rn-rule);
  flex-wrap: wrap;
}

.rn-dateline-left {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.rn-est-pill {
  font-weight: 700;
  color: var(--rn-emerald);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-size: 11px;
}

.rn-search-inline {
  display: flex;
  align-items: center;
  border: 1px solid var(--rn-rule);
  border-radius: 999px;
  overflow: hidden;
  background: var(--rn-paper-warm);
}

.rn-search-inline input {
  border: none;
  background: transparent;
  padding: 6px 12px;
  font-size: 12.5px;
  width: 180px;
  outline: none;
  font-family: inherit;
}

.rn-search-inline button {
  border: none;
  background: var(--rn-ink);
  color: #ffffff;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.rn-search-inline button:hover {
  background: var(--rn-crimson);
}

.rn-masthead {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 22px 0 18px;
  text-align: center;
}

.rn-masthead-crest {
  width: 60px;
  height: 60px;
  object-fit: contain;
  flex-shrink: 0;
}

.rn-masthead-title {
  font-family: var(--rn-font-serif);
  font-size: clamp(2.1rem, 4.4vw, 3.4rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1;
  color: var(--rn-ink);
  margin: 0;
}

.rn-masthead-title span {
  color: var(--rn-crimson);
}

.rn-masthead-motto {
  font-family: var(--rn-font-serif);
  font-style: italic;
  font-size: 14.5px;
  color: var(--rn-muted);
  margin: 5px 0 0;
}

.rn-nav-bar {
  border-top: 2px solid var(--rn-rule-dark);
  border-bottom: 1px solid var(--rn-rule);
  background: #ffffff;
  position: sticky;
  top: 0;
  z-index: 80;
}

.rn-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.rn-nav-list {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
  margin: 0;
  padding: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.rn-nav-list::-webkit-scrollbar {
  display: none;
}

.rn-nav-list a {
  display: block;
  padding: 12px 13px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
  color: var(--rn-ink);
  border-bottom: 2px solid transparent;
}

.rn-nav-list a:hover,
.rn-nav-list .current-cat a {
  color: var(--rn-crimson);
  border-bottom-color: var(--rn-crimson);
}

/* ==========================================================================
   Breaking / Latest Wire Bar
   ========================================================================== */
.rn-ticker-bar {
  background: var(--rn-paper-warm);
  border-bottom: 1px solid var(--rn-rule);
  padding: 9px 0;
}

.rn-ticker-inner {
  display: flex;
  align-items: center;
  gap: 14px;
  overflow: hidden;
}

.rn-ticker-label {
  background: var(--rn-crimson);
  color: #ffffff;
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 4px 10px;
  border-radius: 3px;
  flex-shrink: 0;
}

.rn-ticker-items {
  display: flex;
  align-items: center;
  gap: 22px;
  overflow-x: auto;
  scrollbar-width: none;
  font-size: 13.5px;
  font-weight: 500;
}

.rn-ticker-items::-webkit-scrollbar {
  display: none;
}

.rn-ticker-items a {
  white-space: nowrap;
  color: var(--rn-ink-soft);
}

.rn-ticker-items a:hover {
  color: var(--rn-crimson);
}

/* ==========================================================================
   Front Page Broadsheet Hero
   ========================================================================== */
.rn-main {
  padding: 32px 0 64px;
}

.rn-hero-grid {
  display: grid;
  grid-template-columns: 1.55fr 0.85fr;
  gap: 32px;
  padding-bottom: 36px;
  border-bottom: 2px solid var(--rn-rule-dark);
}

.rn-lead-story {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.rn-thumb-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 6px;
  background: #eceae4;
  aspect-ratio: 16 / 10;
}

.rn-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

a:hover .rn-thumb-wrap img {
  transform: scale(1.03);
}

.rn-thumb-fallback {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #111827 0%, #1e293b 65%, #7f1d1d 100%);
  color: rgba(255, 255, 255, 0.88);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px;
  font-family: var(--rn-font-serif);
  font-size: 18px;
  font-weight: 700;
}

.rn-cat-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--rn-crimson);
  margin-bottom: 6px;
}

.rn-lead-title {
  font-family: var(--rn-font-serif);
  font-size: clamp(1.75rem, 2.8vw, 2.45rem);
  line-height: 1.16;
  font-weight: 700;
  margin: 0 0 10px;
}

.rn-lead-excerpt {
  font-size: 16px;
  color: var(--rn-muted);
  margin: 0 0 12px;
  line-height: 1.6;
}

.rn-meta {
  font-size: 12.5px;
  color: var(--rn-muted);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.rn-subleads {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-top: 26px;
  padding-top: 24px;
  border-top: 1px solid var(--rn-rule);
}

.rn-card-title {
  font-family: var(--rn-font-serif);
  font-size: 19px;
  line-height: 1.28;
  font-weight: 700;
  margin: 6px 0 8px;
}

.rn-card-excerpt {
  font-size: 14px;
  color: var(--rn-muted);
  margin: 0 0 8px;
}

/* Latest Wire Sidebar */
.rn-wire {
  border-left: 1px solid var(--rn-rule);
  padding-left: 28px;
}

.rn-wire-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid var(--rn-crimson);
  padding-bottom: 10px;
  margin-bottom: 16px;
}

.rn-wire-head h2 {
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  margin: 0;
  color: var(--rn-crimson);
}

.rn-wire-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.rn-wire-item {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 10px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--rn-rule);
}

.rn-wire-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.rn-wire-num {
  font-family: var(--rn-font-serif);
  font-size: 22px;
  font-weight: 700;
  color: var(--rn-rule-dark);
  opacity: 0.25;
  line-height: 1;
}

.rn-wire-item h3 {
  font-family: var(--rn-font-serif);
  font-size: 16.5px;
  line-height: 1.32;
  margin: 0 0 5px;
  font-weight: 700;
}

/* ==========================================================================
   Category Sections
   ========================================================================== */
.rn-section {
  padding: 36px 0;
  border-bottom: 1px solid var(--rn-rule);
}

.rn-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 2px solid var(--rn-rule-dark);
  padding-bottom: 10px;
  margin-bottom: 24px;
}

.rn-section-head h2 {
  font-family: var(--rn-font-serif);
  font-size: 24px;
  font-weight: 800;
  margin: 0;
  color: var(--rn-ink);
}

.rn-section-head a {
  font-size: 12.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--rn-crimson);
}

.rn-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}

.rn-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 26px;
}

.rn-split-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 36px;
}

.rn-compact-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.rn-compact-card {
  display: grid;
  grid-template-columns: 118px 1fr;
  gap: 16px;
  align-items: start;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--rn-rule);
}

.rn-compact-card:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.rn-compact-card .rn-thumb-wrap {
  aspect-ratio: 4 / 3;
}

.rn-compact-card h3 {
  font-family: var(--rn-font-serif);
  font-size: 17px;
  line-height: 1.3;
  margin: 0 0 6px;
}

/* Dark Editorial Band (Features & Opinion) */
.rn-dark-band {
  background: #12161f;
  color: #ffffff;
  padding: 48px 0;
  margin: 24px 0 0;
}

.rn-dark-band .rn-section-head {
  border-bottom-color: rgba(255, 255, 255, 0.25);
}

.rn-dark-band .rn-section-head h2 {
  color: #ffffff;
}

.rn-dark-band .rn-card-excerpt,
.rn-dark-band .rn-meta {
  color: rgba(255, 255, 255, 0.72);
}

.rn-dark-band a:hover {
  color: #fca5a5;
}

/* ==========================================================================
   Single Article & Archives
   ========================================================================== */
.rn-article-wrap {
  max-width: 780px;
  margin: 0 auto;
  padding: 40px 0 64px;
}

.rn-article-header h1 {
  font-family: var(--rn-font-serif);
  font-size: clamp(2rem, 3.6vw, 2.9rem);
  line-height: 1.16;
  margin: 8px 0 16px;
}

.rn-article-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 14px 0;
  border-top: 1px solid var(--rn-rule);
  border-bottom: 1px solid var(--rn-rule);
  font-size: 13.5px;
  color: var(--rn-muted);
  margin-bottom: 26px;
}

.rn-article-featured {
  margin-bottom: 28px;
  border-radius: 8px;
  overflow: hidden;
}

.rn-article-featured img {
  width: 100%;
  max-height: 480px;
  object-fit: cover;
}

.rn-article-content {
  font-family: var(--rn-font-serif);
  font-size: 19px;
  line-height: 1.8;
  color: #1f242d;
}

.rn-article-content p {
  margin: 0 0 1.3em;
}

.rn-article-content h2,
.rn-article-content h3 {
  font-family: var(--rn-font-serif);
  margin: 1.6em 0 0.6em;
  line-height: 1.25;
}

.rn-share-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 34px 0;
  padding: 18px 0;
  border-top: 1px solid var(--rn-rule);
  border-bottom: 1px solid var(--rn-rule);
  font-size: 13px;
  font-weight: 700;
}

.rn-share-btn {
  padding: 7px 14px;
  border-radius: 6px;
  background: var(--rn-paper-warm);
  border: 1px solid var(--rn-rule);
  font-size: 12.5px;
  font-weight: 600;
}

.rn-share-btn:hover {
  background: var(--rn-ink);
  color: #ffffff;
  border-color: var(--rn-ink);
}

.rn-archive-header {
  padding: 32px 0 24px;
  border-bottom: 2px solid var(--rn-rule-dark);
  margin-bottom: 32px;
}

.rn-archive-header h1 {
  font-family: var(--rn-font-serif);
  font-size: clamp(1.9rem, 3vw, 2.6rem);
  margin: 6px 0 0;
}

.navigation.pagination {
  margin-top: 40px;
  display: flex;
  justify-content: center;
}

.nav-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.page-numbers {
  padding: 8px 14px;
  border: 1px solid var(--rn-rule);
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
}

.page-numbers.current {
  background: var(--rn-crimson);
  color: #ffffff;
  border-color: var(--rn-crimson);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.rn-footer {
  background: var(--rn-navy-deep);
  color: rgba(255, 255, 255, 0.78);
  padding: 56px 0 28px;
  margin-top: 40px;
}

.rn-footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 36px;
  padding-bottom: 36px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.rn-footer h4 {
  color: #ffffff;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  margin: 0 0 14px;
}

.rn-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
  font-size: 14px;
}

.rn-footer a:hover {
  color: #fca5a5;
}

.rn-footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-top: 22px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
  flex-wrap: wrap;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1024px) {
  .rn-hero-grid,
  .rn-split-2,
  .rn-footer-grid {
    grid-template-columns: 1fr;
  }
  .rn-wire {
    border-left: none;
    padding-left: 0;
    border-top: 1px solid var(--rn-rule);
    padding-top: 28px;
  }
  .rn-grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .rn-grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .rn-subleads,
  .rn-grid-4,
  .rn-grid-3 {
    grid-template-columns: 1fr;
  }
  .rn-masthead {
    flex-direction: column;
    gap: 8px;
  }
  .rn-masthead-crest {
    width: 48px;
    height: 48px;
  }
}
