/*
Theme Name: Elitist Source Hub
Author: Elitist Source
Description: Full-width matte dark editorial gaming & culture hub theme inspired by classic Giant Bomb. Features 1-col/2-col/compact icon switcher, expanded ES Premium gold grid with right-anchored Supporters panel, Reviews, Retro, Topics shelves, and 16-post in-hub AJAX firehose & dark lightbox.
Version: 12.0
*/

:root {
  color-scheme: dark;
  --es-bg: #0c0d10;
  --es-stage: #07080a;
  --es-surface: #14161c;
  --es-surface-2: #1a1d25;
  --es-surface-hover: #1f232d;
  --es-border: #252934;
  --es-border-bright: #3b4154;
  --es-text: #e8eaef;
  --es-text-muted: #949ba8;
  --es-text-dim: #687080;
  --es-accent: #d91e36;
  --es-accent-hover: #b8142a;

  /* ES Premium Gold Palette */
  --es-gold: #eab308;
  --es-gold-bright: #facc15;
  --es-gold-bg: #1c1708;
  --es-gold-surface: #241d0a;
  --es-gold-surface-hover: #2e250d;
  --es-gold-border: #6b5312;
  --es-gold-border-bright: #ca9a14;

  /* Category Accent Colors */
  --cat-hry: #d91e36;
  --cat-filmy: #2563eb;
  --cat-hudba: #9333ea;
  --cat-hardware: #d97706;
  --cat-retro: #0d9488;
  --cat-recenzie: #16a34a;
  --cat-temy: #6366f1;

  --es-font-display: 'Barlow Condensed', 'Oswald', sans-serif;
  --es-font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --es-font-mono: 'JetBrains Mono', monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--es-bg);
  color: var(--es-text);
  font-family: var(--es-font-body);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

/* Full-width responsive hub wrapper */
.es-wrap {
  width: 100%;
  max-width: 1640px;
  margin: 0 auto;
  padding: 0 28px;
}

/* Extra-wide wrapper for ES Premium band so Supporters sits pushed toward the right edge */
.es-wrap--wide {
  max-width: 2160px;
  padding: 0 32px;
}

/* =========================================================
   1. HEADER & DROPDOWN NAVIGATION
   ========================================================= */
.es-header {
  background: var(--es-surface);
  border-bottom: 2px solid var(--es-accent);
  position: sticky;
  top: 0;
  z-index: 200;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.45);
}

.es-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 64px;
}

.es-logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.es-logo img {
  max-height: 44px;
  width: auto;
  filter: drop-shadow(0 0 2px rgba(255, 255, 255, 0.35));
}

.es-logo-text {
  font-family: var(--es-font-display);
  font-size: 28px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #fff;
}

.es-nav-wrap {
  display: flex;
  align-items: center;
  gap: 16px;
}

.es-nav {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 4px;
}

.es-nav > li { position: relative; }

.es-nav > li > a {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 20px 12px;
  font-family: var(--es-font-display);
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--es-text);
  transition: color 0.15s ease, background-color 0.15s ease;
  white-space: nowrap;
}

.es-nav > li > a:hover,
.es-nav > li.current-menu-item > a,
.es-nav > li.current-menu-ancestor > a {
  color: #fff;
  background: rgba(255, 255, 255, 0.04);
}

.es-nav > li.menu-item-has-children > a::after {
  content: "▾";
  font-size: 11px;
  color: var(--es-text-muted);
  transition: transform 0.15s ease, color 0.15s ease;
}

.es-nav > li.menu-item-has-children:hover > a::after {
  color: var(--es-accent);
  transform: rotate(180deg);
}

.es-nav > li > a[href*="premium"],
.es-nav > li.es-premium-item > a {
  background: var(--es-gold);
  color: #0c0d10 !important;
  padding: 7px 14px;
  margin-left: 6px;
  border-radius: 2px;
  font-weight: 800;
}

.es-nav > li > a[href*="premium"]:hover,
.es-nav > li.es-premium-item > a:hover {
  background: var(--es-gold-bright);
}

.es-nav .sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 195px;
  background: var(--es-surface-2);
  border: 1px solid var(--es-border-bright);
  border-top: 2px solid var(--es-accent);
  list-style: none;
  padding: 6px 0;
  z-index: 300;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.65);
}

.es-nav li:hover > .sub-menu,
.es-nav li:focus-within > .sub-menu {
  display: block;
}

.es-nav .sub-menu li { position: relative; list-style: none; }

.es-nav .sub-menu a {
  display: block;
  padding: 9px 16px;
  font-family: var(--es-font-display);
  font-size: 15px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--es-text-muted);
  transition: background 0.12s ease, color 0.12s ease, padding-left 0.12s ease;
}

.es-nav .sub-menu a:hover {
  background: var(--es-surface-hover);
  color: #fff;
  padding-left: 20px;
}

.es-nav .sub-menu .sub-menu {
  top: -2px;
  left: 100%;
}

.es-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.es-icon-btn {
  background: var(--es-surface-2);
  border: 1px solid var(--es-border);
  color: var(--es-text);
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 2px;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.es-icon-btn:hover {
  border-color: var(--es-accent);
  color: var(--es-accent);
}

.es-mobile-toggle { display: none; }

.es-search-bar {
  display: none;
  background: var(--es-stage);
  border-bottom: 1px solid var(--es-border);
  padding: 12px 0;
}

.es-search-bar.is-open { display: block; }

.es-search-form {
  display: flex;
  gap: 8px;
  max-width: 720px;
  margin: 0 auto;
}

.es-search-form input[type="search"] {
  flex: 1;
  background: var(--es-surface);
  border: 1px solid var(--es-border-bright);
  color: var(--es-text);
  padding: 10px 14px;
  font-family: var(--es-font-body);
  font-size: 14px;
  border-radius: 2px;
}

.es-search-form input[type="search"]:focus {
  outline: none;
  border-color: var(--es-accent);
}

.es-search-form button {
  background: var(--es-accent);
  color: #fff;
  border: none;
  padding: 0 20px;
  font-family: var(--es-font-display);
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  cursor: pointer;
  border-radius: 2px;
}

.es-search-form button:hover { background: var(--es-accent-hover); }

/* =========================================================
   2. CATEGORY BADGES
   ========================================================= */
.es-badge {
  display: inline-block;
  background: var(--es-accent);
  color: #fff;
  font-family: var(--es-font-mono);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 2px 7px;
  border-radius: 2px;
  line-height: 1.4;
}

.es-badge--hry      { background: var(--cat-hry); }
.es-badge--filmy    { background: var(--cat-filmy); }
.es-badge--hudba    { background: var(--cat-hudba); }
.es-badge--hardware { background: var(--cat-hardware); }
.es-badge--retro    { background: var(--cat-retro); }
.es-badge--recenzie { background: var(--cat-recenzie); }
.es-badge--temy     { background: var(--cat-temy); }
.es-badge--premium  {
  background: var(--es-gold);
  color: #0c0d10;
  font-weight: 800;
}

/* =========================================================
   3. FULL-WIDTH PROMO STAGE
   ========================================================= */
.es-promo-stage {
  background: var(--es-stage);
  border-bottom: 1px solid var(--es-border);
  padding: 22px 0 26px;
}

.es-promo-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 12px;
}

.es-promo-side {
  display: grid;
  grid-template-rows: repeat(3, 1fr);
  gap: 12px;
}

.es-promo-card {
  position: relative;
  background: var(--es-surface);
  border: 1px solid var(--es-border);
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  min-height: 148px;
}

.es-promo-lead { min-height: 468px; }

.es-promo-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.62;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.es-promo-card:hover img {
  transform: scale(1.03);
  opacity: 0.78;
}

.es-promo-card:hover { border-color: var(--es-border-bright); }

.es-promo-card.es-is-premium {
  border-color: var(--es-gold-border-bright);
  box-shadow: inset 0 0 0 1px rgba(234, 179, 8, 0.35);
}

.es-promo-overlay {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 16px 18px;
  background: linear-gradient(to top, rgba(7, 8, 10, 0.96) 15%, rgba(7, 8, 10, 0.55) 65%, transparent 100%);
}

.es-promo-lead .es-promo-overlay { padding: 24px 28px; }

.es-promo-title {
  font-family: var(--es-font-display);
  font-size: 21px;
  font-weight: 700;
  text-transform: uppercase;
  line-height: 1.08;
  margin-top: 6px;
  color: #fff;
}

.es-promo-lead .es-promo-title { font-size: 38px; }

.es-promo-excerpt {
  font-size: 14px;
  color: #c5cad6;
  margin-top: 8px;
  max-width: 680px;
}

.es-promo-meta {
  font-family: var(--es-font-mono);
  font-size: 11px;
  color: var(--es-text-muted);
  text-transform: uppercase;
  margin-top: 8px;
}

/* =========================================================
   4. FULL-WIDTH EDITORIAL SHELVES (Recenzie, ES Premium, Retro, Témy)
   ========================================================= */
.es-shelf {
  background: #101217;
  border-bottom: 1px solid var(--es-border);
  padding: 26px 0 30px;
}

.es-shelf--alt { background: var(--es-bg); }

/* Gold ES PREMIUM Band */
.es-shelf--premium {
  background: linear-gradient(180deg, #1b1607 0%, #141005 100%);
  border-top: 2px solid var(--es-gold);
  border-bottom: 2px solid var(--es-gold-border);
}

.es-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  border-bottom: 2px solid var(--es-border);
  padding-bottom: 8px;
  margin-bottom: 18px;
  position: relative;
}

.es-section-head::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 72px;
  height: 2px;
  background: var(--es-accent);
}

.es-section-head--reviews::after { background: var(--cat-recenzie); }
.es-section-head--retro::after   { background: var(--cat-retro); }
.es-section-head--temy::after    { background: var(--cat-temy); }
.es-section-head--premium { border-bottom-color: var(--es-gold-border); }
.es-section-head--premium::after { background: var(--es-gold); }

.es-section-title {
  font-family: var(--es-font-display);
  font-size: 24px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #fff;
}

.es-section-head--premium .es-section-title { color: var(--es-gold-bright); }

.es-section-link {
  font-family: var(--es-font-mono);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--es-text-muted);
  letter-spacing: 0.05em;
  transition: color 0.15s ease;
}

.es-section-link:hover { color: var(--es-accent); }

.es-section-head--premium .es-section-link { color: var(--es-gold); }
.es-section-head--premium .es-section-link:hover { color: #fff; }

.es-head-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--es-surface-2);
  border: 1px solid var(--es-border-bright);
  color: var(--es-text);
  font-family: var(--es-font-mono);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 2px;
  transition: all 0.15s ease;
}

.es-head-btn:hover {
  background: var(--es-accent);
  border-color: var(--es-accent);
  color: #fff;
}

.es-shelf-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

/* ES PREMIUM Wide Band: 4-col (up to 8 posts) grid + Supporters anchored far right */
.es-premium-band-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 295px;
  gap: 28px;
  align-items: start;
}

.es-premium-band-grid--full {
  grid-template-columns: 1fr;
}

.es-premium-cards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.es-shelf-card {
  background: var(--es-surface);
  border: 1px solid var(--es-border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: border-color 0.15s ease, transform 0.15s ease, background-color 0.15s ease;
}

.es-shelf-card:hover {
  border-color: var(--es-border-bright);
  transform: translateY(-2px);
}

/* Gold card styling for ES Premium articles */
.es-shelf-card--gold,
.es-shelf-card.es-is-premium {
  background: linear-gradient(180deg, #2a2109 0%, #1d1706 100%);
  border: 1px solid var(--es-gold-border);
}

.es-shelf-card--gold:hover,
.es-shelf-card.es-is-premium:hover {
  background: linear-gradient(180deg, #35290b 0%, #241c08 100%);
  border-color: var(--es-gold-bright);
}

.es-shelf-card--gold .es-shelf-title,
.es-shelf-card.es-is-premium .es-shelf-title {
  color: #fef3c7;
}

.es-shelf-card--gold:hover .es-shelf-title,
.es-shelf-card.es-is-premium:hover .es-shelf-title {
  color: var(--es-gold-bright);
}

.es-shelf-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #0a0b0e;
  overflow: hidden;
}

.es-shelf-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.25s ease;
}

.es-shelf-card:hover .es-shelf-thumb img { transform: scale(1.04); }

.es-shelf-thumb .es-badge {
  position: absolute;
  bottom: 8px;
  left: 8px;
}

.es-shelf-body {
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex: 1;
  gap: 8px;
}

.es-shelf-title {
  font-family: var(--es-font-display);
  font-size: 18px;
  font-weight: 700;
  text-transform: uppercase;
  line-height: 1.15;
  color: var(--es-text);
}

.es-shelf-card:hover .es-shelf-title { color: var(--es-accent); }

/* Supporters Box (ONLY rendered inside ES Premium section & ES Premium archives/pages) */
.es-supporters-panel {
  position: sticky;
  top: 84px;
}

.es-supporters-panel .es-sidebar-box {
  background: linear-gradient(180deg, #271f09 0%, #1a1506 100%);
  border: 1px solid var(--es-gold-border);
  border-top: 3px solid var(--es-gold);
  margin-bottom: 16px;
}

.es-supporters-panel .es-sidebar-box:last-child { margin-bottom: 0; }

.es-supporters-panel .es-section-title {
  color: var(--es-gold-bright);
  border-bottom-color: var(--es-gold-border);
}

.es-supporters-panel p,
.es-supporters-panel li {
  color: #f3e8c8;
  border-bottom-color: rgba(234, 179, 8, 0.18);
}

/* =========================================================
   5. CATEGORY QUICK-FILTER BAR + ICON LAYOUT SWITCHER
   ========================================================= */
.es-cat-bar {
  background: var(--es-surface);
  border-bottom: 1px solid var(--es-border);
}

.es-cat-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  overflow-x: auto;
  padding: 11px 0;
}

.es-cat-pills {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
}

.es-cat-pills a {
  display: inline-block;
  padding: 5px 12px;
  background: var(--es-bg);
  border: 1px solid var(--es-border);
  font-family: var(--es-font-mono);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--es-text-muted);
  border-radius: 2px;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.es-cat-pills a:hover,
.es-cat-pills a.is-active {
  background: var(--es-accent);
  border-color: var(--es-accent);
  color: #fff;
}

/* Icon-based Layout Switcher (1-col / 2-col / Compact) */
.es-layout-switcher {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  background: var(--es-bg);
  border: 1px solid var(--es-border);
  padding: 3px;
  border-radius: 2px;
}

.es-layout-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--es-text-muted);
  width: 32px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 2px;
  transition: all 0.15s ease;
}

.es-layout-btn:hover {
  color: #fff;
  background: var(--es-surface-2);
}

.es-layout-btn.is-active {
  background: var(--es-accent);
  border-color: var(--es-accent);
  color: #fff;
}

/* =========================================================
   6. FULL-WIDTH CHRONOLOGICAL FIREHOSE (15 Articles / Page)
      Modes: .is-two-col (2 columns), default (1 column), .is-compact
   ========================================================= */
.es-hub-full { padding: 30px 0 46px; }

.es-hub-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 28px;
  padding: 30px 0 48px;
}

.es-hub-layout--full { grid-template-columns: 1fr; }

.es-feed-list {
  position: relative;
  transition: opacity 0.18s ease;
}

.es-feed-list.is-loading {
  opacity: 0.45;
  pointer-events: none;
}

.es-feed-item {
  display: flex;
  background: var(--es-surface);
  border: 1px solid var(--es-border);
  margin-bottom: 12px;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.es-feed-item:hover {
  background: var(--es-surface-hover);
  border-color: var(--es-border-bright);
}

/* Gold highlight when an ES Premium article appears in Nový obsah */
.es-feed-item.es-is-premium {
  background: linear-gradient(90deg, #271f09 0%, #1b1607 100%);
  border-color: var(--es-gold-border);
}

.es-feed-item.es-is-premium:hover {
  background: linear-gradient(90deg, #32270b 0%, #241c09 100%);
  border-color: var(--es-gold-bright);
}

.es-feed-item.es-is-premium .es-feed-title { color: #fef3c7; }
.es-feed-item.es-is-premium:hover .es-feed-title { color: var(--es-gold-bright); }

.es-feed-thumb {
  flex: 0 0 260px;
  background: #0a0b0e;
  overflow: hidden;
}

.es-feed-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.25s ease;
}

.es-feed-item:hover .es-feed-thumb img { transform: scale(1.03); }

.es-feed-body {
  padding: 16px 22px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  min-width: 0;
  flex: 1;
}

.es-feed-top {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.es-feed-title {
  font-family: var(--es-font-display);
  font-size: 24px;
  font-weight: 700;
  text-transform: uppercase;
  line-height: 1.12;
  color: #fff;
}

.es-feed-item:hover .es-feed-title { color: var(--es-accent); }

.es-feed-excerpt {
  font-size: 14px;
  color: var(--es-text-muted);
  line-height: 1.5;
}

.es-meta {
  font-family: var(--es-font-mono);
  font-size: 11px;
  color: var(--es-text-dim);
  text-transform: uppercase;
}

/* 2-Column Mode (2 articles side-by-side) */
.es-feed-list.is-two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.es-feed-list.is-two-col .es-feed-item {
  margin-bottom: 0;
  height: 100%;
}

.es-feed-list.is-two-col .es-feed-thumb {
  flex: 0 0 210px;
}

.es-feed-list.is-two-col .es-feed-body {
  padding: 14px 16px;
  gap: 5px;
}

.es-feed-list.is-two-col .es-feed-title {
  font-size: 21px;
}

.es-feed-list.is-two-col .es-feed-excerpt {
  font-size: 13px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Compact Mode */
.es-feed-list.is-compact .es-feed-item { margin-bottom: 6px; }
.es-feed-list.is-compact .es-feed-thumb { flex: 0 0 135px; height: 82px; }
.es-feed-list.is-compact .es-feed-body { padding: 8px 16px; gap: 3px; }
.es-feed-list.is-compact .es-feed-title { font-size: 19px; }
.es-feed-list.is-compact .es-feed-excerpt { display: none; }

/* In-Hub AJAX Pagination Bar */
.es-pagination {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.es-pagination .page-numbers,
.es-ajax-page-btn {
  padding: 9px 15px;
  background: var(--es-surface);
  border: 1px solid var(--es-border);
  color: var(--es-text);
  font-family: var(--es-font-mono);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  border-radius: 2px;
  transition: all 0.15s ease;
}

.es-pagination .current,
.es-pagination a:hover,
.es-ajax-page-btn.is-current,
.es-ajax-page-btn:hover:not(:disabled) {
  background: var(--es-accent);
  border-color: var(--es-accent);
  color: #fff;
}

.es-ajax-page-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.es-page-indicator {
  margin-left: auto;
  font-family: var(--es-font-mono);
  font-size: 11px;
  color: var(--es-text-muted);
  text-transform: uppercase;
}

/* =========================================================
   7. 3-COLUMN PORTAL MATRIX (Hry / Filmy / Hudba)
   ========================================================= */
.es-matrix-band {
  background: var(--es-stage);
  border-top: 1px solid var(--es-border);
  border-bottom: 1px solid var(--es-border);
  padding: 34px 0 40px;
}

.es-matrix-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.es-matrix-col {
  background: var(--es-surface);
  border: 1px solid var(--es-border);
  padding: 18px;
}

.es-matrix-list { list-style: none; }

.es-matrix-item {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--es-border);
  align-items: center;
}

.es-matrix-item:first-child { padding-top: 0; }
.es-matrix-item:last-child { border-bottom: none; padding-bottom: 0; }

.es-matrix-thumb {
  flex: 0 0 78px;
  height: 54px;
  background: #0a0b0e;
  overflow: hidden;
  border: 1px solid var(--es-border);
}

.es-matrix-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.es-matrix-title {
  font-family: var(--es-font-display);
  font-size: 17px;
  font-weight: 700;
  text-transform: uppercase;
  line-height: 1.15;
  display: block;
}

.es-matrix-item a:hover .es-matrix-title { color: var(--es-accent); }

/* =========================================================
   8. SIDEBAR BOXES
   ========================================================= */
.es-sidebar-box {
  background: var(--es-surface);
  border: 1px solid var(--es-border);
  border-top: 3px solid var(--es-accent);
  padding: 16px 18px;
  margin-bottom: 20px;
  overflow: hidden;
}

.es-sidebar-box .es-section-title {
  font-size: 19px;
  border-bottom: 1px solid var(--es-border);
  padding-bottom: 8px;
  margin-bottom: 12px;
}

.es-sidebar-box ul { list-style: none; }

.es-sidebar-box li {
  padding: 8px 0;
  border-bottom: 1px solid var(--es-border);
  font-size: 14px;
}

.es-sidebar-box li:last-child { border-bottom: none; }
.es-sidebar-box a:hover { color: var(--es-accent); }
.es-sidebar-box iframe { max-width: 100% !important; }

/* =========================================================
   9. ARCHIVE BANNER, SINGLE ARTICLE & COMMENTS
   ========================================================= */
.es-archive-banner {
  background: var(--es-stage);
  border-bottom: 1px solid var(--es-border);
  padding: 26px 0;
}

.es-archive-banner--premium {
  background: linear-gradient(180deg, #1f1907 0%, #120f04 100%);
  border-bottom: 2px solid var(--es-gold);
}

.es-archive-banner--premium h1 { color: var(--es-gold-bright); }

.es-archive-banner h1 {
  font-family: var(--es-font-display);
  font-size: 36px;
  text-transform: uppercase;
  color: #fff;
}

.es-archive-desc {
  color: var(--es-text-muted);
  margin-top: 6px;
  max-width: 760px;
}

.es-article {
  background: var(--es-surface);
  border: 1px solid var(--es-border);
  padding: 32px 38px;
  max-width: 980px;
  margin: 0 auto;
}

.es-hub-layout:not(.es-hub-layout--full) .es-article {
  max-width: none;
  margin: 0;
}

.es-article.es-is-premium {
  border-color: var(--es-gold-border);
  border-top: 3px solid var(--es-gold);
}

.es-article-header {
  border-bottom: 1px solid var(--es-border);
  padding-bottom: 18px;
  margin-bottom: 22px;
}

.es-article-title {
  font-family: var(--es-font-display);
  font-size: 42px;
  font-weight: 700;
  text-transform: uppercase;
  line-height: 1.06;
  margin: 10px 0 12px;
  color: #fff;
}

.es-article-hero {
  margin-bottom: 24px;
  border: 1px solid var(--es-border);
  overflow: hidden;
}

.es-article-hero img { width: 100%; height: auto; }

.es-article-content {
  font-size: 16.5px;
  line-height: 1.78;
  color: var(--es-text);
}

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

.es-article-content h2,
.es-article-content h3,
.es-article-content h4 {
  font-family: var(--es-font-display);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin: 28px 0 12px;
  color: #fff;
}

.es-article-content h2 { font-size: 28px; }
.es-article-content h3 { font-size: 23px; }

.es-article-content a {
  color: var(--es-accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.es-article-content a:hover { color: #fff; }
.es-article-content ul,
.es-article-content ol { margin: 0 0 18px 22px; }
.es-article-content li { margin-bottom: 6px; }

.es-article-content blockquote {
  border-left: 3px solid var(--es-accent);
  background: rgba(255, 255, 255, 0.025);
  padding: 14px 18px;
  margin: 22px 0;
  color: var(--es-text-muted);
  font-style: italic;
}

.es-article-content img {
  margin: 20px 0;
  border: 1px solid var(--es-border);
}

.es-article-tags {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid var(--es-border);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.es-article-tags a {
  font-family: var(--es-font-mono);
  font-size: 11px;
  text-transform: uppercase;
  padding: 4px 10px;
  background: var(--es-bg);
  border: 1px solid var(--es-border);
  color: var(--es-text-muted);
}

.es-article-tags a:hover { border-color: var(--es-accent); color: #fff; }

.es-post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 20px auto 0;
  max-width: 980px;
}

.es-hub-layout:not(.es-hub-layout--full) .es-post-nav,
.es-hub-layout:not(.es-hub-layout--full) .es-comments {
  max-width: none;
  margin-left: 0;
  margin-right: 0;
}

.es-post-nav a {
  display: block;
  background: var(--es-surface);
  border: 1px solid var(--es-border);
  padding: 14px 16px;
  transition: border-color 0.15s ease;
}

.es-post-nav a:hover { border-color: var(--es-accent); }

.es-post-nav-label {
  display: block;
  font-family: var(--es-font-mono);
  font-size: 10px;
  text-transform: uppercase;
  color: var(--es-text-muted);
  margin-bottom: 4px;
}

.es-post-nav-title {
  font-family: var(--es-font-display);
  font-size: 18px;
  text-transform: uppercase;
}

.es-comments {
  margin: 24px auto 0;
  max-width: 980px;
  background: var(--es-surface);
  border: 1px solid var(--es-border);
  padding: 24px 28px;
}

.es-comments textarea,
.es-comments input[type="text"],
.es-comments input[type="email"],
.es-comments input[type="url"] {
  width: 100%;
  background: var(--es-bg);
  border: 1px solid var(--es-border);
  color: var(--es-text);
  padding: 10px 12px;
  font-family: var(--es-font-body);
  margin-top: 6px;
}

.es-comments input[type="submit"] {
  background: var(--es-accent);
  color: #fff;
  border: none;
  padding: 10px 20px;
  font-family: var(--es-font-display);
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  cursor: pointer;
  margin-top: 10px;
}

.es-comments input[type="submit"]:hover { background: var(--es-accent-hover); }

/* =========================================================
   10. FOOTER
   ========================================================= */
.es-footer {
  background: var(--es-surface);
  border-top: 2px solid var(--es-border);
  padding: 36px 0 24px;
  font-size: 13px;
  color: var(--es-text-muted);
}

.es-footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--es-border);
  margin-bottom: 18px;
}

.es-footer h4 {
  font-family: var(--es-font-display);
  font-size: 18px;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 10px;
}

.es-footer ul { list-style: none; }
.es-footer li { margin-bottom: 6px; }
.es-footer a:hover { color: var(--es-accent); }

.es-footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-family: var(--es-font-mono);
  font-size: 11px;
  color: var(--es-text-dim);
}

/* =========================================================
   11. RESPONSIVE BREAKPOINTS
   ========================================================= */
@media (max-width: 1420px) {
  .es-premium-cards-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 1200px) {
  .es-premium-band-grid {
    grid-template-columns: 1fr;
  }
  .es-supporters-panel {
    position: static;
  }
  .es-feed-list.is-two-col .es-feed-thumb {
    flex: 0 0 165px;
  }
}

@media (max-width: 1080px) {
  .es-shelf-grid,
  .es-premium-cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .es-matrix-grid { grid-template-columns: 1fr; }
}

@media (max-width: 960px) {
  .es-wrap,
  .es-wrap--wide { padding: 0 16px; }

  .es-promo-grid,
  .es-hub-layout,
  .es-footer-grid,
  .es-feed-list.is-two-col {
    grid-template-columns: 1fr;
  }
  .es-promo-lead { min-height: 290px; }

  .es-mobile-toggle { display: inline-flex; }

  .es-primary-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--es-surface-2);
    border-bottom: 2px solid var(--es-accent);
    padding: 12px 20px 20px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.7);
  }

  .es-primary-nav.is-open { display: block; }

  .es-nav {
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
  }

  .es-nav > li > a {
    padding: 10px 8px;
    border-bottom: 1px solid var(--es-border);
  }

  .es-nav .sub-menu {
    position: static;
    display: block;
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 4px 0 8px 14px;
  }

  .es-nav .sub-menu a { padding: 6px 8px; font-size: 14px; }
}

@media (max-width: 640px) {
  .es-shelf-grid,
  .es-premium-cards-grid {
    grid-template-columns: 1fr;
  }
  .es-feed-item { flex-direction: column; }
  .es-feed-thumb { flex: none; height: 190px; }
  .es-feed-list.is-compact .es-feed-item { flex-direction: row; }
  .es-feed-list.is-compact .es-feed-thumb { flex: 0 0 96px; height: 72px; }
  .es-article { padding: 20px; }
  .es-article-title { font-size: 29px; }
  .es-post-nav { grid-template-columns: 1fr; }
}

/* =========================================================
   12. DARK IMAGE LIGHTBOX / MODAL OVERRIDES
       (WordPress Core, SimpleLightbox / Imagely, Fancybox,
        PhotoSwipe, Elementor, Jetpack Carousel)
   ========================================================= */

/* WordPress Core Gutenberg Image Lightbox */
.wp-lightbox-overlay {
  background-color: rgba(7, 8, 10, 0.94) !important;
  color: var(--es-text) !important;
}

.wp-lightbox-overlay .scrim {
  background-color: rgba(7, 8, 10, 0.94) !important;
}

.wp-lightbox-overlay .close-button {
  background: var(--es-surface) !important;
  border: 1px solid var(--es-border-bright) !important;
  color: #ffffff !important;
  fill: #ffffff !important;
  border-radius: 2px !important;
}

.wp-lightbox-overlay .close-button:hover {
  background: var(--es-accent) !important;
  border-color: var(--es-accent) !important;
}

.wp-lightbox-overlay .close-button svg {
  fill: #ffffff !important;
}

.wp-lightbox-overlay figcaption {
  color: var(--es-text-muted) !important;
}

/* SimpleLightbox (Imagely / NextGEN / WP Lightbox plugins) */
.sl-overlay {
  background: #07080a !important;
  opacity: 0.95 !important;
}

.sl-wrapper {
  background: transparent !important;
}

.sl-wrapper .sl-close,
.sl-wrapper .sl-navigation button,
.sl-wrapper .sl-counter {
  color: var(--es-text) !important;
}

.sl-wrapper .sl-close:hover,
.sl-wrapper .sl-navigation button:hover {
  color: var(--es-accent) !important;
}

.sl-wrapper .sl-image .sl-caption {
  background: rgba(12, 13, 16, 0.88) !important;
  color: var(--es-text) !important;
  border-top: 1px solid var(--es-border) !important;
}

/* Fancybox / NextGEN Fancybox */
.fancybox-bg,
.fancybox__backdrop,
#fancybox-overlay,
#shShutter {
  background: rgba(7, 8, 10, 0.95) !important;
  opacity: 1 !important;
}

.fancybox-button,
.fancybox__button {
  background: rgba(20, 22, 28, 0.85) !important;
  color: var(--es-text) !important;
}

.fancybox-button:hover,
.fancybox__button:hover {
  background: var(--es-accent) !important;
  color: #ffffff !important;
}

.fancybox-caption,
.fancybox__caption {
  color: var(--es-text) !important;
}

/* PhotoSwipe / LightGallery / Magnific Popup */
.pswp__bg,
.lg-backdrop,
.mfp-bg,
#lightboxOverlay {
  background: rgba(7, 8, 10, 0.95) !important;
  opacity: 1 !important;
}

.pswp__button,
.mfp-close,
.mfp-arrow {
  color: var(--es-text) !important;
}

/* Elementor Lightbox & Jetpack Carousel */
.elementor-lightbox,
.dialog-lightbox-widget,
.jp-carousel-overlay,
.jp-carousel-wrap {
  background-color: rgba(7, 8, 10, 0.95) !important;
  color: var(--es-text) !important;
}

.elementor-lightbox .dialog-lightbox-close-button,
.elementor-lightbox .elementor-swiper-button {
  color: var(--es-text) !important;
}

.elementor-lightbox .dialog-lightbox-close-button:hover,
.elementor-lightbox .elementor-swiper-button:hover {
  color: var(--es-accent) !important;
}

/* Gold Buy Me a Coffee button inside homepage ES PREMIUM Supporters panel */
.es-supporters-panel .esp-bmc-desc {
  margin-bottom: 14px;
  font-size: 13.5px;
  line-height: 1.55;
}

.es-supporters-panel .esp-bmc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 11px 16px;
  background: linear-gradient(135deg, #f8e29b 0%, #eab308 48%, #b37e0c 100%);
  color: #090704 !important;
  border: 1px solid #f6d983;
  border-radius: 2px;
  font-family: var(--es-font-display);
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition: transform 0.15s ease, filter 0.15s ease;
}

.es-supporters-panel .esp-bmc-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.06);
  color: #090704 !important;
}

/* =========================================================
   13. BUY ME A COFFEE BAR UNDER EVERY ARTICLE
   ========================================================= */
.es-article-bmc {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  max-width: 980px;
  margin: 20px auto 0;
  padding: 20px 26px;
  background: var(--es-surface);
  border: 1px solid var(--es-border);
  border-left: 3px solid var(--es-gold);
}

.es-hub-layout:not(.es-hub-layout--full) .es-article-bmc {
  max-width: none;
  margin-left: 0;
  margin-right: 0;
}

.es-article-bmc--premium {
  background: linear-gradient(90deg, #211a0b 0%, #141007 100%);
  border-color: var(--es-gold-border);
  border-left: 3px solid var(--es-gold);
}

.es-article-bmc-text {
  flex: 1 1 320px;
}

.es-article-bmc-kicker {
  display: block;
  font-family: var(--es-font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--es-gold);
  margin-bottom: 4px;
}

.es-article-bmc-text p {
  font-size: 14px;
  line-height: 1.5;
  color: var(--es-text-muted);
  margin: 0;
}

.es-article-bmc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-shrink: 0;
  padding: 11px 22px;
  background: linear-gradient(135deg, #f8e29b 0%, #eab308 48%, #b37e0c 100%);
  color: #090704 !important;
  border: 1px solid #f6d983;
  border-radius: 2px;
  font-family: var(--es-font-display);
  font-size: 17px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition: transform 0.15s ease, filter 0.15s ease;
}

.es-article-bmc-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.06);
  color: #090704 !important;
}
