/*
Theme Name: Nexus Versus
Theme URI: https://nexusversus.com
Author: Nexus Versus
Description: Modern dark mode blog template – Elementor compatible. AI, technology, and human insight.
Version: 2.0.0
Requires at least: 5.8
Tested up to: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: nexus-versus
Tags: blog, dark, technology, modern, responsive, custom-menu, featured-images, elementor
*/

/* ============================================
   CSS CUSTOM PROPERTIES
   ============================================ */
:root {
  --nv-bg:            #0d0f14;
  --nv-bg-card:       #13161e;
  --nv-bg-card2:      #181b24;
  --nv-border:        #1e2130;
  --nv-border-light:  #252a3a;

  --nv-cyan:          #00c9c9;
  --nv-cyan-dark:     #009999;
  --nv-purple:        #8b5cf6;
  --nv-purple-btn:    #7c3aed;
  --nv-purple-hover:  #6d28d9;

  --nv-text:          #f0f0f0;
  --nv-text-muted:    #8a8fa8;
  --nv-text-dim:      #4a4f65;

  --nv-font-display:  'Space Grotesk', sans-serif;
  --nv-font-body:     'DM Sans', sans-serif;
  --nv-font-mono:     'JetBrains Mono', monospace;

  --nv-radius:        10px;
  --nv-radius-lg:     14px;
  --nv-radius-pill:   100px;

  --nv-shadow:        0 2px 20px rgba(0,0,0,0.45);
  --nv-glow-cyan:     0 0 28px rgba(0,201,201,0.12);
  --nv-glow-purple:   0 0 28px rgba(139,92,246,0.18);

  --nv-ease:          cubic-bezier(0.4,0,0.2,1);
  --nv-transition:    0.22s var(--nv-ease);

  --nv-max-width:     1160px;
  --nv-header-h:      68px;
}

/* ============================================
   RESET & BASE
   ============================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }

body {
  background-color: var(--nv-bg);
  color: var(--nv-text);
  font-family: var(--nv-font-body);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

/* ============================================
   TYPOGRAPHY
   ============================================ */
h1,h2,h3,h4,h5,h6 {
  font-family: var(--nv-font-display);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.025em;
  color: var(--nv-text);
}
h1 { font-size: clamp(2rem, 4.5vw, 3.5rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); }
h3 { font-size: clamp(1.1rem, 2vw, 1.4rem); }
h4 { font-size: 1.05rem; }
p  { color: var(--nv-text-muted); line-height: 1.75; }

/* Colour helpers */
.nv-cyan   { color: var(--nv-cyan)  !important; }
.nv-purple { color: var(--nv-purple)!important; }

/* ============================================
   LAYOUT
   ============================================ */
.nv-container {
  width: 100%;
  max-width: var(--nv-max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: 32px;
  padding-right: 32px;
}

.nv-section { padding: 72px 0; }

/* ============================================
   ACCESSIBILITY
   ============================================ */
.skip-link {
  position: absolute; top: -100%; left: 0;
  background: var(--nv-purple-btn); color: #fff;
  padding: 8px 16px; z-index: 9999;
}
.skip-link:focus { top: 0; }
:focus-visible { outline: 2px solid var(--nv-cyan); outline-offset: 3px; }

/* ============================================
   SITE HEADER
   ============================================ */
#nv-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--nv-header-h);
  background: rgba(13,15,20,0.92);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--nv-border);
  display: flex;
  align-items: center;
  transition: box-shadow var(--nv-transition);
}

#nv-header.scrolled { box-shadow: 0 4px 32px rgba(0,0,0,0.5); }

.nv-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

/* ---- Logo ---- */
.nv-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--nv-font-display);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  flex-shrink: 0;
}
.nv-logo-icon {
  width: 32px; height: 32px;
  background: linear-gradient(135deg, #00c9c9 0%, #8b5cf6 100%);
  border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}
.nv-logo-nexus  { color: var(--nv-text); }
.nv-logo-versus { color: var(--nv-cyan); }

/* ---- Nav ---- */
#nv-nav ul {
  display: flex;
  align-items: center;
  gap: 4px;
}
#nv-nav ul li a {
  display: block;
  color: var(--nv-text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 6px;
  transition: all var(--nv-transition);
}
#nv-nav ul li a:hover,
#nv-nav ul li.current-menu-item a {
  color: var(--nv-text);
  background: var(--nv-bg-card);
}

/* ---- Subscribe btn ---- */
.nv-btn-subscribe {
  background: var(--nv-purple-btn);
  color: #fff !important;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 9px 22px;
  border-radius: 7px;
  white-space: nowrap;
  transition: background var(--nv-transition), transform var(--nv-transition), box-shadow var(--nv-transition);
}
.nv-btn-subscribe:hover {
  background: var(--nv-purple-hover);
  transform: translateY(-1px);
  box-shadow: var(--nv-glow-purple);
}

/* ---- Hamburger ---- */
.nv-menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px; height: 36px;
  padding: 6px;
  border-radius: 6px;
}
.nv-menu-toggle span {
  display: block; width: 100%; height: 2px;
  background: var(--nv-text); border-radius: 2px;
  transition: var(--nv-transition);
}

/* ============================================
   PAGE OFFSET (so content doesn't hide under header)
   ============================================ */
body.page-template-default .nv-page-wrap,
body.single .nv-page-wrap,
body.blog .nv-page-wrap,
body.archive .nv-page-wrap,
body.search .nv-page-wrap,
body.error404 .nv-page-wrap {
  padding-top: var(--nv-header-h);
}

/* Elementor pages: Elementor manages its own spacing */
body.elementor-page .nv-page-wrap {
  padding-top: var(--nv-header-h);
}

/* ============================================
   BUTTONS
   ============================================ */
.nv-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: var(--nv-font-body);
  cursor: pointer;
  transition: all var(--nv-transition);
  line-height: 1;
}
.nv-btn-primary {
  background: var(--nv-purple-btn);
  color: #fff;
  border: 1px solid transparent;
}
.nv-btn-primary:hover {
  background: var(--nv-purple-hover);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: var(--nv-glow-purple);
}
.nv-btn-outline {
  background: transparent;
  color: var(--nv-text);
  border: 1px solid var(--nv-border-light);
}
.nv-btn-outline:hover {
  border-color: var(--nv-cyan);
  color: var(--nv-cyan);
  transform: translateY(-2px);
}

/* ============================================
   HERO SECTION
   ============================================ */
#nv-hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  /* No extra top padding – header is fixed, content centers naturally */
}

.nv-hero-bg {
  position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(ellipse 70% 60% at 55% 45%, rgba(0,160,160,0.10) 0%, transparent 60%),
    radial-gradient(ellipse 50% 45% at 80% 15%, rgba(139,92,246,0.08) 0%, transparent 55%),
    #0d0f14;
}
.nv-hero-bg::after {
  content: '';
  position: absolute; inset: 0;
  background-image:
    radial-gradient(circle, rgba(0,201,201,0.25) 1px, transparent 1px),
    radial-gradient(circle, rgba(139,92,246,0.15) 1px, transparent 1px);
  background-size: 52px 52px, 80px 80px;
  background-position: 0 0, 26px 26px;
  opacity: 0.5;
  animation: nvDrift 24s linear infinite;
}
@keyframes nvDrift {
  0%   { transform: translateY(0); }
  100% { transform: translateY(-52px); }
}

.nv-hero-content {
  position: relative; z-index: 1;
  max-width: 680px;
  padding: 40px 0; /* breathing room top+bottom within the 100vh */
}

.nv-hero-badge {
  display: inline-flex;
  align-items: center;
  background: rgba(0,201,201,0.08);
  border: 1px solid rgba(0,201,201,0.28);
  color: var(--nv-cyan);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 6px 16px;
  border-radius: var(--nv-radius-pill);
  margin-bottom: 24px;
}

.nv-hero-title {
  margin-bottom: 20px;
  line-height: 1.08;
}
.nv-hero-title .ac-cyan   { color: var(--nv-cyan); }
.nv-hero-title .ac-purple { color: var(--nv-purple); }

.nv-hero-desc {
  font-size: 1rem;
  color: var(--nv-text-muted);
  max-width: 500px;
  margin-bottom: 32px;
  line-height: 1.8;
}

.nv-hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* ============================================
   SECTION HEADERS
   ============================================ */
.nv-section-header { margin-bottom: 40px; }
.nv-section-title  { margin-bottom: 8px; }
.nv-section-title .ac { color: var(--nv-cyan); }
.nv-section-desc   { font-size: 0.9rem; color: var(--nv-text-muted); }

/* ============================================
   CATEGORY BADGE (inline, on cards)
   ============================================ */
.nv-cat-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 4px;
  background: rgba(0,201,201,0.12);
  color: var(--nv-cyan);
  border: 1px solid rgba(0,201,201,0.22);
  line-height: 1;
}
.nv-cat-badge.practical { background:rgba(249,115,22,.12); color:#f97316; border-color:rgba(249,115,22,.22); }
.nv-cat-badge.industry  { background:rgba(239, 68,68,.12); color:#ef4444; border-color:rgba(239, 68,68,.22); }
.nv-cat-badge.ml        { background:rgba( 34,197,94,.12); color:#22c55e; border-color:rgba( 34,197,94,.22); }
.nv-cat-badge.purple    { background:rgba(139, 92,246,.12); color:var(--nv-purple); border-color:rgba(139,92,246,.22); }

/* ============================================
   POST META
   ============================================ */
.nv-post-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.78rem;
  color: var(--nv-text-dim);
  flex-wrap: wrap;
}
.nv-post-meta span {
  display: flex; align-items: center; gap: 5px;
}
.nv-post-meta svg { width: 13px; height: 13px; flex-shrink: 0; }

/* ============================================
   READ LINK
   ============================================ */
.nv-read-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--nv-cyan);
  font-size: 0.82rem;
  font-weight: 600;
  transition: gap var(--nv-transition);
  white-space: nowrap;
}
.nv-read-link:hover { gap: 9px; }
.nv-read-link svg { width: 14px; height: 14px; }

/* ============================================
   CARDS – FEATURED (large)
   ============================================ */
.nv-card-featured {
  background: var(--nv-bg-card);
  border: 1px solid var(--nv-border);
  border-radius: var(--nv-radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color var(--nv-transition), transform var(--nv-transition), box-shadow var(--nv-transition);
}
.nv-card-featured:hover {
  border-color: var(--nv-border-light);
  transform: translateY(-4px);
  box-shadow: var(--nv-shadow);
}
.nv-card-featured .nv-thumb-wrap { position: relative; overflow: hidden; }
.nv-card-featured .nv-thumb-wrap img {
  width: 100%; aspect-ratio: 16/9; object-fit: cover;
  transition: transform 0.45s var(--nv-ease);
  display: block;
}
.nv-card-featured:hover .nv-thumb-wrap img { transform: scale(1.04); }
.nv-card-featured .nv-thumb-wrap .nv-cat-badge {
  position: absolute; top: 14px; left: 14px;
}
.nv-card-featured .nv-card-body {
  padding: 24px 28px 28px;
  display: flex; flex-direction: column; gap: 10px; flex: 1;
}
.nv-card-featured .nv-card-title {
  font-size: 1.25rem;
  transition: color var(--nv-transition);
}
.nv-card-featured:hover .nv-card-title { color: var(--nv-cyan); }
.nv-card-featured .nv-card-excerpt {
  font-size: 0.875rem;
  color: var(--nv-text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}
.nv-card-featured .nv-card-footer {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-top: 4px;
}

/* ============================================
   CARDS – SMALL (grid)
   ============================================ */
.nv-card-small {
  background: var(--nv-bg-card);
  border: 1px solid var(--nv-border);
  border-radius: var(--nv-radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color var(--nv-transition), transform var(--nv-transition), box-shadow var(--nv-transition);
}
.nv-card-small:hover {
  border-color: var(--nv-border-light);
  transform: translateY(-3px);
  box-shadow: var(--nv-shadow);
}
.nv-card-small .nv-thumb-wrap { position: relative; overflow: hidden; }
.nv-card-small .nv-thumb-wrap img {
  width: 100%; aspect-ratio: 16/9; object-fit: cover;
  transition: transform 0.45s var(--nv-ease);
  display: block;
}
.nv-card-small:hover .nv-thumb-wrap img { transform: scale(1.05); }
.nv-card-small .nv-thumb-wrap .nv-cat-badge {
  position: absolute; top: 10px; left: 10px;
}
.nv-card-small .nv-card-body {
  padding: 18px 20px 22px;
  display: flex; flex-direction: column; gap: 8px; flex: 1;
}
.nv-card-small .nv-card-title {
  font-size: 1rem;
  transition: color var(--nv-transition);
}
.nv-card-small:hover .nv-card-title { color: var(--nv-cyan); }
.nv-card-small .nv-card-excerpt {
  font-size: 0.82rem;
  color: var(--nv-text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}
.nv-card-small .nv-card-footer {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-top: 6px;
}

/* No-thumbnail placeholder */
.nv-no-thumb {
  width: 100%; aspect-ratio: 16/9;
  background: linear-gradient(135deg, #13161e 0%, #0d1020 100%);
  display: flex; align-items: center; justify-content: center;
}
.nv-no-thumb svg { width: 40px; height: 40px; opacity: 0.18; }

/* ============================================
   LATEST ARTICLES LAYOUT
   ============================================ */
#nv-latest { background: var(--nv-bg); }

/* Top row: big left + 2 small right */
.nv-articles-top {
  display: grid;
  grid-template-columns: 1.65fr 1fr;
  gap: 24px;
  margin-bottom: 24px;
}
.nv-sidebar-stack {
  display: flex; flex-direction: column; gap: 24px;
}

/* Bottom row: 3 equal */
.nv-articles-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* ============================================
   CATEGORIES SECTION
   ============================================ */
#nv-categories { background: var(--nv-bg); }

.nv-cats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.nv-cat-card {
  background: var(--nv-bg-card);
  border: 1px solid var(--nv-border);
  border-radius: var(--nv-radius-lg);
  padding: 24px;
  display: block;
  transition: border-color var(--nv-transition), transform var(--nv-transition), box-shadow var(--nv-transition), background var(--nv-transition);
}
.nv-cat-card:hover {
  border-color: rgba(0,201,201,0.35);
  background: var(--nv-bg-card2);
  transform: translateY(-3px);
  box-shadow: var(--nv-glow-cyan);
}
.nv-cat-icon {
  width: 40px; height: 40px;
  background: rgba(0,201,201,0.08);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: var(--nv-cyan);
  margin-bottom: 16px;
}
.nv-cat-icon svg { width: 18px; height: 18px; }
.nv-cat-name {
  font-family: var(--nv-font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--nv-text);
  margin-bottom: 4px;
  transition: color var(--nv-transition);
}
.nv-cat-card:hover .nv-cat-name { color: var(--nv-cyan); }
.nv-cat-count { font-size: 0.78rem; color: var(--nv-text-dim); }

/* ============================================
   NEWSLETTER SECTION
   ============================================ */
#nv-newsletter {
  background: var(--nv-bg-card);
  border-top: 1px solid var(--nv-border);
  border-bottom: 1px solid var(--nv-border);
}
.nv-newsletter-inner {
  text-align: center;
  max-width: 520px;
  margin: 0 auto;
}
.nv-newsletter-icon {
  width: 56px; height: 56px;
  background: rgba(139,92,246,0.1);
  border: 1px solid rgba(139,92,246,0.2);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 24px;
  color: var(--nv-purple);
}
.nv-newsletter-icon svg { width: 24px; height: 24px; }
.nv-newsletter-inner h2 { font-size: 2rem; margin-bottom: 10px; }
.nv-newsletter-inner h2 .ac { color: var(--nv-cyan); }
.nv-newsletter-inner > p { margin-bottom: 28px; font-size: 0.9rem; }

.nv-nl-form {
  display: flex; gap: 10px;
  max-width: 420px; margin: 0 auto;
}
.nv-nl-form input[type="email"] {
  flex: 1;
  background: var(--nv-bg);
  border: 1px solid var(--nv-border-light);
  border-radius: 7px;
  padding: 11px 16px;
  color: var(--nv-text);
  font-size: 0.875rem;
  outline: none;
  transition: border-color var(--nv-transition);
}
.nv-nl-form input[type="email"]::placeholder { color: var(--nv-text-dim); }
.nv-nl-form input[type="email"]:focus { border-color: var(--nv-purple); }
.nv-nl-form button {
  background: var(--nv-purple-btn);
  color: #fff;
  border-radius: 7px;
  padding: 11px 20px;
  font-size: 0.875rem;
  font-weight: 600;
  white-space: nowrap;
  transition: background var(--nv-transition), transform var(--nv-transition);
}
.nv-nl-form button:hover { background: var(--nv-purple-hover); transform: translateY(-1px); }
#nv-nl-msg { margin-top: 14px; font-size: 0.82rem; display: none; }

/* ============================================
   SITE FOOTER
   ============================================ */
#nv-footer {
  background: var(--nv-bg);
  border-top: 1px solid var(--nv-border);
  padding: 28px 0;
}
.nv-footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.nv-footer-copy { font-size: 0.78rem; color: var(--nv-text-dim); }

/* ============================================
   ARCHIVE / BLOG PAGE
   ============================================ */
.nv-archive-hero {
  padding: 56px 0 44px;
  border-bottom: 1px solid var(--nv-border);
  margin-bottom: 48px;
}
.nv-archive-hero h1 { margin-bottom: 8px; }

.nv-posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 48px;
}

/* Pagination */
.nv-pagination {
  display: flex; justify-content: center; gap: 6px;
  padding-bottom: 72px;
}
.nv-pagination a,
.nv-pagination span {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  border-radius: 6px;
  font-size: 0.82rem; font-weight: 600;
  border: 1px solid var(--nv-border);
  color: var(--nv-text-muted);
  transition: all var(--nv-transition);
}
.nv-pagination a:hover { border-color: var(--nv-cyan); color: var(--nv-cyan); }
.nv-pagination .current { background: var(--nv-purple-btn); border-color: var(--nv-purple-btn); color: #fff; }

/* ============================================
   SINGLE POST
   ============================================ */
.nv-single-hero {
  padding: 48px 0 36px;
  border-bottom: 1px solid var(--nv-border);
  margin-bottom: 40px;
}
.nv-single-hero .nv-cat-badge { margin-bottom: 18px; }
.nv-single-hero h1 { margin-bottom: 18px; }
.nv-single-hero .nv-post-meta { margin-top: 0; }

.nv-featured-img {
  width: 100%;
  max-height: 460px;
  object-fit: cover;
  border-radius: var(--nv-radius-lg);
  margin-bottom: 44px;
  border: 1px solid var(--nv-border);
}

/* Post content typography */
.nv-entry-content { font-size: 1.02rem; line-height: 1.85; color: #9ca3b5; }
.nv-entry-content h2 { font-size: 1.55rem; margin: 44px 0 16px; color: var(--nv-text); }
.nv-entry-content h3 { font-size: 1.25rem; margin: 36px 0 12px; color: var(--nv-text); }
.nv-entry-content h4 { font-size: 1.05rem; margin: 28px 0 10px; color: var(--nv-text); }
.nv-entry-content p  { margin-bottom: 22px; }
.nv-entry-content ul, .nv-entry-content ol { padding-left: 26px; margin-bottom: 22px; list-style: initial; }
.nv-entry-content ol { list-style: decimal; }
.nv-entry-content li { margin-bottom: 8px; }
.nv-entry-content a  { color: var(--nv-cyan); }
.nv-entry-content a:hover { text-decoration: underline; }
.nv-entry-content strong { color: var(--nv-text); }
.nv-entry-content blockquote {
  border-left: 3px solid var(--nv-cyan);
  padding: 16px 24px; margin: 32px 0;
  background: var(--nv-bg-card);
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: var(--nv-text-muted);
}
.nv-entry-content code {
  background: var(--nv-bg-card); padding: 2px 8px;
  border-radius: 4px; font-family: var(--nv-font-mono);
  font-size: 0.875em; color: var(--nv-cyan);
}
.nv-entry-content pre {
  background: var(--nv-bg-card);
  border: 1px solid var(--nv-border);
  border-radius: var(--nv-radius); padding: 24px;
  overflow-x: auto; margin-bottom: 24px;
}
.nv-entry-content pre code { background: none; padding: 0; }
.nv-entry-content img { border-radius: var(--nv-radius); margin: 28px 0; }

/* Post tags */
.nv-post-tags {
  display: flex; flex-wrap: wrap; gap: 8px;
  padding-top: 28px; margin-top: 36px;
  border-top: 1px solid var(--nv-border);
}
.nv-post-tags a {
  font-size: 0.78rem; color: var(--nv-text-muted);
  background: var(--nv-bg-card);
  border: 1px solid var(--nv-border);
  padding: 5px 14px; border-radius: var(--nv-radius-pill);
  transition: all var(--nv-transition);
}
.nv-post-tags a:hover { border-color: var(--nv-cyan); color: var(--nv-cyan); }

/* Author box */
.nv-author-box {
  display: flex; align-items: flex-start; gap: 20px;
  padding: 28px;
  background: var(--nv-bg-card);
  border: 1px solid var(--nv-border);
  border-radius: var(--nv-radius-lg);
  margin-top: 40px;
}
.nv-author-box img {
  width: 64px; height: 64px;
  border-radius: 50%;
  border: 2px solid var(--nv-border-light);
  flex-shrink: 0;
  object-fit: cover;
}
.nv-author-box .nv-author-name {
  font-family: var(--nv-font-display);
  font-weight: 700; font-size: 1rem;
  color: var(--nv-text); margin-bottom: 4px;
}
.nv-author-box .nv-author-bio {
  font-size: 0.875rem; color: var(--nv-text-muted);
  margin: 0;
}

/* Related posts (footer of single post) */
.nv-related-section {
  padding: 56px 0 72px;
  border-top: 1px solid var(--nv-border);
  margin-top: 56px;
}
.nv-related-section .nv-section-header { margin-bottom: 32px; }

/* ============================================
   SIDEBAR / WIDGETS
   ============================================ */
.nv-widget-area { display: flex; flex-direction: column; gap: 28px; }
.nv-widget {
  background: var(--nv-bg-card);
  border: 1px solid var(--nv-border);
  border-radius: var(--nv-radius-lg);
  padding: 24px;
}
.nv-widget-title {
  font-size: 0.95rem; font-weight: 700;
  padding-bottom: 14px; margin-bottom: 14px;
  border-bottom: 1px solid var(--nv-border);
}
.widget_recent_entries ul li { padding: 9px 0; border-bottom: 1px solid var(--nv-border); }
.widget_recent_entries ul li:last-child { border-bottom: none; }
.widget_recent_entries ul li a { font-size: 0.85rem; color: var(--nv-text-muted); }
.widget_recent_entries ul li a:hover { color: var(--nv-cyan); }
.widget_categories ul li {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 0; border-bottom: 1px solid var(--nv-border);
}
.widget_categories ul li:last-child { border-bottom: none; }
.widget_categories ul li a { font-size: 0.85rem; color: var(--nv-text-muted); }
.widget_categories ul li a:hover { color: var(--nv-cyan); }

/* ============================================
   SEARCH FORM
   ============================================ */
.nv-search-form {
  display: flex; gap: 8px;
}
.nv-search-form input[type="search"] {
  flex: 1;
  background: var(--nv-bg);
  border: 1px solid var(--nv-border-light);
  border-radius: 7px;
  padding: 10px 14px;
  color: var(--nv-text); font-size: 0.875rem;
  outline: none;
  transition: border-color var(--nv-transition);
}
.nv-search-form input:focus { border-color: var(--nv-cyan); }
.nv-search-form button {
  background: var(--nv-purple-btn); color: #fff;
  border-radius: 7px; padding: 10px 14px;
  font-size: 0.875rem; transition: background var(--nv-transition);
}
.nv-search-form button:hover { background: var(--nv-purple-hover); }

/* ============================================
   404 PAGE
   ============================================ */
.nv-404-wrap {
  min-height: calc(100vh - var(--nv-header-h));
  display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 80px 24px;
}
.nv-404-number {
  font-size: clamp(6rem,15vw,10rem);
  font-weight: 800;
  font-family: var(--nv-font-display);
  background: linear-gradient(135deg, var(--nv-cyan), var(--nv-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1;
  margin-bottom: 20px;
}

/* ============================================
   ELEMENTOR OVERRIDES
   ============================================ */

/* Make Elementor sections aware of dark background */
.elementor-section,
.elementor-container,
.e-con,
.e-con-inner {
  background-color: transparent;
}

/* Elementor text elements */
.elementor-widget-heading .elementor-heading-title { color: var(--nv-text); }
.elementor-widget-text-editor { color: var(--nv-text-muted); }

/* Don't override Elementor's own padding when it's explicitly set */
.elementor-section.elementor-section-full_width,
.elementor-section .elementor-container {
  max-width: 100%;
}

/* Fix: Elementor popup / overlay background */
.elementor-popup-modal .dialog-widget-content {
  background: var(--nv-bg-card);
  border: 1px solid var(--nv-border);
  border-radius: var(--nv-radius-lg);
}

/* Elementor button style */
.elementor-button {
  font-family: var(--nv-font-body) !important;
  font-weight: 600 !important;
}

/* Elementor divider */
.elementor-divider-separator { border-color: var(--nv-border) !important; }

/* Elementor image */
.elementor-widget-image img { border-radius: var(--nv-radius); }

/* Elementor form */
.elementor-field-group .elementor-field {
  background: var(--nv-bg-card) !important;
  border: 1px solid var(--nv-border-light) !important;
  color: var(--nv-text) !important;
  border-radius: 7px !important;
}
.elementor-field-group .elementor-field:focus {
  border-color: var(--nv-purple) !important;
  outline: none !important;
}
.elementor-button.elementor-size-md {
  background: var(--nv-purple-btn);
  color: #fff;
  border-radius: 7px;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
  .nv-articles-top   { grid-template-columns: 1fr; }
  .nv-cats-grid      { grid-template-columns: repeat(2,1fr); }
  .nv-articles-row   { grid-template-columns: repeat(2,1fr); }
  .nv-posts-grid     { grid-template-columns: repeat(2,1fr); }
}

@media (max-width: 768px) {
  :root { --nv-header-h: 60px; }
  #nv-nav { display: none; }
  #nv-nav.is-open {
    display: block;
    position: absolute;
    top: var(--nv-header-h); left: 0; right: 0;
    background: rgba(13,15,20,0.98);
    border-bottom: 1px solid var(--nv-border);
    padding: 12px 24px 16px;
    z-index: 999;
  }
  #nv-nav.is-open ul { flex-direction: column; gap: 2px; }
  #nv-nav.is-open ul li a { display: block; padding: 10px 14px; }
  .nv-menu-toggle { display: flex; }
  .nv-btn-subscribe { display: none; }

  .nv-cats-grid   { grid-template-columns: repeat(2,1fr); }
  .nv-articles-row { grid-template-columns: 1fr; }
  .nv-posts-grid  { grid-template-columns: 1fr; }
  .nv-nl-form     { flex-direction: column; }
  .nv-footer-inner { flex-direction: column; gap: 12px; text-align: center; }
  .nv-section { padding: 52px 0; }
  .nv-container { padding-left: 20px; padding-right: 20px; }
}

@media (max-width: 540px) {
  .nv-cats-grid   { grid-template-columns: 1fr; }
  .nv-hero-actions { flex-direction: column; align-items: flex-start; }
  .nv-btn { width: 100%; justify-content: center; }
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes nvFadeUp {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}
.nv-anim { animation: nvFadeUp 0.55s var(--nv-ease) both; }
.nv-d1 { animation-delay: 0.08s; }
.nv-d2 { animation-delay: 0.16s; }
.nv-d3 { animation-delay: 0.24s; }

/* ============================================
   GUTENBERG BLOCKS (dark theme)
   ============================================ */
.wp-block-image img { border-radius: var(--nv-radius); }
.wp-block-pullquote { border-color: var(--nv-cyan); color: var(--nv-text-muted); }
.wp-block-code {
  background: var(--nv-bg-card);
  border: 1px solid var(--nv-border);
  border-radius: var(--nv-radius);
  color: var(--nv-cyan);
  font-family: var(--nv-font-mono);
}
.wp-block-separator { border-color: var(--nv-border) !important; }
.wp-block-quote { border-left-color: var(--nv-cyan) !important; }

/* ============================================
   ADMIN BAR FIX
   ============================================ */
@media screen and (min-width: 783px) {
  body.admin-bar #nv-header { top: 32px; }
}
@media screen and (max-width: 782px) {
  body.admin-bar #nv-header { top: 46px; }
}
