/*
Theme Name:  W1Network Pro
Theme URI:   https://w1network.com
Author:      W1Network Team
Author URI:  https://w1network.com
Description: Premium editorial WordPress theme with infinite scroll, background music player, auto-scroll reader, full schema markup, and AdSense support. Built for peak Core Web Vitals, WCAG 2.1 AA, and international SEO (US/UK/CA).
Version:     8.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License:     GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: w1network-pro
Tags:        dark, custom-logo, custom-colors, custom-menu, featured-images, responsive-layout, accessibility-ready, schema-markup, infinite-scroll
*/

/* ============================================================
   DESIGN TOKENS
   ============================================================ */
:root {
  /* Brand Palette */
  --c-red:       #FF1744;
  --c-red-dim:   #D50032;
  --c-red-glow:  rgba(255,23,68,0.18);
  --c-cyan:      #00E5FF;
  --c-gold:      #FFC400;
  --c-green:     #00E676;
  --c-blue:      #2979FF;

  /* Backgrounds – layered depth */
  --bg-base:     #080808;
  --bg-surface:  #111111;
  --bg-raised:   #191919;
  --bg-elevated: #222222;
  --bg-input:    #2A2A2A;
  --bg-overlay:  rgba(8,8,8,0.92);

  /* Text */
  --tx-primary:   #F0F0F0;
  --tx-secondary: #A8A8A8;
  --tx-muted:     #666666;
  --tx-disabled:  #3A3A3A;

  /* Borders */
  --bd-subtle:  rgba(255,255,255,0.06);
  --bd-default: rgba(255,255,255,0.10);
  --bd-strong:  rgba(255,255,255,0.18);

  /* Shadows */
  --sh-xs:    0 1px 4px  rgba(0,0,0,0.40);
  --sh-sm:    0 2px 10px rgba(0,0,0,0.50);
  --sh-md:    0 4px 24px rgba(0,0,0,0.60);
  --sh-lg:    0 8px 48px rgba(0,0,0,0.70);
  --sh-glow:  0 0 24px var(--c-red-glow);

  /* Typography */
  --font-display: 'Outfit', 'DM Sans', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-body:    'DM Sans', 'Outfit', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', 'Fira Code', 'Courier New', monospace;

  /* Type Scale */
  --fs-11: 0.6875rem;
  --fs-12: 0.75rem;
  --fs-13: 0.8125rem;
  --fs-14: 0.875rem;
  --fs-16: 1rem;
  --fs-18: 1.125rem;
  --fs-20: 1.25rem;
  --fs-24: 1.5rem;
  --fs-28: 1.75rem;
  --fs-36: clamp(1.75rem, 4vw, 2.25rem);
  --fs-48: clamp(2rem,   6vw, 3rem);

  /* Spacing (8pt grid) */
  --s-1:  4px;  --s-2:  8px;  --s-3: 12px;
  --s-4: 16px;  --s-5: 20px;  --s-6: 24px;
  --s-8: 32px;  --s-10:40px;  --s-12:48px;
  --s-16:64px;

  /* Radius */
  --r-sm:   6px;
  --r-md:  10px;
  --r-lg:  16px;
  --r-xl:  24px;
  --r-full:9999px;

  /* Motion */
  --ease:        cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --t-fast: 120ms;
  --t-base: 220ms;
  --t-slow: 380ms;

  /* Layout */
  --w-max:     1440px;
  --w-content:  860px;
  --header-h:   62px;

  /* Z-index */
  --z-base:    1;
  --z-raise:   10;
  --z-sticky: 100;
  --z-header: 900;
  --z-float:  840;
  --z-modal: 1100;
  --z-toast: 1300;
}

/* Light Mode */
body.light-mode {
  --bg-base:     #F5F4F0;
  --bg-surface:  #FFFFFF;
  --bg-raised:   #FAFAFA;
  --bg-elevated: #F0EFE9;
  --bg-input:    #EEEDE8;
  --bg-overlay:  rgba(245,244,240,0.95);
  --tx-primary:  #0A0A0A;
  --tx-secondary:#4A4A4A;
  --tx-muted:    #888888;
  --tx-disabled: #CCCCCC;
  --bd-subtle:   rgba(0,0,0,0.05);
  --bd-default:  rgba(0,0,0,0.09);
  --bd-strong:   rgba(0,0,0,0.16);
  --sh-xs:    0 1px 4px  rgba(0,0,0,0.08);
  --sh-sm:    0 2px 10px rgba(0,0,0,0.10);
  --sh-md:    0 4px 24px rgba(0,0,0,0.12);
  --sh-lg:    0 8px 48px rgba(0,0,0,0.16);
}

/* ============================================================
   RESET
   ============================================================ */
*, *::before, *::after {
  margin: 0; padding: 0;
  box-sizing: border-box;
}
html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-synthesis: none;
  hanging-punctuation: first last;
}
img, video, svg, canvas { max-width: 100%; height: auto; display: block; }
input, button, textarea, select { font: inherit; }
button, a, [role="button"] { touch-action: manipulation; cursor: pointer; }
ul, ol { list-style: none; }
a { text-decoration: none; color: inherit; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* ============================================================
   BASE
   ============================================================ */
body {
  font-family: var(--font-body);
  font-size: var(--fs-16);
  line-height: 1.65;
  background-color: var(--bg-base);
  color: var(--tx-primary);
  overflow-x: hidden;
  padding-top: var(--header-h);
  min-height: 100vh;
}
h1,h2,h3,h4,h5,h6 {
  font-family: var(--font-display);
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--tx-primary);
}
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--c-red);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}
::selection { background: rgba(255,23,68,0.28); }
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: var(--bg-base); }
::-webkit-scrollbar-thumb { background: var(--bd-strong); border-radius: var(--r-full); }
::-webkit-scrollbar-thumb:hover { background: var(--c-red); }

/* ============================================================
   LAYOUT UTILITIES
   ============================================================ */
.site { display: flex; flex-direction: column; min-height: 100vh; }
.site-main { flex: 1; }
.content-wrapper {
  width: 100%;
  max-width: var(--w-max);
  margin-inline: auto;
  padding: var(--s-6) var(--s-4);
}
@media (min-width: 768px) { .content-wrapper { padding: var(--s-8) var(--s-6); } }

.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;
}

/* ============================================================
   SITE HEADER
   ============================================================ */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  height: var(--header-h);
  z-index: var(--z-header);
  background: rgba(8,8,8,0.96);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border-bottom: 1px solid var(--bd-subtle);
  box-shadow: 0 0 40px rgba(0,0,0,0.5);
}
body.light-mode .site-header {
  background: rgba(255,255,255,0.96);
  border-bottom-color: var(--bd-default);
  box-shadow: 0 1px 16px rgba(0,0,0,0.08);
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  max-width: var(--w-max);
  margin-inline: auto;
  padding: 0 var(--s-4);
  height: 100%;
}

/* Logo */
.site-branding { flex-shrink: 0; }
.site-logo {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 1;
  background: linear-gradient(135deg, #FF1744 0%, #FF6090 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: block;
  transition: opacity var(--t-fast) var(--ease);
}
.site-logo:hover { opacity: 0.82; }
.custom-logo-link { display: block; line-height: 0; }
.custom-logo-link img { max-height: 36px; width: auto; }

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  flex-shrink: 0;
}

/* Icon Buttons */
.header-icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px; height: 38px;
  border-radius: var(--r-full);
  background: var(--bg-raised);
  border: 1px solid var(--bd-subtle);
  color: var(--tx-secondary);
  flex-shrink: 0;
  transition:
    background var(--t-fast) var(--ease),
    color var(--t-fast) var(--ease),
    border-color var(--t-fast) var(--ease),
    transform var(--t-fast) var(--ease-spring);
  line-height: 0;
}
.header-icon-btn:hover {
  background: var(--c-red-glow);
  border-color: rgba(255,23,68,0.3);
  color: var(--c-red);
  transform: scale(1.08);
}

/* Submit Button */
.btn-submit-post {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 var(--s-4);
  background: var(--c-red);
  color: #fff;
  border: none;
  border-radius: var(--r-full);
  font-family: var(--font-display);
  font-size: var(--fs-13);
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
  box-shadow: 0 3px 12px rgba(255,23,68,0.35);
  transition:
    background var(--t-fast) var(--ease),
    box-shadow var(--t-fast) var(--ease),
    transform var(--t-fast) var(--ease-spring);
}
.btn-submit-post:hover {
  background: var(--c-red-dim);
  box-shadow: 0 4px 18px rgba(255,23,68,0.5);
  transform: translateY(-1px);
}
.btn-submit-post svg { flex-shrink: 0; }
@media (max-width: 479px) {
  .btn-text { display: none; }
  .btn-submit-post { width: 36px; padding: 0; justify-content: center; }
}

/* User Menu */
.user-menu { position: relative; }
.user-avatar-btn {
  width: 36px; height: 36px;
  border-radius: var(--r-full);
  border: 2px solid var(--c-red);
  background: transparent;
  padding: 2px;
  overflow: hidden;
  flex-shrink: 0;
  transition: transform var(--t-fast) var(--ease-spring), box-shadow var(--t-fast) var(--ease);
}
.user-avatar-btn:hover { transform: scale(1.1); box-shadow: 0 0 0 3px var(--c-red-glow); }
.user-avatar-btn img, .user-avatar-img { width: 100%; height: 100%; border-radius: var(--r-full); object-fit: cover; display: block; }

.user-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 210px;
  background: var(--bg-elevated);
  border: 1px solid var(--bd-default);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-lg);
  opacity: 0; visibility: hidden;
  transform: translateY(-8px) scale(0.97);
  transition: opacity var(--t-base) var(--ease), transform var(--t-base) var(--ease), visibility 0s var(--t-base);
  z-index: var(--z-modal);
  overflow: hidden;
}
.user-dropdown.active {
  opacity: 1; visibility: visible;
  transform: translateY(0) scale(1);
  transition: opacity var(--t-base) var(--ease), transform var(--t-base) var(--ease), visibility 0s;
}
.user-info {
  padding: var(--s-4);
  border-bottom: 1px solid var(--bd-subtle);
}
.user-info-name { display: block; font-weight: 700; font-size: var(--fs-14); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-info-email { display: block; font-size: var(--fs-12); color: var(--tx-muted); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-menu-links { padding: var(--s-2); }
.user-menu-link {
  display: flex; align-items: center; gap: var(--s-2);
  padding: 8px var(--s-3);
  color: var(--tx-secondary); font-size: var(--fs-14); font-weight: 500;
  border-radius: var(--r-sm);
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.user-menu-link:hover { background: var(--bg-input); color: var(--tx-primary); }
.user-menu-link--highlight { color: var(--c-red); font-weight: 700; }
.user-menu-link--highlight:hover { background: var(--c-red-glow); }
.user-menu-link--logout { color: #FF6B6B; }
.user-menu-link--logout:hover { background: rgba(255,107,107,0.1); }

/* Header Search */
.header-search-wrapper {
  position: absolute;
  top: 100%; left: 0; right: 0;
  background: rgba(8,8,8,0.98);
  border-bottom: 1px solid var(--bd-default);
  padding: var(--s-3) var(--s-4);
  box-shadow: 0 12px 40px rgba(0,0,0,0.5);
  opacity: 0; visibility: hidden;
  transform: translateY(-4px);
  transition: opacity var(--t-base) var(--ease), transform var(--t-base) var(--ease), visibility 0s var(--t-base);
  z-index: calc(var(--z-header) - 1);
}
body.light-mode .header-search-wrapper { background: rgba(255,255,255,0.98); }
.header-search-wrapper.is-open {
  opacity: 1; visibility: visible; transform: translateY(0);
  transition: opacity var(--t-base) var(--ease), transform var(--t-base) var(--ease), visibility 0s;
}
.header-search-container {
  max-width: 600px; margin-inline: auto;
  display: flex; align-items: center; gap: var(--s-3);
}
.header-search-form {
  flex: 1; display: flex; align-items: center;
  background: var(--bg-raised);
  border: 1.5px solid var(--bd-default);
  border-radius: var(--r-full);
  overflow: hidden;
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.header-search-form:focus-within { border-color: var(--c-red); box-shadow: 0 0 0 3px var(--c-red-glow); }
.header-search-icon { padding-left: var(--s-4); color: var(--tx-muted); flex-shrink: 0; display: flex; align-items: center; pointer-events: none; }
.header-search-input {
  flex: 1; padding: 9px var(--s-3);
  background: transparent; border: none;
  color: var(--tx-primary); font-size: var(--fs-14);
}
.header-search-input::placeholder { color: var(--tx-muted); }
.header-search-submit, .header-search-close {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 100%;
  background: transparent; border: none;
  color: var(--tx-muted);
  transition: color var(--t-fast) var(--ease);
  flex-shrink: 0;
}
.header-search-submit:hover, .header-search-close:hover { color: var(--c-red); }
.search-shortcut { display: none; font-size: var(--fs-12); color: var(--tx-disabled); white-space: nowrap; }
.search-shortcut kbd { display: inline-block; padding: 1px 5px; background: var(--bg-raised); border: 1px solid var(--bd-default); border-radius: 4px; font-size: var(--fs-11); }
@media (min-width: 768px) { .search-shortcut { display: block; } }

/* Mobile Nav */
.mobile-nav-panel {
  position: fixed;
  top: 0; right: 0;
  width: 280px; max-width: 88vw;
  height: 100dvh;
  background: var(--bg-surface);
  border-left: 1px solid var(--bd-subtle);
  z-index: calc(var(--z-header) + 50);
  overflow-y: auto;
  transform: translateX(110%); visibility: hidden;
  transition: transform var(--t-slow) var(--ease), visibility 0s var(--t-slow);
  box-shadow: var(--sh-lg);
}
.mobile-nav-panel.is-open { transform: translateX(0); visibility: visible; transition: transform var(--t-slow) var(--ease), visibility 0s; }
.mobile-nav-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.7); backdrop-filter: blur(4px);
  z-index: calc(var(--z-header) + 40);
}
.mobile-nav-overlay.is-open { display: block; }
.mobile-nav-inner { display: flex; flex-direction: column; min-height: 100%; }
.mobile-nav-topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--s-4); height: var(--header-h);
  border-bottom: 1px solid var(--bd-subtle);
  flex-shrink: 0;
}
.mobile-nav-brand {
  font-family: var(--font-display); font-size: 1.1rem; font-weight: 800; letter-spacing: -0.04em;
  background: linear-gradient(135deg, #FF1744, #FF6090);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.mobile-nav-close-btn {
  width: 32px; height: 32px; border-radius: var(--r-full);
  background: var(--bg-elevated); border: none; color: var(--tx-secondary);
  display: flex; align-items: center; justify-content: center;
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.mobile-nav-close-btn:hover { background: var(--c-red-glow); color: var(--c-red); }
.mobile-search-wrap { padding: var(--s-3) var(--s-4); border-bottom: 1px solid var(--bd-subtle); }
.mobile-search-form {
  display: flex; align-items: center;
  background: var(--bg-elevated); border: 1.5px solid var(--bd-subtle); border-radius: var(--r-full); overflow: hidden;
}
.mobile-search-form:focus-within { border-color: var(--c-red); }
.mobile-search-icon { padding-left: var(--s-3); color: var(--tx-muted); flex-shrink: 0; display: flex; align-items: center; }
.mobile-search-input { flex: 1; padding: 9px var(--s-3); background: transparent; border: none; color: var(--tx-primary); font-size: var(--fs-14); }
.mobile-search-input::placeholder { color: var(--tx-muted); }
.mobile-search-submit { padding: 0 var(--s-3); background: transparent; border: none; color: var(--tx-muted); display: flex; align-items: center; transition: color var(--t-fast) var(--ease); }
.mobile-search-submit:hover { color: var(--c-red); }
.mobile-user-strip { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-4); border-bottom: 1px solid var(--bd-subtle); }
.mobile-user-avatar { width: 40px; height: 40px; border-radius: var(--r-full); border: 2px solid var(--c-red); object-fit: cover; flex-shrink: 0; }
.mobile-user-name { display: block; font-weight: 700; font-size: var(--fs-14); }
.mobile-user-role { display: block; font-size: var(--fs-12); color: var(--tx-muted); }
.mobile-nav-actions { display: flex; flex-direction: column; padding: var(--s-2) 0; flex: 1; }
.mobile-nav-link {
  display: flex; align-items: center; gap: var(--s-3);
  padding: var(--s-3) var(--s-4); min-height: 44px;
  color: var(--tx-secondary); font-size: var(--fs-14); font-weight: 500;
  border: none; background: none; width: 100%; text-align: left;
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.mobile-nav-link:hover { background: var(--bg-elevated); color: var(--tx-primary); }
.mobile-nav-link--primary { color: var(--c-red); font-weight: 700; }
.mobile-nav-link--primary:hover { background: var(--c-red-glow); }
.mobile-nav-link--logout { color: #FF6B6B; }
.mobile-nav-link--logout:hover { background: rgba(255,107,107,0.08); }

/* Skip Link */
.skip-link {
  position: absolute; top: -100%; left: var(--s-4);
  padding: var(--s-2) var(--s-4); background: var(--c-red); color: #fff;
  border-radius: 0 0 var(--r-sm) var(--r-sm); font-weight: 700;
  z-index: calc(var(--z-modal) + 100);
  transition: top var(--t-fast) var(--ease);
}
.skip-link:focus { top: 0; }

/* ============================================================
   CATEGORY NAVIGATION TABS
   ============================================================ */
.category-tabs {
  position: sticky;
  top: var(--header-h);
  z-index: calc(var(--z-header) - 5);
  background: rgba(8,8,8,0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--bd-subtle);
  margin-bottom: var(--s-6);
}
body.light-mode .category-tabs {
  background: rgba(245,244,240,0.97);
  border-bottom-color: var(--bd-default);
}
.category-tabs-container {
  display: flex;
  gap: var(--s-1);
  max-width: var(--w-max);
  margin-inline: auto;
  padding: var(--s-2) var(--s-4);
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.category-tabs-container::-webkit-scrollbar { display: none; }

.category-tab {
  display: inline-flex; align-items: center; gap: var(--s-2);
  padding: 6px var(--s-4); min-height: 34px;
  background: transparent; border: 1px solid transparent;
  border-radius: var(--r-full);
  color: var(--tx-secondary); font-size: var(--fs-13); font-weight: 600;
  white-space: nowrap;
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
  cursor: pointer;
}
.category-tab:hover { background: var(--bg-elevated); color: var(--tx-primary); }
.category-tab.active {
  background: var(--c-red-glow);
  border-color: rgba(255,23,68,0.35);
  color: var(--c-red);
}

/* ============================================================
   CATEGORY SECTION
   ============================================================ */
.category-section {
  margin-bottom: var(--s-12);
  content-visibility: auto;
  contain-intrinsic-size: 0 700px;
}
.category-section:first-of-type { content-visibility: visible; }

.category-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: var(--s-5);
  padding-bottom: var(--s-4);
  border-bottom: 1px solid var(--bd-subtle);
  gap: var(--s-4);
}
.category-title {
  display: flex; align-items: center; gap: var(--s-3);
  font-family: var(--font-display);
  font-size: var(--fs-20); font-weight: 800;
  letter-spacing: -0.03em;
}
.category-icon {
  display: flex; align-items: center; justify-content: center;
  width: 32px; height: 32px;
  border-radius: var(--r-sm);
  background: linear-gradient(135deg, var(--c-red), #FF6090);
  font-size: var(--fs-13); font-weight: 900; color: #fff;
  flex-shrink: 0;
}
.category-count { font-size: var(--fs-13); color: var(--tx-muted); font-weight: 400; }

.view-all-btn {
  display: inline-flex; align-items: center; gap: var(--s-2);
  padding: 6px var(--s-4); min-height: 32px;
  background: transparent; border: 1px solid var(--bd-default);
  border-radius: var(--r-full);
  color: var(--tx-secondary); font-size: var(--fs-13); font-weight: 600;
  white-space: nowrap;
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.view-all-btn:hover { background: var(--c-red-glow); border-color: rgba(255,23,68,0.3); color: var(--c-red); }

/* ============================================================
   POSTS GRID  (Fixed responsive layout)
   ============================================================ */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
  gap: var(--s-4);
  align-items: start;
}
@media (min-width: 640px)  { .posts-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px)  { .posts-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1280px) { .posts-grid { grid-template-columns: repeat(4, 1fr); } }

/* ============================================================
   POST CARD  (Core component — fixed display issues)
   ============================================================ */
.post-card {
  background: var(--bg-surface);
  border: 1px solid var(--bd-subtle);
  border-radius: var(--r-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  /* Default: invisible, JS adds fade-in class */
  opacity: 0;
  transform: translateY(10px);
  transition:
    transform var(--t-base) var(--ease),
    box-shadow var(--t-base) var(--ease),
    border-color var(--t-base) var(--ease);
}
/* Animated in via JS IntersectionObserver */
.post-card.fade-in {
  animation: cardEnter var(--t-slow) var(--ease) forwards;
}
@keyframes cardEnter {
  to { opacity: 1; transform: translateY(0); }
}
/* If JS is disabled — show all cards */
.no-js .post-card { opacity: 1; transform: none; }

.post-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--sh-md);
  border-color: var(--bd-default);
}

/* Thumbnail — fixed aspect ratio prevents CLS */
.post-thumbnail {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--bg-elevated);
  flex-shrink: 0;
}
.post-thumbnail a { display: block; width: 100%; height: 100%; }
.post-thumbnail img,
.post-thumbnail video {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform var(--t-slow) var(--ease);
}
.post-card:hover .post-thumbnail img,
.post-card:hover .post-thumbnail video { transform: scale(1.05); }

/* Badge */
.post-badges {
  position: absolute; top: var(--s-2); left: var(--s-2);
  z-index: var(--z-raise);
  display: flex; gap: var(--s-1);
}
.badge {
  padding: 3px 8px; border-radius: var(--r-full);
  font-family: var(--font-display);
  font-size: var(--fs-11); font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
  line-height: 1.5;
}
.badge.new      { background: linear-gradient(135deg,#00E676,#00B248); color:#000; }
.badge.trending { background: linear-gradient(135deg,#FFC400,#FF9100); color:#000; }
.badge.hot      { background: linear-gradient(135deg,#FF1744,#D50032); color:#fff; }

/* Post body */
.post-content {
  padding: var(--s-4);
  display: flex; flex-direction: column;
  gap: var(--s-2);
  flex: 1;
}

/* Meta row */
.post-meta {
  display: flex; flex-wrap: wrap;
  align-items: center; gap: 6px;
}
.post-category {
  font-family: var(--font-display);
  font-size: var(--fs-11); font-weight: 700;
  letter-spacing: 0.07em; text-transform: uppercase;
  color: var(--c-red);
  transition: opacity var(--t-fast) var(--ease);
}
.post-category:hover { opacity: 0.75; }
.post-meta-dot { color: var(--tx-disabled); font-size: var(--fs-12); }
.post-date, .post-views {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: var(--fs-12); color: var(--tx-muted);
}

/* Title */
.post-title {
  font-family: var(--font-display);
  font-size: var(--fs-16); font-weight: 700;
  line-height: 1.3; letter-spacing: -0.02em;
}
.post-title a {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--tx-primary);
  transition: color var(--t-fast) var(--ease);
}
.post-title a:hover { color: var(--c-red); }

/* Excerpt */
.post-excerpt {
  font-size: var(--fs-13); color: var(--tx-secondary);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Action buttons */
.post-actions {
  display: flex; align-items: center;
  gap: var(--s-2); flex-wrap: wrap;
  margin-top: auto; padding-top: var(--s-3);
  border-top: 1px solid var(--bd-subtle);
}
.action-btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 10px; min-height: 30px;
  background: transparent;
  border: 1px solid var(--bd-subtle);
  border-radius: var(--r-full);
  color: var(--tx-muted); font-size: var(--fs-12); font-weight: 600;
  transition:
    background var(--t-fast) var(--ease),
    color var(--t-fast) var(--ease),
    border-color var(--t-fast) var(--ease),
    transform var(--t-fast) var(--ease-spring);
  white-space: nowrap;
  cursor: pointer;
}
.action-btn:hover { background: var(--bg-elevated); color: var(--tx-primary); border-color: var(--bd-default); }
.action-btn:active { transform: scale(0.95); }
.like-btn.liked { background: rgba(255,23,68,0.12); border-color: rgba(255,23,68,0.3); color: var(--c-red); }
.like-btn.liked .icon { fill: var(--c-red); stroke: none; }
.bookmark-btn.bookmarked { background: rgba(255,196,0,0.12); border-color: rgba(255,196,0,0.3); color: var(--c-gold); }
.bookmark-btn.bookmarked .icon { fill: var(--c-gold); stroke: none; }
.share-btn:hover { background: rgba(0,229,255,0.08); border-color: rgba(0,229,255,0.25); color: var(--c-cyan); }
.comment-btn:hover { background: rgba(41,121,255,0.08); border-color: rgba(41,121,255,0.25); color: var(--c-blue); }

/* Reactions */
.reaction-buttons {
  display: flex; gap: var(--s-1); flex-wrap: wrap;
  padding: var(--s-2) var(--s-3);
  background: var(--bg-elevated);
  border: 1px solid var(--bd-subtle);
  border-radius: var(--r-md);
  margin-top: var(--s-2);
}
.reaction-btn {
  width: 32px; height: 32px; border-radius: var(--r-full);
  background: transparent; border: none;
  font-size: 1rem; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  transition: transform var(--t-fast) var(--ease-spring), background var(--t-fast) var(--ease);
  cursor: pointer;
}
.reaction-btn:hover { transform: scale(1.3); background: var(--bg-input); }

/* ============================================================
   INFINITE SCROLL / LOAD MORE
   ============================================================ */
.load-more-container { text-align: center; margin-top: var(--s-8); }
.load-more-btn {
  display: inline-flex; align-items: center; gap: var(--s-2);
  padding: 10px var(--s-8); min-height: 44px;
  background: var(--bg-surface);
  border: 1px solid var(--bd-default);
  border-radius: var(--r-full);
  color: var(--tx-primary); font-size: var(--fs-14); font-weight: 700;
  transition:
    background var(--t-fast) var(--ease),
    transform var(--t-fast) var(--ease-spring),
    box-shadow var(--t-fast) var(--ease);
  cursor: pointer;
}
.load-more-btn:hover {
  background: var(--c-red-glow);
  border-color: rgba(255,23,68,0.35);
  color: var(--c-red);
  transform: translateY(-2px);
  box-shadow: var(--sh-sm);
}
.load-more-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.load-more-trigger { height: 1px; pointer-events: none; }
.loading-spinner { display: flex; justify-content: center; padding: var(--s-8) 0; }
.spinner {
  width: 34px; height: 34px;
  border: 2.5px solid var(--bd-default);
  border-top-color: var(--c-red);
  border-radius: var(--r-full);
  animation: spin 0.75s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   ADSENSE
   ============================================================ */
.ad-container {
  width: 100%; overflow: hidden; text-align: center;
  border-radius: var(--r-md); margin-block: var(--s-6);
}
.ad-container::before {
  content: attr(aria-label);
  display: block; font-size: var(--fs-11);
  color: var(--tx-disabled); text-transform: uppercase;
  letter-spacing: 0.1em; margin-bottom: var(--s-2);
}
.ad-container ins { display: block; width: 100%; }
.ad-container:empty { display: none; }

/* ============================================================
   SINGLE POST
   ============================================================ */
.single-post-wrapper { max-width: var(--w-content); margin-inline: auto; }

.post-breadcrumb { margin-bottom: var(--s-5); }
.breadcrumb-list {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: var(--s-2); list-style: none;
  font-size: var(--fs-13); color: var(--tx-muted);
}
.breadcrumb-list a { color: var(--tx-secondary); transition: color var(--t-fast) var(--ease); }
.breadcrumb-list a:hover { color: var(--c-red); }
.breadcrumb-current { color: var(--tx-primary); font-weight: 600; }

.post-badges-single { display: flex; gap: var(--s-2); margin-bottom: var(--s-4); }

.single-post-title {
  font-family: var(--font-display);
  font-size: var(--fs-48);
  font-weight: 800; letter-spacing: -0.035em;
  line-height: 1.12;
  color: var(--tx-primary);
  margin-bottom: var(--s-5);
}

.single-post-meta {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: var(--s-3); margin-bottom: var(--s-6);
  font-size: var(--fs-13); color: var(--tx-secondary);
  padding-bottom: var(--s-5);
  border-bottom: 1px solid var(--bd-subtle);
}
.single-post-meta .post-category {
  padding: 3px 10px;
  background: var(--c-red-glow); border: 1px solid rgba(255,23,68,0.3);
  border-radius: var(--r-full);
  font-size: var(--fs-12); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
}
.single-post-meta .post-date,
.single-post-meta .post-views,
.single-post-meta .post-read-time,
.single-post-meta .post-author { display: inline-flex; align-items: center; gap: 5px; }

/* Featured image */
.post-featured-image {
  width: 100%; border-radius: var(--r-lg);
  overflow: hidden; margin-bottom: var(--s-8);
  aspect-ratio: 16 / 9;
  background: var(--bg-elevated);
}
.post-featured-image img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
}

/* Article body */
.single-post-content {
  color: var(--tx-secondary); line-height: 1.85;
  font-size: var(--fs-18);
}
.single-post-content > * + * { margin-top: var(--s-5); }
.single-post-content h2 { font-size: var(--fs-28); font-weight: 800; color: var(--tx-primary); margin-top: var(--s-12); }
.single-post-content h3 { font-size: var(--fs-20); font-weight: 700; color: var(--tx-primary); margin-top: var(--s-8); }
.single-post-content h4 { font-size: var(--fs-18); font-weight: 700; color: var(--tx-primary); margin-top: var(--s-6); }
.single-post-content p { max-width: 72ch; }
.single-post-content a { color: var(--c-red); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(255,23,68,0.4); }
.single-post-content a:hover { text-decoration-color: var(--c-red); }
.single-post-content ul, .single-post-content ol { padding-left: var(--s-6); list-style: revert; }
.single-post-content li { margin-bottom: var(--s-2); }
.single-post-content blockquote {
  border-left: 3px solid var(--c-red);
  padding: var(--s-4) var(--s-6);
  margin-block: var(--s-8);
  background: var(--bg-raised);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  font-style: italic; color: var(--tx-secondary);
  font-size: var(--fs-18);
}
.single-post-content blockquote cite { display: block; font-style: normal; font-size: var(--fs-13); color: var(--tx-muted); margin-top: var(--s-2); }
.single-post-content figure { margin-block: var(--s-8); }
.single-post-content figcaption { text-align: center; font-size: var(--fs-13); color: var(--tx-muted); margin-top: var(--s-2); }
.single-post-content img { border-radius: var(--r-md); width: 100%; }
.single-post-content pre, .single-post-content code {
  font-family: var(--font-mono); font-size: 0.875em;
  background: var(--bg-raised); border: 1px solid var(--bd-subtle); border-radius: var(--r-sm); padding: 2px 6px;
}
.single-post-content pre { padding: var(--s-5); overflow-x: auto; line-height: 1.65; }
.single-post-content pre code { background: none; border: none; padding: 0; }
.single-post-content table { width: 100%; border-collapse: collapse; margin-block: var(--s-6); font-size: var(--fs-14); }
.single-post-content th, .single-post-content td { padding: var(--s-3) var(--s-4); border: 1px solid var(--bd-subtle); text-align: left; }
.single-post-content th { background: var(--bg-raised); font-weight: 700; }

/* Post footer elements */
.post-tags { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-block: var(--s-6); }
.post-tag {
  display: inline-flex; align-items: center;
  padding: 4px 12px; min-height: 28px;
  background: var(--bg-raised); border: 1px solid var(--bd-subtle);
  border-radius: var(--r-full); font-size: var(--fs-13); font-weight: 600; color: var(--tx-secondary);
  transition: all var(--t-fast) var(--ease);
}
.post-tag:hover { background: var(--c-red-glow); border-color: rgba(255,23,68,0.3); color: var(--c-red); }

.post-actions-card {
  background: var(--bg-raised); border: 1px solid var(--bd-subtle);
  border-radius: var(--r-lg); padding: var(--s-5); margin-block: var(--s-8);
}

/* Related / recommended */
.related-posts { margin-top: var(--s-16); }
.related-posts-header {
  font-family: var(--font-display);
  font-size: var(--fs-24); font-weight: 800; letter-spacing: -0.03em;
  margin-bottom: var(--s-6); padding-bottom: var(--s-4);
  border-bottom: 1px solid var(--bd-subtle);
}

/* ============================================================
   SCROLL TO TOP
   ============================================================ */
.scroll-to-top {
  position: fixed; bottom: var(--s-6); left: var(--s-5);
  width: 40px; height: 40px; border-radius: var(--r-full);
  background: var(--bg-elevated); border: 1px solid var(--bd-default);
  color: var(--tx-secondary);
  display: flex; align-items: center; justify-content: center;
  z-index: var(--z-float); box-shadow: var(--sh-sm);
  opacity: 0; transform: translateY(10px); pointer-events: none;
  transition: opacity var(--t-base) var(--ease), transform var(--t-base) var(--ease), background var(--t-fast) var(--ease);
  cursor: pointer;
}
.scroll-to-top.visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
.scroll-to-top:hover { background: var(--c-red-glow); border-color: rgba(255,23,68,0.3); color: var(--c-red); }

/* ============================================================
   SHARE MODAL
   ============================================================ */
.share-modal {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.75); backdrop-filter: blur(6px);
  z-index: var(--z-modal);
  display: none; align-items: flex-end; justify-content: center;
  padding: var(--s-4);
}
.share-modal.active { display: flex; }
@media (min-width: 480px) { .share-modal { align-items: center; } }

.share-content {
  background: var(--bg-elevated); border: 1px solid var(--bd-default);
  border-radius: var(--r-xl) var(--r-xl) var(--r-lg) var(--r-lg);
  width: 100%; max-width: 400px; overflow: hidden;
  animation: sheetUp var(--t-slow) var(--ease) forwards;
}
@media (min-width: 480px) {
  .share-content { border-radius: var(--r-xl); animation: popIn var(--t-base) var(--ease-spring) forwards; }
}
@keyframes sheetUp  { from { transform: translateY(60px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes popIn    { from { transform: scale(0.9); opacity: 0; }        to { transform: none; opacity: 1; } }

.share-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--s-4) var(--s-5); border-bottom: 1px solid var(--bd-subtle);
}
.share-title { font-family: var(--font-display); font-size: var(--fs-16); font-weight: 700; }
.share-close {
  width: 32px; height: 32px; border-radius: var(--r-full);
  background: var(--bg-input); border: none; color: var(--tx-muted);
  display: flex; align-items: center; justify-content: center;
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
  cursor: pointer;
}
.share-close:hover { background: var(--c-red-glow); color: var(--c-red); }
.share-options {
  display: grid; grid-template-columns: repeat(3,1fr);
  gap: var(--s-2); padding: var(--s-4);
}
.share-option {
  display: flex; flex-direction: column; align-items: center; gap: var(--s-2);
  padding: var(--s-3) var(--s-2); min-height: 68px;
  background: var(--bg-input); border: 1px solid var(--bd-subtle);
  border-radius: var(--r-md); color: var(--tx-secondary);
  font-size: var(--fs-12); font-weight: 600;
  cursor: pointer;
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease-spring), border-color var(--t-fast) var(--ease);
}
.share-option:hover { background: var(--bg-elevated); color: var(--tx-primary); transform: translateY(-2px); border-color: var(--bd-default); }
.share-option .icon { font-size: 1.4rem; }
.share-option.facebook:hover { background: rgba(24,119,242,0.1); border-color: rgba(24,119,242,0.3); color: #1877f2; }
.share-option.twitter:hover  { background: rgba(29,155,240,0.1); border-color: rgba(29,155,240,0.3); color: #1d9bf0; }
.share-option.whatsapp:hover { background: rgba(37,211,102,0.1); border-color: rgba(37,211,102,0.3); color: #25d366; }
.share-option.linkedin:hover { background: rgba(0,119,181,0.1);  border-color: rgba(0,119,181,0.3);  color: #0077b5; }
.share-option.telegram:hover { background: rgba(36,161,222,0.1); border-color: rgba(36,161,222,0.3); color: #24a1de; }

/* ============================================================
   ARCHIVE / SEARCH / 404
   ============================================================ */
.archive-header {
  margin-bottom: var(--s-8); padding-bottom: var(--s-6);
  border-bottom: 1px solid var(--bd-subtle);
}
.archive-label {
  display: inline-flex; padding: 3px 10px;
  background: var(--c-red-glow); border: 1px solid rgba(255,23,68,0.3);
  border-radius: var(--r-full);
  font-family: var(--font-display);
  font-size: var(--fs-11); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--c-red); margin-bottom: var(--s-4);
}
.archive-title {
  font-family: var(--font-display);
  font-size: var(--fs-36); font-weight: 800; letter-spacing: -0.04em;
  margin-bottom: var(--s-3);
}
.archive-title .search-term { color: var(--c-red); }
.archive-description { font-size: var(--fs-16); color: var(--tx-secondary); max-width: 70ch; }
.archive-count { font-size: var(--fs-13); color: var(--tx-muted); margin-top: var(--s-2); }

.archive-pagination { margin-top: var(--s-10); }
.archive-pagination .nav-links { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s-2); }
.archive-pagination .page-numbers {
  display: flex; align-items: center; justify-content: center;
  min-width: 40px; height: 40px; padding: 0 var(--s-3);
  background: var(--bg-surface); border: 1px solid var(--bd-subtle);
  border-radius: var(--r-sm); color: var(--tx-secondary);
  font-size: var(--fs-14); font-weight: 600;
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.archive-pagination .page-numbers:hover { background: var(--bg-elevated); color: var(--tx-primary); }
.archive-pagination .page-numbers.current { background: var(--c-red); border-color: var(--c-red); color: #fff; }

.no-results { text-align: center; padding: var(--s-12) var(--s-4); }
.no-results-message { font-size: var(--fs-18); color: var(--tx-secondary); margin-bottom: var(--s-6); }
.btn-back-home {
  display: inline-flex; align-items: center; gap: var(--s-2);
  padding: 10px var(--s-6); min-height: 44px;
  background: var(--c-red); color: #fff; border-radius: var(--r-full);
  font-weight: 700;
  transition: background var(--t-fast) var(--ease), transform var(--t-fast) var(--ease-spring);
}
.btn-back-home:hover { background: var(--c-red-dim); transform: translateY(-1px); }

/* 404 */
.error-404 { text-align: center; padding: var(--s-16) var(--s-4) var(--s-8); }
.error-404-content { max-width: 460px; margin-inline: auto; }
.error-404-code {
  font-family: var(--font-display);
  font-size: clamp(5rem, 22vw, 9rem); font-weight: 900; letter-spacing: -0.06em; line-height: 1;
  background: linear-gradient(135deg, var(--c-red) 0%, #FF6090 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.error-404-title { font-size: var(--fs-28); font-weight: 800; margin-bottom: var(--s-3); }
.error-404-message { color: var(--tx-secondary); margin-bottom: var(--s-8); }
.error-404-search { display: flex; gap: var(--s-2); max-width: 340px; margin: 0 auto var(--s-6); }
.error-404-search-input {
  flex: 1; padding: 10px var(--s-4);
  background: var(--bg-raised); border: 1px solid var(--bd-default); border-radius: var(--r-full);
  color: var(--tx-primary); font-size: var(--fs-14);
}
.error-404-search-btn {
  width: 44px; height: 44px; flex-shrink: 0;
  background: var(--c-red); border: none; border-radius: var(--r-full); color: #fff;
  display: flex; align-items: center; justify-content: center;
  transition: background var(--t-fast) var(--ease);
}
.error-404-search-btn:hover { background: var(--c-red-dim); }

/* ============================================================
   TOAST
   ============================================================ */
.toast-notification {
  position: fixed; bottom: var(--s-8); left: 50%;
  transform: translateX(-50%) translateY(16px);
  background: var(--bg-elevated); border: 1px solid var(--bd-default);
  border-radius: var(--r-full); padding: var(--s-3) var(--s-5);
  font-size: var(--fs-14); font-weight: 600;
  box-shadow: var(--sh-md); z-index: var(--z-toast);
  opacity: 0; pointer-events: none; white-space: nowrap;
  transition: opacity var(--t-base) var(--ease), transform var(--t-base) var(--ease);
}
.toast-notification.is-visible { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ============================================================
   SUBMIT POST FORM
   ============================================================ */
.submit-form-wrapper { max-width: 660px; margin-inline: auto; }
.submit-form-title { font-family: var(--font-display); font-size: var(--fs-36); font-weight: 800; letter-spacing: -0.035em; margin-bottom: var(--s-8); }
.form-group { display: flex; flex-direction: column; gap: var(--s-2); margin-bottom: var(--s-5); }
.form-label { font-size: var(--fs-14); font-weight: 700; }
.form-input, .form-textarea, .form-select {
  width: 100%; padding: 10px var(--s-4); min-height: 44px;
  background: var(--bg-raised); border: 1.5px solid var(--bd-default);
  border-radius: var(--r-md); color: var(--tx-primary); font-size: var(--fs-14);
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.form-input:focus, .form-textarea:focus, .form-select:focus {
  border-color: var(--c-red); box-shadow: 0 0 0 3px var(--c-red-glow); outline: none;
}
.form-textarea { min-height: 200px; resize: vertical; }
.form-hint { font-size: var(--fs-12); color: var(--tx-muted); }
.form-submit-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  padding: 12px var(--s-8); min-height: 48px;
  background: var(--c-red); color: #fff; border: none; border-radius: var(--r-full);
  font-family: var(--font-display); font-size: var(--fs-16); font-weight: 700;
  box-shadow: 0 4px 16px rgba(255,23,68,0.35);
  transition: background var(--t-fast) var(--ease), transform var(--t-fast) var(--ease-spring), box-shadow var(--t-fast) var(--ease);
  cursor: pointer;
}
.form-submit-btn:hover { background: var(--c-red-dim); transform: translateY(-1px); box-shadow: 0 6px 22px rgba(255,23,68,0.5); }
.form-submit-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.form-alert {
  padding: var(--s-3) var(--s-4); border-radius: var(--r-md);
  font-size: var(--fs-14); font-weight: 600; margin-bottom: var(--s-4);
}
.form-alert-success { background: rgba(0,230,118,0.1); border: 1px solid rgba(0,230,118,0.3); color: var(--c-green); }
.form-alert-error   { background: rgba(255,23,68,0.1);  border: 1px solid rgba(255,23,68,0.3);  color: var(--c-red); }

/* ============================================================
   PAGE LINKS (multi-page posts)
   ============================================================ */
.page-links {
  display: flex; flex-wrap: wrap; gap: var(--s-2);
  margin-block: var(--s-6); font-size: var(--fs-14); font-weight: 700;
}
.page-links a {
  padding: 4px 10px; background: var(--bg-raised); border-radius: var(--r-sm);
  transition: background var(--t-fast) var(--ease);
}
.page-links a:hover { background: var(--c-red); color: #fff; }

/* ============================================================
   COMMENTS
   ============================================================ */
.comments-section { margin-top: var(--s-12); }
.comments-toggle-btn {
  display: inline-flex; align-items: center; gap: var(--s-2);
  padding: var(--s-3) var(--s-5); min-height: 44px;
  background: var(--bg-raised); border: 1px solid var(--bd-default);
  border-radius: var(--r-full); font-weight: 700; cursor: pointer;
  transition: background var(--t-fast) var(--ease);
}
.comments-toggle-btn:hover { background: var(--bg-elevated); }
.toggle-chevron { transition: transform var(--t-base) var(--ease); }
.comments-toggle-btn.is-expanded .toggle-chevron { transform: rotate(180deg); }
.comments-all { display: none; margin-top: var(--s-4); }
.comments-all.is-visible { display: block; animation: fadeDown var(--t-base) var(--ease); }
@keyframes fadeDown { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* ============================================================
   LIGHT MODE OVERRIDES
   ============================================================ */
body.light-mode .post-card { background: var(--bg-surface); }
body.light-mode .post-card:hover { box-shadow: 0 6px 28px rgba(0,0,0,0.1); }
body.light-mode .share-content { background: var(--bg-surface); }
body.light-mode .user-dropdown { background: var(--bg-surface); }
body.light-mode .mobile-nav-panel { background: var(--bg-surface); }
body.light-mode .header-search-wrapper { background: rgba(255,255,255,0.98); }

/* ============================================================
   ACCESSIBILITY — HIGH CONTRAST
   ============================================================ */
@media (forced-colors: active) {
  .post-card, .action-btn, .site-header { border: 1px solid ButtonText; }
}

/* ============================================================
   PRINT
   ============================================================ */
@media print {
  .site-header, .scroll-to-top, .share-modal,
  .loading-spinner, .category-tabs, .post-actions,
  #w1-music-player, #w1-scroll-btn, #ar-toolbar,
  .load-more-container, .mobile-nav-panel, .mobile-nav-overlay {
    display: none !important;
  }
  body { background: #fff; color: #000; padding-top: 0; }
  .single-post-content { color: #111; font-size: 12pt; }
  a { color: #000; }
  a[href]::after { content: ' (' attr(href) ')'; font-size: 9pt; color: #555; }
  .post-featured-image { page-break-after: avoid; }
}
