/*
Theme Name: Nexavice
Theme URI: https://nexavice.com
Author: Nexavice Team
Author URI: https://nexavice.com
Description: A premium, fast, SEO-optimised news theme targeting UK, USA, Germany & Australia. Built for Google News approval, AdSense monetisation, and high Core Web Vitals scores.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: nexavice
Tags: news, magazine, dark-mode, responsive, seo, google-news, custom-menu, featured-images, threaded-comments, translation-ready
*/

/* ============================================================
   NEXAVICE — MASTER STYLESHEET
   Structure:
   1. CSS Custom Properties (Light + Dark Tokens)
   2. Reset & Base
   3. Typography
   4. Layout Utilities
   5. Header & Navigation
   6. Breaking News Ticker
   7. Hero Section
   8. Article Cards (Large / Medium / Small)
   9. Regional Tabs Widget
  10. Sidebar Widgets
  11. Article Single Page
  12. Category Pages
  13. Author Pages
  14. Tag Pages
  15. Search Results
  16. Footer
  17. Dark Mode Overrides
  18. Responsive / Mobile-first
  19. Accessibility
  20. Print
============================================================ */

/* ============================================================
   1. CSS CUSTOM PROPERTIES
============================================================ */
:root {
  /* Brand */
  --nx-red:         #E8192C;
  --nx-red-dark:    #C4111F;
  --nx-red-light:   #FFF0F1;
  --nx-navy:        #0D1B2A;
  --nx-navy-mid:    #1A2C3D;
  --nx-gold:        #F5A623;

  /* Neutrals */
  --nx-bg:          #FFFFFF;
  --nx-bg-2:        #F6F7F9;
  --nx-bg-3:        #EEF0F4;
  --nx-border:      #E2E5EB;
  --nx-border-dark: #CBD0D8;

  /* Text */
  --nx-text-primary:   #0D1B2A;
  --nx-text-secondary: #4A5568;
  --nx-text-muted:     #718096;
  --nx-text-inverse:   #FFFFFF;

  /* Country accent pills */
  --uk-bg: #EBF3FF; --uk-text: #1D4ED8;
  --us-bg: #FFF0F0; --us-text: #C00020;
  --de-bg: #FFF8E1; --de-text: #92400E;
  --au-bg: #ECFDF5; --au-text: #065F46;

  /* Category colours */
  --cat-world:    #6366F1;
  --cat-politics: #DC2626;
  --cat-tech:     #0EA5E9;
  --cat-business: #16A34A;
  --cat-sports:   #F97316;
  --cat-health:   #EC4899;
  --cat-science:  #8B5CF6;
  --cat-ent:      #EAB308;

  /* Typography */
  --font-display: 'Playfair Display', 'Georgia', serif;
  --font-ui:      'DM Sans', 'Helvetica Neue', sans-serif;
  --font-mono:    'JetBrains Mono', monospace;

  /* Spacing */
  --nx-max-width: 1280px;
  --nx-gutter:    24px;
  --nx-radius:    6px;
  --nx-radius-lg: 10px;

  /* Shadows */
  --shadow-sm:  0 1px 3px rgba(13,27,42,.08), 0 1px 2px rgba(13,27,42,.06);
  --shadow-md:  0 4px 12px rgba(13,27,42,.10), 0 2px 6px rgba(13,27,42,.07);
  --shadow-lg:  0 10px 30px rgba(13,27,42,.12), 0 4px 10px rgba(13,27,42,.08);

  /* Transitions */
  --ease: cubic-bezier(.4,0,.2,1);
  --duration: 200ms;
}

/* Dark mode tokens */
[data-theme="dark"] {
  --nx-bg:          #0D1117;
  --nx-bg-2:        #161B22;
  --nx-bg-3:        #1E2530;
  --nx-border:      #30363D;
  --nx-border-dark: #444C56;
  --nx-text-primary:   #E6EDF3;
  --nx-text-secondary: #8B949E;
  --nx-text-muted:     #6E7681;
  --nx-text-inverse:   #0D1117;

  --uk-bg: #1A2744; --uk-text: #93B4FF;
  --us-bg: #3B1212; --us-text: #FCA5A5;
  --de-bg: #3B2A10; --de-text: #FCD34D;
  --au-bg: #0E2E1F; --au-text: #6EE7B7;

  --shadow-sm:  0 1px 3px rgba(0,0,0,.3);
  --shadow-md:  0 4px 12px rgba(0,0,0,.4);
  --shadow-lg:  0 10px 30px rgba(0,0,0,.5);
}

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

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

body {
  font-family: var(--font-ui);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--nx-text-primary);
  background: var(--nx-bg);
  transition: background var(--duration) var(--ease), color var(--duration) var(--ease);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

/* ============================================================
   3. TYPOGRAPHY
============================================================ */
.nx-headline-xl {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3.5vw, 2.75rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -.02em;
  color: var(--nx-text-primary);
}

.nx-headline-lg {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2.5vw, 1.8rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -.015em;
}

.nx-headline-md {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 1.8vw, 1.35rem);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -.01em;
}

.nx-headline-sm {
  font-family: var(--font-ui);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
}

.nx-overline {
  font-family: var(--font-ui);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--nx-text-muted);
}

.nx-byline {
  font-size: .8rem;
  color: var(--nx-text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* ============================================================
   4. LAYOUT UTILITIES
============================================================ */
.nx-container {
  max-width: var(--nx-max-width);
  margin: 0 auto;
  padding: 0 var(--nx-gutter);
}

.nx-grid-main {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 32px;
  align-items: start;
}

.nx-section { padding: 40px 0; }
.nx-section + .nx-section { border-top: 1px solid var(--nx-border); }

.nx-divider { border: none; border-top: 1px solid var(--nx-border); margin: 24px 0; }

/* ============================================================
   5. HEADER & NAVIGATION
============================================================ */
/* Sticky wrapper — topbar + header + nav all stick together */
.nx-sticky-wrap {
  position: sticky;
  top: 0;
  z-index: 1000;
}

#nx-header {
  position: relative;
  top: auto;
  z-index: auto;
  background: var(--nx-bg);
  border-bottom: 1px solid var(--nx-border);
  transition: background var(--duration) var(--ease), border-color var(--duration) var(--ease);
}

/* Top bar (date + social) */
.nx-topbar {
  background: var(--nx-navy);
  color: rgba(255,255,255,.7);
  font-size: .72rem;
  letter-spacing: .03em;
}

.nx-topbar .nx-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 34px;
}

.nx-topbar a {
  color: rgba(255,255,255,.7);
  transition: color var(--duration);
}
.nx-topbar a:hover { color: #fff; }

.nx-topbar-socials { display: flex; gap: 12px; }
.nx-topbar-socials a { font-size: .75rem; }

/* Topbar page links */
.nx-topbar-pages {
  display: flex;
  align-items: center;
  gap: 0;
  margin-left: 8px;
  flex: 1;
}
.nx-topbar-pages a {
  font-size: .72rem;
  font-weight: 500;
  color: rgba(255,255,255,.65);
  padding: 0 10px;
  border-right: 1px solid rgba(255,255,255,.12);
  letter-spacing: .03em;
  transition: color .15s;
  white-space: nowrap;
}
.nx-topbar-pages a:first-child { padding-left: 0; }
.nx-topbar-pages a:last-child  { border-right: none; }
.nx-topbar-pages a:hover       { color: #fff; }

@media (max-width: 768px) {
  .nx-topbar-pages { display: none; }
}

/* Main header row */
.nx-header-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
}

/* Logo */
.nx-logo {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 900;
  letter-spacing: -.04em;
  color: var(--nx-red);
  display: flex;
  align-items: center;
  gap: 4px;
  text-decoration: none;
}

.nx-logo-accent {
  color: var(--nx-red);
}

/* Header actions */
.nx-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Search toggle */
.nx-search-btn {
  background: none;
  border: 1px solid var(--nx-border);
  border-radius: var(--nx-radius);
  padding: 7px 14px;
  font-size: .82rem;
  color: var(--nx-text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all var(--duration);
}
.nx-search-btn:hover { border-color: var(--nx-red); color: var(--nx-red); }

/* Dark mode toggle */
.nx-dark-toggle {
  background: none;
  border: 1px solid var(--nx-border);
  border-radius: var(--nx-radius);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: var(--nx-text-secondary);
  transition: all var(--duration);
}
.nx-dark-toggle:hover { border-color: var(--nx-gold); color: var(--nx-gold); }

/* Primary navigation */
#nx-nav {
  border-top: 1px solid var(--nx-border);
  background: var(--nx-bg);
}

.nx-nav-list {
  display: flex;
  align-items: center;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.nx-nav-list::-webkit-scrollbar { display: none; }

.nx-nav-item { position: relative; }

.nx-nav-link {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 12px 16px;
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: var(--nx-text-secondary);
  white-space: nowrap;
  transition: color var(--duration);
  border-bottom: 2px solid transparent;
}
.nx-nav-link:hover,
.nx-nav-link.active { color: var(--nx-red); border-bottom-color: var(--nx-red); }

/* Mega dropdown */
.nx-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  background: var(--nx-bg);
  border: 1px solid var(--nx-border);
  border-radius: 0 0 var(--nx-radius-lg) var(--nx-radius-lg);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: all var(--duration) var(--ease);
  z-index: 100;
}
.nx-nav-item:hover .nx-dropdown { opacity: 1; visibility: visible; transform: translateY(0); }

.nx-dropdown a {
  display: block;
  padding: 10px 18px;
  font-size: .85rem;
  color: var(--nx-text-secondary);
  border-bottom: 1px solid var(--nx-border);
  transition: all var(--duration);
}
.nx-dropdown a:last-child { border-bottom: none; }
.nx-dropdown a:hover { color: var(--nx-red); background: var(--nx-bg-2); padding-left: 24px; }

/* Mobile hamburger */
.nx-hamburger {
  display: none;
  background: none;
  border: 1px solid var(--nx-border);
  border-radius: var(--nx-radius);
  width: 36px;
  height: 36px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.nx-hamburger span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--nx-text-primary);
  border-radius: 2px;
  transition: all var(--duration);
}

/* Search overlay */
.nx-search-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(13,27,42,.8);
  backdrop-filter: blur(4px);
  z-index: 9999;
  align-items: flex-start;
  justify-content: center;
  padding-top: 80px;
}
.nx-search-overlay.open { display: flex; }

.nx-search-box {
  background: var(--nx-bg);
  border-radius: var(--nx-radius-lg);
  padding: 24px;
  width: min(640px, 90vw);
  box-shadow: var(--shadow-lg);
}

.nx-search-input-wrap {
  display: flex;
  gap: 10px;
}

.nx-search-input {
  flex: 1;
  border: 1px solid var(--nx-border);
  border-radius: var(--nx-radius);
  padding: 12px 16px;
  font-size: 1rem;
  background: var(--nx-bg-2);
  color: var(--nx-text-primary);
  outline: none;
  transition: border-color var(--duration);
}
.nx-search-input:focus { border-color: var(--nx-red); }

.nx-btn-primary {
  background: var(--nx-red);
  color: #fff;
  border: none;
  border-radius: var(--nx-radius);
  padding: 12px 20px;
  font-size: .9rem;
  font-weight: 600;
  transition: background var(--duration);
}
.nx-btn-primary:hover { background: var(--nx-red-dark); }

/* ============================================================
   6. BREAKING NEWS TICKER
============================================================ */
.nx-ticker {
  background: var(--nx-red);
  color: #fff;
  overflow: hidden;
  height: 36px;
  display: flex;
  align-items: center;
}

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

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

.nx-ticker-inner {
  display: flex;
  gap: 64px;
  animation: ticker-scroll 40s linear infinite;
  white-space: nowrap;
}
.nx-ticker:hover .nx-ticker-inner { animation-play-state: paused; }

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

.nx-ticker-item {
  font-size: .8rem;
  font-weight: 500;
  color: rgba(255,255,255,.9);
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: color var(--duration);
  flex-shrink: 0;
}
.nx-ticker-item:hover { color: #fff; }
.nx-ticker-item::before { content: '•'; color: rgba(255,255,255,.4); }

/* ============================================================
   7. HERO SECTION
============================================================ */
.nx-hero {
  padding: 28px 0;
}

.nx-hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 16px;
}

/* Featured story (takes full left column) */
.nx-hero-featured {
  grid-row: 1 / 3;
  position: relative;
  border-radius: var(--nx-radius-lg);
  overflow: hidden;
  background: var(--nx-bg-3);
  min-height: 460px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.nx-hero-featured-img {
  position: absolute;
  inset: 0;
  object-fit: cover;
  width: 100%;
  height: 100%;
}

.nx-hero-featured-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.85) 0%, rgba(0,0,0,.2) 60%, transparent 100%);
}

.nx-hero-featured-body {
  position: relative;
  z-index: 2;
  padding: 24px;
  color: #fff;
}

/* Secondary stories (right column, 2 rows) */
.nx-hero-secondary {
  border-radius: var(--nx-radius-lg);
  overflow: hidden;
  background: var(--nx-bg-2);
  border: 1px solid var(--nx-border);
  display: flex;
  flex-direction: column;
}

.nx-hero-secondary-img-wrap {
  position: relative;
  flex: 0 0 160px;
  overflow: hidden;
}

.nx-hero-secondary-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 400ms var(--ease);
}
.nx-hero-secondary:hover .nx-hero-secondary-img { transform: scale(1.04); }

.nx-hero-secondary-body {
  padding: 16px;
  flex: 1;
}

/* ============================================================
   8. ARTICLE CARDS
============================================================ */

/* ---- Large card ---- */
.nx-card-lg {
  border-radius: var(--nx-radius-lg);
  overflow: hidden;
  background: var(--nx-bg);
  border: 1px solid var(--nx-border);
  transition: box-shadow var(--duration), transform var(--duration);
}
.nx-card-lg:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

.nx-card-lg-img-wrap {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--nx-bg-3);
}
.nx-card-lg-img { width: 100%; height: 100%; object-fit: cover; transition: transform 400ms var(--ease); }
.nx-card-lg:hover .nx-card-lg-img { transform: scale(1.04); }

.nx-card-lg-body { padding: 20px; }

/* ---- Medium card ---- */
.nx-card-md {
  display: flex;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--nx-border);
}
.nx-card-md:last-child { border-bottom: none; }

.nx-card-md-img-wrap {
  flex: 0 0 110px;
  height: 80px;
  border-radius: var(--nx-radius);
  overflow: hidden;
  background: var(--nx-bg-3);
}
.nx-card-md-img { width: 100%; height: 100%; object-fit: cover; transition: transform 400ms var(--ease); }
.nx-card-md:hover .nx-card-md-img { transform: scale(1.06); }

.nx-card-md-body { flex: 1; min-width: 0; }

/* ---- Small card (list style) ---- */
.nx-card-sm {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--nx-border);
}
.nx-card-sm:last-child { border-bottom: none; }

.nx-card-sm-num {
  flex: 0 0 28px;
  font-size: 1.4rem;
  font-weight: 900;
  font-family: var(--font-display);
  color: var(--nx-border-dark);
  line-height: 1;
}

.nx-card-sm-body { flex: 1; min-width: 0; }

/* ============================================================
   9. CATEGORY BADGE & COUNTRY PILLS
============================================================ */
.nx-cat {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  background: var(--nx-red);
  color: #fff;
  text-decoration: none;
  transition: opacity var(--duration);
}
.nx-cat:hover { opacity: .85; }

.nx-cat-world    { background: var(--cat-world); }
.nx-cat-politics { background: var(--cat-politics); }
.nx-cat-tech     { background: var(--cat-tech); }
.nx-cat-business { background: var(--cat-business); }
.nx-cat-sports   { background: var(--cat-sports); }
.nx-cat-health   { background: var(--cat-health); }
.nx-cat-science  { background: var(--cat-science); }
.nx-cat-entertainment { background: var(--cat-ent); }

.nx-country-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .04em;
}
.nx-country-pill.uk { background: var(--uk-bg); color: var(--uk-text); }
.nx-country-pill.us { background: var(--us-bg); color: var(--us-text); }
.nx-country-pill.de { background: var(--de-bg); color: var(--de-text); }
.nx-country-pill.au { background: var(--au-bg); color: var(--au-text); }

/* ============================================================
   10. REGIONAL TABS WIDGET
============================================================ */
.nx-tabs {
  border-bottom: 1px solid var(--nx-border);
  margin-bottom: 20px;
  display: flex;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.nx-tabs::-webkit-scrollbar { display: none; }

.nx-tab-btn {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 10px 18px;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--nx-text-muted);
  white-space: nowrap;
  transition: all var(--duration);
  margin-bottom: -1px;
}
.nx-tab-btn:hover { color: var(--nx-text-primary); }
.nx-tab-btn.active { color: var(--nx-red); border-bottom-color: var(--nx-red); }

.nx-tab-panel { display: none; }
.nx-tab-panel.active { display: block; }

/* ============================================================
   11. SIDEBAR WIDGETS
============================================================ */
.nx-sidebar { display: flex; flex-direction: column; gap: 28px; }

.nx-widget {
  background: var(--nx-bg-2);
  border: 1px solid var(--nx-border);
  border-radius: var(--nx-radius-lg);
  padding: 20px;
}

.nx-widget-title {
  font-family: var(--font-ui);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--nx-text-muted);
  padding-bottom: 12px;
  margin-bottom: 16px;
  border-bottom: 2px solid var(--nx-red);
  display: inline-block;
}

/* Newsletter widget */
.nx-newsletter-input {
  width: 100%;
  border: 1px solid var(--nx-border);
  border-radius: var(--nx-radius);
  padding: 10px 14px;
  font-size: .875rem;
  background: var(--nx-bg);
  color: var(--nx-text-primary);
  margin-bottom: 10px;
  outline: none;
  transition: border-color var(--duration);
}
.nx-newsletter-input:focus { border-color: var(--nx-red); }

.nx-newsletter-btn {
  width: 100%;
  background: var(--nx-red);
  color: #fff;
  border: none;
  border-radius: var(--nx-radius);
  padding: 10px;
  font-size: .875rem;
  font-weight: 600;
  transition: background var(--duration);
}
.nx-newsletter-btn:hover { background: var(--nx-red-dark); }

/* Trending tags */
.nx-tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.nx-tag {
  background: var(--nx-bg-3);
  border: 1px solid var(--nx-border);
  border-radius: 20px;
  padding: 4px 12px;
  font-size: .76rem;
  font-weight: 500;
  color: var(--nx-text-secondary);
  transition: all var(--duration);
}
.nx-tag:hover { background: var(--nx-red); color: #fff; border-color: var(--nx-red); }

/* ============================================================
   12. ARTICLE SINGLE PAGE
============================================================ */
.nx-article-header { padding: 32px 0 24px; }
.nx-article-header .nx-headline-xl { margin: 16px 0 12px; }

.nx-article-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 0;
  border-top: 1px solid var(--nx-border);
  border-bottom: 1px solid var(--nx-border);
  margin: 20px 0;
  flex-wrap: wrap;
}

.nx-author-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--nx-border);
}

/* Article body */
.nx-article-body {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--nx-text-primary);
}

.nx-article-body p { margin-bottom: 1.5rem; }
.nx-article-body h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  margin: 2.5rem 0 1rem;
  color: var(--nx-text-primary);
}
.nx-article-body h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  margin: 2rem 0 .75rem;
}
.nx-article-body a { color: var(--nx-red); border-bottom: 1px solid rgba(232,25,44,.3); }
.nx-article-body a:hover { border-bottom-color: var(--nx-red); }
.nx-article-body blockquote {
  border-left: 4px solid var(--nx-red);
  margin: 2rem 0;
  padding: 16px 24px;
  background: var(--nx-bg-2);
  border-radius: 0 var(--nx-radius) var(--nx-radius) 0;
  font-style: italic;
  font-size: 1.1rem;
}
.nx-article-body figure { margin: 2rem 0; }
.nx-article-body figure img { border-radius: var(--nx-radius); width: 100%; }
.nx-article-body figcaption {
  font-size: .8rem;
  color: var(--nx-text-muted);
  text-align: center;
  margin-top: 8px;
}

/* Sticky share bar */
.nx-share-bar {
  position: sticky;
  top: 80px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-left: -56px;
  width: 44px;
}

.nx-share-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--nx-border);
  background: var(--nx-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .85rem;
  color: var(--nx-text-secondary);
  transition: all var(--duration);
  box-shadow: var(--shadow-sm);
}
.nx-share-btn:hover { background: var(--nx-red); color: #fff; border-color: var(--nx-red); }

/* ============================================================
   13. FOOTER
============================================================ */
#nx-footer {
  background: var(--nx-navy);
  color: rgba(255,255,255,.75);
  margin-top: 60px;
}

.nx-footer-top {
  padding: 48px 0 32px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}

.nx-footer-brand .nx-logo { color: #fff; margin-bottom: 12px; }
.nx-footer-brand p { font-size: .85rem; line-height: 1.7; max-width: 280px; }

.nx-footer-col-title {
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(255,255,255,.4);
  margin-bottom: 16px;
}

.nx-footer-links { display: flex; flex-direction: column; gap: 10px; }
.nx-footer-links a {
  font-size: .85rem;
  color: rgba(255,255,255,.65);
  transition: color var(--duration);
}
.nx-footer-links a:hover { color: #fff; }

.nx-footer-bottom {
  padding: 16px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: .78rem;
  color: rgba(255,255,255,.4);
  flex-wrap: wrap;
  gap: 12px;
}

.nx-footer-bottom-links { display: flex; gap: 20px; }
.nx-footer-bottom-links a { color: rgba(255,255,255,.4); transition: color var(--duration); }
.nx-footer-bottom-links a:hover { color: rgba(255,255,255,.7); }

/* ============================================================
   14. DARK MODE OVERRIDES
============================================================ */
[data-theme="dark"] #nx-header { box-shadow: 0 1px 0 var(--nx-border); }
[data-theme="dark"] .nx-ticker { background: #B01221; }
[data-theme="dark"] .nx-widget { background: var(--nx-bg-2); }
[data-theme="dark"] .nx-card-lg { background: var(--nx-bg-2); }
[data-theme="dark"] .nx-hero-secondary { background: var(--nx-bg-2); }
[data-theme="dark"] .nx-article-body blockquote { background: var(--nx-bg-2); }
[data-theme="dark"] .nx-tag { background: var(--nx-bg-3); }

/* ============================================================
   15. RESPONSIVE / MOBILE-FIRST
============================================================ */
@media (max-width: 1024px) {
  .nx-grid-main { grid-template-columns: 1fr; }
  .nx-sidebar { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
  .nx-footer-top { grid-template-columns: 1fr 1fr; }
  .nx-share-bar { display: none; }
}

@media (max-width: 768px) {
  :root { --nx-gutter: 16px; }

  .nx-topbar { display: none; }
  .nx-topbar-pages { display: none; }

  .nx-hero-grid { grid-template-columns: 1fr; grid-template-rows: auto; }
  .nx-hero-featured { grid-row: auto; min-height: 300px; }

  #nx-nav { display: none; }
  #nx-nav.open { display: block; }
  .nx-nav-list { flex-direction: column; padding: 8px 0; }
  .nx-nav-link { padding: 12px 20px; border-bottom: 1px solid var(--nx-border); border-right: none; }
  .nx-dropdown { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: none; border-left: 3px solid var(--nx-red); border-radius: 0; display: none; }
  .nx-nav-item.open .nx-dropdown { display: block; }

  .nx-hamburger { display: flex; }

  .nx-sidebar { grid-template-columns: 1fr; }
  .nx-footer-top { grid-template-columns: 1fr 1fr; }
  .nx-article-meta { flex-direction: column; align-items: flex-start; gap: 8px; }
}

@media (max-width: 480px) {
  .nx-footer-top { grid-template-columns: 1fr; }
  .nx-footer-bottom { flex-direction: column; text-align: center; }
  .nx-card-md-img-wrap { flex: 0 0 80px; height: 65px; }
}

/* ============================================================
   16. ACCESSIBILITY
============================================================ */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

:focus-visible {
  outline: 2px solid var(--nx-red);
  outline-offset: 3px;
  border-radius: 3px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .nx-ticker-inner { animation: none; }
}

/* ============================================================
   17. PRINT
============================================================ */
@media print {
  #nx-header, #nx-footer, .nx-sidebar, .nx-ticker, .nx-share-bar, .nx-ads { display: none !important; }
  .nx-grid-main { grid-template-columns: 1fr; }
  .nx-article-body { font-size: 12pt; }
  a[href]::after { content: ' (' attr(href) ')'; font-size: 9pt; color: #666; }
}
