/*
Theme Name: ValuFlash
Theme URI: https://valuflash.com
Author: ValuFlash Team
Author URI: https://valuflash.com
Description: A bold, modern WordPress theme for tech, startup, and finance news — inspired by TechCrunch. Features dark mode, category color coding, reading progress bar, auto-generated table of contents, and a card-based responsive layout.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: valuflash
Tags: news, blog, tech, dark-mode, responsive, accessibility-ready, custom-menu, custom-logo, featured-images, threaded-comments
*/

/* ============================================================
   0. CSS CUSTOM PROPERTIES (DESIGN TOKENS)
   ============================================================ */
:root {
  /* --- Colors: Light Mode --- */
  --vf-bg-primary: #FAFAFA;
  --vf-bg-secondary: #FFFFFF;
  --vf-bg-tertiary: #F3F4F6;
  --vf-text-primary: #0A1128;
  --vf-text-secondary: #4B5563;
  --vf-text-tertiary: #6B7280;
  --vf-brand-primary: #F7941D;
  --vf-brand-primary-hover: #E63946;
  --vf-border: #E5E7EB;
  --vf-card-bg: #FFFFFF;
  --vf-card-shadow: 0 2px 8px rgba(0,0,0,0.06);
  --vf-card-shadow-hover: 0 12px 24px rgba(0,0,0,0.1), 0 4px 8px rgba(0,0,0,0.06);
  --vf-overlay: rgba(0,0,0,0.7);
  --vf-code-bg: #F3F4F6;
  --vf-input-bg: #FFFFFF;
  --vf-input-border: #D1D5DB;
  --vf-hero-overlay: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.85) 100%);
  --vf-progress-bg: #E5E7EB;
  --vf-scrollbar-track: #F3F4F6;
  --vf-scrollbar-thumb: #D1D5DB;

  /* --- Category Colors --- */
  --vf-cat-ai: #2563eb;           /* Blue */
  --vf-cat-finance: #059669;      /* Emerald Green */
  --vf-cat-cybersecurity: #991b1b; /* Dark Crimson */
  --vf-cat-startups: #7c3aed;     /* Purple */
  --vf-cat-career: #475569;
  --vf-cat-gadgets: #475569;
  --vf-cat-howto: #475569;
  --vf-cat-latest: var(--vf-brand-primary);

  /* --- Typography --- */
  --vf-font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --vf-font-display: 'Archivo Black', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --vf-font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;

  /* --- Spacing Scale --- */
  --vf-space-1: 0.25rem;
  --vf-space-2: 0.5rem;   /* 8px */
  --vf-space-3: 0.75rem;
  --vf-space-4: 1rem;     /* 16px */
  --vf-space-5: 1.25rem;
  --vf-space-6: 1.5rem;   /* 24px */
  --vf-space-8: 2rem;     /* 32px */
  --vf-space-10: 2.5rem;
  --vf-space-12: 3rem;    /* 48px */
  --vf-space-16: 4rem;    /* 64px */
  --vf-space-20: 5rem;
  --vf-space-24: 6rem;    /* 96px */
  --vf-space-32: 8rem;    /* 128px */

  /* --- Border Radius --- */
  --vf-radius-sm: 4px;
  --vf-radius-md: 8px;
  --vf-radius-lg: 12px;
  --vf-radius-xl: 16px;
  --vf-radius-full: 9999px;

  /* --- Transitions --- */
  --vf-transition-fast: 150ms ease;
  --vf-transition-base: 250ms ease;
  --vf-transition-slow: 400ms ease;

  /* --- Layout --- */
  --vf-container-max: 1280px;
  --vf-container-narrow: 780px;
  --vf-header-height: 90px;
  --vf-sidebar-width: 360px;
}

/* --- Dark Mode --- */
[data-theme="dark"] {
  --vf-bg-primary: #0A1128;
  --vf-bg-secondary: #111827;
  --vf-bg-tertiary: #1F2937;
  --vf-text-primary: #F9FAFB;
  --vf-text-secondary: #9CA3AF;
  --vf-text-tertiary: #6B7280;
  --vf-brand-primary: #F7941D;
  --vf-brand-primary-hover: #E63946;
  --vf-border: #1F2937;
  --vf-card-bg: #111827;
  --vf-card-shadow: 0 4px 12px rgba(0,0,0,0.4);
  --vf-card-shadow-hover: 0 12px 32px rgba(0,0,0,0.6);
  --vf-code-bg: #1F2937;
  --vf-input-bg: #111827;
  --vf-input-border: #374151;
  --vf-progress-bg: #1F2937;
  --vf-scrollbar-track: #111827;
  --vf-scrollbar-thumb: #374151;
}


/* ============================================================
   1. RESET & BASE
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scrollbar-color: var(--vf-scrollbar-thumb) var(--vf-scrollbar-track);
}

body {
  font-family: var(--vf-font-sans);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--vf-text-primary);
  background-color: var(--vf-bg-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a {
  color: var(--vf-brand-primary);
  text-decoration: none;
  transition: color var(--vf-transition-fast);
}

a:hover,
a:focus-visible {
  color: var(--vf-brand-primary-hover);
}

a:focus-visible {
  outline: 2px solid var(--vf-brand-primary);
  outline-offset: 2px;
  border-radius: var(--vf-radius-sm);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul, ol {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

input, textarea {
  font-family: inherit;
  font-size: inherit;
}

::selection {
  background-color: var(--vf-brand-primary);
  color: #FFFFFF;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--vf-scrollbar-track);
}
::-webkit-scrollbar-thumb {
  background: var(--vf-scrollbar-thumb);
  border-radius: var(--vf-radius-full);
}

/* Screen reader only */
.screen-reader-text {
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  width: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  word-wrap: normal !important;
}

.screen-reader-text:focus {
  clip: auto;
  clip-path: none;
  display: block;
  height: auto;
  width: auto;
  position: static;
}


/* ============================================================
   2. TYPOGRAPHY
   ============================================================ */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--vf-font-display);
  font-weight: 900;
  line-height: 1.1;
  color: var(--vf-text-primary);
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 3vw, 1.75rem); }
h4 { font-size: 1.125rem; }
h5 { font-size: 1rem; }
h6 { font-size: 0.875rem; }

.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.text-lg { font-size: 1.125rem; }

.font-bold { font-weight: 700; }
.font-extrabold { font-weight: 900; }
.font-medium { font-weight: 500; }


/* ============================================================
   3. LAYOUT & CONTAINERS
   ============================================================ */
.vf-container {
  width: 100%;
  max-width: var(--vf-container-max);
  margin: 0 auto;
  padding: 0 var(--vf-space-4);
}

.vf-container--narrow {
  max-width: var(--vf-container-narrow);
}

.vf-main-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--vf-space-8);
}

@media (min-width: 1024px) {
  .vf-main-grid {
    grid-template-columns: 1fr var(--vf-sidebar-width);
  }
}

.vf-section {
  padding: var(--vf-space-12) 0;
}

@media (min-width: 1024px) {
  .vf-section {
    padding: var(--vf-space-24) 0;
  }
}

.vf-section--flush {
  padding: 0;
}

.vf-section__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--vf-space-6);
}

.vf-section__title {
  font-size: 1.25rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  position: relative;
  padding-left: var(--vf-space-4);
}

.vf-section__title::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 100%;
  background-color: var(--vf-brand-primary);
  border-radius: var(--vf-radius-full);
}


/* ============================================================
   4. HEADER
   ============================================================ */
.vf-header {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--vf-header-height);
  background-color: var(--vf-bg-primary);
  border-bottom: 1px solid var(--vf-border);
  z-index: 1000;
  transition: transform var(--vf-transition-base), box-shadow var(--vf-transition-base);
}

.vf-header--hidden {
  transform: translateY(-100%);
}

.vf-header--shadow {
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

[data-theme="dark"] .vf-header--shadow {
  box-shadow: 0 2px 12px rgba(0,0,0,0.3);
}

.vf-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: var(--vf-space-4);
}

/* Logo */
.vf-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.vf-logo img {
  height: auto;
  max-height: 70px;
  width: auto;
  display: block;
}

.vf-logo__text {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--vf-text-primary);
  letter-spacing: -0.03em;
}

.vf-logo__text span {
  color: var(--vf-brand-primary);
}

/* Primary Nav */
.vf-nav {
  display: none;
}

@media (min-width: 1024px) {
  .vf-nav {
    display: flex;
    align-items: center;
    gap: var(--vf-space-1);
    flex: 1;
    justify-content: center;
  }
}

.vf-nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: var(--vf-space-2) var(--vf-space-3);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--vf-text-secondary);
  transition: color var(--vf-transition-fast);
  white-space: nowrap;
}

.vf-nav a::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: var(--vf-space-3);
  width: 0;
  height: 2px;
  background-color: var(--vf-brand-primary);
  transition: width 0.2s ease-out;
  border-radius: var(--vf-radius-full);
}

.vf-nav a:hover,
.vf-nav a:focus-visible,
.vf-nav .current-menu-item > a,
.vf-nav .current_page_item > a {
  color: var(--vf-text-primary);
}

.vf-nav a:hover::after,
.vf-nav a:focus-visible::after,
.vf-nav .current-menu-item > a::after,
.vf-nav .current_page_item > a::after {
  width: calc(100% - calc(var(--vf-space-3) * 2));
}

/* Header Actions */
.vf-header__actions {
  display: flex;
  align-items: center;
  gap: var(--vf-space-2);
  flex-shrink: 0;
}

.vf-header__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--vf-radius-md);
  color: var(--vf-text-secondary);
  transition: color var(--vf-transition-fast), background-color var(--vf-transition-fast);
}

.vf-header__btn:hover,
.vf-header__btn:focus-visible {
  color: var(--vf-text-primary);
  background-color: var(--vf-bg-secondary);
}

.vf-header__btn svg {
  width: 20px;
  height: 20px;
}

.vf-subscribe-btn {
  display: none;
  align-items: center;
  gap: var(--vf-space-2);
  padding: var(--vf-space-2) var(--vf-space-5);
  font-size: 0.875rem;
  font-weight: 600;
  color: #FFFFFF;
  background-color: var(--vf-brand-primary);
  border-radius: var(--vf-radius-full);
  transition: background-color var(--vf-transition-fast), transform var(--vf-transition-fast);
}

.vf-subscribe-btn:hover {
  background-color: var(--vf-brand-primary-hover);
  color: #FFFFFF;
  transform: translateY(-1px);
}

@media (min-width: 768px) {
  .vf-subscribe-btn {
    display: inline-flex;
  }
}

/* Search Overlay */
.vf-search-overlay {
  position: fixed;
  inset: 0;
  background-color: var(--vf-overlay);
  z-index: 2000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 15vh;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--vf-transition-base), visibility var(--vf-transition-base);
}

.vf-search-overlay.is-active {
  opacity: 1;
  visibility: visible;
}

.vf-search-overlay__inner {
  width: 100%;
  max-width: 640px;
  padding: 0 var(--vf-space-4);
  transform: translateY(-20px);
  transition: transform var(--vf-transition-base);
}

.vf-search-overlay.is-active .vf-search-overlay__inner {
  transform: translateY(0);
}

.vf-search-overlay input[type="search"] {
  width: 100%;
  padding: var(--vf-space-5) var(--vf-space-6);
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--vf-text-primary);
  background-color: var(--vf-card-bg);
  border: 2px solid var(--vf-border);
  border-radius: var(--vf-radius-lg);
  outline: none;
  transition: border-color var(--vf-transition-fast);
}

.vf-search-overlay input[type="search"]:focus {
  border-color: var(--vf-brand-primary);
}

.vf-search-overlay__close {
  position: absolute;
  top: var(--vf-space-6);
  right: var(--vf-space-6);
  color: #FFFFFF;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Mobile Menu */
.vf-mobile-menu {
  position: fixed;
  top: 0;
  right: 0;
  width: 100%;
  max-width: 320px;
  height: 100vh;
  height: 100dvh;
  background-color: var(--vf-bg-primary);
  border-left: 1px solid var(--vf-border);
  z-index: 1500;
  transform: translateX(100%);
  transition: transform var(--vf-transition-base);
  overflow-y: auto;
  padding: var(--vf-space-6);
}

.vf-mobile-menu.is-active {
  transform: translateX(0);
}

.vf-mobile-menu__backdrop {
  position: fixed;
  inset: 0;
  background-color: var(--vf-overlay);
  z-index: 1499;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--vf-transition-base), visibility var(--vf-transition-base);
}

.vf-mobile-menu__backdrop.is-active {
  opacity: 1;
  visibility: visible;
}

.vf-mobile-menu__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--vf-space-8);
}

.vf-mobile-menu__close {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--vf-text-secondary);
  border-radius: var(--vf-radius-md);
}

.vf-mobile-menu nav a {
  display: block;
  padding: var(--vf-space-3) 0;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--vf-text-primary);
  border-bottom: 1px solid var(--vf-border);
  transition: color var(--vf-transition-fast);
}

.vf-mobile-menu nav a:hover {
  color: var(--vf-brand-primary);
}


/* ============================================================
   5. HERO SECTION
   ============================================================ */
.vf-hero {
  padding: var(--vf-space-6) 0;
}

.vf-hero__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--vf-space-4);
}

@media (min-width: 768px) {
  .vf-hero__grid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
  }
}

@media (min-width: 1024px) {
  .vf-hero__grid {
    grid-template-columns: 2fr 1fr;
    grid-template-rows: 500px; /* Fixed height for desktop to align properly */
  }
  
  .vf-hero__grid--full {
    grid-template-columns: 1fr;
  }
}

/* Hero Carousel Wrapper */
.vf-hero__carousel-wrapper {
  position: relative;
  border-radius: var(--vf-radius-xl);
  overflow: hidden;
  min-height: 420px;
  background-color: var(--vf-bg-card);
}

@media (min-width: 768px) {
  .vf-hero__carousel-wrapper {
    grid-row: span 2;
    min-height: 500px;
  }
}

.vf-hero__carousel-track {
  display: flex;
  height: 100%;
  width: 100%;
  transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
  will-change: transform;
}

/* Individual Slide */
.vf-hero__slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
}

.vf-hero__slide:not(.is-active) {
  visibility: hidden;
  pointer-events: none;
  transition: visibility 0s linear 0.6s;
}

.vf-hero__slide.is-active {
  visibility: visible;
  pointer-events: auto;
  transition: visibility 0s linear 0s;
}

.vf-hero__primary-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--vf-transition-slow);
  z-index: 0;
}

.vf-hero__carousel-wrapper:hover .vf-hero__primary-img {
  transform: scale(1.03);
}

/* Carousel Controls */
.vf-hero__carousel-controls {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 10;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.vf-hero__carousel-dots {
  display: flex;
  justify-content: center;
  gap: var(--vf-space-2);
  padding-bottom: var(--vf-space-4);
  pointer-events: auto;
}

.vf-hero__carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.4);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: background-color var(--vf-transition-fast), transform var(--vf-transition-fast);
}

.vf-hero__carousel-dot:hover {
  background-color: rgba(255, 255, 255, 0.8);
}

.vf-hero__carousel-dot.is-active {
  background-color: var(--vf-brand-primary);
  transform: scale(1.2);
}

.vf-hero__carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  background-color: rgba(10, 17, 40, 0.6);
  backdrop-filter: blur(4px);
  color: white;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  pointer-events: auto;
  opacity: 0;
  transition: opacity var(--vf-transition-fast), background-color var(--vf-transition-fast);
}

@media (prefers-reduced-motion: reduce) {
  .vf-hero__carousel-track {
    transition: none !important;
  }
}

.vf-hero__carousel-wrapper:hover .vf-hero__carousel-arrow {
  opacity: 1;
}

.vf-hero__carousel-arrow:hover {
  background-color: var(--vf-brand-primary);
}

.vf-hero__carousel-arrow--prev {
  left: var(--vf-space-4);
}

.vf-hero__carousel-arrow--next {
  right: var(--vf-space-4);
}

.vf-hero__primary-overlay {
  position: absolute;
  inset: 0;
  background: var(--vf-hero-overlay);
  z-index: 1;
}

.vf-hero__primary-content {
  position: relative;
  z-index: 2;
  padding: var(--vf-space-8);
  color: #FFFFFF;
}

.vf-hero__primary-content .vf-card__title {
  color: #FFFFFF;
  font-size: clamp(1.5rem, 3.5vw, 2.25rem);
  margin: var(--vf-space-3) 0;
}

.vf-hero__primary-content .vf-card__title a {
  color: #FFFFFF;
}

.vf-hero__primary-content .vf-card__title a:hover {
  color: #FFFFFF;
  opacity: 0.9;
}

.vf-hero__primary-content .vf-card__excerpt {
  color: rgba(255,255,255,0.8);
  margin-bottom: var(--vf-space-4);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.vf-hero__primary-content .vf-card__meta {
  color: rgba(255,255,255,0.7);
}

/* Hero Secondary Cards */
.vf-hero__secondary {
  display: flex;
  flex-direction: column;
  gap: var(--vf-space-4);
}

.vf-hero__secondary-card {
  display: flex;
  gap: var(--vf-space-4);
  background-color: var(--vf-card-bg);
  border-radius: var(--vf-radius-lg);
  overflow: hidden;
  box-shadow: var(--vf-card-shadow);
  transition: box-shadow var(--vf-transition-base), transform var(--vf-transition-base);
}

.vf-hero__secondary-card:hover {
  box-shadow: var(--vf-card-shadow-hover);
  transform: translateY(-2px);
}

.vf-hero__secondary-card-img {
  width: 160px;
  min-height: 120px;
  flex-shrink: 0;
  overflow: hidden;
}

.vf-hero__secondary-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--vf-transition-slow);
}

.vf-hero__secondary-card:hover .vf-hero__secondary-card-img img {
  transform: scale(1.05);
}

.vf-hero__secondary-card-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--vf-space-4);
  flex: 1;
  min-width: 0;
}

.vf-hero__secondary-card-content .vf-card__title {
  font-size: 1rem;
  font-weight: 700;
  margin: var(--vf-space-2) 0;
}


/* ============================================================
   6. CATEGORY BADGES
   ============================================================ */
.vf-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-radius: var(--vf-radius-full);
  color: #FFFFFF;
  line-height: 1.6;
  white-space: nowrap;
}

.vf-badge--ai          { background-color: var(--vf-cat-ai); }
.vf-badge--finance      { background-color: var(--vf-cat-finance); }
.vf-badge--cybersecurity{ background-color: var(--vf-cat-cybersecurity); }
.vf-badge--startups     { background-color: var(--vf-cat-startups); }
.vf-badge--career       { background-color: var(--vf-cat-career); }
.vf-badge--gadgets      { background-color: var(--vf-cat-gadgets); }
.vf-badge--how-to       { background-color: var(--vf-cat-howto); }
.vf-badge--latest,
.vf-badge--uncategorized{ background-color: var(--vf-cat-latest); }

.vf-badge--outline {
  background-color: transparent;
  border: 1.5px solid currentColor;
}


/* ============================================================
   7. ARTICLE CARDS
   ============================================================ */
.vf-card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--vf-space-6);
}

@media (min-width: 640px) {
  .vf-card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.vf-card {
  background-color: var(--vf-card-bg);
  border-radius: var(--vf-radius-lg);
  overflow: hidden;
  box-shadow: var(--vf-card-shadow);
  transition: box-shadow var(--vf-transition-base), transform var(--vf-transition-base);
  display: flex;
  flex-direction: column;
}

.vf-card:hover {
  box-shadow: var(--vf-card-shadow-hover);
  transform: translateY(-4px);
}

.vf-card__image {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
}

.vf-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--vf-transition-slow);
}

.vf-card__image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.4) 0%, transparent 40%);
  pointer-events: none;
}

.vf-card:hover .vf-card__image img {
  transform: scale(1.05);
}

.vf-card__image .vf-badge {
  position: absolute;
  top: var(--vf-space-3);
  left: var(--vf-space-3);
  z-index: 1;
}

.vf-card__body {
  padding: var(--vf-space-5);
  display: flex;
  flex-direction: column;
  flex: 1;
}

.vf-card__title {
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: var(--vf-space-2);
}

.vf-card__title a {
  color: var(--vf-text-primary);
  transition: color var(--vf-transition-fast);
}

.vf-card__title a:hover {
  color: var(--vf-brand-primary);
}

.vf-card__excerpt {
  font-size: 0.875rem;
  color: var(--vf-text-secondary);
  line-height: 1.6;
  margin-bottom: var(--vf-space-4);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.vf-card__meta {
  display: flex;
  align-items: center;
  gap: var(--vf-space-3);
  font-size: 0.75rem;
  color: var(--vf-text-tertiary);
  margin-top: auto;
}

.vf-card__author {
  display: flex;
  align-items: center;
  gap: var(--vf-space-2);
}

.vf-card__avatar {
  width: 24px;
  height: 24px;
  border-radius: var(--vf-radius-full);
  object-fit: cover;
}

.vf-card__author-name {
  font-weight: 600;
  color: var(--vf-text-secondary);
}

.vf-card__dot {
  width: 3px;
  height: 3px;
  border-radius: var(--vf-radius-full);
  background-color: var(--vf-text-tertiary);
  flex-shrink: 0;
}

.vf-card__read-time {
  white-space: nowrap;
}


/* ============================================================
   8. TRENDING STRIP
   ============================================================ */
.vf-trending {
  padding: var(--vf-space-6) 0;
  border-top: 1px solid var(--vf-border);
  border-bottom: 1px solid var(--vf-border);
  background-color: var(--vf-bg-secondary);
  overflow: hidden;
}

.vf-trending__scroll {
  overflow: hidden;
  position: relative;
  width: 100%;
}

.vf-trending__track {
  display: flex;
  gap: var(--vf-space-5);
  width: max-content;
  animation: vf-marquee 40s linear infinite;
  will-change: transform;
}

.vf-trending__scroll:hover .vf-trending__track,
.vf-trending__scroll:active .vf-trending__track {
  animation-play-state: paused;
}

@keyframes vf-marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(calc(-25% - (var(--vf-space-5) / 4))); }
}

@media (prefers-reduced-motion: reduce) {
  .vf-trending__track {
    animation: none;
  }
  .vf-trending__scroll {
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: var(--vf-space-2);
    scrollbar-width: none;
  }
  .vf-trending__scroll::-webkit-scrollbar {
    display: none;
  }
}

.vf-trending__item {
  display: flex;
  align-items: center;
  gap: var(--vf-space-3);
  flex-shrink: 0;
  scroll-snap-align: start;
  width: 240px;
}

@media (min-width: 768px) {
  .vf-trending__item {
    width: 300px;
  }
}

.vf-trending__number {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--vf-brand-primary);
  line-height: 1;
  flex-shrink: 0;
  min-width: 32px;
  text-align: center;
  opacity: 0.5;
}

.vf-trending__thumb {
  width: 64px;
  height: 64px;
  border-radius: var(--vf-radius-md);
  overflow: hidden;
  flex-shrink: 0;
}

.vf-trending__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.vf-trending__title {
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--vf-text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.vf-trending__title a {
  color: var(--vf-text-primary);
}

.vf-trending__title a:hover {
  color: var(--vf-brand-primary);
}


/* ============================================================
   9. SIDEBAR
   ============================================================ */
.vf-sidebar {
  display: flex;
  flex-direction: column;
  gap: var(--vf-space-8);
}

/* Popular Posts Widget */
.vf-widget {
  background-color: var(--vf-card-bg);
  border-radius: var(--vf-radius-lg);
  padding: var(--vf-space-6);
  box-shadow: var(--vf-card-shadow);
}

.vf-widget__title {
  font-size: 0.875rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--vf-text-primary);
  margin-bottom: var(--vf-space-5);
  padding-bottom: var(--vf-space-3);
  border-bottom: 2px solid var(--vf-brand-primary);
}

.vf-popular-list {
  display: flex;
  flex-direction: column;
  gap: var(--vf-space-5);
}

.vf-popular-item {
  display: flex;
  gap: var(--vf-space-3);
  align-items: flex-start;
}

.vf-popular-item__number {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--vf-brand-primary);
  opacity: 0.4;
  line-height: 1;
  min-width: 24px;
  padding-top: 2px;
}

.vf-popular-item__content {
  flex: 1;
  min-width: 0;
}

.vf-popular-item__title {
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: var(--vf-space-1);
}

.vf-popular-item__title a {
  color: var(--vf-text-primary);
}

.vf-popular-item__title a:hover {
  color: var(--vf-brand-primary);
}

.vf-popular-item__meta {
  font-size: 0.75rem;
  color: var(--vf-text-tertiary);
}

/* Newsletter Widget */
.vf-newsletter {
  background: linear-gradient(135deg, var(--vf-brand-primary) 0%, #0044AA 100%);
  border-radius: var(--vf-radius-lg);
  padding: var(--vf-space-8);
  color: #FFFFFF;
  text-align: center;
}

[data-theme="dark"] .vf-newsletter {
  background: linear-gradient(135deg, #1a3a6b 0%, #0d2240 100%);
  border: 1px solid var(--vf-border);
}

.vf-newsletter__icon {
  width: 48px;
  height: 48px;
  margin: 0 auto var(--vf-space-4);
  opacity: 0.9;
}

.vf-newsletter__title {
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: var(--vf-space-2);
  color: #FFFFFF;
}

.vf-newsletter__desc {
  font-size: 0.875rem;
  opacity: 0.85;
  margin-bottom: var(--vf-space-5);
  line-height: 1.5;
}

.vf-newsletter__form {
  display: flex;
  flex-direction: column;
  gap: var(--vf-space-3);
}

.vf-newsletter__input {
  width: 100%;
  padding: var(--vf-space-3) var(--vf-space-4);
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: var(--vf-radius-md);
  background-color: rgba(255,255,255,0.15);
  color: #FFFFFF;
  font-size: 0.875rem;
  outline: none;
  transition: border-color var(--vf-transition-fast), background-color var(--vf-transition-fast);
}

.vf-newsletter__input::placeholder {
  color: rgba(255,255,255,0.6);
}

.vf-newsletter__input:focus {
  border-color: #FFFFFF;
  background-color: rgba(255,255,255,0.2);
}

.vf-newsletter__submit {
  width: 100%;
  padding: var(--vf-space-3) var(--vf-space-4);
  background-color: #FFFFFF;
  color: var(--vf-brand-primary);
  font-weight: 700;
  font-size: 0.875rem;
  border-radius: var(--vf-radius-md);
  border: none;
  cursor: pointer;
  transition: transform var(--vf-transition-fast), box-shadow var(--vf-transition-fast);
}

.vf-newsletter__submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}


/* ============================================================
   10. LOAD MORE
   ============================================================ */
.vf-load-more {
  text-align: center;
  padding: var(--vf-space-8) 0;
}

.vf-load-more__btn {
  display: inline-flex;
  align-items: center;
  gap: var(--vf-space-2);
  padding: var(--vf-space-3) var(--vf-space-8);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--vf-brand-primary);
  background-color: transparent;
  border: 2px solid var(--vf-brand-primary);
  border-radius: var(--vf-radius-full);
  cursor: pointer;
  transition: background-color var(--vf-transition-fast), color var(--vf-transition-fast), transform var(--vf-transition-fast);
}

.vf-load-more__btn:hover {
  background-color: var(--vf-brand-primary);
  color: #FFFFFF;
  transform: translateY(-1px);
}

.vf-load-more__btn.is-loading {
  pointer-events: none;
  opacity: 0.7;
}

.vf-load-more__spinner {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: vf-spin 0.6s linear infinite;
}

.vf-load-more__btn.is-loading .vf-load-more__spinner {
  display: block;
}

@keyframes vf-spin {
  to { transform: rotate(360deg); }
}


/* ============================================================
   11. SINGLE POST
   ============================================================ */

/* Reading Progress Bar */
.vf-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, var(--vf-brand-primary) 0%, #00AAFF 100%);
  z-index: 1100;
  transition: width 50ms linear;
}

/* Single Header */
.vf-single-header {
  padding: var(--vf-space-8) 0 var(--vf-space-6);
  text-align: center;
  max-width: var(--vf-container-narrow);
  margin: 0 auto;
}

.vf-single-header .vf-badge {
  margin-bottom: var(--vf-space-4);
}

.vf-single-header h1 {
  margin-bottom: var(--vf-space-5);
}

.vf-single-header .vf-card__meta {
  justify-content: center;
  font-size: 0.875rem;
}

.vf-single-header .vf-card__avatar {
  width: 36px;
  height: 36px;
}

/* Featured Image */
.vf-single-featured {
  max-width: 960px;
  margin: 0 auto var(--vf-space-8);
  border-radius: var(--vf-radius-xl);
  overflow: hidden;
}

.vf-single-featured img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
}

.vf-single-featured figcaption {
  font-size: 0.8125rem;
  color: var(--vf-text-tertiary);
  text-align: center;
  padding: var(--vf-space-3) var(--vf-space-4);
}

/* Single Content Layout */
.vf-single-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--vf-space-8);
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 var(--vf-space-4);
}

@media (min-width: 1024px) {
  .vf-single-layout {
    grid-template-columns: 1fr 240px;
  }
}

/* Social Share (Sticky Left) */
.vf-share {
  display: none;
}

@media (min-width: 1280px) {
  .vf-share {
    display: flex;
    flex-direction: column;
    gap: var(--vf-space-3);
    position: fixed;
    left: calc((100vw - 1100px) / 2 - 80px);
    top: calc(var(--vf-header-height) + var(--vf-space-10));
    z-index: 50;
  }
}

.vf-share__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--vf-radius-md);
  background-color: var(--vf-bg-secondary);
  color: var(--vf-text-secondary);
  transition: background-color var(--vf-transition-fast), color var(--vf-transition-fast), transform var(--vf-transition-fast);
}

.vf-share__btn:hover {
  background-color: var(--vf-brand-primary);
  color: #FFFFFF;
  transform: scale(1.1);
}

.vf-share__btn svg {
  width: 18px;
  height: 18px;
}

/* Mobile Share */
.vf-share-mobile {
  display: flex;
  gap: var(--vf-space-3);
  padding: var(--vf-space-4) 0;
  border-top: 1px solid var(--vf-border);
  border-bottom: 1px solid var(--vf-border);
  margin-bottom: var(--vf-space-6);
}

@media (min-width: 1280px) {
  .vf-share-mobile {
    display: none;
  }
}

/* Entry Content (Gutenberg Compatible) */
.entry-content {
  font-size: 1.0625rem;
  line-height: 1.8;
  color: var(--vf-text-primary);
}

.entry-content > * + * {
  margin-top: var(--vf-space-5);
}

.entry-content h2 {
  margin-top: var(--vf-space-10);
  margin-bottom: var(--vf-space-4);
  padding-top: var(--vf-space-4);
  border-top: 1px solid var(--vf-border);
}

.entry-content h3 {
  margin-top: var(--vf-space-8);
  margin-bottom: var(--vf-space-3);
}

.entry-content p {
  margin-bottom: var(--vf-space-5);
}

.entry-content a {
  color: var(--vf-brand-primary);
  text-decoration: underline;
  text-decoration-color: rgba(0, 102, 255, 0.3);
  text-underline-offset: 2px;
  transition: text-decoration-color var(--vf-transition-fast);
}

.entry-content a:hover {
  text-decoration-color: var(--vf-brand-primary);
}

.entry-content img {
  border-radius: var(--vf-radius-md);
  margin: var(--vf-space-6) 0;
}

.entry-content blockquote {
  border-left: 4px solid var(--vf-brand-primary);
  padding: var(--vf-space-4) var(--vf-space-6);
  margin: var(--vf-space-6) 0;
  background-color: var(--vf-bg-secondary);
  border-radius: 0 var(--vf-radius-md) var(--vf-radius-md) 0;
  font-style: italic;
  color: var(--vf-text-secondary);
}

.entry-content blockquote p:last-child {
  margin-bottom: 0;
}

.entry-content ul,
.entry-content ol {
  padding-left: var(--vf-space-6);
  margin: var(--vf-space-4) 0;
}

.entry-content ul {
  list-style: disc;
}

.entry-content ol {
  list-style: decimal;
}

.entry-content li {
  margin-bottom: var(--vf-space-2);
}

.entry-content pre {
  background-color: var(--vf-code-bg);
  border-radius: var(--vf-radius-md);
  padding: var(--vf-space-5);
  overflow-x: auto;
  font-family: var(--vf-font-mono);
  font-size: 0.875rem;
  line-height: 1.7;
}

.entry-content code {
  font-family: var(--vf-font-mono);
  font-size: 0.875em;
  background-color: var(--vf-code-bg);
  padding: 2px 6px;
  border-radius: var(--vf-radius-sm);
}

.entry-content pre code {
  background: none;
  padding: 0;
}

.entry-content figure {
  margin: var(--vf-space-6) 0;
}

.entry-content figcaption {
  font-size: 0.8125rem;
  color: var(--vf-text-tertiary);
  text-align: center;
  margin-top: var(--vf-space-2);
}

.entry-content table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--vf-space-6) 0;
}

.entry-content th,
.entry-content td {
  padding: var(--vf-space-3) var(--vf-space-4);
  border: 1px solid var(--vf-border);
  text-align: left;
}

.entry-content th {
  background-color: var(--vf-bg-secondary);
  font-weight: 700;
}

/* Gutenberg Alignments */
.entry-content .alignwide {
  max-width: 960px;
  margin-left: auto;
  margin-right: auto;
}

.entry-content .alignfull {
  max-width: 100vw;
  margin-left: calc(-50vw + 50%);
  margin-right: calc(-50vw + 50%);
}

.entry-content .aligncenter {
  text-align: center;
}

.entry-content .alignleft {
  float: left;
  margin-right: var(--vf-space-5);
  margin-bottom: var(--vf-space-4);
}

.entry-content .alignright {
  float: right;
  margin-left: var(--vf-space-5);
  margin-bottom: var(--vf-space-4);
}

/* Table of Contents */
.vf-toc {
  position: sticky;
  top: calc(var(--vf-header-height) + var(--vf-space-6));
  max-height: calc(100vh - var(--vf-header-height) - var(--vf-space-12));
  overflow-y: auto;
  scrollbar-width: thin;
}

.vf-toc__title {
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--vf-text-tertiary);
  margin-bottom: var(--vf-space-4);
}

.vf-toc__list {
  border-left: 2px solid var(--vf-border);
  padding-left: var(--vf-space-4);
}

.vf-toc__link {
  display: block;
  padding: var(--vf-space-1) 0;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--vf-text-tertiary);
  line-height: 1.4;
  transition: color var(--vf-transition-fast);
  position: relative;
}

.vf-toc__link:hover {
  color: var(--vf-text-primary);
}

.vf-toc__link.is-active {
  color: var(--vf-brand-primary);
  font-weight: 600;
}

.vf-toc__link--h3 {
  padding-left: var(--vf-space-4);
  font-size: 0.75rem;
}

/* Author Box */
.vf-author-box {
  display: flex;
  gap: var(--vf-space-5);
  padding: var(--vf-space-6);
  background-color: var(--vf-bg-secondary);
  border-radius: var(--vf-radius-lg);
  margin: var(--vf-space-10) 0;
}

.vf-author-box__avatar {
  width: 72px;
  height: 72px;
  border-radius: var(--vf-radius-full);
  object-fit: cover;
  flex-shrink: 0;
}

.vf-author-box__name {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: var(--vf-space-1);
}

.vf-author-box__name a {
  color: var(--vf-text-primary);
}

.vf-author-box__name a:hover {
  color: var(--vf-brand-primary);
}

.vf-author-box__bio {
  font-size: 0.875rem;
  color: var(--vf-text-secondary);
  line-height: 1.6;
}


/* ============================================================
   12. RELATED POSTS
   ============================================================ */
.vf-related {
  padding: var(--vf-space-12) 0;
  border-top: 1px solid var(--vf-border);
}

.vf-related .vf-card-grid {
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .vf-related .vf-card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .vf-related .vf-card-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}


/* ============================================================
   13. CATEGORY ARCHIVE
   ============================================================ */
.vf-category-header {
  padding: var(--vf-space-10) 0 var(--vf-space-6);
  border-bottom: 1px solid var(--vf-border);
  margin-bottom: var(--vf-space-8);
}

.vf-category-header__bar {
  width: 60px;
  height: 4px;
  border-radius: var(--vf-radius-full);
  margin-bottom: var(--vf-space-4);
}

.vf-category-header h1 {
  margin-bottom: var(--vf-space-2);
}

.vf-category-header__desc {
  font-size: 1rem;
  color: var(--vf-text-secondary);
  max-width: 600px;
}


/* ============================================================
   14. FOOTER
   ============================================================ */
.vf-footer {
  background-color: var(--vf-bg-secondary);
  border-top: 1px solid var(--vf-border);
  padding: var(--vf-space-16) 0 0;
}

.vf-footer__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--vf-space-10);
  margin-bottom: var(--vf-space-12);
}

@media (min-width: 640px) {
  .vf-footer__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .vf-footer__grid {
    grid-template-columns: 2fr 1fr 1fr 2fr;
  }
}

.vf-footer__col-title {
  font-size: 0.8125rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--vf-text-primary);
  margin-bottom: var(--vf-space-5);
}

.vf-footer__about-text {
  font-size: 0.875rem;
  color: var(--vf-text-secondary);
  line-height: 1.7;
}

.vf-footer__links {
  display: flex;
  flex-direction: column;
  gap: var(--vf-space-3);
}

.vf-footer__links a {
  font-size: 0.875rem;
  color: var(--vf-text-secondary);
  transition: color var(--vf-transition-fast);
}

.vf-footer__links a:hover {
  color: var(--vf-brand-primary);
}

.vf-footer__social {
  display: flex;
  gap: var(--vf-space-3);
  margin-top: var(--vf-space-2);
}

.vf-footer__social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--vf-radius-md);
  background-color: var(--vf-bg-tertiary);
  color: var(--vf-text-secondary);
  transition: background-color var(--vf-transition-fast), color var(--vf-transition-fast), transform var(--vf-transition-fast);
}

.vf-footer__social a:hover {
  background-color: var(--vf-brand-primary);
  color: #FFFFFF;
  transform: translateY(-2px);
}

.vf-footer__social svg {
  width: 18px;
  height: 18px;
}

/* Footer Newsletter */
.vf-footer__newsletter-form {
  display: flex;
  gap: var(--vf-space-2);
}

.vf-footer__newsletter-input {
  flex: 1;
  padding: var(--vf-space-3) var(--vf-space-4);
  border: 1px solid var(--vf-input-border);
  border-radius: var(--vf-radius-md);
  background-color: var(--vf-input-bg);
  color: var(--vf-text-primary);
  font-size: 0.875rem;
  outline: none;
  transition: border-color var(--vf-transition-fast);
}

.vf-footer__newsletter-input:focus {
  border-color: var(--vf-brand-primary);
}

.vf-footer__newsletter-btn {
  padding: var(--vf-space-3) var(--vf-space-5);
  background-color: var(--vf-brand-primary);
  color: #FFFFFF;
  font-weight: 600;
  font-size: 0.875rem;
  border-radius: var(--vf-radius-md);
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color var(--vf-transition-fast);
}

.vf-footer__newsletter-btn:hover {
  background-color: var(--vf-brand-primary-hover);
}

/* Footer Bottom */
.vf-footer__bottom {
  border-top: 1px solid var(--vf-border);
  padding: var(--vf-space-5) 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--vf-space-4);
}

.vf-footer__copyright {
  font-size: 0.8125rem;
  color: var(--vf-text-tertiary);
}

.vf-footer__bottom-links {
  display: flex;
  gap: var(--vf-space-5);
}

.vf-footer__bottom-links a {
  font-size: 0.8125rem;
  color: var(--vf-text-tertiary);
}

.vf-footer__bottom-links a:hover {
  color: var(--vf-brand-primary);
}


/* ============================================================
   15. SEARCH FORM
   ============================================================ */
.vf-search-form {
  display: flex;
  gap: var(--vf-space-2);
}

.vf-search-form__input {
  flex: 1;
  padding: var(--vf-space-3) var(--vf-space-4);
  border: 1px solid var(--vf-input-border);
  border-radius: var(--vf-radius-md);
  background-color: var(--vf-input-bg);
  color: var(--vf-text-primary);
  font-size: 0.875rem;
  outline: none;
}

.vf-search-form__input:focus {
  border-color: var(--vf-brand-primary);
}

.vf-search-form__btn {
  padding: var(--vf-space-3);
  background-color: var(--vf-brand-primary);
  color: #FFFFFF;
  border-radius: var(--vf-radius-md);
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}


/* ============================================================
   16. PAGINATION
   ============================================================ */
.vf-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--vf-space-2);
  padding: var(--vf-space-8) 0;
}

.vf-pagination a,
.vf-pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 var(--vf-space-3);
  border-radius: var(--vf-radius-md);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--vf-text-secondary);
  transition: background-color var(--vf-transition-fast), color var(--vf-transition-fast);
}

.vf-pagination a:hover {
  background-color: var(--vf-bg-secondary);
  color: var(--vf-text-primary);
}

.vf-pagination .current {
  background-color: var(--vf-brand-primary);
  color: #FFFFFF;
}


/* ============================================================
   17. ANIMATIONS
   ============================================================ */
@keyframes vf-fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.vf-animate-in {
  animation: vf-fadeInUp 0.5s ease both;
}

/* Stagger children */
.vf-stagger > *:nth-child(1) { animation-delay: 0ms; }
.vf-stagger > *:nth-child(2) { animation-delay: 60ms; }
.vf-stagger > *:nth-child(3) { animation-delay: 120ms; }
.vf-stagger > *:nth-child(4) { animation-delay: 180ms; }
.vf-stagger > *:nth-child(5) { animation-delay: 240ms; }
.vf-stagger > *:nth-child(6) { animation-delay: 300ms; }
.vf-stagger > *:nth-child(7) { animation-delay: 360ms; }
.vf-stagger > *:nth-child(8) { animation-delay: 420ms; }
.vf-stagger > *:nth-child(9) { animation-delay: 480ms; }


/* ============================================================
   18. UTILITY CLASSES
   ============================================================ */
.vf-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.vf-no-posts {
  text-align: center;
  padding: var(--vf-space-16) 0;
  color: var(--vf-text-tertiary);
}

.vf-no-posts h2 {
  font-size: 1.5rem;
  margin-bottom: var(--vf-space-4);
  color: var(--vf-text-secondary);
}

/* Dark mode toggle button */
.vf-dark-toggle {
  position: relative;
}

.vf-dark-toggle__icon--sun,
.vf-dark-toggle__icon--moon {
  transition: opacity var(--vf-transition-fast), transform var(--vf-transition-fast);
}

[data-theme="dark"] .vf-dark-toggle__icon--moon {
  opacity: 0;
  transform: scale(0.5);
  position: absolute;
}

[data-theme="dark"] .vf-dark-toggle__icon--sun {
  opacity: 1;
  transform: scale(1);
}

[data-theme="light"] .vf-dark-toggle__icon--sun,
:root:not([data-theme="dark"]) .vf-dark-toggle__icon--sun {
  opacity: 0;
  transform: scale(0.5);
  position: absolute;
}

[data-theme="light"] .vf-dark-toggle__icon--moon,
:root:not([data-theme="dark"]) .vf-dark-toggle__icon--moon {
  opacity: 1;
  transform: scale(1);
}

/* Schema.org hidden markup */
.vf-schema-hidden {
  display: none;
}


/* ============================================================
   19. PRINT
   ============================================================ */
@media print {
  .vf-header,
  .vf-footer,
  .vf-share,
  .vf-share-mobile,
  .vf-toc,
  .vf-progress-bar,
  .vf-related,
  .vf-load-more,
  .vf-trending {
    display: none !important;
  }

  body {
    color: #000;
    background: #fff;
  }

  .entry-content a {
    text-decoration: underline;
    color: #000;
  }

  .entry-content a::after {
    content: " (" attr(href) ")";
    font-size: 0.75em;
    color: #666;
  }
}

/* ============================================================
   22. SCROLL ANIMATIONS
   ============================================================ */
.vf-fade-up {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.vf-fade-up.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.vf-hero-fade-in {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}
.vf-hero-fade-in.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Buttons Animation --- */
.vf-subscribe-btn,
.vf-footer__newsletter-btn,
.vf-load-more__btn {
  transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
  will-change: transform, box-shadow;
}

.vf-subscribe-btn:hover,
.vf-footer__newsletter-btn:hover,
.vf-load-more__btn:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 12px rgba(30, 107, 245, 0.3);
}

.vf-subscribe-btn:active,
.vf-footer__newsletter-btn:active,
.vf-load-more__btn:active {
  transform: scale(0.98);
}

/* --- Badge Animation --- */
.vf-card .vf-badge {
  transition: transform 0.25s ease;
}

.vf-card:hover .vf-badge {
  transform: scale(1.05);
}

/* --- Input Focus Glow --- */
input[type="email"]:focus,
input[type="text"]:focus,
textarea:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(30, 107, 245, 0.3);
  border-color: var(--vf-brand-primary);
}

@keyframes vf-checkmark {
  0% { transform: scale(0); opacity: 0; }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); opacity: 1; }
}

/* --- Progress Bar --- */
.vf-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 4px;
  background-color: var(--vf-brand-primary);
  width: 0%;
  z-index: 9999;
  transition: width 0.1s linear;
  will-change: width;
}

/* --- Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ============================================================
   17. LIVE MARKET TICKER
   ============================================================ */
.vf-widget--markets .vf-widget__title {
  display: flex;
  align-items: center;
  gap: var(--vf-space-2);
}

.vf-live-dot {
  width: 8px;
  height: 8px;
  background-color: var(--vf-brand-success);
  border-radius: 50%;
  display: inline-block;
  animation: pulse-dot 2s infinite ease-in-out;
}

@keyframes pulse-dot {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(22, 163, 74, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(22, 163, 74, 0); }
}

.vf-market-list {
  display: flex;
  flex-direction: column;
  gap: var(--vf-space-2);
}

.vf-market-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--vf-space-3);
  background: var(--vf-bg-secondary);
  border: 1px solid var(--vf-border);
  border-radius: var(--vf-radius-md);
  font-size: 0.875rem;
  transition: background-color var(--vf-transition-fast);
}

.vf-market-row:hover {
  background-color: var(--vf-bg-tertiary);
}

.vf-market-name {
  font-weight: 600;
  color: var(--vf-text-primary);
  flex: 1;
}

.vf-market-price {
  font-weight: 500;
  color: var(--vf-text-secondary);
  margin-right: var(--vf-space-4);
}

.vf-market-change {
  display: flex;
  align-items: center;
  gap: 2px;
  font-weight: 600;
  font-size: 0.75rem;
  min-width: 65px;
  justify-content: flex-end;
}

.vf-market-change svg {
  width: 14px;
  height: 14px;
}

.vf-trend-up {
  color: var(--vf-brand-success);
}

.vf-trend-down {
  color: var(--vf-brand-error);
}

.vf-market-skeleton {
  gap: var(--vf-space-3);
}

.vf-skeleton-box {
  height: 16px;
  background: linear-gradient(90deg, var(--vf-bg-tertiary) 25%, var(--vf-border) 50%, var(--vf-bg-tertiary) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--vf-radius-sm);
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
    content: " (" attr(href) ")";
    font-size: 0.75em;
    color: #666;
  }
}

/* ============================================================
   22. SCROLL ANIMATIONS
   ============================================================ */
.vf-fade-up {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.vf-fade-up.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.vf-hero-fade-in {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}
.vf-hero-fade-in.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Buttons Animation --- */
.vf-subscribe-btn,
.vf-footer__newsletter-btn,
.vf-load-more__btn {
  transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
  will-change: transform, box-shadow;
}

.vf-subscribe-btn:hover,
.vf-footer__newsletter-btn:hover,
.vf-load-more__btn:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 12px rgba(30, 107, 245, 0.3);
}

.vf-subscribe-btn:active,
.vf-footer__newsletter-btn:active,
.vf-load-more__btn:active {
  transform: scale(0.98);
}

/* --- Badge Animation --- */
.vf-card .vf-badge {
  transition: transform 0.25s ease;
}

.vf-card:hover .vf-badge {
  transform: scale(1.05);
}

/* --- Input Focus Glow --- */
input[type="email"]:focus,
input[type="text"]:focus,
textarea:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(30, 107, 245, 0.3);
  border-color: var(--vf-brand-primary);
}

@keyframes vf-checkmark {
  0% { transform: scale(0); opacity: 0; }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); opacity: 1; }
}

/* --- Progress Bar --- */
.vf-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 4px;
  background-color: var(--vf-brand-primary);
  width: 0%;
  z-index: 9999;
  transition: width 0.1s linear;
  will-change: width;
}

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

/* ============================================================
   17. LIVE MARKET TICKER
   ============================================================ */
.vf-widget--markets .vf-widget__title {
  display: flex;
  align-items: center;
  gap: var(--vf-space-2);
}

.vf-live-dot {
  width: 8px;
  height: 8px;
  background-color: var(--vf-brand-success);
  border-radius: 50%;
  display: inline-block;
  animation: pulse-dot 2s infinite ease-in-out;
}

@keyframes pulse-dot {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(22, 163, 74, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(22, 163, 74, 0); }
}

.vf-market-list {
  display: flex;
  flex-direction: column;
  gap: var(--vf-space-2);
}

.vf-market-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--vf-space-3);
  background: var(--vf-bg-secondary);
  border: 1px solid var(--vf-border);
  border-radius: var(--vf-radius-md);
  font-size: 0.875rem;
  transition: background-color var(--vf-transition-fast);
}

.vf-market-row:hover {
  background-color: var(--vf-bg-tertiary);
}

.vf-market-name {
  font-weight: 600;
  color: var(--vf-text-primary);
  flex: 1;
}

.vf-market-price {
  font-weight: 500;
  color: var(--vf-text-secondary);
  margin-right: var(--vf-space-4);
}

.vf-market-change {
  display: flex;
  align-items: center;
  gap: 2px;
  font-weight: 600;
  font-size: 0.75rem;
  min-width: 65px;
  justify-content: flex-end;
}

.vf-market-change svg {
  width: 14px;
  height: 14px;
}

.vf-trend-up {
  color: var(--vf-brand-success);
}

.vf-trend-down {
  color: var(--vf-brand-error);
}

.vf-market-skeleton {
  gap: var(--vf-space-3);
}

.vf-skeleton-box {
  height: 16px;
  background: linear-gradient(90deg, var(--vf-bg-tertiary) 25%, var(--vf-border) 50%, var(--vf-bg-tertiary) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--vf-radius-sm);
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.vf-market-cached-note {
  font-size: 0.7rem;
  color: var(--vf-text-tertiary);
  text-align: center;
  margin-top: var(--vf-space-2);
}

/* ============================================================
   READING STREAK WIDGET
   ============================================================ */
.vf-widget--streak {
  transition: transform var(--vf-transition-base), box-shadow var(--vf-transition-base);
}

.vf-streak-content {
  font-size: 0.95rem;
  color: var(--vf-text-secondary);
}

.vf-streak-welcome p {
  margin: 0;
  display: flex;
  align-items: center;
  gap: var(--vf-space-2);
}

.vf-streak-stats {
  display: flex;
  flex-direction: column;
  gap: var(--vf-space-3);
}

.vf-streak-stat-item {
  display: flex;
  align-items: center;
  gap: var(--vf-space-3);
  padding: var(--vf-space-2) 0;
  border-bottom: 1px solid var(--vf-border);
}

.vf-streak-stat-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.vf-streak-icon {
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
}

.vf-streak-text strong {
  color: var(--vf-text-primary);
  font-size: 1.1em;
}

/* Milestone Celebration Animation */
@keyframes streak-pulse {
  0% {
    transform: scale(1);
    box-shadow: var(--vf-card-shadow);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(247, 148, 29, 0.4), var(--vf-card-shadow-hover);
  }
  100% {
    transform: scale(1);
    box-shadow: var(--vf-card-shadow);
  }
}

.vf-streak-celebrate {
  animation: streak-pulse 1.5s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid var(--vf-brand-primary);
}
