/* ==========================================================================
   NafisFlahi Editorial Theme System & CSS Styles
   ========================================================================== */

:root {
  /* Color Palette */
  --nf-navy-dark: #0b132a;
  --nf-navy: #1e293b;
  --nf-navy-light: #334155;
  --nf-slate-muted: #64748b;
  --nf-gray-light: #f8fafc;
  --nf-gray-border: #e2e8f0;
  --nf-white: #ffffff;
  
  --nf-gold: #d97706;
  --nf-gold-hover: #b45309;
  --nf-gold-light: #fef3c7;
  --nf-gold-text: #92400e;

  /* Typography */
  --nf-font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  --nf-font-heading: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --nf-font-mono: 'Fira Code', 'Cascadia Code', Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;

  /* Spacing & Container */
  --nf-container-max: 1200px;
  --nf-radius-sm: 6px;
  --nf-radius-md: 12px;
  --nf-radius-lg: 16px;

  /* Shadows */
  --nf-shadow-sm: 0 1px 3px rgba(11, 19, 42, 0.05);
  --nf-shadow-md: 0 4px 12px rgba(11, 19, 42, 0.08);
  --nf-shadow-lg: 0 10px 25px rgba(11, 19, 42, 0.12);

  /* Transitions */
  --nf-transition: all 0.25s ease-in-out;
}

/* --------------------------------------------------------------------------
   Reset & Core Base
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: var(--nf-font-family);
  font-size: 16px;
  line-height: 1.6;
  color: var(--nf-navy);
  background-color: var(--nf-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

main {
  flex: 1;
}

a {
  color: var(--nf-gold);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: var(--nf-transition);
}

a:hover {
  color: var(--nf-gold-hover);
  text-decoration-thickness: 2px;
}

/* Image Reset with Reserved Aspect Ratio Support */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

button, input, select, textarea {
  font: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

/* Accessibility Focus & Utility */
:focus-visible {
  outline: 2px solid var(--nf-gold);
  outline-offset: 3px;
}

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

.nf-container {
  width: 100%;
  max-width: var(--nf-container-max);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* --------------------------------------------------------------------------
   Typography
   -------------------------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--nf-font-heading);
  color: var(--nf-navy-dark);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 1.875rem; }
h3 { font-size: 1.375rem; }
h4 { font-size: 1.1875rem; }
h5 { font-size: 1rem; }
h6 { font-size: 0.875rem; }

@media (max-width: 768px) {
  h1 { font-size: 1.875rem; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.25rem; }
}

/* Badges & Buttons */
.nf-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.25rem 0.65rem;
  border-radius: var(--nf-radius-sm);
  background-color: var(--nf-gray-light);
  color: var(--nf-navy-dark);
  border: 1px solid var(--nf-gray-border);
  text-decoration: none;
}

.nf-badge-gold {
  background-color: var(--nf-gold-light);
  color: var(--nf-gold-text);
  border-color: rgba(217, 119, 6, 0.2);
}

.nf-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.9375rem;
  font-weight: 600;
  padding: 0.75rem 1.35rem;
  border-radius: var(--nf-radius-sm);
  transition: var(--nf-transition);
  text-align: center;
  text-decoration: none;
}

.nf-btn-gold {
  background-color: var(--nf-gold);
  color: var(--nf-white) !important;
  text-decoration: none !important;
}

.nf-btn-gold:hover {
  background-color: var(--nf-gold-hover);
  color: var(--nf-white) !important;
  box-shadow: 0 4px 12px rgba(217, 119, 6, 0.3);
}

.nf-btn-outline {
  background-color: transparent;
  color: var(--nf-navy-dark) !important;
  border: 1px solid var(--nf-gray-border);
  text-decoration: none !important;
}

.nf-btn-outline:hover {
  border-color: var(--nf-navy-dark);
  background-color: var(--nf-gray-light);
}

/* Gutenberg Button Compatibility */
.wp-block-button__link,
.wp-element-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.35rem;
  border-radius: var(--nf-radius-sm);
  background-color: var(--nf-gold);
  color: var(--nf-white) !important;
  font-weight: 600;
  text-decoration: none !important;
  transition: var(--nf-transition);
  border: none;
}

.wp-block-button__link:hover,
.wp-element-button:hover {
  background-color: var(--nf-gold-hover);
}

/* --------------------------------------------------------------------------
   Header & Navigation
   -------------------------------------------------------------------------- */
.nf-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--nf-white);
  border-bottom: 1px solid var(--nf-gray-border);
  box-shadow: var(--nf-shadow-sm);
}

.nf-reading-progress {
  position: absolute;
  bottom: -1px;
  left: 0;
  height: 3px;
  background-color: var(--nf-gold);
  width: 0%;
  transition: width 0.1s linear;
  border-radius: 0 2px 2px 0;
}

body.admin-bar .nf-header { top: 32px; }
@media screen and (max-width: 782px) {
  body.admin-bar .nf-header { top: 46px; }
}

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

.nf-site-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nf-site-brand-link {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none !important;
}

.nf-brand-logo-img {
  display: block;
  width: auto;
  height: auto;
  transition: opacity 0.2s ease;
}

.nf-brand-logo-img:hover {
  opacity: 0.9;
}

.nf-site-title {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--nf-navy-dark);
  text-decoration: none;
  line-height: 1.1;
  display: flex;
  flex-direction: column;
}

.nf-site-title span { color: var(--nf-gold); }

.nf-site-tagline {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--nf-slate-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-top: 0.15rem;
}

.nf-nav-desktop {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  list-style: none;
}

.nf-nav-desktop a {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--nf-navy-light);
  text-decoration: none;
}

.nf-nav-desktop a:hover,
.nf-nav-desktop .current-menu-item > a {
  color: var(--nf-navy-dark);
  font-weight: 700;
}

.nf-header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nf-search-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: var(--nf-navy);
  transition: var(--nf-transition);
}

.nf-search-toggle:hover {
  background-color: var(--nf-gray-light);
  color: var(--nf-navy-dark);
}

.nf-mobile-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 38px;
  height: 38px;
  padding: 8px;
}

.nf-mobile-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--nf-navy-dark);
}

@media (max-width: 991px) {
  .nf-nav-desktop { display: none; }
  .nf-mobile-toggle { display: flex; }
}

/* Mobile Drawer Overlay */
.nf-mobile-drawer {
  position: fixed;
  top: 0;
  right: -100%;
  width: 300px;
  max-width: 85%;
  height: 100vh;
  background-color: var(--nf-navy-dark);
  color: var(--nf-white);
  z-index: 1000;
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  transition: right 0.3s ease;
  box-shadow: -5px 0 25px rgba(0,0,0,0.3);
}

.nf-mobile-drawer.is-open { right: 0; }

.nf-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
}

.nf-drawer-header .nf-site-title { color: var(--nf-white); }

.nf-drawer-close {
  color: var(--nf-white);
  font-size: 1.5rem;
}

.nf-nav-mobile {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.nf-nav-mobile a {
  color: #cbd5e1;
  font-size: 1.0625rem;
  font-weight: 600;
  text-decoration: none;
}

.nf-nav-mobile a:hover { color: var(--nf-white); }

.nf-drawer-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(11, 19, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.nf-drawer-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

/* Search Modal */
.nf-search-modal {
  position: fixed;
  inset: 0;
  background-color: rgba(11, 19, 42, 0.75);
  backdrop-filter: blur(6px);
  z-index: 2000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 100px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.nf-search-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.nf-search-box {
  width: 90%;
  max-width: 540px;
  background-color: var(--nf-white);
  border-radius: var(--nf-radius-md);
  padding: 1.5rem;
  box-shadow: var(--nf-shadow-lg);
}

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

.nf-search-input {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 1px solid var(--nf-gray-border);
  border-radius: var(--nf-radius-sm);
  font-size: 1rem;
}

/* Homepage Brand Header Banner ("My Blog") */
.nf-homepage-brand-header {
  padding: 2.25rem 0 1.25rem 0;
  border-bottom: 1px solid var(--nf-gray-border);
  margin-bottom: 2rem;
}

.nf-homepage-main-title {
  font-size: 2.75rem;
  font-weight: 800;
  color: var(--nf-navy-dark);
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 0.35rem;
}

.nf-homepage-sub-title {
  font-size: 1.125rem;
  color: var(--nf-slate-muted);
  margin-bottom: 0;
}

.nf-search-input:focus {
  outline: none;
  border-color: var(--nf-gold);
}

/* --------------------------------------------------------------------------
   Editorial Magazine Homepage Hero & Component System (Mockup 1:1)
   -------------------------------------------------------------------------- */
.nf-hero {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 2.5rem;
  align-items: center;
  background: linear-gradient(135deg, #0b132a 0%, #1e293b 100%);
  color: #ffffff;
  border-radius: var(--nf-radius-lg);
  padding: 3rem 3.25rem;
  margin: 1.5rem 0 2.5rem 0;
  box-shadow: 0 12px 35px rgba(11, 19, 42, 0.25);
  overflow: hidden;
  position: relative;
}

@media (max-width: 991px) {
  .nf-hero {
    grid-template-columns: 1fr;
    padding: 2rem;
  }
}

.nf-hero-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  z-index: 2;
}

.nf-hero-badges {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.nf-badge-hero {
  background-color: rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
}

.nf-hero-title {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.025em;
  margin-bottom: 1rem;
}

.nf-hero-title a {
  color: #ffffff !important;
  text-decoration: none !important;
  transition: var(--nf-transition);
}

.nf-hero-title a:hover {
  color: #fbbf24 !important;
}

@media (max-width: 768px) {
  .nf-hero-title { font-size: 1.85rem; }
}

.nf-hero-excerpt {
  font-size: 1.0625rem;
  line-height: 1.6;
  color: #94a3b8;
  margin-bottom: 1.75rem;
}

.nf-hero-action {
  margin-bottom: 2rem;
}

.nf-hero-meta {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.8125rem;
  color: #cbd5e1;
}

.nf-hero-author-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.nf-hero-author {
  font-weight: 700;
  color: #ffffff;
}

.nf-hero-dot {
  opacity: 0.5;
}

.nf-hero-media {
  border-radius: var(--nf-radius-md);
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
  max-height: 380px;
}

.nf-hero-media-link img,
.nf-hero-media img {
  width: 100%;
  height: 100%;
  max-height: 380px;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.nf-hero-media-link:hover img {
  transform: scale(1.03);
}

.nf-hero-media-placeholder {
  width: 100%;
  height: 320px;
  background-color: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--nf-gold);
}

/* Category Mini Cards Row (5 Columns) */
.nf-category-cards-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1.25rem;
  margin-bottom: 3rem;
}

@media (max-width: 991px) {
  .nf-category-cards-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .nf-category-cards-row {
    grid-template-columns: 1fr;
  }
}

.nf-cat-card-mini {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1rem 1.15rem;
  background-color: var(--nf-white);
  border: 1px solid var(--nf-gray-border);
  border-radius: var(--nf-radius-md);
  text-decoration: none !important;
  box-shadow: var(--nf-shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.nf-cat-card-mini:hover {
  transform: translateY(-3px);
  box-shadow: var(--nf-shadow-md);
  border-color: rgba(217, 119, 6, 0.4);
}

.nf-cat-card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: var(--nf-radius-sm);
  background-color: var(--nf-gold-light);
  color: var(--nf-gold-text);
  flex-shrink: 0;
}

.nf-cat-card-info h4 {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--nf-navy-dark);
  margin-bottom: 0.15rem;
  line-height: 1.2;
}

.nf-cat-card-info p {
  font-size: 0.75rem;
  color: var(--nf-slate-muted);
  margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   Homepage Sections & Layout System (Cards, Grids, Explore & Popular Rows)
   -------------------------------------------------------------------------- */
.nf-section {
  margin: 3.5rem 0;
}

.nf-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.75rem;
  flex-wrap: wrap;
  gap: 1rem;
  border-bottom: 2px solid var(--nf-gray-border);
  padding-bottom: 0.85rem;
}

.nf-section-title {
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--nf-navy-dark);
  margin: 0;
  position: relative;
  letter-spacing: -0.02em;
}

.nf-cat-pills {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.nf-pill {
  display: inline-block;
  padding: 0.35rem 0.9rem;
  border-radius: 20px;
  font-size: 0.8125rem;
  font-weight: 600;
  background-color: var(--nf-gray-light);
  color: var(--nf-slate-muted) !important;
  text-decoration: none !important;
  border: 1px solid var(--nf-gray-border);
  transition: var(--nf-transition);
}

.nf-pill:hover,
.nf-pill.is-active {
  background-color: var(--nf-navy-dark);
  color: var(--nf-white) !important;
  border-color: var(--nf-navy-dark);
}

/* Latest Articles 3-Column Card Grid */
.nf-card-grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 1.75rem !important;
  margin-top: 1.5rem;
}

@media (max-width: 991px) {
  .nf-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 640px) {
  .nf-card-grid {
    grid-template-columns: 1fr !important;
  }
}

.nf-card {
  display: flex;
  flex-direction: column;
  background-color: var(--nf-white);
  border: 1px solid var(--nf-gray-border);
  border-radius: var(--nf-radius-md);
  overflow: hidden;
  height: 100%;
  box-shadow: var(--nf-shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.nf-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--nf-shadow-md);
  border-color: rgba(217, 119, 6, 0.4);
}

.nf-card-media {
  width: 100%;
  height: 200px;
  overflow: hidden;
  background-color: var(--nf-gray-light);
  flex-shrink: 0;
  position: relative;
}

.nf-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

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

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

.nf-card-category {
  margin-bottom: 0.65rem;
}

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

.nf-card-title a {
  color: var(--nf-navy-dark) !important;
  text-decoration: none !important;
  transition: var(--nf-transition);
}

.nf-card-title a:hover {
  color: var(--nf-gold) !important;
}

.nf-card-excerpt {
  font-size: 0.875rem;
  color: var(--nf-slate-muted);
  line-height: 1.55;
  margin-bottom: 1.25rem;
  flex-grow: 1;
}

.nf-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78125rem;
  color: var(--nf-slate-muted);
  font-weight: 500;
  border-top: 1px solid var(--nf-gray-border);
  padding-top: 0.85rem;
  margin-top: auto;
}

/* 2-Column Split Row (Popular Articles + Newsletter) */
.nf-split-row {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 2.5rem;
  align-items: start;
}

@media (max-width: 991px) {
  .nf-split-row {
    grid-template-columns: 1fr;
  }
}

.nf-popular-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.nf-popular-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background-color: var(--nf-white);
  border: 1px solid var(--nf-gray-border);
  border-radius: var(--nf-radius-md);
  transition: var(--nf-transition);
  box-shadow: var(--nf-shadow-sm);
}

.nf-popular-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--nf-shadow-md);
  border-color: rgba(217, 119, 6, 0.4);
}

.nf-popular-number {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--nf-gold);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background-color: var(--nf-gold-light);
  border-radius: 50%;
}

.nf-popular-thumb {
  width: 85px;
  height: 65px;
  object-fit: cover;
  border-radius: var(--nf-radius-sm);
  flex-shrink: 0;
}

.nf-popular-title {
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.35;
  margin: 0;
}

.nf-popular-title a {
  color: var(--nf-navy-dark) !important;
  text-decoration: none !important;
  transition: var(--nf-transition);
}

.nf-popular-title a:hover {
  color: var(--nf-gold) !important;
}

/* Newsletter Box */
.nf-newsletter-card {
  background: linear-gradient(135deg, #0b132a 0%, #1e293b 100%);
  color: #ffffff;
  padding: 2.25rem 2rem;
  border-radius: var(--nf-radius-lg);
  box-shadow: 0 10px 30px rgba(11, 19, 42, 0.2);
}

.nf-newsletter-title {
  color: #ffffff;
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.nf-newsletter-desc {
  color: #94a3b8;
  font-size: 0.9375rem;
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

.nf-newsletter-form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.nf-newsletter-input {
  width: 100%;
  padding: 0.85rem 1rem;
  border-radius: var(--nf-radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.2);
  background-color: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font-size: 0.9375rem;
}

.nf-newsletter-input::placeholder {
  color: #94a3b8;
}

.nf-newsletter-input:focus {
  outline: none;
  border-color: var(--nf-gold);
  background-color: rgba(255, 255, 255, 0.12);
}

/* Explore by Category Visual Grid */
.nf-explore-category-grid {
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  gap: 1.25rem !important;
}

@media (max-width: 991px) {
  .nf-explore-category-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 640px) {
  .nf-explore-category-grid {
    grid-template-columns: 1fr !important;
  }
}

.nf-explore-cat-card {
  display: flex;
  flex-direction: column;
  background-color: var(--nf-white);
  border: 1px solid var(--nf-gray-border);
  border-radius: var(--nf-radius-md);
  overflow: hidden;
  text-decoration: none !important;
  box-shadow: var(--nf-shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.nf-explore-cat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--nf-shadow-md);
  border-color: rgba(217, 119, 6, 0.4);
}

.nf-explore-cat-media {
  width: 100%;
  height: 110px;
  overflow: hidden;
  position: relative;
}

.nf-explore-cat-body {
  padding: 1rem 1.15rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: var(--nf-white);
}

.nf-explore-cat-body h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--nf-navy-dark);
  margin: 0 0 0.2rem 0;
  line-height: 1.2;
}

.nf-explore-cat-body p {
  font-size: 0.75rem;
  color: var(--nf-slate-muted);
  margin: 0;
}

/* --------------------------------------------------------------------------
   Single Post Layout & Article Elements Optimization
   -------------------------------------------------------------------------- */
.nf-breadcrumbs {
  padding: 1rem 0 0.5rem 0;
  font-size: 0.8125rem;
  color: var(--nf-slate-muted);
}

.nf-breadcrumbs a {
  color: var(--nf-slate-muted);
  text-decoration: none;
}

.nf-breadcrumbs a:hover { color: var(--nf-gold); }
.nf-breadcrumbs span { margin: 0 0.4rem; opacity: 0.5; }

.nf-single-header {
  margin-top: 0.75rem;
  margin-bottom: 1.25rem;
  max-width: 900px;
}

.nf-single-title {
  font-size: 2.5rem;
  line-height: 1.2;
  margin: 0.75rem 0;
}

@media (max-width: 768px) {
  .nf-single-title { font-size: 1.875rem; }
}

.nf-single-meta-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
  border-top: 1px solid var(--nf-gray-border);
  border-bottom: 1px solid var(--nf-gray-border);
  margin-top: 1rem;
  margin-bottom: 1.25rem;
}

.nf-author-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nf-author-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
}

.nf-author-name {
  font-weight: 700;
  color: var(--nf-navy-dark);
  text-decoration: none;
}

.nf-post-date {
  font-size: 0.8125rem;
  color: var(--nf-slate-muted);
}

.nf-share-bar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.nf-share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background-color: var(--nf-gray-light);
  color: var(--nf-navy);
  border: 1px solid var(--nf-gray-border);
  transition: var(--nf-transition);
}

.nf-share-btn:hover {
  background-color: var(--nf-navy-dark);
  color: var(--nf-white);
}

/* Post Tags Styling */
.nf-post-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin: 2rem 0 1.5rem 0;
  padding-top: 1rem;
  border-top: 1px solid var(--nf-gray-border);
}

.nf-tags-label {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--nf-slate-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-right: 0.25rem;
}

.nf-post-tags a {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--nf-navy-light);
  background-color: var(--nf-gray-light);
  border: 1px solid var(--nf-gray-border);
  padding: 0.25rem 0.65rem;
  border-radius: var(--nf-radius-sm);
  text-decoration: none !important;
  transition: var(--nf-transition);
}

.nf-post-tags a:hover {
  background-color: var(--nf-navy-dark);
  color: var(--nf-white) !important;
  border-color: var(--nf-navy-dark);
}

/* Bottom Social Media Share Card */
.nf-bottom-share-card {
  background-color: var(--nf-gray-light);
  border: 1px solid var(--nf-gray-border);
  border-radius: var(--nf-radius-md);
  padding: 1.5rem;
  margin: 2rem 0;
  box-shadow: var(--nf-shadow-sm);
}

.nf-share-card-header {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}

.nf-share-card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: var(--nf-gold-light);
  color: var(--nf-gold-text);
  flex-shrink: 0;
}

.nf-share-card-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--nf-navy-dark);
  margin-bottom: 0.15rem;
}

.nf-share-card-desc {
  font-size: 0.875rem;
  color: var(--nf-slate-muted);
  margin-bottom: 0;
}

.nf-bottom-share-buttons {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 0.65rem;
}

.nf-btn-share {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.55rem 0.85rem;
  border-radius: var(--nf-radius-sm);
  font-size: 0.8125rem;
  font-weight: 600;
  color: #ffffff !important;
  text-decoration: none !important;
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.nf-btn-share:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  opacity: 0.92;
}

.nf-btn-share-x { background-color: #000000; }
.nf-btn-share-fb { background-color: #1877f2; }
.nf-btn-share-li { background-color: #0a66c2; }
.nf-btn-share-wa { background-color: #25d366; }
.nf-btn-share-rd { background-color: #ff4500; }
.nf-btn-share-copy {
  background-color: var(--nf-navy-dark);
  color: var(--nf-white) !important;
}

/* Featured Image */
.nf-post-featured-image {
  border-radius: var(--nf-radius-md);
  overflow: hidden;
  margin-top: 0.5rem;
  margin-bottom: 2rem;
  max-width: 100%;
}

.nf-post-featured-image img {
  width: 100%;
  max-height: 520px;
  object-fit: cover;
}

/* Single Post Layout Grid (Flexible 2-Column: Left minmax(0, 1fr) + Right 300px) */
.nf-single-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 2.5rem;
  align-items: start;
}

@media (max-width: 991px) {
  .nf-single-layout {
    grid-template-columns: 1fr;
  }
}

/* Article Body Content Typography & Readability */
.nf-post-content {
  font-size: 1.125rem;
  line-height: 1.75;
  color: #1e293b;
  min-width: 0;
}

.nf-post-content p {
  margin-bottom: 1.5rem;
}

/* In-Text Content Links Styling */
.nf-post-content a:not(.nf-btn):not(.wp-block-button__link):not(.nf-badge) {
  color: var(--nf-gold);
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
  font-weight: 600;
}

.nf-post-content a:not(.nf-btn):not(.wp-block-button__link):not(.nf-badge):hover {
  color: var(--nf-gold-hover);
  text-decoration-thickness: 2.5px;
}

.nf-post-content h2 {
  font-size: 1.875rem;
  margin-top: 2.25rem;
  margin-bottom: 0.85rem;
}

.nf-post-content h3 {
  font-size: 1.375rem;
  margin-top: 1.75rem;
  margin-bottom: 0.65rem;
}

.nf-post-content ul,
.nf-post-content ol {
  margin: 1.25rem 0 1.5rem 1.5rem;
}

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

/* Inline Table of Contents Box inside Main Content */
.nf-inline-toc {
  background-color: var(--nf-gray-light);
  border: 1px solid var(--nf-gray-border);
  border-radius: var(--nf-radius-md);
  padding: 1.5rem;
  margin: 1.75rem 0 2.25rem 0;
  box-shadow: var(--nf-shadow-sm);
}

.nf-inline-toc-title {
  font-size: 1.125rem;
  color: var(--nf-navy-dark);
  font-weight: 700;
  margin-bottom: 0.85rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--nf-gold);
  display: inline-block;
}

.nf-inline-toc-list {
  list-style: none;
  margin: 0 !important;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.nf-inline-toc-list li {
  margin-bottom: 0 !important;
  font-size: 0.9375rem;
}

.nf-inline-toc-list a {
  color: var(--nf-navy-dark) !important;
  text-decoration: none !important;
  font-weight: 600 !important;
  transition: var(--nf-transition);
}

.nf-inline-toc-list a:hover,
.nf-inline-toc-list a.is-active {
  color: var(--nf-gold) !important;
}

/* Premium Blockquote Styling */
.nf-post-content blockquote {
  margin: 2rem 0;
  padding: 1.5rem 1.75rem 1.5rem 2.25rem;
  background-color: var(--nf-gray-light);
  border-left: 4px solid var(--nf-gold);
  border-radius: 0 var(--nf-radius-md) var(--nf-radius-md) 0;
  font-style: italic;
  font-size: 1.15rem;
  line-height: 1.7;
  color: var(--nf-navy-dark);
  position: relative;
}

.nf-post-content blockquote cite {
  display: block;
  font-style: normal;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--nf-slate-muted);
  margin-top: 0.75rem;
}

/* High-Contrast Code Blocks with Copy Button */
.nf-code-block {
  position: relative;
  background-color: var(--nf-navy-dark);
  border-radius: var(--nf-radius-md);
  margin: 1.75rem 0;
  overflow: hidden;
  max-width: 100%;
}

.nf-code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.85rem;
  background-color: rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.75rem;
  color: #94a3b8;
  font-family: var(--nf-font-mono);
}

.nf-copy-code-btn {
  background-color: rgba(255, 255, 255, 0.1);
  color: #f8fafc;
  padding: 0.25rem 0.65rem;
  border-radius: 4px;
  font-size: 0.75rem;
  transition: var(--nf-transition);
}

.nf-copy-code-btn:hover {
  background-color: var(--nf-gold);
  color: var(--nf-white);
}

.nf-post-content pre {
  margin: 0;
  padding: 1.25rem;
  overflow-x: auto;
  font-size: 0.875rem;
  font-family: var(--nf-font-mono);
  color: #f8fafc;
  background: transparent;
  white-space: pre;
}

/* Modern Premium Editorial Table Design System */
.nf-table-card-wrapper,
.wp-block-table {
  width: 100%;
  overflow-x: auto;
  margin: 2rem 0;
  border-radius: var(--nf-radius-md);
  border: 1px solid var(--nf-gray-border);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  background-color: var(--nf-white);
  -webkit-overflow-scrolling: touch;
}

.nf-post-content table,
.wp-block-table table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 0 !important;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--nf-navy-dark);
}

/* Header Row */
.nf-post-content th,
.wp-block-table th {
  background-color: var(--nf-navy-dark);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.95rem 1.15rem;
  text-align: left;
  border-bottom: 3px solid var(--nf-gold);
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  white-space: nowrap;
}

.nf-post-content th:last-child,
.wp-block-table th:last-child {
  border-right: none;
}

/* Body Cells */
.nf-post-content td,
.wp-block-table td {
  padding: 0.85rem 1.15rem;
  border-bottom: 1px solid #e2e8f0;
  border-right: 1px solid #f1f5f9;
  vertical-align: middle;
  transition: background-color 0.15s ease;
}

.nf-post-content td:last-child,
.wp-block-table td:last-child {
  border-right: none;
}

.nf-post-content tr:last-child td,
.wp-block-table tr:last-child td {
  border-bottom: none;
}

/* First Column Feature Label Highlight */
.nf-post-content tbody td:first-child,
.wp-block-table tbody td:first-child {
  font-weight: 700;
  color: var(--nf-navy-dark);
  background-color: rgba(248, 250, 252, 0.7);
}

/* Alternating Rows */
.nf-post-content tbody tr:nth-child(even) td,
.wp-block-table tbody tr:nth-child(even) td {
  background-color: #f8fafc;
}

.nf-post-content tbody tr:nth-child(even) td:first-child,
.wp-block-table tbody tr:nth-child(even) td:first-child {
  background-color: #f1f5f9;
}

/* Interactive Row Hover Highlight */
.nf-post-content tbody tr:hover td,
.wp-block-table tbody tr:hover td {
  background-color: #fffbeb !important;
}

/* Key Takeaways Box */
.nf-key-takeaways {
  background-color: #fffbeb;
  border: 1px solid rgba(217, 119, 6, 0.3);
  border-radius: var(--nf-radius-md);
  padding: 1.25rem 1.5rem;
  margin: 2rem 0;
}

.nf-key-takeaways-title {
  font-size: 1.0625rem;
  color: var(--nf-gold-text);
  font-weight: 700;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nf-key-takeaways-list {
  list-style: none;
  margin: 0 !important;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.nf-key-takeaways-list li {
  position: relative;
  padding-left: 1.5rem;
  font-size: 0.9375rem;
  color: #78350f;
  margin-bottom: 0 !important;
}

.nf-key-takeaways-list li::before {
  content: "✔";
  position: absolute;
  left: 0;
  color: var(--nf-gold);
  font-weight: bold;
}

/* In-Article Inline Newsletter Banner */
.nf-article-newsletter {
  background-color: var(--nf-navy-dark);
  color: var(--nf-white);
  padding: 1.75rem;
  border-radius: var(--nf-radius-md);
  margin: 2.25rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.nf-article-newsletter h4 {
  color: var(--nf-white);
  font-size: 1.25rem;
}

.nf-article-newsletter p {
  color: #94a3b8;
  margin-bottom: 0;
  font-size: 0.875rem;
}

.nf-article-newsletter-form {
  display: flex;
  gap: 0.75rem;
}

@media (max-width: 640px) {
  .nf-article-newsletter-form { flex-direction: column; }
}

/* Author Bio Card */
.nf-author-bio {
  display: flex;
  gap: 1.25rem;
  padding: 1.75rem;
  background-color: var(--nf-gray-light);
  border-radius: var(--nf-radius-md);
  border: 1px solid var(--nf-gray-border);
  margin-top: 3rem;
}

@media (max-width: 640px) {
  .nf-author-bio { flex-direction: column; text-align: center; }
}

.nf-author-bio-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.nf-author-bio-content h4 {
  font-size: 1.125rem;
  margin-bottom: 0.4rem;
}

.nf-author-bio-content p {
  font-size: 0.875rem;
  color: var(--nf-slate-muted);
  margin-bottom: 0.85rem;
}

/* Related Posts Section (3 Equal Compact Cards Grid) */
.nf-related-section {
  margin-top: 2.5rem;
  margin-bottom: 2rem;
}

.nf-related-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

@media (max-width: 640px) {
  .nf-related-grid {
    grid-template-columns: 1fr;
  }
}

.nf-related-card {
  display: flex;
  flex-direction: column;
  background-color: var(--nf-white);
  border: 1px solid var(--nf-gray-border);
  border-radius: var(--nf-radius-md);
  overflow: hidden;
  height: 100%;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.nf-related-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--nf-shadow-md);
  border-color: rgba(217, 119, 6, 0.4);
}

.nf-related-thumb-link {
  display: block;
  width: 100%;
  height: 135px;
  overflow: hidden;
  background-color: var(--nf-gray-light);
  position: relative;
  flex-shrink: 0;
}

.nf-related-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

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

.nf-related-thumb-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--nf-navy-dark);
  color: var(--nf-gold);
}

.nf-related-card-body {
  padding: 0.85rem 0.95rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.nf-related-meta {
  margin-bottom: 0.35rem;
}

.nf-related-date {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--nf-slate-muted);
}

.nf-related-card-title {
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.35;
  margin: 0;
}

.nf-related-card-title a {
  color: var(--nf-navy-dark) !important;
  text-decoration: none !important;
  transition: var(--nf-transition);
}

.nf-related-card-title a:hover {
  color: var(--nf-gold) !important;
}

/* Sidebar Widgets */
.nf-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.nf-widget {
  background-color: var(--nf-white);
  border-radius: var(--nf-radius-md);
  border: 1px solid var(--nf-gray-border);
  padding: 1.25rem;
}

.nf-widget-title {
  font-size: 1.0625rem;
  margin-bottom: 1rem;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid var(--nf-gold);
  display: inline-block;
}

.nf-widget-categories {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin: 0 !important;
}

.nf-widget-categories li a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--nf-navy);
  font-weight: 600;
  font-size: 0.875rem;
  text-decoration: none;
}

.nf-widget-categories li a .count {
  background-color: var(--nf-gray-light);
  padding: 0.15rem 0.5rem;
  border-radius: 20px;
  font-size: 0.75rem;
  color: var(--nf-slate-muted);
}

/* Promotional Sidebar Banner CTA Card */
.nf-promo-widget {
  background-color: var(--nf-navy-dark);
  color: var(--nf-white);
  border-radius: var(--nf-radius-md);
  padding: 1.75rem 1.25rem;
  text-align: center;
}

.nf-promo-widget h4 {
  color: var(--nf-white);
  font-size: 1.25rem;
  margin-bottom: 0.85rem;
}

/* Toast Tooltip Notification */
.nf-toast {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background-color: var(--nf-navy-dark);
  color: var(--nf-white);
  padding: 0.75rem 1.25rem;
  border-radius: var(--nf-radius-sm);
  font-weight: 600;
  font-size: 0.875rem;
  box-shadow: var(--nf-shadow-lg);
  z-index: 3000;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s ease;
  pointer-events: none;
}

.nf-toast.is-show {
  opacity: 1;
  transform: translateY(0);
}

/* --------------------------------------------------------------------------
   Archive & Category Header
   -------------------------------------------------------------------------- */
.nf-archive-header {
  background-color: var(--nf-navy-dark);
  color: var(--nf-white);
  padding: 3.5rem 0;
  border-radius: var(--nf-radius-lg);
  margin: 1.5rem 0 2.5rem 0;
}

.nf-archive-title {
  color: var(--nf-white);
  font-size: 2.25rem;
  margin-bottom: 0.5rem;
}

.nf-archive-description {
  color: #94a3b8;
  font-size: 1rem;
  max-width: 650px;
}

/* Crawlable Pagination */
.nf-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 3rem;
}

.nf-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 0.75rem;
  border-radius: var(--nf-radius-sm);
  background-color: var(--nf-white);
  border: 1px solid var(--nf-gray-border);
  color: var(--nf-navy-dark);
  font-weight: 600;
  text-decoration: none;
}

.nf-pagination .page-numbers.current {
  background-color: var(--nf-navy-dark);
  color: var(--nf-white);
  border-color: var(--nf-navy-dark);
}

.nf-pagination .page-numbers:hover:not(.current) {
  border-color: var(--nf-gold);
  color: var(--nf-gold-hover);
}

/* --------------------------------------------------------------------------
   Footer Layout
   -------------------------------------------------------------------------- */
.nf-footer {
  background-color: var(--nf-navy-dark);
  color: var(--nf-white);
  padding-top: 4rem;
  margin-top: 4.5rem;
}

.nf-footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 2.5rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

@media (max-width: 991px) {
  .nf-footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .nf-footer-grid { grid-template-columns: 1fr; }
}

.nf-footer-brand p {
  color: #94a3b8;
  margin: 0.85rem 0 1.25rem 0;
  max-width: 380px;
}

.nf-footer-socials {
  display: flex;
  gap: 0.65rem;
}

.nf-footer-socials a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.08);
  color: var(--nf-white);
  text-decoration: none;
  transition: var(--nf-transition);
}

.nf-footer-socials a:hover {
  background-color: var(--nf-gold);
  color: var(--nf-white);
}

.nf-footer-column h5 {
  color: var(--nf-white);
  font-size: 1.0625rem;
  margin-bottom: 1rem;
}

.nf-footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.nf-footer-links a {
  color: #94a3b8;
  font-size: 0.875rem;
  text-decoration: none;
}

.nf-footer-links a:hover { color: var(--nf-white); }

.nf-footer-bottom {
  padding: 1.5rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8125rem;
  color: #64748b;
}

.nf-footer-legal {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.nf-footer-legal a { color: #64748b; text-decoration: none; }
.nf-footer-legal a:hover { color: var(--nf-white); }
