/* ==========================================================================
   DEVANSH.BLOG - COMPLETE DESIGN SYSTEM & STYLESHEET
   Supports: Public Blog, Travel Diaries, Learning Hub, Single Articles & Admin CMS
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. DESIGN TOKENS & CSS VARIABLES
   -------------------------------------------------------------------------- */
:root {
  /* Brand Palettes */
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --primary-light: #eef2ff;
  --primary-rgb: 99, 102, 241;
  --secondary: #8b5cf6;
  --accent: #06b6d4;
  --accent-light: #ecfeff;

  /* Semantic Feedback */
  --success: #10b981;
  --success-light: #ecfdf5;
  --warning: #f59e0b;
  --warning-light: #fffbeb;
  --danger: #ef4444;
  --danger-light: #fef2f2;

  /* Surfaces & Canvas */
  --bg: #ffffff;
  --bg-alt: #f8fafc;
  --bg-card: #ffffff;
  --bg-card-hover: #ffffff;
  --bg-code: #f1f5f9;

  /* Text & Hierarchy */
  --text: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --text-inverse: #ffffff;

  /* Borders & Shadows */
  --border: #e2e8f0;
  --border-focus: #6366f1;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);

  /* Border Radii */
  --radius-sm: 6px;
  --radius: 10px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Motion & Timing */
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);

  /* Typography */
  --font-heading: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', Consolas, monospace;

  /* Layout Structure */
  --container-max: 1200px;
  --navbar-height: 72px;
  --sidebar-width: 260px;
}

/* --------------------------------------------------------------------------
   2. DARK MODE PALETTE
   -------------------------------------------------------------------------- */
body.dark-mode {
  --bg: #0f172a;
  --bg-alt: #1e293b;
  --bg-card: #1e293b;
  --bg-card-hover: #243248;
  --bg-code: #334155;
  --text: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --border: #334155;
  --border-focus: #818cf8;
  --primary-light: rgba(99, 102, 241, 0.15);
  --accent-light: rgba(6, 182, 212, 0.15);
  --success-light: rgba(16, 185, 129, 0.15);
  --warning-light: rgba(245, 158, 11, 0.15);
  --danger-light: rgba(239, 68, 68, 0.15);
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.25);
  --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.35), 0 1px 2px -1px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.35), 0 2px 4px -2px rgba(0, 0, 0, 0.25);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -4px rgba(0, 0, 0, 0.25);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
}

/* --------------------------------------------------------------------------
   3. RESET & BASE STYLES
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  color: var(--text);
  background-color: var(--bg);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background-color 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--text);
  font-weight: 700;
  line-height: 1.25;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition-fast);
}

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

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul, ol {
  list-style: none;
}

button, input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

::selection {
  background-color: var(--primary);
  color: #ffffff;
}

/* --------------------------------------------------------------------------
   4. LAYOUT UTILITIES & CONTAINERS
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
}

.section {
  padding: 80px 0;
  position: relative;
}

.grid {
  display: grid;
  gap: 24px;
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-center { display: flex; justify-content: center; align-items: center; }
.flex-col { display: flex; flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }

.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.gap-3 { gap: 24px; }
.gap-4 { gap: 32px; }

/* --------------------------------------------------------------------------
   5. NAVBAR
   -------------------------------------------------------------------------- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--navbar-height);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  transition: var(--transition);
}

body.dark-mode .navbar {
  background: rgba(15, 23, 42, 0.85);
}

.navbar.scrolled {
  box-shadow: var(--shadow-md);
  border-bottom-color: transparent;
}

.navbar .container {
  height: 100%;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--text);
  font-family: var(--font-heading);
}

.navbar-brand-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  box-shadow: 0 4px 10px rgba(var(--primary-rgb), 0.35);
}

.navbar-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.navbar-links a {
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-weight: 500;
  font-size: 0.925rem;
  color: var(--text-secondary);
  transition: var(--transition-fast);
}

.navbar-links a:hover {
  color: var(--primary);
  background-color: var(--primary-light);
}

.navbar-links a.active {
  color: var(--primary);
  background-color: var(--primary-light);
  font-weight: 600;
}

/* Modern Dropdown Navigation */
.nav-item-dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.nav-link-parent {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
}

.nav-link-parent i.chevron {
  width: 14px;
  height: 14px;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-item-dropdown:hover .nav-link-parent i.chevron,
.nav-item-dropdown:focus-within .nav-link-parent i.chevron {
  transform: rotate(180deg);
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 270px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: 0 16px 36px -4px rgba(0, 0, 0, 0.12), 0 4px 12px rgba(0, 0, 0, 0.05);
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1050;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

body.dark-mode .dropdown-menu {
  background: rgba(30, 41, 59, 0.95);
  box-shadow: 0 20px 40px -4px rgba(0, 0, 0, 0.45);
}

.nav-item-dropdown:hover .dropdown-menu,
.nav-item-dropdown:focus-within .dropdown-menu,
.dropdown-menu.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.dropdown-item {
  display: flex !important;
  align-items: center;
  gap: 12px;
  padding: 10px 12px !important;
  border-radius: var(--radius-sm) !important;
  color: var(--text) !important;
  text-decoration: none;
  transition: var(--transition-fast) !important;
  background: transparent !important;
}

.dropdown-item:hover {
  background: var(--bg-alt) !important;
  color: var(--primary) !important;
  transform: translateX(3px);
}

.dropdown-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.dropdown-icon svg, .dropdown-icon i {
  width: 18px;
  height: 18px;
}

.dropdown-icon.blog { background: var(--primary-light); color: var(--primary); }
.dropdown-icon.travel { background: var(--accent-light); color: var(--accent); }
.dropdown-icon.learning { background: var(--success-light); color: var(--success); }

.dropdown-text {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.dropdown-title {
  font-size: 0.885rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.25;
}

.dropdown-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 3px;
  line-height: 1.3;
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.navbar-toggle {
  display: none;
}

/* Theme Toggle Button Icons */
.theme-icon-light { display: block; }
.theme-icon-dark { display: none; }

body.dark-mode .theme-icon-light { display: none; }
body.dark-mode .theme-icon-dark { display: block; }

/* --------------------------------------------------------------------------
   6. HERO SECTION & MODERN BACKGROUND EFFECTS
   -------------------------------------------------------------------------- */
.hero {
  padding-top: calc(var(--navbar-height) + 50px);
  padding-bottom: 90px;
  background: var(--bg);
  position: relative;
  overflow: hidden;
}

.hero-glow-1 {
  position: absolute;
  top: 15%;
  left: 50%;
  transform: translateX(-50%);
  width: 750px;
  height: 400px;
  background: radial-gradient(ellipse at center, rgba(99, 102, 241, 0.22) 0%, rgba(6, 182, 212, 0.14) 45%, transparent 72%);
  filter: blur(60px);
  pointer-events: none;
  z-index: 1;
}

body.dark-mode .hero-glow-1 {
  background: radial-gradient(ellipse at center, rgba(99, 102, 241, 0.3) 0%, rgba(6, 182, 212, 0.18) 50%, transparent 75%);
}

.hero-grid-pattern {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(15, 23, 42, 0.08) 1.2px, transparent 1.2px);
  background-size: 28px 28px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 50%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 50%, transparent 100%);
  pointer-events: none;
  z-index: 1;
}

body.dark-mode .hero-grid-pattern {
  background-image: radial-gradient(rgba(241, 245, 249, 0.09) 1.2px, transparent 1.2px);
}

.hero-content {
  max-width: 860px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
  text-align: center;
}

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 18px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 24px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
  transition: var(--transition-fast);
}

body.dark-mode .live-pill {
  background: rgba(30, 41, 59, 0.85);
}

.live-pill:hover {
  border-color: var(--primary);
  transform: translateY(-1px);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background-color: var(--success);
  border-radius: 50%;
  position: relative;
  display: inline-block;
}

.pulse-dot::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background-color: var(--success);
  opacity: 0.75;
  animation: pulseDot 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulseDot {
  0%, 100% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(2.4); opacity: 0; }
}

.hero-title {
  font-size: 3.75rem;
  font-weight: 800;
  line-height: 1.12;
  margin-bottom: 20px;
  letter-spacing: -0.025em;
}

.gradient-text {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 50%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-secondary);
  max-width: 680px;
  margin: 0 auto 36px;
  line-height: 1.7;
}

.hero-cta {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 48px;
  margin-top: 56px;
  padding-top: 36px;
  border-top: 1px solid var(--border);
}

.hero-stat {
  text-align: center;
}

.hero-stat-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text);
  font-family: var(--font-heading);
}

.hero-stat-label {
  font-size: 0.875rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-top: 4px;
}

/* --------------------------------------------------------------------------
   6B. HERO TWO-HALVES SPLIT: FEATURED CAROUSEL & LATEST STORIES FEED
   -------------------------------------------------------------------------- */
/* Editorial Newspaper & Magazine Styles (EveryGyan) */
.navbar-editorial {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 68px;
  background: #0B1120;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  z-index: 1000;
  display: flex;
  align-items: center;
}

.navbar-editorial .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.brand-editorial {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-editorial-logo {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  background: #06B6D4;
  color: #0B1120;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: 1.35rem;
  box-shadow: 0 2px 10px rgba(6, 182, 212, 0.35);
}

.brand-editorial-name {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.35rem;
  color: #ffffff;
  letter-spacing: -0.015em;
}

.nav-links-editorial {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-item-editorial {
  position: relative;
}

.nav-link-editorial {
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 22px 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color 0.2s ease;
  position: relative;
}

.nav-link-editorial:hover,
.nav-link-editorial.active {
  color: #ffffff;
}

.nav-link-editorial.active::after,
.nav-item-editorial:hover > .nav-link-editorial::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: #38BDF8;
}

/* 2-Column Mega Dropdown Menu */
.mega-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  background: #0B1220;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 22px 24px 18px;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.6);
  min-width: 360px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1100;
}

.nav-item-editorial:hover .mega-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.mega-grid-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 28px;
  margin-bottom: 16px;
}

.mega-link-item {
  color: rgba(241, 245, 249, 0.85);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s ease, transform 0.2s ease;
  display: block;
}

.mega-link-item:hover {
  color: #38BDF8;
  transform: translateX(2px);
}

.mega-footer-link {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #38BDF8;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-decoration: none;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  transition: color 0.2s ease, gap 0.2s ease;
}

.mega-footer-link:hover {
  color: #7DD3FC;
  gap: 9px;
}

/* Nav Actions on Right */
.nav-actions-editorial {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-nav-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-nav-icon:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

.btn-nav-icon svg, .btn-nav-icon i {
  width: 18px;
  height: 18px;
}

.btn-subscribe {
  background: #2563EB;
  color: #ffffff;
  padding: 7px 18px;
  border-radius: 9999px;
  font-size: 0.825rem;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.2s ease, transform 0.2s ease;
  display: inline-flex;
  align-items: center;
}

.btn-subscribe:hover {
  background: #1D4ED8;
  transform: translateY(-1px);
}

.btn-login {
  background: transparent;
  color: #ffffff;
  padding: 6px 16px;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  font-size: 0.825rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
}

.btn-login:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.4);
}

/* Hero Section */
.hero-editorial-section {
  padding-top: 92px;
  padding-bottom: 50px;
  background: var(--bg);
}

.hero-editorial-split {
  display: grid;
  grid-template-columns: 1.18fr 0.82fr;
  gap: 24px;
  align-items: stretch;
}

/* Left Half: Top Story Carousel Card */
.top-story-carousel-wrap {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.top-story-carousel {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  height: 540px;
  background: #0B1120;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}

.top-story-track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.top-story-slide {
  min-width: 100%;
  width: 100%;
  height: 100%;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 34px 38px 28px;
  box-sizing: border-box;
  flex-shrink: 0;
}

.top-story-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 1;
}

.top-story-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 6s cubic-bezier(0.25, 1, 0.5, 1);
}

.top-story-slide:hover .top-story-bg img {
  transform: scale(1.04);
}

.top-story-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(11, 18, 32, 0.25) 0%, rgba(11, 18, 32, 0.58) 45%, rgba(11, 18, 32, 0.96) 100%);
}

.top-story-badges {
  position: absolute;
  top: 24px;
  left: 32px;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 3;
}

.badge-top-story {
  background: #4F46E5;
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 4px 12px;
  border-radius: 9999px;
  text-transform: uppercase;
}

.badge-cat {
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 4px 12px;
  border-radius: 9999px;
  text-transform: uppercase;
}

.badge-cat.tech { background: #0284C7; }
.badge-cat.travel { background: #0D9488; }
.badge-cat.health { background: #16A34A; }
.badge-cat.blog { background: #8B5CF6; }
.badge-cat.learning { background: #F59E0B; }

/* Centered Left & Right Arrow Buttons */
.carousel-arrow-circle {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 5;
  transition: all 0.2s ease;
}

.carousel-arrow-circle.prev { left: 16px; }
.carousel-arrow-circle.next { right: 16px; }

.carousel-arrow-circle:hover {
  background: rgba(15, 23, 42, 0.95);
  border-color: rgba(255, 255, 255, 0.45);
  transform: translateY(-50%) scale(1.06);
}

.carousel-arrow-circle svg, .carousel-arrow-circle i {
  width: 20px;
  height: 20px;
}

.top-story-content {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 10px;
  color: #ffffff;
  margin-bottom: 24px;
}

.top-story-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 2.15rem;
  font-weight: 800;
  line-height: 1.18;
  margin: 0;
  letter-spacing: -0.015em;
}

.top-story-title a {
  color: #ffffff;
  text-decoration: none;
  transition: color 0.2s ease;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

.top-story-title a:hover {
  color: #93C5FD;
}

.top-story-excerpt {
  font-size: 0.94rem;
  line-height: 1.55;
  color: rgba(226, 232, 240, 0.88);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-width: 92%;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

.top-story-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.74rem;
  font-weight: 600;
  color: rgba(203, 213, 225, 0.85);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 4px;
}

.top-story-meta .meta-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.top-story-meta .meta-item svg, .top-story-meta .meta-item i {
  width: 13px;
  height: 13px;
}

/* Horizontal Dash Indicators */
.card-dash-indicators {
  position: absolute;
  bottom: 20px;
  left: 36px;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 6px;
}

.card-dash {
  width: 22px;
  height: 3px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.28);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-dash.active {
  width: 38px;
  background: #38BDF8;
}

/* Right Half: Trending Now Card */
.trending-now-wrap {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.trending-now-card {
  background: #ffffff;
  border: 1px solid #E2E8F0;
  border-radius: 18px;
  padding: 22px 24px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.03);
  height: 540px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-sizing: border-box;
}

body.dark-mode .trending-now-card {
  background: #111827;
  border-color: #1F2937;
  box-shadow: none;
}

.trending-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 12px;
  border-bottom: 1px solid #F1F5F9;
}

body.dark-mode .trending-card-header {
  border-bottom-color: #1F2937;
}

.trending-card-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 800;
  color: #0F172A;
  margin: 0;
}

body.dark-mode .trending-card-title {
  color: #F8FAFC;
}

.trending-red-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #EF4444;
  display: inline-block;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.6);
}

.trending-items-list {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex: 1;
  padding-top: 8px;
}

.trending-story-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 8px 0;
  border-bottom: 1px solid #F1F5F9;
  text-decoration: none;
  color: inherit;
  transition: background 0.2s ease;
}

body.dark-mode .trending-story-row {
  border-bottom-color: #1F2937;
}

.trending-story-row:last-child {
  border-bottom: none;
}

.trending-story-rank {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.45rem;
  font-weight: 700;
  color: #94A3B8;
  min-width: 26px;
  line-height: 1.1;
  margin-top: 1px;
}

body.dark-mode .trending-story-rank {
  color: #64748B;
}

.trending-story-details {
  flex: 1;
  min-width: 0;
}

.trending-story-headline {
  font-family: var(--font-heading);
  font-size: 0.92rem;
  font-weight: 700;
  color: #0F172A;
  line-height: 1.34;
  margin: 0 0 5px 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.2s ease;
}

body.dark-mode .trending-story-headline {
  color: #F1F5F9;
}

.trending-story-row:hover .trending-story-headline {
  color: #2563EB;
}

body.dark-mode .trending-story-row:hover .trending-story-headline {
  color: #38BDF8;
}

.trending-story-timestamp {
  font-size: 0.72rem;
  color: #64748B;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

body.dark-mode .trending-story-timestamp {
  color: #94A3B8;
}

.trending-story-thumb {
  width: 58px;
  height: 58px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  background: #F1F5F9;
}

.trending-story-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.trending-story-row:hover .trending-story-thumb img {
  transform: scale(1.08);
}

/* Responsive Editorial Media Queries */
@media (max-width: 992px) {
  .hero-editorial-split {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .top-story-carousel, .trending-now-card {
    height: auto;
  }
  .top-story-carousel {
    height: 440px;
  }
  .trending-now-card {
    min-height: 460px;
  }
  .nav-links-editorial {
    display: none;
  }
}

@media (max-width: 640px) {
  .hero-editorial-section {
    padding-top: 80px;
    padding-bottom: 30px;
  }
  .top-story-carousel {
    height: 380px;
  }
  .top-story-slide {
    padding: 24px 20px 20px;
  }
  .top-story-title {
    font-size: 1.45rem;
  }
  .top-story-excerpt {
    display: none;
  }
  .carousel-arrow-circle {
    width: 36px;
    height: 36px;
  }
  .carousel-arrow-circle.prev { left: 10px; }
  .carousel-arrow-circle.next { right: 10px; }
  .trending-story-thumb {
    width: 50px;
    height: 50px;
  }
}

/* --------------------------------------------------------------------------
   7. BUTTONS
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  font-family: var(--font-body);
  font-size: 0.925rem;
  font-weight: 600;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
  user-select: none;
}

.btn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.btn-primary {
  background: var(--primary);
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.25);
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(var(--primary-rgb), 0.35);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 1.5px solid var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: #ffffff !important;
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}

.btn-ghost:hover {
  background: var(--bg-alt);
  color: var(--text);
}

.btn-danger {
  background: var(--danger);
  color: #ffffff !important;
}

.btn-danger:hover {
  background: #dc2626;
  transform: translateY(-1px);
}

.btn-sm {
  padding: 6px 14px;
  font-size: 0.825rem;
  border-radius: var(--radius-sm);
}

.btn-lg {
  padding: 14px 30px;
  font-size: 1rem;
  border-radius: var(--radius-md);
}

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-icon:hover {
  background: var(--bg-alt);
  color: var(--primary);
}

.btn-block {
  width: 100%;
}

/* --------------------------------------------------------------------------
   8. CARDS & GRID PRESENTATION
   -------------------------------------------------------------------------- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
  height: 100%;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(var(--primary-rgb), 0.3);
}

.card-img {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background-color: var(--bg-alt);
}

.card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover .card-img img {
  transform: scale(1.06);
}

.card-img-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(0, 0, 0, 0.45) 100%);
  opacity: 0;
  transition: var(--transition);
}

.card:hover .card-img-overlay {
  opacity: 1;
}

.card-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 12px;
}

.card-category {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  width: fit-content;
}

.card-category.blog {
  color: var(--primary);
  background: var(--primary-light);
}

.card-category.travel {
  color: var(--accent);
  background: var(--accent-light);
}

.card-category.learning {
  color: var(--success);
  background: var(--success-light);
}

.card-title {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.4;
  margin: 0;
}

.card-title a {
  color: var(--text);
  transition: color 0.2s ease;
}

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

.card-excerpt {
  font-size: 0.925rem;
  color: var(--text-secondary);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 0.825rem;
  color: var(--text-muted);
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.card-meta-left, .card-meta-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.card-meta-item {
  display: flex;
  align-items: center;
  gap: 5px;
}

.card-meta-item svg, .card-meta-item i {
  width: 15px;
  height: 15px;
}

/* Featured Large Card */
.card-featured {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}

.card-featured:hover {
  box-shadow: var(--shadow-xl);
  border-color: rgba(var(--primary-rgb), 0.3);
}

.card-featured .card-img {
  aspect-ratio: auto;
  min-height: 380px;
}

.card-featured .card-body {
  padding: 40px;
  justify-content: center;
}

.card-featured .card-title {
  font-size: 2rem;
  line-height: 1.3;
}

.card-featured .card-excerpt {
  -webkit-line-clamp: 4;
  font-size: 1.05rem;
}

/* --------------------------------------------------------------------------
   9. CATEGORY CARDS (HOMEPAGE)
   -------------------------------------------------------------------------- */
.category-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 28px;
  text-align: center;
  text-decoration: none;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.category-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}

.category-card-icon {
  width: 68px;
  height: 68px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  transition: transform 0.3s ease;
}

.category-card:hover .category-card-icon {
  transform: scale(1.1) rotate(4deg);
}

.category-card-icon.blog {
  background: var(--primary-light);
  color: var(--primary);
}

.category-card-icon.travel {
  background: var(--accent-light);
  color: var(--accent);
}

.category-card-icon.learning {
  background: var(--success-light);
  color: var(--success);
}

.category-card-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
}

.category-card-text {
  font-size: 0.925rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.category-card-count {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-top: 16px;
  padding: 4px 12px;
  background: var(--bg-alt);
  border-radius: var(--radius-full);
}

/* --------------------------------------------------------------------------
   10. SECTION HEADERS & FILTER BARS
   -------------------------------------------------------------------------- */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 40px;
  flex-wrap: wrap;
  gap: 16px;
}

.section-header.center {
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.section-title {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary);
  margin-top: 8px;
  max-width: 600px;
}

.section-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary);
  margin-bottom: 8px;
}

.page-header {
  padding-top: calc(var(--navbar-height) + 50px);
  padding-bottom: 50px;
  background: var(--bg-alt);
  text-align: center;
  border-bottom: 1px solid var(--border);
  position: relative;
}

.page-header-icon {
  width: 54px;
  height: 54px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
}

.page-header-title {
  font-size: 2.75rem;
  font-weight: 800;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.page-header-text {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 620px;
  margin: 0 auto;
}

/* Filter Controls */
.filter-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 36px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-btn {
  padding: 8px 18px;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--radius-full);
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition-fast);
}

.filter-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.filter-btn.active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(var(--primary-rgb), 0.3);
}

.search-bar {
  position: relative;
  min-width: 260px;
  max-width: 360px;
  width: 100%;
}

.search-input {
  width: 100%;
  padding: 10px 16px 10px 42px;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  background: var(--bg-card);
  color: var(--text);
  transition: var(--transition-fast);
}

.search-input:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.15);
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
  display: flex;
  align-items: center;
}

/* --------------------------------------------------------------------------
   11. SINGLE ARTICLE VIEW
   -------------------------------------------------------------------------- */
.article-view {
  padding-top: calc(var(--navbar-height) + 30px);
  padding-bottom: 80px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.breadcrumb a {
  color: var(--text-secondary);
}

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

.breadcrumb-separator {
  color: var(--text-muted);
}

.article-header {
  text-align: center;
  max-width: 860px;
  margin: 0 auto 36px;
}

.article-title {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.2;
  margin: 16px 0 24px;
  letter-spacing: -0.02em;
}

.article-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  color: var(--text-muted);
  font-size: 0.925rem;
  flex-wrap: wrap;
}

.article-cover {
  max-width: 1000px;
  margin: 0 auto 48px;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  aspect-ratio: 16 / 9;
}

.article-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article-content {
  max-width: 760px;
  margin: 0 auto;
  font-size: 1.125rem;
  line-height: 1.85;
  color: var(--text-secondary);
}

.article-content h2 {
  font-size: 2rem;
  margin-top: 48px;
  margin-bottom: 18px;
  color: var(--text);
  letter-spacing: -0.01em;
}

.article-content h3 {
  font-size: 1.5rem;
  margin-top: 36px;
  margin-bottom: 14px;
  color: var(--text);
}

.article-content p {
  margin-bottom: 28px;
}

.article-content ul, .article-content ol {
  margin-bottom: 28px;
  padding-left: 28px;
}

.article-content ul { list-style: disc; }
.article-content ol { list-style: decimal; }

.article-content li {
  margin-bottom: 10px;
}

.article-content blockquote {
  border-left: 4px solid var(--primary);
  padding: 20px 28px;
  margin: 36px 0;
  background: var(--primary-light);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-style: italic;
  font-size: 1.15rem;
  color: var(--text);
}

.article-content pre {
  background: var(--bg-code);
  padding: 24px;
  border-radius: var(--radius-md);
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  border: 1px solid var(--border);
  margin: 32px 0;
  line-height: 1.6;
}

.article-content code {
  background: var(--bg-code);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.9em;
  font-family: var(--font-mono);
  color: var(--primary);
}

.article-content pre code {
  background: transparent;
  padding: 0;
  color: inherit;
}

.article-content img {
  border-radius: var(--radius-lg);
  margin: 36px 0;
  box-shadow: var(--shadow-md);
  width: 100%;
}

.article-tags {
  max-width: 760px;
  margin: 40px auto 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  font-size: 0.825rem;
  font-weight: 500;
  border-radius: var(--radius-full);
  background: var(--bg-alt);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  transition: var(--transition-fast);
}

.tag:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.article-share {
  max-width: 760px;
  margin: 40px auto 0;
  padding: 28px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.article-nav {
  max-width: 760px;
  margin: 40px auto 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.article-nav-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  text-decoration: none;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.article-nav-item:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.article-nav-label {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.article-nav-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.4;
}

/* --------------------------------------------------------------------------
   12. NEWSLETTER CALL TO ACTION
   -------------------------------------------------------------------------- */
.newsletter {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  border-radius: var(--radius-xl);
  padding: 64px 40px;
  text-align: center;
  color: #ffffff;
  position: relative;
  overflow: hidden;
  margin: 60px 0;
  box-shadow: 0 20px 30px -10px rgba(var(--primary-rgb), 0.4);
}

.newsletter::before {
  content: '';
  position: absolute;
  top: -50px;
  right: -50px;
  width: 200px;
  height: 200px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
}

.newsletter-title {
  font-size: 2.25rem;
  font-weight: 800;
  margin-bottom: 14px;
  color: #ffffff;
}

.newsletter-text {
  font-size: 1.1rem;
  opacity: 0.92;
  margin-bottom: 32px;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

.newsletter-form {
  display: flex;
  max-width: 480px;
  margin: 0 auto;
  background: #ffffff;
  border-radius: var(--radius-full);
  padding: 6px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.newsletter-input {
  flex: 1;
  padding: 12px 20px;
  border: none;
  background: transparent;
  font-size: 0.95rem;
  color: #0f172a;
  outline: none;
}

.newsletter-btn {
  padding: 12px 28px;
  background: var(--primary);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-full);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
}

.newsletter-btn:hover {
  background: var(--primary-hover);
}

/* --------------------------------------------------------------------------
   13. FOOTER
   -------------------------------------------------------------------------- */
.footer {
  background: var(--bg-alt);
  padding: 72px 0 0;
  margin-top: auto;
  border-top: 1px solid var(--border);
}

body.dark-mode .footer {
  background: #0b1120;
}

.footer-content {
  padding-bottom: 56px;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-title {
  font-size: 0.925rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text);
  margin-bottom: 8px;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  color: var(--text-secondary);
  font-size: 0.925rem;
  transition: var(--transition-fast);
}

.footer-links a:hover {
  color: var(--primary);
  transform: translateX(4px);
}

.footer-social {
  display: flex;
  gap: 8px;
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 28px 0;
  text-align: center;
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   14. PAGINATION
   -------------------------------------------------------------------------- */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 56px;
}

.page-btn {
  min-width: 42px;
  height: 42px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition-fast);
  font-weight: 600;
  font-size: 0.9rem;
}

.page-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.page-btn.active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

.page-btn.disabled {
  opacity: 0.4;
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   15. ADMIN DASHBOARD LAYOUT & COMPONENTS
   -------------------------------------------------------------------------- */
.admin-layout {
  display: flex;
  min-height: 100vh;
  background: var(--bg-alt);
}

.admin-sidebar {
  width: var(--sidebar-width);
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  z-index: 1050;
  transition: transform 0.3s ease;
}

.admin-sidebar-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.admin-sidebar-nav {
  flex: 1;
  padding: 20px 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.admin-sidebar-section {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.admin-sidebar-section-title {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  padding: 0 12px;
  margin-bottom: 10px;
}

.admin-sidebar-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.925rem;
  font-weight: 500;
  transition: var(--transition-fast);
  cursor: pointer;
  text-decoration: none;
}

.admin-sidebar-item:hover {
  background: var(--bg-alt);
  color: var(--text);
}

.admin-sidebar-item.active {
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 600;
}

.admin-sidebar-item svg, .admin-sidebar-item i {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.admin-sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
}

.admin-main {
  flex: 1;
  margin-left: var(--sidebar-width);
  background: var(--bg-alt);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.admin-topbar {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  padding: 16px 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
}

.admin-topbar-title {
  font-size: 1.35rem;
  font-weight: 700;
}

.admin-topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-content {
  padding: 36px;
  flex: 1;
}

/* Stat Cards */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-bottom: 36px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 18px;
  transition: var(--transition);
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.stat-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-icon.primary { background: var(--primary-light); color: var(--primary); }
.stat-icon.accent { background: var(--accent-light); color: var(--accent); }
.stat-icon.success { background: var(--success-light); color: var(--success); }
.stat-icon.warning { background: var(--warning-light); color: var(--warning); }

.stat-info {
  display: flex;
  flex-direction: column;
}

.stat-value {
  font-size: 2rem;
  font-weight: 800;
  font-family: var(--font-heading);
  color: var(--text);
  line-height: 1;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-top: 6px;
}

/* Data Tables */
.data-table-container {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.data-table-header {
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 16px;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.data-table th {
  padding: 14px 18px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
}

.data-table td {
  padding: 16px 18px;
  font-size: 0.925rem;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.data-table tr:last-child td {
  border-bottom: none;
}

.data-table tr:hover td {
  background: var(--bg-alt);
}

.table-article-title {
  font-weight: 600;
  color: var(--text);
  display: block;
}

.table-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.table-empty {
  padding: 60px 20px;
  text-align: center;
  color: var(--text-muted);
}

/* Status Badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  text-transform: capitalize;
}

.status-published {
  background: var(--success-light);
  color: var(--success);
}

.status-draft {
  background: var(--warning-light);
  color: var(--warning);
}

.status-archived {
  background: var(--bg-alt);
  color: var(--text-muted);
}

/* Forms */
.form-group {
  margin-bottom: 22px;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}

.form-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 6px;
}

.form-input, .form-textarea, .form-select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.925rem;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  transition: var(--transition-fast);
}

.form-input:focus, .form-textarea:focus, .form-select:focus {
  border-color: var(--border-focus);
  outline: none;
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.15);
}

.form-textarea {
  min-height: 120px;
  resize: vertical;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.form-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
  font-size: 0.925rem;
  font-weight: 500;
}

.form-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
  cursor: pointer;
}

.form-error {
  color: var(--danger);
  font-size: 0.825rem;
  margin-top: 6px;
}

/* Editor Styling */
.editor-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 28px;
  align-items: start;
}

.editor-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
}

.ql-toolbar.ql-snow {
  border-color: var(--border) !important;
  background: var(--bg-alt);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}

.ql-container.ql-snow {
  border-color: var(--border) !important;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  min-height: 380px;
  font-family: var(--font-body) !important;
  font-size: 1.05rem !important;
  color: var(--text) !important;
}

body.dark-mode .ql-stroke { stroke: var(--text-secondary) !important; }
body.dark-mode .ql-fill { fill: var(--text-secondary) !important; }
body.dark-mode .ql-picker { color: var(--text-secondary) !important; }
body.dark-mode .ql-picker-options { background-color: var(--bg-card) !important; border-color: var(--border) !important; }

/* Media Library */
.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 18px;
  margin-top: 24px;
}

.media-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  cursor: pointer;
  background: var(--bg-alt);
  transition: var(--transition);
}

.media-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-item:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
}

.media-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  opacity: 0;
  transition: var(--transition-fast);
}

.media-item:hover .media-overlay {
  opacity: 1;
}

.upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius-md);
  padding: 48px 24px;
  text-align: center;
  cursor: pointer;
  background: var(--bg-card);
  transition: var(--transition-fast);
}

.upload-zone:hover, .upload-zone.dragover {
  border-color: var(--primary);
  background: var(--primary-light);
}

.upload-zone-icon {
  width: 48px;
  height: 48px;
  color: var(--primary);
  margin: 0 auto 16px;
}

/* Modals */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.modal-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  max-width: 520px;
  width: 90%;
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--border);
  transform: scale(0.92);
  transition: var(--transition);
  overflow: hidden;
}

.modal-backdrop.active .modal {
  transform: scale(1);
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-title {
  font-size: 1.25rem;
  font-weight: 700;
}

.modal-body {
  padding: 24px;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  background: var(--bg-alt);
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 20px;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 320px;
  max-width: 440px;
  animation: slideInRight 0.35s ease forwards;
}

.toast-success { border-left: 4px solid var(--success); }
.toast-error { border-left: 4px solid var(--danger); }
.toast-warning { border-left: 4px solid var(--warning); }

.toast-close {
  margin-left: auto;
  cursor: pointer;
  color: var(--text-muted);
}

.toast-close:hover {
  color: var(--text);
}

/* Login Page Presentation */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-alt);
  padding: 24px;
}

.login-card {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  padding: 48px 40px;
  max-width: 440px;
  width: 100%;
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--border);
}

.login-header {
  text-align: center;
  margin-bottom: 32px;
}

.login-logo {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  color: #ffffff;
  box-shadow: 0 8px 16px rgba(var(--primary-rgb), 0.3);
}

.login-title {
  font-size: 1.6rem;
  font-weight: 800;
}

.login-subtitle {
  color: var(--text-muted);
  font-size: 0.925rem;
  margin-top: 6px;
}

/* --------------------------------------------------------------------------
   16. ANIMATIONS & UTILITY CLASSES
   -------------------------------------------------------------------------- */
@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(50px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.loading-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: inline-block;
}

.loading-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

body.dark-mode .loading-overlay {
  background: rgba(15, 23, 42, 0.7);
}

.animate-on-scroll {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Skeletons */
.skeleton {
  background: linear-gradient(90deg, var(--bg-alt) 25%, var(--border) 50%, var(--bg-alt) 75%);
  background-size: 200% 100%;
  animation: pulse 1.5s infinite;
  border-radius: var(--radius-sm);
}

.skeleton-text { height: 16px; margin-bottom: 8px; }
.skeleton-text.short { width: 60%; }
.skeleton-title { height: 26px; width: 85%; margin-bottom: 14px; }
.skeleton-image { aspect-ratio: 16 / 10; width: 100%; }

/* General Utilities */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-primary { color: var(--primary) !important; }
.text-muted { color: var(--text-muted) !important; }
.text-success { color: var(--success) !important; }
.text-danger { color: var(--danger) !important; }

.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mt-5 { margin-top: 48px; }

.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }
.mb-5 { margin-bottom: 48px; }

.py-1 { padding-top: 8px; padding-bottom: 8px; }
.py-2 { padding-top: 16px; padding-bottom: 16px; }
.py-3 { padding-top: 24px; padding-bottom: 24px; }
.py-4 { padding-top: 32px; padding-bottom: 32px; }

.hidden { display: none !important; }
.w-full { width: 100%; }
.truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* --------------------------------------------------------------------------
   17. RESPONSIVENESS & MEDIA QUERIES
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .editor-layout { grid-template-columns: 1fr; }

  /* Admin Sidebar collapses to drawer */
  .admin-sidebar {
    transform: translateX(-100%);
  }

  .admin-sidebar.active {
    transform: translateX(0);
  }

  .admin-main {
    margin-left: 0;
  }
}

@media (max-width: 768px) {
  .section { padding: 60px 0; }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: 1fr; }
  .hero-title { font-size: 2.5rem; }
  .hero-stats { gap: 24px; }
  .card-featured { grid-template-columns: 1fr; }
  .card-featured .card-img { min-height: 240px; }
  .card-featured .card-body { padding: 24px; }
  .article-title { font-size: 2.25rem; }
  .article-nav { grid-template-columns: 1fr; }
  .footer-content { grid-template-columns: 1fr; gap: 32px; }
  .newsletter { padding: 48px 24px; }
  .newsletter-form { flex-direction: column; border-radius: var(--radius-md); background: transparent; padding: 0; gap: 10px; }
  .newsletter-input { background: #ffffff; border-radius: var(--radius); }
  .newsletter-btn { border-radius: var(--radius); }
  .form-row { grid-template-columns: 1fr; }

  /* Navbar Mobile Menu */
  .navbar-toggle {
    display: inline-flex;
  }

  .navbar-links {
    position: fixed;
    top: var(--navbar-height);
    left: 0;
    right: 0;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 20px 24px;
    gap: 12px;
    box-shadow: var(--shadow-lg);
    transform: translateY(-150%);
    opacity: 0;
    transition: var(--transition);
    pointer-events: none;
  }

  .navbar-links.active {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .navbar-links a {
    width: 100%;
    text-align: left;
  }

  .nav-item-dropdown {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .nav-item-dropdown .nav-link-parent {
    width: 100%;
    justify-content: space-between;
  }

  .nav-item-dropdown .dropdown-menu {
    position: static;
    transform: none;
    box-shadow: none;
    border: 1px solid var(--border);
    background: var(--bg-alt);
    width: 100%;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    display: none;
    margin-top: 6px;
    margin-bottom: 6px;
  }

  .nav-item-dropdown.open .dropdown-menu {
    display: flex;
  }
}

@media (max-width: 480px) {
  .hero-title { font-size: 2rem; }
  .hero-subtitle { font-size: 1rem; }
  .hero-stats { flex-direction: column; gap: 16px; }
  .admin-content { padding: 20px; }
  .login-card { padding: 32px 20px; }
}

/* Print Stylesheet */
@media print {
  .navbar, .footer, .newsletter, .article-nav, .article-share, .admin-sidebar, .btn {
    display: none !important;
  }
  body {
    background: #ffffff !important;
    color: #000000 !important;
  }
  .article-content {
    max-width: 100% !important;
  }
}
