/* =========================================================
   ES RETRO — 80s/90s CRT Phosphor & Arcade Editorial UI
   Loaded exclusively on the Retro category archive.
   Version: 29.5
   ========================================================= */

:root {
  --esr-bg: #070b0c;
  --esr-surface: #0d1416;
  --esr-surface-2: #111c1f;
  --esr-surface-hover: #152428;
  --esr-teal: #14b8a6;
  --esr-cyan: #2dd4bf;
  --esr-cyan-pale: #ccfbf1;
  --esr-amber: #f59e0b;
  --esr-magenta: #ec4899;
  --esr-border: rgba(45, 212, 191, 0.24);
  --esr-border-strong: rgba(45, 212, 191, 0.56);
  --esr-text: #e2f1ef;
  --esr-muted: #8fb0ac;
}

body.es-retro-view {
  background-color: var(--esr-bg) !important;
  background-image:
    radial-gradient(ellipse 80% 35% at 50% 0%, rgba(20, 184, 166, 0.14), transparent 68%),
    linear-gradient(rgba(45, 212, 191, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(45, 212, 191, 0.03) 1px, transparent 1px) !important;
  background-size: 100% 100%, 36px 36px, 36px 36px !important;
  color: var(--esr-text) !important;
}

/* Header teal CRT trim */
body.es-retro-view .es-header {
  background: #080d0e;
  border-bottom: 2px solid var(--esr-teal);
  box-shadow: 0 4px 24px rgba(20, 184, 166, 0.16);
}

/* Teal/Cyan CRT logo bloom & hover glow on Retro archive */
body.es-retro-view .es-logo img {
  filter:
    drop-shadow(0 0 3px rgba(204, 251, 241, 0.72))
    drop-shadow(0 0 10px rgba(20, 184, 166, 0.48));
}

body.es-retro-view .es-logo:hover img {
  transform: scale(1.04);
  filter:
    drop-shadow(0 0 4px rgba(204, 251, 241, 0.92))
    drop-shadow(0 0 14px rgba(20, 184, 166, 0.80))
    drop-shadow(0 0 24px rgba(45, 212, 191, 0.45));
}

/* =========================================================
   1. RETRO CRT HERO BANNER
   ========================================================= */
.esr-hero {
  position: relative;
  overflow: hidden;
  padding: 40px 0 36px;
  border-bottom: 2px solid var(--esr-teal);
  background:
    radial-gradient(ellipse 70% 90% at 50% 0%, rgba(20, 184, 166, 0.20), transparent 72%),
    linear-gradient(180deg, #0b1416 0%, #070b0c 100%);
}

/* Subtle CRT scanline overlay across hero */
.esr-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.22) 0px,
    rgba(0, 0, 0, 0.22) 1px,
    transparent 1px,
    transparent 3px
  );
  z-index: 1;
}

/* Subtle perspective synth grid floor along bottom of hero */
.esr-hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--esr-teal), var(--esr-amber), var(--esr-magenta), var(--esr-teal));
  opacity: 0.85;
  z-index: 2;
}

.esr-hero-inner {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.esr-hero-left {
  max-width: 780px;
}

.esr-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  margin-bottom: 14px;
  background: rgba(20, 184, 166, 0.12);
  border: 1px solid var(--esr-border-strong);
  color: var(--esr-cyan);
  font-family: var(--es-font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.6);
}

.esr-kicker-dot {
  width: 7px;
  height: 7px;
  background: var(--esr-amber);
  box-shadow: 0 0 8px var(--esr-amber);
  animation: esr-blink 1.4s steps(2, start) infinite;
}

@keyframes esr-blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0.25; }
}

.esr-title {
  font-family: 'Press Start 2P', var(--es-font-display), monospace;
  font-size: clamp(32px, 4.6vw, 54px);
  line-height: 1.15;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #ffffff;
  text-shadow:
    3px 3px 0 var(--esr-teal),
    6px 6px 0 rgba(245, 158, 11, 0.45),
    0 0 24px rgba(45, 212, 191, 0.35);
  margin: 0;
}

.esr-desc {
  margin-top: 14px;
  color: var(--esr-muted);
  font-size: 15px;
  line-height: 1.6;
  max-width: 680px;
}

.esr-hero-right {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.esr-status-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.esr-chip {
  padding: 4px 10px;
  background: rgba(7, 11, 12, 0.85);
  border: 1px solid var(--esr-border);
  font-family: var(--es-font-mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--esr-cyan-pale);
}

.esr-chip--amber {
  border-color: rgba(245, 158, 11, 0.45);
  color: #fde68a;
}

/* =========================================================
   2. RETRO FEED CARDS, LAYOUT SWITCHER & PAGINATION
   ========================================================= */
body.es-retro-view .es-layout-switcher {
  background: #070b0c;
  border: 1px solid var(--esr-border-strong);
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.6);
}

body.es-retro-view .es-layout-btn.is-active {
  background: var(--esr-teal);
  border-color: var(--esr-cyan);
  color: #04100f;
}

body.es-retro-view .es-feed-item:not(.es-is-premium) {
  background: linear-gradient(180deg, var(--esr-surface) 0%, #090f11 100%);
  border: 1px solid var(--esr-border);
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.55);
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease;
}

body.es-retro-view .es-feed-item:not(.es-is-premium):hover {
  background: linear-gradient(180deg, var(--esr-surface-hover) 0%, #0d1619 100%);
  border-color: var(--esr-cyan);
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 rgba(20, 184, 166, 0.28);
}

/* Keep ES PREMIUM articles glowing in gold inside Retro */
body.es-retro-view .es-feed-item.es-is-premium {
  background: linear-gradient(90deg, #271f09 0%, #1b1607 100%);
  border: 1px solid var(--es-gold-border);
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.55);
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease;
}

body.es-retro-view .es-feed-item.es-is-premium:hover {
  background: linear-gradient(90deg, #32270b 0%, #241c09 100%);
  border-color: var(--es-gold-bright);
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 rgba(234, 179, 8, 0.26);
}

body.es-retro-view .es-feed-item:not(.es-is-premium) .es-feed-thumb {
  position: relative;
  border-right: 1px solid var(--esr-border);
}

body.es-retro-view .es-feed-item.es-is-premium .es-feed-thumb {
  position: relative;
  border-right: 1px solid var(--es-gold-border);
}

/* Subtle CRT scanline sheen on retro thumbnails */
body.es-retro-view .es-feed-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.14) 0px,
    rgba(0, 0, 0, 0.14) 1px,
    transparent 1px,
    transparent 3px
  );
}

body.es-retro-view .es-feed-item:not(.es-is-premium) .es-feed-title {
  color: var(--esr-cyan-pale);
}

body.es-retro-view .es-feed-item:not(.es-is-premium):hover .es-feed-title {
  color: var(--esr-amber);
}

body.es-retro-view .es-feed-item.es-is-premium .es-feed-title {
  color: #fef3c7;
}

body.es-retro-view .es-feed-item.es-is-premium:hover .es-feed-title {
  color: var(--es-gold-bright);
}

body.es-retro-view .es-feed-item:not(.es-is-premium) .es-feed-excerpt {
  color: var(--esr-muted);
}

body.es-retro-view .es-feed-item:not(.es-is-premium) .es-meta {
  color: #6b8f8b;
}

/* Pagination */
body.es-retro-view .es-pagination .page-numbers {
  background: var(--esr-surface);
  border: 1px solid var(--esr-border);
  color: var(--esr-cyan-pale);
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.5);
}

body.es-retro-view .es-pagination .current,
body.es-retro-view .es-pagination a:hover {
  background: var(--esr-teal);
  border-color: var(--esr-cyan);
  color: #04100f;
}

/* Footer */
body.es-retro-view .es-footer {
  background: #080d0e;
  border-top: 2px solid var(--esr-teal);
}

/* Responsive */
@media (max-width: 760px) {
  .esr-hero {
    padding: 36px 0 30px;
  }
  .esr-hero-right {
    align-items: flex-start;
  }
  .esr-status-chips {
    justify-content: flex-start;
  }
  body.es-retro-view .es-feed-thumb {
    border-right: none;
    border-bottom: 1px solid var(--esr-border);
  }
}
