/*
Theme Name: Novadeons
Theme URI: https://example.com/novadeons
Author: Deons
Author URI: https://codeandcapital.com.ng
Description: A dark-mode-only magazine/news theme built for high ad density — wire-service urgency in a deliberately restrained palette. No light mode, by design.
Version: 1.0.1
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: novadeons
*/

/* =========================================================
   1. DESIGN TOKENS
   Dark-only. There is no light-mode branch anywhere in this
   theme — do not add prefers-color-scheme overrides.
   ========================================================= */
:root {
  /* Surfaces — a charcoal-navy base, not pure black, with three elevation steps */
  --bg-base: #12141b;
  --bg-elevated: #1a1d26;
  --bg-elevated-2: #232733;
  --bg-ticker: #0d0e13;

  /* Borders */
  --border-subtle: #2c303c;
  --border-strong: #3a3f4e;

  /* Text */
  --text-primary: #ecedf1;
  --text-secondary: #b7bbc7;
  --text-muted: #767c8c;

  /* Accents — three, each with a job. Not decoration. */
  --accent-wire: #e14848;      /* breaking / category tags — wire-service urgency */
  --accent-wire-dim: #4a2226;  /* wire accent at low opacity for backgrounds */
  --accent-signal: #3e8ede;    /* links, CTAs, active states */
  --accent-gold: #d8a94e;      /* single reserved highlight — featured/premium only */

  /* Type */
  --font-display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --font-body: "Source Sans 3", "Segoe UI", sans-serif;

  /* Layout */
  --content-max: 1240px;
  --gap: 24px;
  --radius: 3px;
}

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

html { background: var(--bg-base); color-scheme: dark; }

body {
  background: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  margin: 0;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--accent-signal);
  text-decoration: none;
}
a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.1;
  margin: 0 0 0.4em;
  color: var(--text-primary);
}

.novadeons-container {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 20px;
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Visible keyboard focus everywhere — required, not optional polish */
a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--accent-signal);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* =========================================================
   3. MASTHEAD / TICKER
   ========================================================= */
.novadeons-ticker {
  background: var(--bg-ticker);
  border-bottom: 1px solid var(--border-subtle);
  font-size: 13px;
  color: var(--text-muted);
}
.novadeons-ticker .novadeons-container {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 8px;
  padding-bottom: 8px;
  overflow-x: auto;
  white-space: nowrap;
}
.novadeons-ticker .ticker-label {
  color: var(--accent-wire);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  flex: none;
}
.novadeons-ticker a { color: var(--text-secondary); }
.novadeons-ticker a:hover { color: var(--text-primary); }

.novadeons-header {
  background: var(--bg-base);
  border-bottom: 1px solid var(--border-subtle);
  padding: 18px 0;
}
.novadeons-header .novadeons-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--gap);
  flex-wrap: wrap;
}
.novadeons-logo {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.01em;
}
.novadeons-logo a { color: inherit; text-decoration: none; }
.novadeons-logo span { color: var(--accent-wire); }

.novadeons-primary-nav ul {
  list-style: none;
  display: flex;
  gap: 22px;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}
.novadeons-primary-nav a {
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 14px;
}
.novadeons-primary-nav a:hover,
.novadeons-primary-nav .current-menu-item > a {
  color: var(--text-primary);
  text-decoration: none;
}

.novadeons-nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  width: 42px;
  height: 38px;
  cursor: pointer;
  position: relative;
}
.novadeons-nav-toggle-bars,
.novadeons-nav-toggle-bars::before,
.novadeons-nav-toggle-bars::after {
  content: "";
  display: block;
  position: absolute;
  left: 10px;
  right: 10px;
  height: 2px;
  background: var(--text-primary);
}
.novadeons-nav-toggle-bars { top: 18px; }
.novadeons-nav-toggle-bars::before { top: -7px; }
.novadeons-nav-toggle-bars::after { top: 7px; }

@media (max-width: 780px) {
  .novadeons-nav-toggle { display: block; }
  .novadeons-primary-nav { display: none; width: 100%; }
  .novadeons-primary-nav.is-open { display: block; }
  .novadeons-primary-nav ul { flex-direction: column; gap: 0; padding: 10px 0; }
  .novadeons-primary-nav li { border-bottom: 1px solid var(--border-subtle); }
  .novadeons-primary-nav a { display: block; padding: 12px 4px; }
}

/* =========================================================
   4. AD ZONES
   Every ad slot renders through this shell so spacing and
   the "Advertisement" label stay consistent no matter which
   network/plugin fills it.
   ========================================================= */
.novadeons-ad-zone {
  margin: var(--gap) 0;
  text-align: center;
}
.novadeons-ad-zone .ad-label {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 6px;
  font-family: var(--font-body);
}
.novadeons-ad-zone .widget {
  background: var(--bg-elevated);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  min-height: 90px;
  width: 100%;
  max-width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
/* Whatever an ad plugin/network injects (iframe, ins, img) must never
   force horizontal overflow of the zone it's dropped into. */
.novadeons-ad-zone .widget iframe,
.novadeons-ad-zone .widget ins,
.novadeons-ad-zone .widget img,
.novadeons-ad-zone .widget > div {
  max-width: 100%;
}
.novadeons-ad-zone--leaderboard .widget { min-height: 90px; }
.novadeons-ad-zone--rectangle .widget { min-height: 250px; }
.novadeons-ad-zone--skyscraper .widget { min-height: 600px; }
.novadeons-ad-zone--in-feed .widget { min-height: 120px; }

/* =========================================================
   5. SECTION HEADERS
   ========================================================= */
.novadeons-section {
  margin: 40px 0;
}
.novadeons-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  border-bottom: 3px solid var(--accent-wire);
  padding-bottom: 8px;
  margin-bottom: 20px;
}
.novadeons-section-head h2 {
  font-size: 24px;
  margin: 0;
}
.novadeons-section-head .section-more {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 600;
}

/* =========================================================
   6. POST CARD (single reusable component — 3 sizes)
   ========================================================= */
.novadeons-card {
  position: relative;
  background: var(--bg-elevated);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
}
.novadeons-card__media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--bg-elevated-2);
}
.novadeons-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.novadeons-card__tag {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--accent-wire);
  color: #fff;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: var(--radius);
  z-index: 2;
}
.novadeons-card__body { padding: 14px 16px 16px; }
.novadeons-card__title {
  font-size: 18px;
  margin: 0 0 8px;
}
.novadeons-card__title a { color: var(--text-primary); }
.novadeons-card__title a:hover { color: var(--accent-signal); text-decoration: none; }
.novadeons-card__excerpt {
  color: var(--text-secondary);
  font-size: 14px;
  margin: 0 0 10px;
}
.novadeons-card__meta {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  gap: 8px;
  align-items: center;
}

/* Size: large (hero) */
.novadeons-card--large .novadeons-card__title { font-size: 28px; }
.novadeons-card--large .novadeons-card__excerpt { font-size: 15px; display: block; }

/* Size: small (list row, no media aspect constraint) */
.novadeons-card--small { border: none; background: transparent; }
.novadeons-card--small .novadeons-card__body { padding: 0; }
.novadeons-card--small .novadeons-card__title { font-size: 14px; margin-bottom: 4px; }
.novadeons-card--small .novadeons-card__excerpt { display: none; }

.novadeons-card-row {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-subtle);
}
.novadeons-card-row:last-child { border-bottom: none; }
.novadeons-card-row__media {
  flex: none;
  width: 84px;
  height: 64px;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-elevated-2);
}
.novadeons-card-row__media img { width: 100%; height: 100%; object-fit: cover; }

/* =========================================================
   7. GRID LAYOUTS
   ========================================================= */
.novadeons-grid-2col {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: var(--gap);
  align-items: start;
}
.novadeons-grid-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
}
/* Used for the Politics/Sports side-by-side pairing on the homepage.
   A dedicated class (not an inline style) so the responsive rules
   below can actually override it — inline styles beat media queries. */
.novadeons-grid-cards--split {
  grid-template-columns: 1fr 1fr;
}
.novadeons-hero-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: var(--gap);
}
.novadeons-hero-grid .novadeons-card-row-stack {
  display: flex;
  flex-direction: column;
  gap: 0;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: 0 14px;
}

/* =========================================================
   8. SIDEBAR
   ========================================================= */
.novadeons-sidebar { display: flex; flex-direction: column; gap: var(--gap); }
.novadeons-widget {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: 16px;
}
.novadeons-widget .widget-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  border-bottom: 2px solid var(--accent-wire);
  padding-bottom: 8px;
  margin: 0 0 12px;
}

/* Default WP widgets (Search, Recent Posts, Recent Comments, Categories,
   Archives, etc.) ship with no responsive styling of their own — reset
   and constrain them so they never overflow the sidebar column.
   :not(.novadeons-social-list) keeps this from touching the social
   button list styled separately below. */
.novadeons-widget ul:not(.novadeons-social-list) {
  list-style: none;
  margin: 0;
  padding: 0;
}
.novadeons-widget ul:not(.novadeons-social-list) li {
  padding: 8px 0;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 14px;
  color: var(--text-secondary);
  overflow-wrap: anywhere;
}
.novadeons-widget ul:not(.novadeons-social-list) li:last-child { border-bottom: none; }
.novadeons-widget ul:not(.novadeons-social-list) li a { color: var(--text-primary); }

.novadeons-widget .search-form,
.novadeons-widget form {
  display: flex;
  width: 100%;
  max-width: 100%;
}
.novadeons-widget .search-form label,
.novadeons-widget form label {
  flex: 1 1 auto;
  min-width: 0;
}
.novadeons-widget input[type="search"],
.novadeons-widget input[type="text"],
.novadeons-widget input[type="email"] {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  background: var(--bg-base);
  border: 1px solid var(--border-strong);
  color: var(--text-primary);
  padding: 8px 10px;
  border-radius: var(--radius) 0 0 var(--radius);
  font-family: var(--font-body);
}
.novadeons-widget .search-submit,
.novadeons-widget button[type="submit"] {
  flex: none;
  background: var(--accent-wire);
  color: #fff;
  border: none;
  padding: 8px 14px;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-weight: 700;
  cursor: pointer;
}

/* Recent Comments widget nests the comment author inside the link text
   by default — keep it from stretching the row on narrow columns. */
.novadeons-widget .widget_recent_comments li,
.novadeons-widget .widget_recent_entries li {
  line-height: 1.4;
}

.novadeons-social-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.novadeons-social-list a {
  display: block;
  padding: 10px 14px;
  border-radius: var(--radius);
  color: #fff;
  font-weight: 600;
  font-size: 14px;
}
.novadeons-social-list a:hover { text-decoration: none; opacity: 0.9; }
.social-facebook { background: #3b5998; }
.social-twitter { background: #1da1f2; }
.social-googleplus { background: #dd4b39; }
.social-dribbble { background: #ea4c89; }
.social-linkedin { background: #0077b5; }
.social-pinterest { background: #bd081c; }

/* =========================================================
   9. NEWSLETTER BAND
   ========================================================= */
.novadeons-newsletter {
  background: var(--bg-elevated);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  padding: 28px 0;
  margin: 40px 0;
}
.novadeons-newsletter .novadeons-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--gap);
  flex-wrap: wrap;
}
.novadeons-newsletter h3 { margin: 0 0 4px; font-size: 20px; }
.novadeons-newsletter p { margin: 0; color: var(--text-muted); font-size: 14px; }
.novadeons-newsletter-form { display: flex; gap: 0; flex: none; }
.novadeons-newsletter-form input[type="email"] {
  background: var(--bg-base);
  border: 1px solid var(--border-strong);
  border-right: none;
  color: var(--text-primary);
  padding: 10px 14px;
  border-radius: var(--radius) 0 0 var(--radius);
  min-width: 240px;
  font-family: var(--font-body);
}
.novadeons-newsletter-form button {
  background: var(--accent-wire);
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--font-body);
}
.novadeons-newsletter-form button:hover { background: #c53a3a; }

/* =========================================================
   10. FOOTER
   ========================================================= */
.novadeons-footer {
  background: var(--bg-ticker);
  border-top: 1px solid var(--border-subtle);
  padding: 40px 0 20px;
  margin-top: 40px;
}
.novadeons-footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--gap);
}
.novadeons-footer .widget-title {
  font-family: var(--font-display);
  font-size: 16px;
  color: var(--text-primary);
  margin: 0 0 12px;
}
.novadeons-footer-bottom {
  border-top: 1px solid var(--border-subtle);
  margin-top: 30px;
  padding-top: 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}

/* =========================================================
   11. RESPONSIVE
   ========================================================= */
@media (max-width: 960px) {
  .novadeons-grid-2col { grid-template-columns: 1fr; }
  .novadeons-hero-grid { grid-template-columns: 1fr; }
  .novadeons-grid-cards { grid-template-columns: repeat(2, 1fr); }
  .novadeons-grid-cards--split { grid-template-columns: repeat(2, 1fr); }
  .novadeons-footer-grid { grid-template-columns: repeat(2, 1fr); }

  /* 3-card sections: square media so image + title + meta fit one
     tidy block instead of a tall 16:10 crop squeezing the text below it. */
  .novadeons-card__media { aspect-ratio: 1 / 1; }
  .novadeons-card--large .novadeons-card__media { aspect-ratio: 16 / 10; }

  /* Ad zones scale down a step before the phone breakpoint so a
     160x600 skyscraper or 728x90 leaderboard isn't fighting a tablet
     width. */
  .novadeons-ad-zone--skyscraper .widget { min-height: 250px; }
  .novadeons-ad-zone--leaderboard .widget { min-height: 60px; }
}
@media (max-width: 600px) {
  .novadeons-grid-cards { grid-template-columns: 1fr; }
  .novadeons-grid-cards--split { grid-template-columns: 1fr; }
  .novadeons-footer-grid { grid-template-columns: 1fr; }
  .novadeons-logo { font-size: 26px; }
  .novadeons-primary-nav ul { gap: 14px; }
  .novadeons-newsletter .novadeons-container { flex-direction: column; align-items: flex-start; }

  /* Phone-width ad sizing: match common mobile ad unit heights
     (320x50 banner, 300x250 fits inside 320 width unchanged). */
  .novadeons-ad-zone--leaderboard .widget { min-height: 50px; }
  .novadeons-ad-zone--skyscraper .widget { min-height: 250px; }
  .novadeons-ad-zone--in-feed .widget { min-height: 100px; }

  .novadeons-card--large .novadeons-card__media { aspect-ratio: 1 / 1; }
  .novadeons-card--large .novadeons-card__title { font-size: 22px; }

  .novadeons-newsletter-form { width: 100%; }
  .novadeons-newsletter-form input[type="email"] { min-width: 0; flex: 1 1 auto; }
}
