/**
 * NicheForge Theme - Main Stylesheet
 *
 * Ultra-responsive, mobile-first design system with modern SaaS aesthetic.
 */

/* ==========================================================================
   1. Typography & Global Elements & Accessibility
   ========================================================================== */
:focus-visible {
  outline: 2px solid var(--nf-primary);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

h1, h2, h3, h4, h5, h6,
.nf-page-title,
.nf-card-title,
.nf-card-lead-title,
.nf-widget-title,
.comments-title {
  text-wrap: balance;
}

p {
  margin-bottom: 1.25rem;
  color: var(--nf-text);
  line-height: 1.7;
  text-wrap: pretty;
}

strong, b {
  color: var(--nf-heading);
  font-weight: 600;
}

hr {
  border: 0;
  border-top: 1px solid var(--nf-border);
  margin: 2.5rem 0;
}

blockquote {
  border-left: 3px solid var(--nf-primary);
  padding: 0.75rem 1.25rem;
  margin: 1.5rem 0;
  background: var(--nf-primary-light);
  border-radius: 0 var(--nf-radius-sm) var(--nf-radius-sm) 0;
  font-style: italic;
  color: var(--nf-text);
}

/* ==========================================================================
   2. Header & Navigation Bar
   ========================================================================== */
.nf-site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: var(--nf-navbar-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--nf-border);
  transition: all 0.3s ease;
}

.nf-site-header.scrolled {
  box-shadow: var(--nf-shadow-md);
  border-bottom-color: var(--nf-card-border);
}

.nf-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
  gap: 1.5rem;
}

.site-branding,
.nf-branding {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.site-logo,
.nf-brand-logo-wrap {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

.site-logo img,
.custom-logo-link img,
.nf-brand-logo-wrap img {
  height: 40px;
  width: auto;
  max-height: 48px;
  display: block;
}

.site-identity,
.nf-site-identity {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.site-title,
.nf-site-title {
  font-family: var(--nf-font-logo, var(--nf-font-headings, sans-serif));
  font-size: 1.35rem;
  font-weight: var(--nf-logo-weight, 800);
  letter-spacing: var(--nf-logo-spacing, -0.02em);
  text-transform: var(--nf-logo-transform, none);
  margin: 0;
  line-height: 1.2;
  color: var(--nf-heading);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.site-title a,
.nf-site-title a {
  color: inherit;
  text-decoration: none;
  font-family: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  display: inline-block;
}

.site-description,
.nf-site-description {
  font-size: 0.8rem;
  color: var(--nf-text-muted, #64748b);
  margin: 0.15rem 0 0 0;
  line-height: 1.3;
  font-weight: 400;
  display: block;
}

/* Guarantee site title & description are never hidden when custom logo is active */
.has-custom-logo .site-title,
.has-custom-logo .nf-site-title,
.wp-custom-logo .site-title,
.wp-custom-logo .nf-site-title,
.has-custom-logo .site-description,
.has-custom-logo .nf-site-description,
.wp-custom-logo .site-description,
.wp-custom-logo .nf-site-description {
  display: block !important;
}

.nf-badge-ai,
.nf-badge-curated {
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background-color: var(--nf-badge-bg, #f1f5f9);
  color: var(--nf-badge-text, #1e293b);
  border: 1px solid var(--nf-badge-border, #cbd5e1);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  line-height: 1;
}

/* ==========================================================================
   Header Omnibar (Quick Direct Search on Desktop)
   ========================================================================== */
.nf-header-omnibar {
  display: none;
  width: 100%;
  max-width: 320px;
  margin: 0;
}

@media (min-width: 992px) {
  .nf-nav-wrap {
    margin-left: auto;
  }

  .nf-header-omnibar {
    display: block;
  }

  .nf-header-actions {
    display: none !important;
  }
}

.nf-omnibar-form {
  display: flex;
  align-items: center;
  background: var(--nf-bg-secondary);
  border: 1px solid var(--nf-border);
  border-radius: var(--nf-radius-full, 9999px);
  padding: 0.25rem 0.35rem 0.25rem 1rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.nf-omnibar-form:focus-within {
  border-color: var(--nf-primary);
  background: var(--nf-bg);
  box-shadow: 0 0 0 3px var(--nf-primary-light);
}

.nf-omnibar-input-wrap {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
}

.nf-omnibar-field {
  width: 100%;
  border: none;
  background: transparent;
  padding: 0.35rem 0.5rem 0.35rem 0;
  font-size: 0.875rem;
  color: var(--nf-heading);
  outline: none;
}

.nf-omnibar-field::placeholder {
  color: var(--nf-text-muted);
}

.nf-omnibar-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: var(--nf-primary);
  color: #ffffff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
  padding: 0;
}

.nf-omnibar-submit:hover {
  background: var(--nf-primary-hover);
  transform: scale(1.05);
}

.nf-omnibar-submit:active {
  transform: scale(0.95);
}

.nf-omnibar-submit-icon {
  display: block;
  flex-shrink: 0;
}

.nf-kbd-hint {
  font-family: inherit;
  font-size: 0.675rem;
  font-weight: 700;
  line-height: 1;
  padding: 0.15rem 0.35rem;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

/* Primary Navigation Menu */
.nf-nav-wrap {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nf-primary-menu {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nf-primary-menu > li {
  position: relative;
}

.nf-primary-menu > li > a {
  display: inline-flex;
  align-items: center;
  padding: 0.55rem 0.95rem;
  font-size: 0.925rem;
  font-weight: 500;
  color: var(--nf-text-muted);
  border-radius: var(--nf-radius-sm);
  transition: all 0.2s ease;
  text-decoration: none;
}

.nf-primary-menu > li > a:hover {
  color: var(--nf-primary);
  background-color: var(--nf-primary-light);
}

.nf-primary-menu > li.current-menu-item > a {
  color: var(--nf-primary);
  background-color: var(--nf-primary-light);
  font-weight: 600;
}

/* Submenu / Dropdowns */
.nf-primary-menu .sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  background: var(--nf-card-bg);
  border: 1px solid var(--nf-card-border);
  border-radius: var(--nf-radius-md);
  box-shadow: var(--nf-shadow-md);
  padding: 0.5rem;
  list-style: none;
  z-index: 1010;
  margin-top: 0.25rem;
}

.nf-primary-menu li:hover > .sub-menu,
.nf-primary-menu li:focus-within > .sub-menu {
  display: block;
}

.nf-primary-menu .sub-menu a {
  display: block;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  color: var(--nf-text);
  border-radius: var(--nf-radius-sm);
  text-decoration: none;
  transition: all 0.15s ease;
}

.nf-primary-menu .sub-menu a:hover {
  background: var(--nf-primary-light);
  color: var(--nf-primary);
}

/* Header Actions */
.nf-header-actions {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-shrink: 0;
}

/* Search Trigger Button */
.nf-search-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border-radius: var(--nf-radius-sm);
  background: var(--nf-card-bg);
  border: 1px solid var(--nf-card-border);
  color: var(--nf-text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.nf-search-toggle:hover {
  color: var(--nf-primary);
  border-color: var(--nf-primary);
  box-shadow: var(--nf-shadow-sm);
  transform: translateY(-1px);
}

.nf-search-toggle:active {
  transform: scale(0.96);
}

/* Mobile Navigation Toggle */
.nf-mobile-menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border-radius: var(--nf-radius-sm);
  background: var(--nf-card-bg);
  border: 1px solid var(--nf-card-border);
  color: var(--nf-text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.nf-mobile-menu-toggle:hover {
  color: var(--nf-heading);
  border-color: var(--nf-primary);
  transform: translateY(-1px);
}

.nf-mobile-menu-toggle:active {
  transform: scale(0.96);
}

/* Buttons */
.nf-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.6rem 1.25rem;
  border-radius: var(--nf-radius-sm);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid transparent;
  line-height: 1.4;
}

.nf-btn-primary {
  background-color: var(--nf-primary);
  color: #ffffff;
  font-weight: 600;
  border: 1px solid rgba(0, 0, 0, 0.12);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.nf-btn-primary:hover {
  background-color: var(--nf-primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  color: #ffffff;
}

.nf-btn-primary:active {
  transform: scale(0.98);
}

.nf-btn-secondary {
  background: var(--nf-card-bg);
  border-color: var(--nf-card-border);
  color: var(--nf-heading);
}

.nf-btn-secondary:hover {
  background: var(--nf-bg-secondary);
  border-color: var(--nf-primary);
  color: var(--nf-primary);
}

/* Mobile Toggle */
.nf-mobile-menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  background: var(--nf-card-bg);
  border: 1px solid var(--nf-card-border);
  border-radius: var(--nf-radius-sm);
  align-items: center;
  justify-content: center;
  color: var(--nf-heading);
}

/* ==========================================================================
   3. Search Modal Overlay
   ========================================================================== */
.nf-search-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  z-index: 10000;
  align-items: flex-start;
  justify-content: center;
  padding-top: 10vh;
}

.nf-search-modal.active {
  display: flex;
}

.nf-search-modal-content {
  background: var(--nf-card-bg);
  border: 1px solid var(--nf-card-border);
  border-radius: var(--nf-radius-lg);
  width: 100%;
  max-width: 650px;
  padding: 2.25rem;
  box-shadow: var(--nf-shadow-md), 0 20px 40px -10px rgba(0, 0, 0, 0.25);
  position: relative;
}

.nf-search-modal-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--nf-bg-secondary);
  border: 1px solid var(--nf-border);
  border-radius: var(--nf-radius-sm);
  color: var(--nf-text-muted);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  transition: all 0.2s ease;
}

.nf-search-modal-close:hover {
  color: var(--nf-heading);
  border-color: var(--nf-primary);
  background: var(--nf-bg);
  transform: translateY(-1px);
}

.nf-search-modal-close:active {
  transform: scale(0.96);
}

.nf-search-form {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
}

.nf-search-input {
  flex: 1;
  background: var(--nf-bg);
  border: 1px solid var(--nf-card-border);
  border-radius: var(--nf-radius-sm);
  padding: 0.85rem 1.25rem;
  color: var(--nf-heading);
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s;
}

.nf-search-input:focus {
  border-color: var(--nf-primary);
  box-shadow: 0 0 0 3px var(--nf-primary-light);
}

/* ==========================================================================
   4. Breadcrumbs & Page Headers
   ========================================================================== */
.nf-breadcrumbs-bar {
  padding: 1rem 0;
  font-size: 0.875rem;
  color: var(--nf-text-muted);
  border-bottom: 1px solid var(--nf-border);
  background: rgba(255, 255, 255, 0.01);
}

.nf-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nf-breadcrumbs li {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.nf-breadcrumbs li::after {
  content: "/";
  color: var(--nf-text-subtle);
}

.nf-breadcrumbs li:last-child::after {
  content: "";
}

.nf-page-header {
  padding: 3.5rem 0 2.5rem;
  border-bottom: 1px solid var(--nf-border);
  background: var(--nf-bg-secondary);
  position: relative;
}

.nf-header-pill-wrap {
  margin-bottom: 0.75rem;
}

.nf-editorial-kicker {
  display: inline-block;
  font-size: 0.725rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--nf-primary);
  background: var(--nf-primary-light);
  padding: 0.25rem 0.65rem;
  border-radius: var(--nf-radius-full, 9999px);
}

.nf-page-title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.15;
  margin-bottom: 0.5rem;
}

.nf-page-description {
  font-size: 1.125rem;
  color: var(--nf-text-muted);
  max-width: 720px;
  margin: 0;
  line-height: 1.6;
}

/* ==========================================================================
   5. Content Layouts & Grid Systems
   ========================================================================== */
.nf-site-content {
  padding: 3.5rem 0 5rem;
}

.nf-main-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 3rem;
  align-items: start;
}

.nf-full-width-content {
  width: 100%;
}

/* ==========================================================================
   Editorial Lead Story (Asymmetric Hero Anchor)
   ========================================================================== */
.nf-card-lead {
  margin-bottom: 2.75rem;
  border: 1px solid var(--nf-card-border);
  border-radius: var(--nf-radius-lg);
  background: var(--nf-card-bg);
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

@media (min-width: 860px) {
  .nf-card-lead {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    align-items: stretch;
  }
}

.nf-card-lead-media {
  position: relative;
  min-height: 260px;
  overflow: hidden;
  background-color: var(--nf-bg-secondary);
}

@media (min-width: 860px) {
  .nf-card-lead-media {
    min-height: 100%;
  }
}

.nf-lead-img-link {
  display: block;
  width: 100%;
  height: 100%;
}

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

.nf-card-lead:hover .nf-lead-img {
  transform: scale(1.03);
}

.nf-lead-badge {
  position: absolute;
  top: 1.25rem;
  left: 1.25rem;
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(4px);
  color: #ffffff;
  font-size: 0.675rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.3rem 0.65rem;
  border-radius: 4px;
}

.nf-card-lead-body {
  padding: 2.25rem 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.nf-meta-kicker {
  font-size: 0.725rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--nf-primary);
}

.nf-meta-dot {
  color: var(--nf-text-subtle);
}

.nf-card-lead-title {
  font-size: clamp(1.65rem, 3.2vw, 2.35rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.18;
  margin: 0.65rem 0 1rem;
}

.nf-card-lead-title a {
  color: var(--nf-heading);
  text-decoration: none;
  transition: color 0.15s ease;
}

.nf-card-lead-title a:hover {
  color: var(--nf-primary);
}

.nf-lead-excerpt {
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--nf-text-muted);
  margin-bottom: 1.5rem;
}

.nf-card-lead-footer {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-top: auto;
  flex-wrap: wrap;
}

.nf-lead-author-byline {
  font-size: 0.85rem;
  color: var(--nf-text-muted);
  font-weight: 500;
}

/* Editorial Section Divider */
.nf-editorial-divider {
  position: relative;
  text-align: center;
  margin: 2.5rem 0 2rem;
}

.nf-editorial-divider::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--nf-border);
}

.nf-divider-label {
  position: relative;
  display: inline-block;
  padding: 0 1rem;
  background: var(--nf-bg);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--nf-text-muted);
}

/* Card Arrow Link */
.nf-card-arrow-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--nf-primary);
  text-decoration: none;
  transition: gap 0.15s ease, color 0.15s ease;
}

.nf-card-arrow-link:hover {
  gap: 0.55rem;
  color: var(--nf-primary-hover);
}

/* Post Cards */
.nf-posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
}

.nf-card {
  background-color: var(--nf-card-bg);
  border: 1px solid var(--nf-card-border);
  border-radius: var(--nf-radius-lg);
  overflow: hidden;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  display: flex;
  flex-direction: column;
}

.nf-card:hover {
  transform: translateY(-3px);
  border-color: var(--nf-card-border-hover);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.08), 0 4px 10px -2px rgba(0, 0, 0, 0.04);
}

/* Empty state */
.nf-empty-state-box {
  padding: 4rem 2rem;
  text-align: center;
  border-radius: var(--nf-radius-lg);
}

.nf-empty-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--nf-bg-secondary);
  color: var(--nf-text-subtle);
  margin: 0 auto 1.25rem;
}

.nf-empty-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.nf-card-thumbnail {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background-color: var(--nf-bg-secondary);
}

.nf-card-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.nf-card:hover .nf-card-thumbnail img {
  transform: scale(1.05);
}

.nf-card-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.nf-card-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.8rem;
  color: var(--nf-text-muted);
  margin-bottom: 0.75rem;
}

.nf-card-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  line-height: 1.35;
}

.nf-card-title a {
  color: var(--nf-heading);
  text-decoration: none;
}

.nf-card-title a:hover {
  color: var(--nf-primary);
}

.nf-card-excerpt {
  color: var(--nf-text-muted);
  font-size: 0.925rem;
  line-height: 1.6;
  margin-bottom: 1.25rem;
  flex: 1;
}

.nf-card-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  border-top: 1px solid var(--nf-border);
  font-size: 0.875rem;
}

/* ==========================================================================
   6. Badges & Micro-components
   ========================================================================== */
.nf-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: var(--nf-radius-full);
  background: var(--nf-badge-bg);
  color: var(--nf-badge-text);
  border: 1px solid var(--nf-badge-border);
}

.nf-badge-verified {
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.3);
}

.nf-badge-verified svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

/* ==========================================================================
   7. Sidebar & Widgets
   ========================================================================== */
.nf-sidebar {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.nf-widget {
  background: var(--nf-card-bg);
  border: 1px solid var(--nf-card-border);
  border-radius: var(--nf-radius-lg);
  padding: 1.5rem;
}

.nf-widget-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--nf-border);
  color: var(--nf-heading);
}

.nf-widget ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.nf-widget li {
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.nf-widget li:last-child {
  border-bottom: none;
}

.nf-widget a {
  color: var(--nf-text);
  text-decoration: none;
}

.nf-widget a:hover {
  color: var(--nf-primary);
}

/* ==========================================================================
   8. Single Post / Business Detail
   ========================================================================== */
.nf-article {
  background: var(--nf-card-bg);
  border: 1px solid var(--nf-card-border);
  border-radius: var(--nf-radius-lg);
  padding: 2.5rem;
  margin-bottom: 3rem;
}

.nf-article-header {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--nf-border);
}

.nf-article-content {
  font-size: 1.05rem;
  line-height: 1.8;
}

.nf-article-content h2 {
  margin-top: 2rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--nf-border);
}

.nf-article-content ul,
.nf-article-content ol {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}

.nf-article-content li {
  margin-bottom: 0.5rem;
}

/* ==========================================================================
   Pagination System (.nf-pagination)
   ========================================================================== */
.nf-pagination {
  margin: 3.5rem 0 1.5rem;
  display: flex;
  justify-content: center;
}

.nf-pagination .nav-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.nf-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
  padding: 0 0.85rem;
  border-radius: var(--nf-radius-sm);
  background: var(--nf-card-bg);
  border: 1px solid var(--nf-card-border);
  color: var(--nf-heading);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  line-height: 1;
}

.nf-pagination .page-numbers:hover {
  background: var(--nf-primary-light);
  border-color: var(--nf-primary);
  color: var(--nf-primary);
  transform: translateY(-1px);
}

.nf-pagination .page-numbers:active {
  transform: scale(0.96);
}

.nf-pagination .page-numbers.current {
  background: var(--nf-primary);
  border-color: var(--nf-primary);
  color: #ffffff;
  font-weight: 700;
  cursor: default;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.nf-pagination .page-numbers.dots {
  background: transparent;
  border-color: transparent;
  color: var(--nf-text-muted);
  cursor: default;
}

/* ==========================================================================
   Comments System & Discussion Form
   ========================================================================== */
.comments-area {
  margin-top: 3rem;
  padding: 2.5rem;
}

.comment-list {
  list-style: none;
  padding: 0;
  margin: 0 0 2.5rem;
}

.comment-list .comment {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--nf-border);
}

.comment-list .comment:last-child {
  border-bottom: none;
}

.comment-list .children {
  list-style: none;
  padding-left: 2rem;
  margin-top: 1.5rem;
  border-left: 2px solid var(--nf-border);
}

.comment-body {
  position: relative;
}

.comment-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.comment-author .avatar {
  border-radius: 50%;
  border: 2px solid var(--nf-card-border);
  flex-shrink: 0;
}

.comment-author .fn {
  font-weight: 700;
  color: var(--nf-heading);
  font-style: normal;
  font-size: 0.95rem;
}

.comment-metadata {
  font-size: 0.8rem;
  color: var(--nf-text-muted);
}

.comment-metadata a {
  color: inherit;
  text-decoration: none;
}

.comment-metadata a:hover {
  color: var(--nf-primary);
}

.comment-content {
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--nf-text);
  text-wrap: pretty;
}

.comment-content p:last-child {
  margin-bottom: 0.75rem;
}

.reply a {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--nf-primary);
  text-decoration: none;
  padding: 0.25rem 0.65rem;
  background: var(--nf-primary-light);
  border-radius: var(--nf-radius-sm);
  transition: all 0.15s ease;
}

.reply a:hover {
  background: var(--nf-primary);
  color: #ffffff;
}

/* Comment Form */
#commentform {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.comment-notes,
.logged-in-as {
  font-size: 0.875rem;
  color: var(--nf-text-muted);
  margin-bottom: 0.5rem;
}

.comment-form-comment label,
.comment-form-author label,
.comment-form-email label,
.comment-form-url label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--nf-heading);
  margin-bottom: 0.4rem;
}

.comment-form-comment textarea,
.comment-form-author input,
.comment-form-email input,
.comment-form-url input {
  width: 100%;
  background: var(--nf-bg);
  border: 1px solid var(--nf-card-border);
  border-radius: var(--nf-radius-sm);
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  color: var(--nf-heading);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  font-family: inherit;
}

.comment-form-comment textarea:focus,
.comment-form-author input:focus,
.comment-form-email input:focus,
.comment-form-url input:focus {
  border-color: var(--nf-primary);
  box-shadow: 0 0 0 3px var(--nf-primary-light);
}

.comment-form-cookies-consent {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.825rem;
  color: var(--nf-text-muted);
}

.comment-form-cookies-consent input[type="checkbox"] {
  margin-top: 0.2rem;
  accent-color: var(--nf-primary);
}

/* ==========================================================================
   9. Rich SEO Mega-Footer & Legal Bar
   ========================================================================== */
.nf-mega-footer {
  background-color: var(--nf-footer-bg);
  border-top: 1px solid var(--nf-footer-border);
  padding: 5rem 0 2rem;
  margin-top: auto;
  position: relative;
}

.nf-footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 4rem;
}

.nf-footer-col-title {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--nf-heading);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nf-footer-col-title::after {
  content: "";
  height: 2px;
  width: 24px;
  background: var(--nf-primary);
  border-radius: 2px;
  margin-left: 0.5rem;
}

.nf-footer-brand-pitch {
  color: var(--nf-text-muted);
  font-size: 0.925rem;
  line-height: 1.65;
  margin-bottom: 1.5rem;
}

/* Trust Badge in Footer */
.nf-trust-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--nf-card-bg);
  border: 1px solid var(--nf-card-border);
  border-radius: var(--nf-radius-md);
  padding: 0.75rem 1rem;
  margin-bottom: 1.5rem;
}

.nf-trust-badge-icon {
  width: 32px;
  height: 32px;
  background: var(--nf-primary);
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.nf-trust-badge-text {
  font-size: 0.8rem;
  line-height: 1.3;
}

.nf-trust-badge-text strong {
  display: block;
  font-size: 0.875rem;
  color: var(--nf-heading);
}

/* Footer Category & Location Links */
.nf-footer-links-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.nf-footer-links-list li a {
  color: var(--nf-text-muted);
  font-size: 0.9rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
}

.nf-footer-links-list li a:hover {
  color: var(--nf-primary);
  transform: translateX(3px);
}

.nf-term-count {
  font-size: 0.75rem;
  color: var(--nf-text-muted);
  background: var(--nf-bg-secondary);
  border: 1px solid var(--nf-border);
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
}

/* Dark mode specific enhancements */
body.nf-is-dark-theme .nf-primary-menu > li > a:hover,
body.nf-is-dark-theme .nf-primary-menu > li.current-menu-item > a {
  background-color: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

body.nf-is-dark-theme .nf-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
}

body.nf-is-dark-theme .nf-term-count {
  background: rgba(255, 255, 255, 0.08);
  color: var(--nf-text-subtle);
  border-color: rgba(255, 255, 255, 0.1);
}

/* Footer Bottom Bar */
.nf-footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid var(--nf-footer-border);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  font-size: 0.85rem;
  color: var(--nf-text-subtle);
}

.nf-footer-bottom a {
  color: var(--nf-text-muted);
}

.nf-footer-bottom a:hover {
  color: var(--nf-primary);
}

.nf-legal-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

/* ==========================================================================
   10. 404 & Error Recovery
   ========================================================================== */
.nf-404-container {
  text-align: center;
  padding: 5rem 1.5rem;
}

.nf-404-hero-card {
  padding: 4.5rem 2rem;
  text-align: center;
  margin-bottom: 3.5rem;
  position: relative;
  overflow: hidden;
  background-color: var(--nf-card-bg);
  border: 1px solid var(--nf-card-border);
}

.nf-404-code {
  font-size: clamp(5rem, 15vw, 8.5rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--nf-primary);
  margin-bottom: 1rem;
}

/* ==========================================================================
   11. Responsive Media Queries
   ========================================================================== */
@media (max-width: 1024px) {
  .nf-footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
  }
  .nf-main-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .nf-nav-wrap {
    position: fixed;
    top: 76px;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--nf-bg);
    padding: 2rem 1.5rem;
    overflow-y: auto;
    display: none;
    z-index: 999;
    border-top: 1px solid var(--nf-border);
  }

  .nf-nav-wrap.active {
    display: block;
  }

  .nf-mobile-menu-toggle {
    display: flex;
  }

  .nf-nav-wrap .nf-primary-menu {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    width: 100%;
  }

  .nf-nav-wrap .nf-primary-menu > li {
    width: 100%;
  }

  .nf-nav-wrap .nf-primary-menu > li > a {
    width: 100%;
    padding: 0.85rem 1rem;
    font-size: 1.1rem;
  }

  .nf-nav-wrap .sub-menu {
    position: static;
    display: block;
    box-shadow: none;
    border: none;
    background: transparent;
    padding-left: 1rem;
  }

  .nf-footer-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .nf-footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  .nf-legal-nav {
    justify-content: center;
  }

  .site-branding,
  .nf-branding {
    gap: 10px;
  }

  .site-title,
  .nf-site-title {
    font-size: 1.15rem;
  }

  .site-logo img,
  .custom-logo-link img,
  .nf-brand-logo-wrap img {
    height: 34px;
  }
}

@media (max-width: 480px) {
  .site-description,
  .nf-site-description {
    display: none;
  }

  .site-title,
  .nf-site-title {
    font-size: 1.05rem;
  }
}
