/* ═══════════════════════════════════════════════════════════
   eJournalHub — Main Stylesheet
   ═══════════════════════════════════════════════════════════ */

/* 0. CSS Custom Properties (Variables)
   ─────────────────────────────────────────────────────────── */
:root {
  --color-primary: #6C63FF;
  --color-primary-dark: #5a52d5;
  --color-secondary: #FF6584;
  --color-accent: #43C6AC;
  --color-bg: #ffffff;
  --color-bg-secondary: #f8f9fa;
  --color-bg-tertiary: #f1f3f5;
  --color-surface: #ffffff;
  --color-surface-hover: #f8f9fa;
  --color-border: #e9ecef;
  --color-text: #1a1a2e;
  --color-text-secondary: #6c757d;
  --color-text-muted: #adb5bd;
  --color-heading: #0d0d1a;
  --color-link: #6C63FF;
  --color-link-hover: #5a52d5;
  --color-white: #ffffff;
  --color-black: #000000;
  --color-dark: #0d0d1a;
  --color-card-shadow: 0 2px 20px rgba(0,0,0,0.08);
  --color-card-shadow-hover: 0 8px 40px rgba(0,0,0,0.15);

  --gradient-primary: linear-gradient(135deg, #6C63FF 0%, #43C6AC 100%);
  --gradient-secondary: linear-gradient(135deg, #FF6584 0%, #FF8E53 100%);
  --gradient-hero: linear-gradient(135deg, #0d0d1a 0%, #1a1a3e 50%, #0d0d1a 100%);
  --gradient-overlay: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.3) 60%, transparent 100%);

  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-serif: 'Merriweather', 'Georgia', serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  --text-5xl: 3rem;

  --fw-normal: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 700;
  --fw-extrabold: 800;

  --lh-tight: 1.25;
  --lh-snug: 1.4;
  --lh-normal: 1.6;
  --lh-relaxed: 1.75;

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;

  --container-max: 1280px;
  --container-content: 860px;
  --sidebar-width: 320px;
  --header-height: 70px;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  --transition-fast: 0.15s ease;
  --transition-base: 0.25s ease;
  --transition-slow: 0.4s ease;

  --z-below: -1;
  --z-base: 0;
  --z-raised: 10;
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-overlay: 300;
  --z-modal: 400;
  --z-toast: 500;
}

[data-theme="dark"] {
  --color-bg: #0d0d1a;
  --color-bg-secondary: #13131f;
  --color-bg-tertiary: #1a1a2e;
  --color-surface: #13131f;
  --color-surface-hover: #1a1a2e;
  --color-border: #2a2a3e;
  --color-text: #e8e8f0;
  --color-text-secondary: #9999b3;
  --color-text-muted: #666680;
  --color-heading: #f0f0ff;
  --color-link: #8B84FF;
  --color-link-hover: #a09aff;
  --color-card-shadow: 0 2px 20px rgba(0,0,0,0.4);
  --color-card-shadow-hover: 0 8px 40px rgba(0,0,0,0.6);
}

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

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

body {
  font-family: var(--font-primary);
  font-size: var(--text-base);
  font-weight: var(--fw-normal);
  line-height: var(--lh-normal);
  color: var(--color-text);
  background-color: var(--color-bg);
  transition: background-color var(--transition-base), color var(--transition-base);
  overflow-x: hidden;
}

a {
  color: var(--color-link);
  text-decoration: none;
  transition: color var(--transition-fast);
}
a:hover { color: var(--color-link-hover); }
a:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; border-radius: 2px; }

img, video { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }
input, textarea, select { font-family: inherit; font-size: inherit; }

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

/* 2. Typography
   ─────────────────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-weight: var(--fw-bold);
  line-height: var(--lh-tight);
  color: var(--color-heading);
  letter-spacing: -0.02em;
}
h1 { font-size: clamp(1.75rem, 4vw, 2.75rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h3 { font-size: clamp(1.15rem, 2.5vw, 1.5rem); }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.1rem; }
h6 { font-size: 1rem; }

p { margin-bottom: var(--space-4); }
p:last-child { margin-bottom: 0; }

strong, b { font-weight: var(--fw-semibold); }
em, i { font-style: italic; }

blockquote {
  margin: var(--space-8) 0;
  padding: var(--space-6) var(--space-8);
  border-left: 4px solid var(--color-primary);
  background: var(--color-bg-secondary);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-size: var(--text-lg);
  font-style: italic;
  color: var(--color-text-secondary);
}
blockquote cite { display: block; margin-top: var(--space-3); font-size: var(--text-sm); font-style: normal; font-weight: var(--fw-semibold); color: var(--color-primary); }

code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: var(--color-bg-tertiary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 0.15em 0.4em;
  color: var(--color-secondary);
}
pre {
  background: var(--color-dark);
  border-radius: var(--radius-md);
  padding: var(--space-6);
  overflow-x: auto;
  margin: var(--space-6) 0;
}
pre code {
  background: none;
  border: none;
  padding: 0;
  color: #e8e8f0;
  font-size: var(--text-sm);
}

/* 3. Layout & Container
   ─────────────────────────────────────────────────────────── */
.ejh-container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.site { display: flex; flex-direction: column; min-height: 100vh; }
.site-content { flex: 1; }

.ejh-content-layout {
  display: grid;
  grid-template-columns: 1fr var(--sidebar-width);
  gap: var(--space-10);
  align-items: start;
}
.ejh-content-main { min-width: 0; }

/* 4. Top Bar
   ─────────────────────────────────────────────────────────── */
.ejh-topbar {
  background: var(--color-dark);
  color: #aaa;
  font-size: var(--text-xs);
  padding: var(--space-2) 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
[data-theme="dark"] .ejh-topbar { background: #060612; }

.ejh-topbar__inner { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); }
.ejh-topbar__date { color: #888; }
.ejh-topbar__ticker { color: #ccc; transition: color var(--transition-fast); display: flex; align-items: center; gap: var(--space-2); }
.ejh-topbar__ticker:hover { color: #fff; }
.ejh-ticker__label { color: var(--color-secondary); font-weight: var(--fw-semibold); }
.ejh-topbar__social { color: #999; padding: 2px 6px; transition: color var(--transition-fast); }
.ejh-topbar__social:hover { color: #fff; }
.ejh-topbar__right { display: flex; align-items: center; gap: 2px; }

/* 5. Header
   ─────────────────────────────────────────────────────────── */
.ejh-header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  position: relative;
  z-index: var(--z-sticky);
  transition: background var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base);
}
.ejh-header--sticky { position: sticky; top: 0; }
.ejh-header.is-scrolled {
  box-shadow: 0 4px 24px rgba(0,0,0,0.1);
  border-bottom-color: transparent;
}

.ejh-header__inner {
  display: flex;
  align-items: center;
  height: var(--header-height);
  gap: var(--space-6);
}

/* Logo */
.ejh-logo-text { display: flex; flex-direction: column; line-height: 1; }
.ejh-logo-text__main {
  font-size: var(--text-xl);
  font-weight: var(--fw-extrabold);
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.03em;
}
.ejh-logo-text__sub { font-size: var(--text-xs); color: var(--color-text-muted); letter-spacing: 0.05em; }
.ejh-header__logo { flex-shrink: 0; }
.ejh-header__logo .custom-logo { max-height: 50px; width: auto; }

/* Nav */
.ejh-nav { flex: 1; display: flex; justify-content: center; }
.ejh-menu { display: flex; align-items: center; gap: var(--space-1); flex-wrap: wrap; }

.ejh-menu-item { position: relative; }
.ejh-menu-link {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-sm);
  font-weight: var(--fw-medium);
  color: var(--color-text);
  border-radius: var(--radius-sm);
  transition: background var(--transition-fast), color var(--transition-fast);
  white-space: nowrap;
}
.ejh-menu-link:hover,
.ejh-menu-item.current-item > .ejh-menu-link { background: var(--color-bg-secondary); color: var(--color-primary); }
.ejh-menu-arrow { font-size: 10px; opacity: 0.5; transition: transform var(--transition-fast); }
.ejh-menu-item.has-dropdown:hover .ejh-menu-arrow { transform: rotate(180deg); }

/* Dropdown */
.ejh-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 200px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--color-card-shadow-hover);
  padding: var(--space-2);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity var(--transition-fast), transform var(--transition-fast), visibility var(--transition-fast);
  z-index: var(--z-dropdown);
}
.ejh-menu-item.has-dropdown:hover > .ejh-dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.ejh-dropdown .ejh-menu-item { width: 100%; }
.ejh-dropdown .ejh-menu-link { width: 100%; padding: var(--space-2) var(--space-3); border-radius: var(--radius-sm); }

/* Header Actions */
.ejh-header__actions { display: flex; align-items: center; gap: var(--space-2); flex-shrink: 0; }
.ejh-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  color: var(--color-text-secondary);
  transition: background var(--transition-fast), color var(--transition-fast);
}
.ejh-action-btn:hover { background: var(--color-bg-secondary); color: var(--color-primary); }

/* Dark Mode Toggle */
.ejh-theme-toggle { position: relative; font-size: 16px; }
.ejh-theme-toggle__icon { transition: opacity var(--transition-fast), transform var(--transition-fast); }
.ejh-theme-toggle__moon { position: absolute; opacity: 0; }
[data-theme="dark"] .ejh-theme-toggle__sun { opacity: 0; transform: scale(0.5); }
[data-theme="dark"] .ejh-theme-toggle__moon { opacity: 1; position: relative; transform: scale(1); }

/* Buttons */
.ejh-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  font-size: var(--text-sm);
  font-weight: var(--fw-semibold);
  border-radius: var(--radius-full);
  border: 2px solid transparent;
  transition: all var(--transition-base);
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
}
.ejh-btn--primary {
  background: var(--gradient-primary);
  color: #fff;
  border-color: transparent;
}
.ejh-btn--primary:hover { opacity: 0.9; transform: translateY(-1px); box-shadow: 0 6px 20px rgba(108,99,255,0.4); color: #fff; }
.ejh-btn--outline {
  background: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}
.ejh-btn--outline:hover { background: var(--color-primary); color: #fff; transform: translateY(-1px); }
.ejh-btn--sm { padding: var(--space-2) var(--space-4); font-size: var(--text-xs); }
.ejh-btn--full { width: 100%; }
.ejh-btn--hero { margin-top: var(--space-6); padding: var(--space-4) var(--space-8); font-size: var(--text-base); }
.ejh-btn--load-more { padding: var(--space-4) var(--space-10); min-width: 200px; gap: var(--space-3); }

/* 6. Search Overlay
   ─────────────────────────────────────────────────────────── */
.ejh-search-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  z-index: var(--z-modal);
  display: flex;
  align-items: flex-start;
  padding-top: 120px;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-base), visibility var(--transition-base);
  backdrop-filter: blur(8px);
}
.ejh-search-overlay.is-open { opacity: 1; visibility: visible; }
.ejh-search-overlay .ejh-search-form { width: 100%; max-width: 700px; margin: 0 auto; }
.ejh-search-overlay .ejh-search-form__input {
  background: rgba(255,255,255,0.1);
  border: 2px solid rgba(255,255,255,0.2);
  color: #fff;
  font-size: var(--text-2xl);
  padding: var(--space-5) var(--space-6);
}
.ejh-search-overlay .ejh-search-form__input::placeholder { color: rgba(255,255,255,0.4); }
.ejh-search-close {
  position: absolute;
  top: var(--space-6);
  right: var(--space-6);
  font-size: 28px;
  color: rgba(255,255,255,0.7);
  padding: var(--space-2);
  transition: color var(--transition-fast);
}
.ejh-search-close:hover { color: #fff; }

/* 7. Mobile Menu
   ─────────────────────────────────────────────────────────── */
.ejh-mobile-toggle { display: none; flex-direction: column; gap: 5px; width: 36px; height: 36px; padding: 8px 6px; }
.ejh-hamburger,
.ejh-hamburger::before,
.ejh-hamburger::after {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: transform var(--transition-base), opacity var(--transition-base);
  content: '';
}
.ejh-hamburger { position: relative; }
.ejh-hamburger::before { position: absolute; top: -6px; }
.ejh-hamburger::after { position: absolute; top: 6px; }

.ejh-mobile-menu {
  position: fixed;
  top: 0;
  right: 0;
  width: min(340px, 90vw);
  height: 100vh;
  background: var(--color-surface);
  z-index: var(--z-modal);
  transform: translateX(100%);
  transition: transform var(--transition-slow);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  box-shadow: -8px 0 40px rgba(0,0,0,0.2);
}
.ejh-mobile-menu.is-open { transform: translateX(0); }
.ejh-mobile-menu__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-5) var(--space-6);
  border-bottom: 1px solid var(--color-border);
}
.ejh-mobile-close { font-size: 24px; color: var(--color-text-secondary); padding: var(--space-2); }
.ejh-mobile-nav { flex: 1; padding: var(--space-4); }
.ejh-mobile-nav .ejh-menu-item { border-bottom: 1px solid var(--color-border); }
.ejh-mobile-nav .ejh-menu-link { padding: var(--space-3) var(--space-2); font-size: var(--text-base); width: 100%; }
.ejh-mobile-menu__footer { padding: var(--space-6); display: flex; flex-direction: column; gap: var(--space-3); }

.ejh-overlay-bg {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: calc(var(--z-modal) - 1);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-base), visibility var(--transition-base);
}
.ejh-overlay-bg.is-visible { opacity: 1; visibility: visible; }

/* 8. Hero Slider
   ─────────────────────────────────────────────────────────── */
.ejh-hero {
  position: relative;
  overflow: hidden;
  height: min(90vh, 680px);
  background: var(--color-dark);
}
.ejh-hero__slider { width: 100%; height: 100%; }
.ejh-hero__track {
  display: flex;
  height: 100%;
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.ejh-hero__slide {
  position: relative;
  flex: 0 0 100%;
  height: 100%;
  overflow: hidden;
}
.ejh-hero__slide-bg { position: absolute; inset: 0; }
.ejh-hero__img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.05); transition: transform 8s ease; }
.ejh-hero__slide.is-active .ejh-hero__img { transform: scale(1); }
.ejh-hero__overlay {
  position: absolute;
  inset: 0;
  background: var(--gradient-overlay);
}

.ejh-hero__content {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding-bottom: var(--space-16);
}
.ejh-hero__body {
  max-width: 780px;
  animation: slideUp 0.6s ease forwards;
}
@keyframes slideUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }

.ejh-hero__title {
  font-size: clamp(1.5rem, 4vw, 3rem);
  font-weight: var(--fw-extrabold);
  line-height: var(--lh-tight);
  margin: var(--space-3) 0;
  color: #fff;
  letter-spacing: -0.03em;
}
.ejh-hero__title a { color: inherit; }
.ejh-hero__title a:hover { opacity: 0.85; }
.ejh-hero__excerpt { color: rgba(255,255,255,0.8); font-size: var(--text-lg); line-height: var(--lh-relaxed); max-width: 600px; margin-bottom: var(--space-4); }
.ejh-hero__cats { display: flex; gap: var(--space-2); flex-wrap: wrap; margin-bottom: var(--space-4); }
.ejh-hero__meta { display: flex; align-items: center; gap: var(--space-3); margin-bottom: var(--space-4); }
.ejh-hero__meta-info { display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; }
.ejh-hero__author { color: #fff; font-weight: var(--fw-semibold); font-size: var(--text-sm); }
.ejh-hero__meta-sep { color: rgba(255,255,255,0.4); }
.ejh-hero__body .ejh-post-date,
.ejh-hero__body .ejh-reading-time { color: rgba(255,255,255,0.7); font-size: var(--text-sm); }

/* Slider Controls */
.ejh-hero__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 48px;
  height: 48px;
  background: rgba(255,255,255,0.1);
  color: #fff;
  font-size: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255,255,255,0.2);
  transition: background var(--transition-fast), transform var(--transition-fast);
}
.ejh-hero__nav:hover { background: rgba(255,255,255,0.25); }
.ejh-hero__nav--prev { left: var(--space-6); }
.ejh-hero__nav--next { right: var(--space-6); }
.ejh-hero__dots {
  position: absolute;
  bottom: var(--space-6);
  right: var(--space-8);
  display: flex;
  gap: var(--space-2);
  z-index: 10;
}
.ejh-hero__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  border: none;
  cursor: pointer;
  transition: background var(--transition-fast), transform var(--transition-fast);
}
.ejh-hero__dot.is-active { background: #fff; transform: scale(1.3); }

/* 9. Sections
   ─────────────────────────────────────────────────────────── */
.ejh-section { padding: var(--space-16) 0; }
.ejh-section__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-8);
  flex-wrap: wrap;
}
.ejh-section__header--center { flex-direction: column; text-align: center; }
.ejh-section__title {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-2xl);
  font-weight: var(--fw-extrabold);
  position: relative;
}
.ejh-section__title::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 40px;
  height: 3px;
  background: var(--gradient-primary);
  border-radius: var(--radius-full);
}
.ejh-section__header--center .ejh-section__title::after { left: 50%; transform: translateX(-50%); }
.ejh-section__title-icon { font-size: 1.4em; }
.ejh-section__subtitle { color: var(--color-text-secondary); margin-top: var(--space-3); }
.ejh-section__more { font-size: var(--text-sm); font-weight: var(--fw-semibold); color: var(--color-primary); display: flex; align-items: center; gap: 4px; white-space: nowrap; }
.ejh-section__more:hover { gap: var(--space-2); }

/* 10. Post Cards
    ─────────────────────────────────────────────────────────── */
.ejh-posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-6);
}

.ejh-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform var(--transition-base), box-shadow var(--transition-base);
  display: flex;
  flex-direction: column;
}
.ejh-card:hover { transform: translateY(-4px); box-shadow: var(--color-card-shadow-hover); }

.ejh-card__thumb-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16/9;
  background: var(--color-bg-tertiary);
}
.ejh-card__thumb-link { display: block; width: 100%; height: 100%; }
.ejh-card__thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}
.ejh-card:hover .ejh-card__thumb { transform: scale(1.05); }
.ejh-card__thumb--placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ejh-card__thumb-icon { font-size: 3rem; opacity: 0.5; }

.ejh-card__body {
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: var(--space-3);
}
.ejh-card__title {
  font-size: var(--text-lg);
  font-weight: var(--fw-bold);
  line-height: var(--lh-snug);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ejh-card__title a { color: var(--color-heading); }
.ejh-card__title a:hover { color: var(--color-primary); }
.ejh-card__excerpt {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: var(--lh-relaxed);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}
.ejh-card__footer {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-top: auto;
  padding-top: var(--space-3);
  border-top: 1px solid var(--color-border);
}
.ejh-card__meta { flex: 1; min-width: 0; }
.ejh-card__author { font-size: var(--text-sm); font-weight: var(--fw-semibold); color: var(--color-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.ejh-card__author:hover { color: var(--color-primary); }
.ejh-card__meta-row {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  flex-wrap: wrap;
}
.ejh-card__sep { color: var(--color-border); }

/* Bookmark Button on Card */
.ejh-bookmark-btn {
  position: absolute;
  top: var(--space-3);
  right: var(--space-3);
  width: 32px;
  height: 32px;
  background: rgba(0,0,0,0.5);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  opacity: 0;
  transition: opacity var(--transition-fast), background var(--transition-fast);
  backdrop-filter: blur(4px);
}
.ejh-card__thumb-wrap:hover .ejh-bookmark-btn,
.ejh-bookmark-btn.is-bookmarked { opacity: 1; }
.ejh-bookmark-btn:hover { background: rgba(0,0,0,0.75); }

/* Trending Grid */
.ejh-trending { background: var(--color-bg-secondary); }
.ejh-trending__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-5);
}
.ejh-trending__rank {
  position: absolute;
  bottom: var(--space-3);
  left: var(--space-3);
  font-size: var(--text-4xl);
  font-weight: var(--fw-extrabold);
  color: rgba(255,255,255,0.15);
  line-height: 1;
  pointer-events: none;
  z-index: 2;
}

/* Cat Badge */
.ejh-cat-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  font-size: var(--text-xs);
  font-weight: var(--fw-semibold);
  border-radius: var(--radius-full);
  background: var(--cat-color, var(--color-primary));
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  transition: opacity var(--transition-fast), transform var(--transition-fast);
}
.ejh-cat-badge:hover { opacity: 0.85; transform: translateY(-1px); color: #fff; }
.ejh-cat-badge--hero { font-size: 0.8rem; }
.ejh-cat-badge--card {
  position: absolute;
  top: var(--space-3);
  left: var(--space-3);
  z-index: 3;
}
.ejh-cat-badge--xs { font-size: 10px; padding: 2px 7px; }

/* Category Filter Tabs */
.ejh-cat-tabs { display: flex; gap: var(--space-2); flex-wrap: wrap; }
.ejh-cat-tab {
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-sm);
  font-weight: var(--fw-medium);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  color: var(--color-text-secondary);
  background: transparent;
  transition: all var(--transition-fast);
}
.ejh-cat-tab:hover { border-color: var(--cat-color, var(--color-primary)); color: var(--cat-color, var(--color-primary)); }
.ejh-cat-tab--active { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }

/* Load More */
.ejh-load-more-wrap { display: flex; justify-content: center; padding: var(--space-10) 0; }
.ejh-spinner { width: 16px; height: 16px; border: 2px solid rgba(255,255,255,0.3); border-top-color: #fff; border-radius: 50%; animation: spin 0.6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* 11. Categories Section
    ─────────────────────────────────────────────────────────── */
.ejh-categories-section { background: var(--color-bg); }
.ejh-categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: var(--space-4);
  margin-top: var(--space-8);
}

.ejh-cat-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4/3;
  display: flex;
  align-items: flex-end;
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}
.ejh-cat-card:hover { transform: translateY(-4px) scale(1.02); box-shadow: var(--color-card-shadow-hover); }
.ejh-cat-card__bg { position: absolute; inset: 0; background-size: cover; background-position: center; transition: transform var(--transition-slow); }
.ejh-cat-card:hover .ejh-cat-card__bg { transform: scale(1.1); }
.ejh-cat-card__overlay { position: absolute; inset: 0; background: var(--gradient-overlay); }
.ejh-cat-card__content { position: relative; z-index: 2; padding: var(--space-4); }
.ejh-cat-card__icon { display: block; font-size: 1.5rem; margin-bottom: var(--space-1); }
.ejh-cat-card__name { color: #fff; font-weight: var(--fw-bold); font-size: var(--text-base); line-height: var(--lh-tight); display: block; }
.ejh-cat-card__count { color: rgba(255,255,255,0.7); font-size: var(--text-xs); margin-top: 2px; display: block; }

/* 12. Featured Author
    ─────────────────────────────────────────────────────────── */
.ejh-featured-author {
  background: var(--gradient-primary);
  color: #fff;
}
.ejh-featured-author__inner {
  display: flex;
  align-items: center;
  gap: var(--space-10);
  padding: var(--space-8) 0;
}
.ejh-featured-author__avatar { position: relative; }
.ejh-featured-author__img { width: 120px; height: 120px; border-radius: 50%; border: 4px solid rgba(255,255,255,0.3); object-fit: cover; }
.ejh-featured-author__label { font-size: var(--text-xs); text-transform: uppercase; letter-spacing: 0.1em; opacity: 0.8; display: block; }
.ejh-featured-author__name { font-size: var(--text-3xl); font-weight: var(--fw-extrabold); color: #fff; margin: var(--space-2) 0; }
.ejh-featured-author__bio { color: rgba(255,255,255,0.85); line-height: var(--lh-relaxed); margin-bottom: var(--space-6); max-width: 500px; }
.ejh-featured-author .ejh-btn--primary { background: rgba(255,255,255,0.2); border: 2px solid rgba(255,255,255,0.5); }
.ejh-featured-author .ejh-btn--primary:hover { background: rgba(255,255,255,0.35); }

/* 13. Sidebar
    ─────────────────────────────────────────────────────────── */
.ejh-sidebar { position: sticky; top: calc(var(--header-height) + 20px); }
.ejh-sidebar__inner { display: flex; flex-direction: column; gap: var(--space-6); }

.widget { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: var(--space-5); }
.widget-title {
  font-size: var(--text-base);
  font-weight: var(--fw-bold);
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: 2px solid var(--color-border);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.widget-title span {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Widget: Recent Posts */
.ejh-widget-posts { display: flex; flex-direction: column; gap: var(--space-4); }
.ejh-widget-post-item { display: flex; gap: var(--space-3); align-items: flex-start; }
.ejh-widget-thumb { width: 70px; height: 50px; flex-shrink: 0; border-radius: var(--radius-sm); overflow: hidden; }
.ejh-widget-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--transition-fast); }
.ejh-widget-thumb:hover img { transform: scale(1.05); }
.ejh-widget-post-info { flex: 1; min-width: 0; }
.ejh-widget-post-title { font-size: var(--text-sm); font-weight: var(--fw-semibold); color: var(--color-heading); line-height: var(--lh-snug); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; display: block; }
.ejh-widget-post-title:hover { color: var(--color-primary); }
.ejh-widget-post-date { font-size: var(--text-xs); color: var(--color-text-muted); display: block; margin-top: 4px; }

/* Widget: Popular */
.ejh-widget-popular { display: flex; flex-direction: column; gap: var(--space-3); counter-reset: popular-counter; }
.ejh-widget-popular-item { display: flex; align-items: center; gap: var(--space-3); }
.ejh-popular-num { font-size: var(--text-2xl); font-weight: var(--fw-extrabold); color: var(--color-border); line-height: 1; min-width: 36px; }
.ejh-popular-info { flex: 1; }
.ejh-popular-info a { font-size: var(--text-sm); font-weight: var(--fw-semibold); color: var(--color-heading); line-height: var(--lh-snug); display: block; }
.ejh-popular-info a:hover { color: var(--color-primary); }
.ejh-popular-views { font-size: var(--text-xs); color: var(--color-text-muted); }

/* Widget: Categories */
.ejh-widget-categories { display: flex; flex-direction: column; gap: var(--space-2); }
.ejh-widget-categories li a {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  color: var(--color-text);
  transition: background var(--transition-fast);
  border-left: 3px solid var(--cat-color, var(--color-primary));
}
.ejh-widget-categories li a:hover { background: var(--color-bg-secondary); color: var(--cat-color, var(--color-primary)); }
.cat-icon { font-size: 1rem; }
.cat-name { flex: 1; }
.cat-count {
  font-size: var(--text-xs);
  background: var(--color-bg-tertiary);
  border-radius: var(--radius-full);
  padding: 1px 8px;
  color: var(--color-text-secondary);
}

/* Tag Cloud */
.ejh-tag-cloud { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.ejh-tag {
  display: inline-flex;
  padding: var(--space-1) var(--space-3);
  background: var(--color-bg-secondary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
  transition: all var(--transition-fast);
}
.ejh-tag:hover { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }

/* Newsletter Widget */
.ejh-newsletter-widget p { font-size: var(--text-sm); color: var(--color-text-secondary); margin-bottom: var(--space-4); }
.ejh-subscribe-form .ejh-subscribe-email {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg-secondary);
  color: var(--color-text);
  font-size: var(--text-sm);
  margin-bottom: var(--space-3);
  transition: border-color var(--transition-fast);
}
.ejh-subscribe-form .ejh-subscribe-email:focus { border-color: var(--color-primary); outline: none; }
.ejh-subscribe-form .ejh-btn { width: 100%; }

/* Social Icons Widget */
.ejh-social-icons { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.ejh-social-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--color-bg-secondary);
  border: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-sm);
  font-weight: var(--fw-bold);
  color: var(--color-text-secondary);
  transition: all var(--transition-fast);
}
.ejh-social-icon:hover { background: var(--color-primary); border-color: var(--color-primary); color: #fff; transform: translateY(-2px); }

/* 14. Search Form
    ─────────────────────────────────────────────────────────── */
.ejh-search-form__inner {
  position: relative;
  display: flex;
}
.ejh-search-form__input {
  flex: 1;
  padding: var(--space-3) var(--space-4);
  padding-right: 48px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg-secondary);
  color: var(--color-text);
  font-size: var(--text-sm);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.ejh-search-form__input:focus { border-color: var(--color-primary); box-shadow: 0 0 0 3px rgba(108,99,255,0.15); outline: none; }
.ejh-search-form__submit {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  transition: color var(--transition-fast);
  padding: 0;
}
.ejh-search-form__submit:hover { color: var(--color-primary); }

/* 15. Article Content
    ─────────────────────────────────────────────────────────── */
.ejh-article { background: var(--color-surface); border-radius: var(--radius-xl); border: 1px solid var(--color-border); padding: var(--space-10); }
.ejh-article__header { margin-bottom: var(--space-8); }
.ejh-article__cats { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-bottom: var(--space-4); }
.ejh-article__title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: var(--fw-extrabold);
  line-height: var(--lh-tight);
  letter-spacing: -0.03em;
  margin-bottom: var(--space-4);
}
.ejh-article__subtitle { font-size: var(--text-xl); color: var(--color-text-secondary); line-height: var(--lh-relaxed); margin-bottom: var(--space-6); border-left: 4px solid var(--color-primary); padding-left: var(--space-5); }
.ejh-article__meta {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4) 0;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  flex-wrap: wrap;
}
.ejh-article__meta-info { flex: 1; }
.ejh-article__meta-top { display: flex; align-items: center; gap: var(--space-2); }
.ejh-article__author-name { font-weight: var(--fw-bold); color: var(--color-heading); font-size: var(--text-base); }
.ejh-article__meta-bottom { display: flex; align-items: center; gap: var(--space-2); font-size: var(--text-sm); color: var(--color-text-secondary); flex-wrap: wrap; margin-top: 4px; }
.ejh-article__meta-sep { color: var(--color-border); }
.ejh-article__actions { display: flex; align-items: center; gap: var(--space-3); }
.ejh-article__featured-img { border-radius: var(--radius-lg); overflow: hidden; margin: var(--space-6) 0; }
.ejh-article__featured-img img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.ejh-article__featured-img figcaption { font-size: var(--text-sm); color: var(--color-text-secondary); text-align: center; padding: var(--space-3) var(--space-4); background: var(--color-bg-secondary); border-radius: 0 0 var(--radius-lg) var(--radius-lg); }

/* Like Button */
.ejh-like-btn {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  transition: all var(--transition-fast);
}
.ejh-like-btn:hover, .ejh-like-btn.is-liked { border-color: var(--color-secondary); color: var(--color-secondary); background: rgba(255,101,132,0.08); }
.ejh-share-trigger { font-size: 18px; color: var(--color-text-secondary); padding: var(--space-2); border-radius: var(--radius-sm); transition: color var(--transition-fast), background var(--transition-fast); }
.ejh-share-trigger:hover { background: var(--color-bg-secondary); color: var(--color-primary); }

/* Article Body */
.ejh-article__body { font-size: var(--text-lg); line-height: var(--lh-relaxed); color: var(--color-text); }
.ejh-article__body h2 { font-size: var(--text-2xl); margin: var(--space-10) 0 var(--space-4); padding-top: var(--space-4); border-top: 1px solid var(--color-border); }
.ejh-article__body h3 { font-size: var(--text-xl); margin: var(--space-8) 0 var(--space-3); }
.ejh-article__body h4 { font-size: var(--text-lg); margin: var(--space-6) 0 var(--space-3); }
.ejh-article__body img { border-radius: var(--radius-md); margin: var(--space-6) 0; }
.ejh-article__body ul, .ejh-article__body ol { padding-left: var(--space-6); margin-bottom: var(--space-6); }
.ejh-article__body ul { list-style: disc; }
.ejh-article__body ol { list-style: decimal; }
.ejh-article__body li { margin-bottom: var(--space-2); }
.ejh-article__body a { color: var(--color-primary); text-decoration: underline; text-underline-offset: 3px; }
.ejh-article__body table { width: 100%; border-collapse: collapse; margin: var(--space-6) 0; }
.ejh-article__body th, .ejh-article__body td { padding: var(--space-3) var(--space-4); border: 1px solid var(--color-border); }
.ejh-article__body th { background: var(--color-bg-secondary); font-weight: var(--fw-semibold); }

/* In-Content Ad (after 2nd paragraph via JS) */
.ejh-ad--in-content { text-align: center; margin: var(--space-8) 0; }

/* TOC */
.ejh-toc {
  background: var(--color-bg-secondary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  margin: var(--space-8) 0;
  overflow: hidden;
}
.ejh-toc__header {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-5);
  background: var(--color-bg-tertiary);
  border-bottom: 1px solid var(--color-border);
  font-weight: var(--fw-bold);
  font-size: var(--text-sm);
}
.ejh-toc__toggle {
  margin-left: auto;
  width: 24px;
  height: 24px;
  border-radius: var(--radius-sm);
  background: var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-lg);
  line-height: 1;
  color: var(--color-text-secondary);
  transition: background var(--transition-fast);
}
.ejh-toc__toggle:hover { background: var(--color-primary); color: #fff; }
.ejh-toc__list { padding: var(--space-4) var(--space-5); counter-reset: toc; }
.ejh-toc__list li { margin-bottom: var(--space-2); padding-left: var(--space-4); }
.ejh-toc__list a { font-size: var(--text-sm); color: var(--color-text-secondary); text-decoration: none; display: flex; align-items: center; gap: var(--space-2); transition: color var(--transition-fast); }
.ejh-toc__list a:hover { color: var(--color-primary); }
.ejh-toc__list.is-collapsed { display: none; }

/* Tags & Share */
.ejh-article__tags { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; padding: var(--space-6) 0; border-top: 1px solid var(--color-border); margin-top: var(--space-8); }
.ejh-article__tags-label { font-weight: var(--fw-semibold); font-size: var(--text-sm); color: var(--color-text-secondary); }

.ejh-article__share-bar { padding: var(--space-6) 0; border-top: 1px solid var(--color-border); display: flex; align-items: center; gap: var(--space-4); flex-wrap: wrap; }
.ejh-article__share-label { font-size: var(--text-sm); font-weight: var(--fw-semibold); color: var(--color-text-secondary); }
.ejh-share-btns { display: flex; gap: var(--space-2); flex-wrap: wrap; }
.ejh-share-btn {
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: var(--fw-semibold);
  border: 1px solid var(--color-border);
  color: var(--color-text-secondary);
  background: var(--color-surface);
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
}
.ejh-share-btn:hover { border-color: var(--color-primary); color: var(--color-primary); }
.ejh-share-twitter:hover { border-color: #1da1f2; color: #1da1f2; }
.ejh-share-facebook:hover { border-color: #1877f2; color: #1877f2; }
.ejh-share-linkedin:hover { border-color: #0a66c2; color: #0a66c2; }

/* Author Box */
.ejh-author-box {
  display: flex;
  gap: var(--space-6);
  background: var(--color-bg-secondary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  margin-top: var(--space-10);
  position: relative;
}
.ejh-author-box::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: var(--gradient-primary); border-radius: var(--radius-xl) var(--radius-xl) 0 0; }
.ejh-author-box__avatar { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; flex-shrink: 0; border: 3px solid var(--color-primary); }
.ejh-author-box__info { flex: 1; }
.ejh-author-box__label { font-size: var(--text-xs); text-transform: uppercase; letter-spacing: 0.1em; color: var(--color-text-muted); display: block; margin-bottom: var(--space-1); }
.ejh-author-box__name { font-size: var(--text-xl); font-weight: var(--fw-bold); color: var(--color-heading); display: block; margin-bottom: var(--space-2); }
.ejh-author-box__name:hover { color: var(--color-primary); }
.ejh-author-box__bio { color: var(--color-text-secondary); font-size: var(--text-sm); line-height: var(--lh-relaxed); margin-bottom: var(--space-4); }
.ejh-author-box__posts-count { font-size: var(--text-xs); color: var(--color-text-muted); margin-bottom: var(--space-3); }

/* Related Posts */
.ejh-related-posts { margin-top: var(--space-10); padding-top: var(--space-8); border-top: 1px solid var(--color-border); }
.ejh-related-posts__title { font-size: var(--text-2xl); font-weight: var(--fw-extrabold); margin-bottom: var(--space-6); }
.ejh-related-posts__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: var(--space-4); }
.ejh-related-post-card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); overflow: hidden; transition: transform var(--transition-base), box-shadow var(--transition-base); }
.ejh-related-post-card:hover { transform: translateY(-3px); box-shadow: var(--color-card-shadow-hover); }
.ejh-related-post-card__link { display: block; }
.ejh-related-post-card__img { width: 100%; aspect-ratio: 16/9; object-fit: cover; transition: transform var(--transition-slow); }
.ejh-related-post-card:hover .ejh-related-post-card__img { transform: scale(1.05); }
.ejh-related-post-card__img--ph { background: var(--gradient-primary); }
.ejh-related-post-card__body { padding: var(--space-4); }
.ejh-related-post-card__body h4 { font-size: var(--text-sm); font-weight: var(--fw-bold); line-height: var(--lh-snug); margin: var(--space-2) 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ejh-related-post-card__body h4 a { color: var(--color-heading); }
.ejh-related-post-card__body h4 a:hover { color: var(--color-primary); }
.ejh-related-post-card__date { font-size: var(--text-xs); color: var(--color-text-muted); }

/* Post Nav */
.ejh-post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
  margin-top: var(--space-10);
  padding-top: var(--space-6);
  border-top: 1px solid var(--color-border);
}
.ejh-post-nav__link {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4);
  background: var(--color-bg-secondary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  transition: all var(--transition-base);
}
.ejh-post-nav__link:hover { background: var(--color-primary); border-color: var(--color-primary); }
.ejh-post-nav__link:hover .ejh-post-nav__label, .ejh-post-nav__link:hover .ejh-post-nav__title { color: #fff; }
.ejh-post-nav__link--next { justify-content: flex-end; text-align: right; }
.ejh-post-nav__arrow { font-size: 1.5rem; color: var(--color-primary); transition: color var(--transition-fast); flex-shrink: 0; }
.ejh-post-nav__link:hover .ejh-post-nav__arrow { color: #fff; }
.ejh-post-nav__label { font-size: var(--text-xs); text-transform: uppercase; letter-spacing: 0.08em; color: var(--color-text-muted); display: block; }
.ejh-post-nav__title { font-size: var(--text-sm); font-weight: var(--fw-semibold); color: var(--color-heading); display: block; margin-top: 2px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Floating Share (desktop) */
.ejh-floating-share {
  position: fixed;
  left: max(20px, calc((100vw - var(--container-max)) / 2 - 70px));
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  z-index: var(--z-raised);
  opacity: 0;
  transition: opacity var(--transition-base);
}
.ejh-floating-share.is-visible { opacity: 1; }
.ejh-floating-share__label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--color-text-muted); writing-mode: vertical-rl; margin-bottom: var(--space-2); }
.ejh-floating-share__btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-sm);
  font-weight: var(--fw-bold);
  color: var(--color-text-secondary);
  transition: all var(--transition-fast);
  box-shadow: var(--color-card-shadow);
}
.ejh-floating-share__btn:hover { background: var(--color-primary); border-color: var(--color-primary); color: #fff; transform: scale(1.1); }

/* Reading Progress */
.ejh-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 0;
  height: 3px;
  background: var(--gradient-primary);
  z-index: calc(var(--z-sticky) + 1);
  transition: width 0.1s linear;
}

/* 16. Single Layout
    ─────────────────────────────────────────────────────────── */
.ejh-single .ejh-container { padding-top: var(--space-6); padding-bottom: var(--space-16); }
.ejh-single__layout {
  display: grid;
  grid-template-columns: 1fr var(--sidebar-width);
  gap: var(--space-10);
  align-items: start;
  margin-top: var(--space-6);
}
.ejh-single__layout--full { grid-template-columns: 1fr; max-width: var(--container-content); margin: var(--space-6) auto 0; }
.ejh-single .ejh-sidebar { top: calc(var(--header-height) + 30px); }

/* 17. Comments
    ─────────────────────────────────────────────────────────── */
.ejh-comments-wrap { margin-top: var(--space-10); padding-top: var(--space-8); border-top: 1px solid var(--color-border); }
.ejh-comments { }
.ejh-comments__title { font-size: var(--text-2xl); font-weight: var(--fw-extrabold); margin-bottom: var(--space-8); }
.ejh-comment-list { display: flex; flex-direction: column; gap: var(--space-6); }
.ejh-comment { }
.ejh-comment__inner { display: flex; gap: var(--space-4); }
.ejh-comment__avatar { flex-shrink: 0; }
.ejh-comment__avatar .ejh-avatar { border-radius: 50%; }
.ejh-comment__body { flex: 1; background: var(--color-bg-secondary); border-radius: var(--radius-lg); padding: var(--space-4) var(--space-5); }
.ejh-comment__header { display: flex; align-items: center; gap: var(--space-3); margin-bottom: var(--space-3); flex-wrap: wrap; }
.ejh-comment__author { font-weight: var(--fw-semibold); font-size: var(--text-sm); color: var(--color-heading); }
.ejh-comment__time { font-size: var(--text-xs); color: var(--color-text-muted); }
.ejh-comment__reply { margin-left: auto; font-size: var(--text-xs); color: var(--color-primary); font-weight: var(--fw-semibold); }
.ejh-comment__text { font-size: var(--text-sm); line-height: var(--lh-relaxed); }
.ejh-comment__pending { font-style: italic; color: var(--color-text-muted); font-size: var(--text-sm); }

/* Comment form */
.comment-respond { margin-top: var(--space-10); }
.comment-respond h3 { font-size: var(--text-2xl); margin-bottom: var(--space-6); }
.ejh-comment-fields { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: var(--space-4); }
.comment-form p { margin-bottom: var(--space-4); }
.comment-form label { display: block; font-size: var(--text-sm); font-weight: var(--fw-semibold); margin-bottom: var(--space-2); color: var(--color-text-secondary); }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg-secondary);
  color: var(--color-text);
  font-size: var(--text-sm);
  transition: border-color var(--transition-fast);
}
.comment-form input:focus, .comment-form textarea:focus { border-color: var(--color-primary); outline: none; box-shadow: 0 0 0 3px rgba(108,99,255,0.15); }
.comment-form textarea { resize: vertical; min-height: 120px; }

/* 18. Archive/Index Headers
    ─────────────────────────────────────────────────────────── */
.ejh-main.ejh-page,
.ejh-main.ejh-archive { padding-top: var(--space-8); padding-bottom: var(--space-16); }
.ejh-archive__header { margin-bottom: var(--space-8); }
.ejh-archive__title { font-size: var(--text-3xl); font-weight: var(--fw-extrabold); margin-bottom: var(--space-3); }
.ejh-archive__desc { color: var(--color-text-secondary); font-size: var(--text-lg); }
.ejh-archive__count { font-size: var(--text-sm); color: var(--color-text-muted); }
.ejh-no-results { text-align: center; padding: var(--space-16) 0; }
.ejh-no-results__icon { font-size: 4rem; margin-bottom: var(--space-4); }
.ejh-no-results h2 { margin-bottom: var(--space-3); }
.ejh-no-results p { color: var(--color-text-secondary); margin-bottom: var(--space-6); }
.ejh-no-results .ejh-search-form { max-width: 400px; margin: var(--space-6) auto; }

/* Pagination */
.ejh-pagination { display: flex; justify-content: center; gap: var(--space-2); margin-top: var(--space-10); flex-wrap: wrap; }
.nav-links { display: flex; gap: var(--space-2); align-items: center; flex-wrap: wrap; justify-content: center; }
.page-numbers {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 var(--space-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  transition: all var(--transition-fast);
}
.page-numbers:hover, .page-numbers.current { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }
.page-numbers.dots { border: none; }

/* 19. 404 Page
    ─────────────────────────────────────────────────────────── */
.ejh-404__inner { text-align: center; padding: var(--space-20) 0; }
.ejh-404__animation { display: flex; align-items: center; justify-content: center; gap: var(--space-4); margin-bottom: var(--space-6); }
.ejh-404__number { font-size: clamp(4rem, 15vw, 8rem); font-weight: var(--fw-extrabold); background: var(--gradient-primary); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; line-height: 1; }
.ejh-404__icon { font-size: clamp(3rem, 10vw, 6rem); animation: float 3s ease-in-out infinite; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-20px); } }
.ejh-404__title { font-size: var(--text-3xl); margin-bottom: var(--space-4); }
.ejh-404__text { color: var(--color-text-secondary); font-size: var(--text-lg); max-width: 500px; margin: 0 auto var(--space-8); }
.ejh-404__actions { display: flex; justify-content: center; gap: var(--space-4); flex-wrap: wrap; margin-bottom: var(--space-8); }
.ejh-404__search { max-width: 400px; margin: 0 auto var(--space-10); }
.ejh-404__popular h3 { margin-bottom: var(--space-6); }

/* 20. Search Page
    ─────────────────────────────────────────────────────────── */
.ejh-search-header { padding: var(--space-8) 0; border-bottom: 1px solid var(--color-border); margin-bottom: var(--space-8); }
.ejh-search-header h1 { font-size: var(--text-3xl); margin-bottom: var(--space-3); }
.ejh-search-header p { color: var(--color-text-secondary); margin-bottom: var(--space-6); }
.ejh-search-header .ejh-search-form { max-width: 500px; }

/* 21. Author Page
    ─────────────────────────────────────────────────────────── */
.ejh-author-hero {
  display: flex;
  align-items: center;
  gap: var(--space-8);
  padding: var(--space-10) 0;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: var(--space-8);
}
.ejh-author-hero__avatar { border-radius: 50%; border: 4px solid var(--color-primary); }
.ejh-author-hero__name { font-size: var(--text-4xl); font-weight: var(--fw-extrabold); margin-bottom: var(--space-3); }
.ejh-author-hero__bio { color: var(--color-text-secondary); line-height: var(--lh-relaxed); margin-bottom: var(--space-4); }
.ejh-author-hero__meta { font-size: var(--text-sm); color: var(--color-text-muted); }

/* 22. Footer
    ─────────────────────────────────────────────────────────── */
.ejh-footer { background: var(--color-bg-secondary); border-top: 1px solid var(--color-border); }

/* Newsletter Band */
.ejh-footer__newsletter {
  background: var(--gradient-hero);
  padding: var(--space-16) 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.ejh-newsletter-band {
  display: flex;
  align-items: center;
  gap: var(--space-10);
  flex-wrap: wrap;
}
.ejh-newsletter-band__text { flex: 1; min-width: 250px; }
.ejh-newsletter-band__text h2 { color: #fff; font-size: var(--text-3xl); margin-bottom: var(--space-3); }
.ejh-newsletter-band__text p { color: rgba(255,255,255,0.7); font-size: var(--text-lg); margin: 0; }
.ejh-subscribe-form--band { flex: 1; min-width: 300px; max-width: 500px; }
.ejh-subscribe-form__group { display: flex; gap: var(--space-3); }
.ejh-subscribe-form--band .ejh-subscribe-email {
  flex: 1;
  padding: var(--space-4) var(--space-5);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--radius-full);
  background: rgba(255,255,255,0.1);
  color: #fff;
  font-size: var(--text-sm);
  backdrop-filter: blur(4px);
}
.ejh-subscribe-form--band .ejh-subscribe-email::placeholder { color: rgba(255,255,255,0.5); }
.ejh-subscribe-form--band .ejh-subscribe-email:focus { border-color: rgba(255,255,255,0.5); outline: none; }
.ejh-subscribe-form__note { color: rgba(255,255,255,0.5); font-size: var(--text-xs); margin-top: var(--space-3); }

/* Widget area */
.ejh-footer__widgets { padding: var(--space-16) 0; }
.ejh-footer__grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: var(--space-10); }
.ejh-footer__brand { }
.ejh-logo-text--footer .ejh-logo-text__main { font-size: var(--text-2xl); }
.ejh-footer__about { color: var(--color-text-secondary); font-size: var(--text-sm); line-height: var(--lh-relaxed); margin: var(--space-4) 0 var(--space-5); max-width: 280px; }
.ejh-footer__social { display: flex; gap: var(--space-2); flex-wrap: wrap; }
.ejh-footer__social-link {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--color-bg-tertiary);
  border: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-sm);
  font-weight: var(--fw-bold);
  color: var(--color-text-secondary);
  transition: all var(--transition-fast);
}
.ejh-footer__social-link:hover { background: var(--color-primary); border-color: var(--color-primary); color: #fff; transform: translateY(-2px); }

.ejh-footer__col-title {
  font-size: var(--text-sm);
  font-weight: var(--fw-bold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-heading);
  margin-bottom: var(--space-5);
  padding-bottom: var(--space-3);
  border-bottom: 2px solid var(--color-border);
}
.ejh-footer__links { display: flex; flex-direction: column; gap: var(--space-2); }
.ejh-footer__links li a, .ejh-footer__links a {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  transition: color var(--transition-fast), padding-left var(--transition-fast);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.ejh-footer__links li a:hover, .ejh-footer__links a:hover { color: var(--color-primary); padding-left: 4px; }
.ejh-footer__links li a span, .ejh-footer__links a span { font-size: var(--text-xs); color: var(--color-text-muted); }

.ejh-footer__recent-posts { display: flex; flex-direction: column; gap: var(--space-4); }
.ejh-footer__recent-posts li a { font-size: var(--text-sm); color: var(--color-text-secondary); display: block; line-height: var(--lh-snug); margin-bottom: 2px; font-weight: var(--fw-medium); }
.ejh-footer__recent-posts li a:hover { color: var(--color-primary); }
.ejh-footer__recent-posts li span { font-size: var(--text-xs); color: var(--color-text-muted); }

/* Footer Bottom */
.ejh-footer__bottom {
  background: var(--color-bg-tertiary);
  border-top: 1px solid var(--color-border);
  padding: var(--space-5) 0;
}
.ejh-footer__bottom-inner { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); flex-wrap: wrap; }
.ejh-footer__copyright, .ejh-footer__credit { font-size: var(--text-xs); color: var(--color-text-muted); margin: 0; }
.ejh-footer__bottom-nav { display: flex; gap: var(--space-4); }
.ejh-footer__bottom-nav a { font-size: var(--text-xs); color: var(--color-text-muted); }
.ejh-footer__bottom-nav a:hover { color: var(--color-primary); }

/* 23. Breadcrumbs
    ─────────────────────────────────────────────────────────── */
.ejh-breadcrumbs {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  padding: var(--space-4) 0;
  flex-wrap: wrap;
}
.ejh-breadcrumbs a { color: var(--color-text-secondary); }
.ejh-breadcrumbs a:hover { color: var(--color-primary); }
.breadcrumb-sep { color: var(--color-border); }
.ejh-breadcrumbs span[aria-current] { color: var(--color-text-secondary); }

/* 24. Misc
    ─────────────────────────────────────────────────────────── */
.ejh-avatar { border-radius: 50%; object-fit: cover; }
.ejh-post-date, .ejh-reading-time { font-size: var(--text-sm); color: var(--color-text-secondary); }

/* Avatar links */
.ejh-author-link { display: inline-flex; flex-shrink: 0; }

/* Back to Top */
.ejh-back-top {
  position: fixed;
  bottom: var(--space-8);
  right: var(--space-8);
  width: 44px;
  height: 44px;
  background: var(--color-primary);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  box-shadow: 0 4px 16px rgba(108,99,255,0.4);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity var(--transition-base), transform var(--transition-base);
  z-index: var(--z-raised);
}
.ejh-back-top.is-visible { opacity: 1; transform: translateY(0); }
.ejh-back-top:hover { background: var(--color-primary-dark); transform: translateY(-2px); }

/* Toast */
.ejh-toast {
  position: fixed;
  bottom: var(--space-8);
  left: 50%;
  transform: translateX(-50%) translateY(30px);
  background: var(--color-dark);
  color: #fff;
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: var(--fw-medium);
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
  opacity: 0;
  transition: all var(--transition-base);
  z-index: var(--z-toast);
  white-space: nowrap;
  pointer-events: none;
}
.ejh-toast.is-visible { opacity: 1; transform: translateX(-50%) translateY(0); }
.ejh-toast.is-success { background: var(--color-accent); }
.ejh-toast.is-error { background: var(--color-secondary); }

/* Ad Zones */
.ejh-ad { text-align: center; }
.ejh-ad--header { margin: var(--space-6) 0; }
.ejh-widget--ad { padding: 0; overflow: hidden; }

/* Page article */
.ejh-page-article { max-width: var(--container-content); }
.ejh-page-header { margin-bottom: var(--space-8); }
.ejh-page-title { font-size: var(--text-4xl); font-weight: var(--fw-extrabold); }
.ejh-page-thumb { border-radius: var(--radius-lg); overflow: hidden; margin-bottom: var(--space-8); }

/* 25. Animations
    ─────────────────────────────────────────────────────────── */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }

.ejh-card, .ejh-cat-card, .ejh-related-post-card {
  animation: fadeInUp 0.4s ease both;
}
.ejh-card:nth-child(1) { animation-delay: 0.05s; }
.ejh-card:nth-child(2) { animation-delay: 0.1s; }
.ejh-card:nth-child(3) { animation-delay: 0.15s; }
.ejh-card:nth-child(4) { animation-delay: 0.2s; }
.ejh-card:nth-child(5) { animation-delay: 0.25s; }
.ejh-card:nth-child(6) { animation-delay: 0.3s; }

/* 26. Responsive
    ─────────────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .ejh-footer__grid { grid-template-columns: 1fr 1fr; gap: var(--space-8); }
  .ejh-floating-share { display: none; }
}

@media (max-width: 900px) {
  .ejh-nav { display: none; }
  .ejh-mobile-toggle { display: flex; }
  .ejh-content-layout,
  .ejh-single__layout { grid-template-columns: 1fr; }
  .ejh-sidebar { position: static; }
  .ejh-hero { height: min(70vh, 520px); }
  .ejh-hero__content { padding-bottom: var(--space-10); }
  .ejh-categories-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  .ejh-newsletter-band { flex-direction: column; }
  .ejh-newsletter-band__text { text-align: center; }
  .ejh-subscribe-form--band { width: 100%; }
  .ejh-featured-author__inner { flex-direction: column; text-align: center; }
  .ejh-author-box { flex-direction: column; }
  .ejh-post-nav { grid-template-columns: 1fr; }
  .ejh-related-posts__grid { grid-template-columns: 1fr 1fr; }
  .ejh-comment-fields { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  :root { --header-height: 60px; }
  .ejh-container { padding: 0 var(--space-4); }
  .ejh-topbar { display: none; }
  .ejh-hero { height: min(60vh, 400px); }
  .ejh-hero__body { padding: 0 var(--space-4); }
  .ejh-hero__title { font-size: 1.4rem; }
  .ejh-hero__excerpt { display: none; }
  .ejh-hero__nav { display: none; }
  .ejh-posts-grid { grid-template-columns: 1fr; }
  .ejh-trending__grid { grid-template-columns: 1fr; }
  .ejh-article { padding: var(--space-5); }
  .ejh-footer__grid { grid-template-columns: 1fr; gap: var(--space-6); }
  .ejh-footer__bottom-inner { flex-direction: column; text-align: center; }
  .ejh-related-posts__grid { grid-template-columns: 1fr; }
  .ejh-subscribe-form__group { flex-direction: column; }
  .ejh-author-hero { flex-direction: column; text-align: center; }
  .ejh-cat-tabs { gap: var(--space-2); }
  .ejh-section__header { flex-direction: column; align-items: flex-start; }
}

/* 27. ACF / Badge Styles
    ─────────────────────────────────────────────────────────── */

/* Post Badge on Card */
.ejh-card__badge {
  position: absolute;
  top: var(--space-3);
  right: var(--space-3);
  z-index: 4;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 10px;
  font-weight: var(--fw-bold);
  background: var(--color-dark);
  color: #fff;
  backdrop-filter: blur(4px);
}
.ejh-card__badge--hot, .ejh-card__badge--trending { background: var(--color-secondary); }
.ejh-card__badge--featured { background: var(--gradient-primary); }
.ejh-card__badge--new { background: var(--color-accent); }
.ejh-card__badge--exclusive { background: var(--color-primary); }
.ejh-card__sponsored {
  position: absolute;
  bottom: var(--space-3);
  left: var(--space-3);
  z-index: 4;
  padding: 2px 8px;
  background: rgba(0,0,0,0.6);
  color: rgba(255,255,255,0.8);
  font-size: 10px;
  border-radius: var(--radius-sm);
  backdrop-filter: blur(4px);
}

/* Article badge (single) */
.ejh-article__badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: var(--fw-bold);
  background: var(--color-primary);
  color: #fff;
  margin-bottom: var(--space-3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.ejh-article__badge--hot, .ejh-article__badge--trending { background: var(--color-secondary); }
.ejh-article__badge--featured { background: var(--gradient-primary); }
.ejh-article__badge--new { background: var(--color-accent); }
.ejh-article__sponsored { display: inline-flex; align-items: center; padding: 4px 12px; border-radius: var(--radius-full); font-size: var(--text-xs); font-weight: var(--fw-bold); background: var(--color-bg-tertiary); color: var(--color-text-muted); margin-left: var(--space-2); border: 1px solid var(--color-border); }

/* Author box extra fields */
.ejh-author-box__title { font-size: var(--text-sm); color: var(--color-text-secondary); font-weight: var(--fw-medium); display: block; margin-bottom: var(--space-2); }
.ejh-author-box__expertise { display: flex; flex-wrap: wrap; gap: var(--space-2); margin: var(--space-3) 0; }
.ejh-author-box__links { display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap; margin-top: var(--space-4); }
.ejh-author-box__social-link { font-size: var(--text-sm); font-weight: var(--fw-semibold); color: var(--color-primary); padding: var(--space-2) var(--space-3); border: 1px solid var(--color-border); border-radius: var(--radius-full); transition: all var(--transition-fast); }
.ejh-author-box__social-link:hover { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }

/* Breaking Banner (ACF options) */
.ejh-breaking-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--color-primary);
  color: #fff;
  font-size: var(--text-sm);
  font-weight: var(--fw-medium);
  text-align: center;
}
.ejh-breaking-banner a { color: inherit; text-decoration: underline; text-underline-offset: 2px; font-weight: var(--fw-bold); }
.ejh-breaking-banner a:hover { opacity: 0.85; }
.ejh-breaking-banner__close { margin-left: auto; opacity: 0.7; padding: 2px 6px; border-radius: var(--radius-sm); transition: opacity var(--transition-fast); }
.ejh-breaking-banner__close:hover { opacity: 1; background: rgba(255,255,255,0.2); }

/* 28. Print
    ─────────────────────────────────────────────────────────── */
@media print {
  .ejh-header, .ejh-footer, .ejh-sidebar, .ejh-hero__nav, .ejh-back-top,
  .ejh-floating-share, .ejh-progress-bar, .ejh-share-btns, .ejh-related-posts,
  .ejh-post-nav, .comment-respond, .ejh-topbar { display: none !important; }
  .ejh-single__layout { grid-template-columns: 1fr; }
  .ejh-article { border: none; padding: 0; box-shadow: none; }
  body { font-size: 12pt; line-height: 1.5; }
  a { color: inherit; text-decoration: none; }
  h1, h2, h3 { page-break-after: avoid; }
  img { max-width: 100%; page-break-inside: avoid; }
}

/* ═══════════════════════════════════════════════════════════
   PATCH: Design Polish, Newsletter Fix, Textures, Mobile Nav
   ═══════════════════════════════════════════════════════════ */

/* ── Newsletter Band — Full Fix ──────────────────────────── */
.ejh-footer__newsletter {
  background: linear-gradient(135deg, #0d0d1a 0%, #1a1a3e 40%, #0d1a2e 100%);
  position: relative;
  overflow: hidden;
}
.ejh-footer__newsletter::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 20% 50%, rgba(108,99,255,0.15) 0%, transparent 60%),
                    radial-gradient(circle at 80% 50%, rgba(67,198,172,0.1) 0%, transparent 60%);
  pointer-events: none;
}
.ejh-newsletter-band {
  position: relative;
  z-index: 1;
  gap: var(--space-12);
}
/* Fix: stop input from collapsing */
.ejh-subscribe-form--band .ejh-subscribe-form__group {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius-full);
  padding: var(--space-2) var(--space-2) var(--space-2) var(--space-5);
  backdrop-filter: blur(8px);
}
.ejh-subscribe-form--band .ejh-subscribe-email {
  flex: 1;
  min-width: 0;
  width: auto !important;
  padding: var(--space-3) 0;
  border: none !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: #fff;
  font-size: var(--text-base);
  outline: none;
  box-shadow: none !important;
}
.ejh-subscribe-form--band .ejh-subscribe-email::placeholder {
  color: rgba(255,255,255,0.45);
}
.ejh-subscribe-form--band .ejh-btn {
  flex-shrink: 0;
  white-space: nowrap;
  border-radius: var(--radius-full) !important;
  padding: var(--space-3) var(--space-7);
  font-size: var(--text-sm);
  font-weight: var(--fw-bold);
  background: var(--gradient-primary);
  color: #fff;
  border: none;
  transition: opacity var(--transition-fast), transform var(--transition-fast);
}
.ejh-subscribe-form--band .ejh-btn:hover {
  opacity: 0.9;
  transform: scale(1.02);
  box-shadow: 0 6px 20px rgba(108,99,255,0.4);
}
.ejh-subscribe-form__note {
  color: rgba(255,255,255,0.4);
  font-size: var(--text-xs);
  margin-top: var(--space-3);
  text-align: center;
}

/* ── Textures & Noise ────────────────────────────────────── */
/* Subtle grain texture on body */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: var(--z-toast);
  opacity: 0.4;
}
[data-theme="dark"] body::after { opacity: 0.25; }

/* Dot pattern on hero */
.ejh-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.06) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
  z-index: 1;
}
.ejh-hero__content { z-index: 2; }
.ejh-hero__slide-bg { z-index: 0; }
.ejh-hero__nav, .ejh-hero__dots { z-index: 3; }

/* Grid lines on sections */
.ejh-categories-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(108,99,255,0.04) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(108,99,255,0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}
.ejh-categories-section { position: relative; overflow: hidden; }

/* ── Trending Section Refresh ────────────────────────────── */
.ejh-trending {
  background: var(--color-bg-secondary);
  position: relative;
  overflow: hidden;
}
.ejh-trending::before {
  content: '';
  position: absolute;
  top: -80px;
  right: -80px;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(108,99,255,0.08) 0%, transparent 70%);
  pointer-events: none;
}
[data-theme="dark"] .ejh-trending { background: #0f0f1e; }

/* ── Card Glassmorphism Hover ─────────────────────────────── */
[data-theme="dark"] .ejh-card {
  background: rgba(19,19,31,0.8);
  border-color: rgba(255,255,255,0.06);
  backdrop-filter: blur(8px);
}
[data-theme="dark"] .ejh-card:hover {
  border-color: rgba(108,99,255,0.3);
  box-shadow: 0 8px 40px rgba(108,99,255,0.15);
}

/* ── Widget Refresh ──────────────────────────────────────── */
.widget {
  border-radius: var(--radius-lg);
  box-shadow: var(--color-card-shadow);
  transition: box-shadow var(--transition-base);
}
.widget:hover { box-shadow: var(--color-card-shadow-hover); }
[data-theme="dark"] .widget {
  background: #13131f;
  border-color: rgba(255,255,255,0.06);
}

/* ── Sidebar Search — single clean one ───────────────────── */
.widget_search { display: none !important; }  /* hide WP default search widget */
.wp-block-search { display: none !important; } /* hide block search widget */

/* ── Header Glass Effect on Scroll ───────────────────────── */
.ejh-header--sticky {
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
[data-theme="dark"] .ejh-header {
  background: rgba(13,13,26,0.9);
  border-bottom-color: rgba(255,255,255,0.06);
}
[data-theme="dark"] .ejh-header.is-scrolled {
  background: rgba(13,13,26,0.97);
  box-shadow: 0 4px 30px rgba(0,0,0,0.5);
}

/* ── Logo Gradient ───────────────────────────────────────── */
.ejh-logo-text__main {
  font-size: var(--text-xl);
  font-weight: 900;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.04em;
}

/* ── Section Title Pill ───────────────────────────────────── */
.ejh-section__title {
  background: var(--color-bg);
  border: none;
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
}
.ejh-section__title::after {
  display: none; /* replaced by pill border below title-icon */
}
.ejh-section__title-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--gradient-primary);
  font-size: 1rem;
}

/* ── Hero Slide Title Enhancement ────────────────────────── */
.ejh-hero__title {
  font-weight: 900;
  letter-spacing: -0.04em;
  text-shadow: 0 2px 20px rgba(0,0,0,0.4);
}

/* ── Trending Rank Overlay ────────────────────────────────── */
.ejh-trending__rank {
  font-size: 5rem;
  color: rgba(255,255,255,0.08);
  font-weight: 900;
}

/* ── Category Card Enhancement ────────────────────────────── */
.ejh-cat-card {
  min-height: 140px;
}
.ejh-cat-card__name {
  font-weight: 800;
  font-size: var(--text-base);
  text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}
.ejh-cat-card__overlay {
  background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.2) 60%, transparent 100%);
}

/* ── Button Micro-interactions ────────────────────────────── */
.ejh-btn {
  position: relative;
  overflow: hidden;
}
.ejh-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(255,255,255,0.1), transparent);
  opacity: 0;
  transition: opacity var(--transition-fast);
}
.ejh-btn:hover::after { opacity: 1; }

/* ── Dark Mode Toggle Pill ────────────────────────────────── */
.ejh-theme-toggle {
  position: relative;
  width: 52px !important;
  height: 28px !important;
  background: var(--color-bg-tertiary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  padding: 2px;
  cursor: pointer;
  transition: background var(--transition-base);
  overflow: visible;
}
.ejh-theme-toggle::before {
  content: '';
  position: absolute;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--color-primary);
  left: 3px;
  transition: transform var(--transition-base), background var(--transition-base);
  box-shadow: 0 2px 6px rgba(108,99,255,0.4);
}
[data-theme="dark"] .ejh-theme-toggle::before {
  transform: translateX(24px);
  background: var(--color-accent);
}
[data-theme="dark"] .ejh-theme-toggle { background: rgba(255,255,255,0.08); }
.ejh-theme-toggle__icon { position: absolute; font-size: 11px; pointer-events: none; transition: opacity var(--transition-base); }
.ejh-theme-toggle__sun { right: 6px; opacity: 1; }
.ejh-theme-toggle__moon { left: 6px; opacity: 0; }
[data-theme="dark"] .ejh-theme-toggle__sun { opacity: 0; }
[data-theme="dark"] .ejh-theme-toggle__moon { opacity: 1; }

/* ── Dark Mode: Footer ────────────────────────────────────── */
[data-theme="dark"] .ejh-footer { background: #0a0a14; border-top-color: rgba(255,255,255,0.05); }
[data-theme="dark"] .ejh-footer__widgets { background: #0a0a14; }
[data-theme="dark"] .ejh-footer__bottom { background: #060610; border-top-color: rgba(255,255,255,0.04); }

/* ── Dark Mode: Sidebar ───────────────────────────────────── */
[data-theme="dark"] .ejh-sidebar .widget-title span { background: var(--gradient-primary); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
[data-theme="dark"] .ejh-tag { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.08); color: var(--color-text-secondary); }
[data-theme="dark"] .ejh-tag:hover { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }

/* ── Dark Mode: Article ───────────────────────────────────── */
[data-theme="dark"] .ejh-article {
  background: rgba(19,19,31,0.9);
  border-color: rgba(255,255,255,0.06);
}
[data-theme="dark"] .ejh-author-box {
  background: rgba(26,26,46,0.8);
  border-color: rgba(255,255,255,0.06);
}

/* ── Dark Mode: Comments ──────────────────────────────────── */
[data-theme="dark"] .ejh-comment__body { background: rgba(26,26,46,0.8); }
[data-theme="dark"] .comment-form input,
[data-theme="dark"] .comment-form textarea {
  background: rgba(26,26,46,0.8);
  border-color: rgba(255,255,255,0.08);
  color: var(--color-text);
}

/* ── Dark Mode: Hero Body text ────────────────────────────── */
[data-theme="dark"] .ejh-hero__body { /* stays same - hero is always dark bg */ }

/* ═══════════════════════════════════════════════════════════
   MOBILE BOTTOM NAVIGATION BAR
   ═══════════════════════════════════════════════════════════ */
.ejh-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  z-index: calc(var(--z-sticky) + 10);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 0 env(safe-area-inset-right, 0) env(safe-area-inset-bottom, 0) env(safe-area-inset-left, 0);
}
[data-theme="dark"] .ejh-bottom-nav {
  background: rgba(13,13,26,0.95);
  border-top-color: rgba(255,255,255,0.06);
}

.ejh-bottom-nav__inner {
  display: flex;
  align-items: stretch;
  height: 60px;
  justify-content: space-around;
}

.ejh-bottom-nav__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  gap: 3px;
  padding: 8px 4px;
  color: var(--color-text-muted);
  font-size: 10px;
  font-weight: var(--fw-medium);
  letter-spacing: 0.02em;
  border: none;
  background: none;
  cursor: pointer;
  transition: color var(--transition-fast), transform var(--transition-fast);
  -webkit-tap-highlight-color: transparent;
  text-decoration: none;
  position: relative;
}
.ejh-bottom-nav__item:active { transform: scale(0.9); }
.ejh-bottom-nav__item.is-active {
  color: var(--color-primary);
}
.ejh-bottom-nav__item.is-active .ejh-bottom-nav__icon {
  background: rgba(108,99,255,0.12);
  transform: translateY(-2px);
}
[data-theme="dark"] .ejh-bottom-nav__item.is-active .ejh-bottom-nav__icon {
  background: rgba(108,99,255,0.2);
}

.ejh-bottom-nav__icon {
  width: 36px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-size: 18px;
  transition: background var(--transition-fast), transform var(--transition-fast);
}
.ejh-bottom-nav__label { font-size: 10px; line-height: 1; }

/* Notification dot */
.ejh-bottom-nav__dot {
  position: absolute;
  top: 6px;
  right: calc(50% - 20px);
  width: 7px;
  height: 7px;
  background: var(--color-secondary);
  border-radius: 50%;
  border: 2px solid var(--color-surface);
}

/* Push page content up so it's not hidden behind bottom nav on mobile */
@media (max-width: 900px) {
  .ejh-bottom-nav { display: flex; }
  body { padding-bottom: 60px; }
  .ejh-back-top { bottom: calc(var(--space-8) + 60px); }
  .ejh-toast { bottom: calc(var(--space-8) + 60px); }
}

/* ─── Search Overlay: centered properly ──────────────────── */
.ejh-search-overlay {
  padding-top: 80px;
  align-items: flex-start;
}
.ejh-search-overlay__inner {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
}
.ejh-search-overlay .ejh-search-form { width: 100%; }
.ejh-search-overlay .ejh-search-form__inner { border-radius: var(--radius-xl); overflow: hidden; }
.ejh-search-overlay .ejh-search-form__input {
  font-size: var(--text-2xl);
  padding: var(--space-5) var(--space-6);
  padding-right: 60px;
  height: 72px;
  border-radius: var(--radius-xl);
}
.ejh-search-overlay .ejh-search-form__submit {
  width: 56px;
  color: rgba(255,255,255,0.6);
}
.ejh-search-overlay .ejh-search-form__submit svg { width: 22px; height: 22px; }

/* ─── Topbar dark improvement ────────────────────────────── */
.ejh-topbar {
  background: linear-gradient(90deg, #080814 0%, #0d0d1a 100%);
  border-bottom: 1px solid rgba(108,99,255,0.15);
}
.ejh-topbar__date { font-size: 11px; color: rgba(255,255,255,0.4); }

/* ─── Post cards grid gap ────────────────────────────────── */
.ejh-posts-grid { gap: var(--space-5); }

/* ─── Footer social link hover colours ───────────────────── */
.ejh-social-twitter:hover,  .ejh-footer__social-link.ejh-social-twitter:hover  { background: #1da1f2; border-color: #1da1f2; }
.ejh-social-facebook:hover, .ejh-footer__social-link.ejh-social-facebook:hover { background: #1877f2; border-color: #1877f2; }
.ejh-social-instagram:hover,.ejh-footer__social-link.ejh-social-instagram:hover{ background: linear-gradient(45deg,#f09433,#e6683c,#dc2743,#cc2366,#bc1888); border-color: #dc2743; color:#fff; }
.ejh-social-youtube:hover,  .ejh-footer__social-link.ejh-social-youtube:hover  { background: #ff0000; border-color: #ff0000; }
.ejh-social-linkedin:hover, .ejh-footer__social-link.ejh-social-linkedin:hover { background: #0a66c2; border-color: #0a66c2; }
.ejh-social-github:hover,   .ejh-footer__social-link.ejh-social-github:hover   { background: #24292e; border-color: #24292e; }

/* ─── Mobile: hide side sidebar, show bottom nav ─────────── */
@media (max-width: 900px) {
  /* Don't show floating share on mobile */
  .ejh-floating-share { display: none !important; }
}

