/*
Theme Name: The Jacksonite Magazine
Theme URI: https://mag.thejacksonites.com/
Author: The Jacksonites Digital Revamp
Description: Modern luxury editorial digital magazine theme for The Jacksonite Magazine — 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: jacksonite-mag
*/

:root {
  --jm-navy-deep: #071327;
  --jm-cream: #faf8f4;
  --jm-surface: #ffffff;
  --jm-ink: #161514;
  --jm-ink-soft: #363330;
  --jm-muted: #6b655e;
  --jm-burgundy: #9e2a2b;
  --jm-gold: #c89b3c;
  --jm-border: #e7e2d9;
  --jm-border-strong: #cfc8bc;
  --jm-font-serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --jm-font-sans: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --jm-container: 1240px;
}

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

body {
  margin: 0;
  font-family: var(--jm-font-sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--jm-ink);
  background: var(--jm-cream);
  -webkit-font-smoothing: antialiased;
}

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

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

a:hover {
  color: var(--jm-burgundy);
}

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

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

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

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

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

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

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

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

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

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

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

/* ==========================================================================
   Editorial Magazine Header
   ========================================================================== */
.jm-header {
  background: var(--jm-surface);
  border-bottom: 1px solid var(--jm-border);
}

.jm-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 0 20px;
  border-bottom: 1px solid var(--jm-border);
  flex-wrap: wrap;
}

.jm-issue-meta {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--jm-muted);
}

.jm-masthead-center {
  text-align: center;
  flex: 1;
}

.jm-wordmark {
  font-family: var(--jm-font-serif);
  font-size: clamp(1.9rem, 3.8vw, 3.1rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: 0;
  color: var(--jm-ink);
}

.jm-wordmark span {
  font-style: italic;
  color: var(--jm-burgundy);
}

.jm-tagline {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--jm-muted);
  margin: 6px 0 0;
}

.jm-search-box {
  display: flex;
  align-items: center;
  border: 1px solid var(--jm-border-strong);
  border-radius: 999px;
  overflow: hidden;
  background: var(--jm-cream);
}

.jm-search-box input {
  border: none;
  background: transparent;
  padding: 7px 14px;
  font-size: 13px;
  width: 170px;
  outline: none;
  font-family: inherit;
}

.jm-search-box button {
  border: none;
  background: var(--jm-ink);
  color: #ffffff;
  padding: 7px 14px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.jm-search-box button:hover {
  background: var(--jm-burgundy);
}

.jm-nav-bar {
  background: var(--jm-surface);
  border-bottom: 1px solid var(--jm-border);
  position: sticky;
  top: 0;
  z-index: 80;
}

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

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

.jm-nav-list a {
  display: block;
  padding: 13px 14px;
  font-size: 12.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  white-space: nowrap;
  color: var(--jm-ink-soft);
  border-bottom: 2px solid transparent;
}

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

/* ==========================================================================
   Cover Story Hero
   ========================================================================== */
.jm-cover-section {
  padding: 44px 0 56px;
}

.jm-cover-card {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  background: var(--jm-surface);
  border: 1px solid var(--jm-border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 16px 44px rgba(22, 21, 20, 0.06);
}

.jm-cover-media {
  position: relative;
  min-height: 440px;
  background: #1c1917;
  overflow: hidden;
}

.jm-cover-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.jm-cover-card:hover .jm-cover-media img {
  transform: scale(1.03);
}

.jm-cover-body {
  padding: 46px 42px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.jm-kicker {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--jm-burgundy);
  margin-bottom: 12px;
}

.jm-cover-title {
  font-family: var(--jm-font-serif);
  font-size: clamp(1.9rem, 3vw, 2.75rem);
  line-height: 1.15;
  margin: 0 0 18px;
  font-weight: 700;
}

.jm-cover-excerpt {
  font-size: 16.5px;
  color: var(--jm-muted);
  margin: 0 0 24px;
  line-height: 1.7;
}

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

.jm-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 999px;
  background: var(--jm-ink);
  color: #ffffff;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  margin-top: 24px;
  align-self: flex-start;
}

.jm-btn:hover {
  background: var(--jm-burgundy);
  color: #ffffff;
}

/* ==========================================================================
   Editorial Grids & Sections
   ========================================================================== */
.jm-section {
  padding: 48px 0;
  border-top: 1px solid var(--jm-border);
}

.jm-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 30px;
}

.jm-section-head h2 {
  font-family: var(--jm-font-serif);
  font-size: clamp(1.65rem, 2.5vw, 2.15rem);
  font-weight: 700;
  margin: 0;
}

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

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

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

.jm-card {
  display: flex;
  flex-direction: column;
}

.jm-thumb {
  border-radius: 10px;
  overflow: hidden;
  background: #e8e4dc;
  aspect-ratio: 4 / 3;
  margin-bottom: 16px;
}

.jm-thumb-tall {
  aspect-ratio: 4 / 5;
}

.jm-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.jm-card:hover .jm-thumb img {
  transform: scale(1.04);
}

.jm-thumb-fallback {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #27221f 0%, #5c2224 100%);
  color: rgba(255, 255, 255, 0.88);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px;
  font-family: var(--jm-font-serif);
  font-style: italic;
  font-size: 18px;
}

.jm-card-title {
  font-family: var(--jm-font-serif);
  font-size: 21px;
  line-height: 1.28;
  font-weight: 700;
  margin: 0 0 10px;
}

.jm-card-excerpt {
  font-size: 14.5px;
  color: var(--jm-muted);
  margin: 0 0 12px;
}

/* Newsletter Editorial Band */
.jm-newsletter-band {
  background: #171514;
  color: #ffffff;
  border-radius: 18px;
  padding: 52px 48px;
  margin: 24px 0 64px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 36px;
  align-items: center;
}

.jm-newsletter-band h2 {
  font-family: var(--jm-font-serif);
  font-size: clamp(1.7rem, 2.8vw, 2.35rem);
  margin: 8px 0 12px;
  line-height: 1.2;
}

.jm-newsletter-band p {
  margin: 0;
  color: rgba(255, 255, 255, 0.76);
  font-size: 15.5px;
}

.jm-newsletter-form {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.jm-newsletter-form input {
  flex: 1;
  min-width: 220px;
  padding: 14px 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font-size: 14.5px;
  outline: none;
}

.jm-newsletter-form input::placeholder {
  color: rgba(255, 255, 255, 0.55);
}

.jm-newsletter-form button {
  padding: 14px 26px;
  border-radius: 999px;
  border: none;
  background: var(--jm-gold);
  color: #161514;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
}

.jm-newsletter-form button:hover {
  background: #e2b857;
}

/* ==========================================================================
   Single Feature Reading View
   ========================================================================== */
.jm-article-wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 48px 0 72px;
}

.jm-article-header {
  text-align: center;
  margin-bottom: 32px;
}

.jm-article-header h1 {
  font-family: var(--jm-font-serif);
  font-size: clamp(2.1rem, 3.8vw, 3.1rem);
  line-height: 1.15;
  margin: 10px 0 18px;
}

.jm-article-meta {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 13.5px;
  color: var(--jm-muted);
}

.jm-article-featured {
  margin: 0 0 34px;
  border-radius: 14px;
  overflow: hidden;
}

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

.jm-article-content {
  font-size: 18px;
  line-height: 1.85;
  color: #24211f;
}

.jm-article-content > p:first-of-type::first-letter {
  font-family: var(--jm-font-serif);
  font-size: 3.4em;
  float: left;
  line-height: 0.85;
  padding-right: 10px;
  padding-top: 4px;
  color: var(--jm-burgundy);
  font-weight: 700;
}

.jm-article-content p {
  margin: 0 0 1.4em;
}

.jm-archive-head {
  padding: 40px 0 26px;
  border-bottom: 1px solid var(--jm-border-strong);
  margin-bottom: 36px;
  text-align: center;
}

.jm-archive-head h1 {
  font-family: var(--jm-font-serif);
  font-size: clamp(2rem, 3.2vw, 2.8rem);
  margin: 8px 0 0;
}

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

.jm-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);
}

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

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

.jm-footer a:hover {
  color: #f3d285;
}

.jm-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) {
  .jm-cover-card,
  .jm-newsletter-band,
  .jm-footer-grid {
    grid-template-columns: 1fr;
  }
  .jm-cover-media {
    min-height: 300px;
  }
  .jm-grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .jm-grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .jm-header-top {
    justify-content: center;
    text-align: center;
  }
  .jm-cover-body,
  .jm-newsletter-band {
    padding: 28px 24px;
  }
  .jm-grid-3,
  .jm-grid-4 {
    grid-template-columns: 1fr;
  }
}
