/*
 * FAP — Global Design Tokens & Base Styles
 * Task: TASK-001 (CSS tokens) + TASK-012 (typography)
 * Source: LEAD_REFERENCE.md
 *
 * TABLE OF CONTENTS
 *  1. CSS Custom Properties (Design Tokens)
 *  2. Dark Mode Overrides
 *  3. Base Reset & Typography
 *  4. Scrollbar
 *  5. Kadence Overrides — Variables
 *  6. Utility Classes
 *  7. Homepage Layout Wrapper
 *  8. Hero Section — TASK-003/004/005
 *  9. Latest Episode Section — TASK-006
 * 10. Global Buttons — TASK-005
 * 11. Sticky Audio Player — TASK-013
 * 12. Back to Top — TASK-015
 * 13. Scroll Reveal — TASK-015
 * 14. Episode Badge — TASK-014
 * 15. Recent Blog Posts Grid — TASK-007
 * 16. Affiliate Cards Grid — TASK-008
 * 17. Support / Patreon Section — TASK-009
 * 18. Meet the Hosts Section — TASK-010
 * 19. Single Episode Page
 * 20. Single Character Page
 */


/* ============================================================
   1. CSS CUSTOM PROPERTIES (DESIGN TOKENS)
   Default: Light Mode
   ============================================================ */

:root {
  /* Brand */
  --brand-1: #ad966c;
  /* gold sand */
  --brand-2: #c4660e;
  /* burnt orange */
  --brand-3: #FF7F00;
  /* vivid orange */

  /* Semantic */
  --primary: #FF7F00;
  --primary-600: #e57000;
  --primary-700: #c65f00;

  /* Accent */
  --accent-blue: #1f6feb;

  /* Misc UI */
  --hero-accent: #E67E22;
  /* hero title text */
  --secondary-btn: #748b9f;
  /* podcast card secondary button */
  --patreon: #f96854;
  --patreon-hover: #d84a38;

  /* Base */
  --white: #ffffff;
  --black: #000000;

  /* Grayscale — Light Mode */
  --gray-50: #fafafa;
  --gray-75: #f7f7f9;
  --gray-100: #f5f5f5;
  --gray-200: #eeeeee;
  --gray-300: #e0e0e0;
  --gray-700: #333333;
  --gray-800: #1a1a1a;
  --gray-900: #000000;

  /* Semantic text / surface tokens — use these for color/background-color.
     These NEVER invert to the wrong value, unlike --black / --white. */
  --text-primary: #0a0a0a;
  /* body copy, headings  */
  --text-secondary: #1f1f1f;
  /* subtitles, meta      */
  --text-muted: #444444;
  /* descriptions, hints  */
  --surface: #ffffff;
  /* page background      */
  --surface-alt: #f5f5f5;
  /* cards, panels        */

  /* Layout */
  --container-max-width: 1500px;
  --sidebar-width: 260px;
  --header-height: 80px;

  /* Shape */
  --border-radius: 12px;
  --border-radius-pill: 24px;
  --border-radius-badge: 999px;

  /* Typography */
  --font-primary: 'Roboto', system-ui, sans-serif;
  --font-heading: 'Montserrat', sans-serif;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, .1), 0 2px 4px -2px rgba(0, 0, 0, .1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, .1), 0 4px 6px -4px rgba(0, 0, 0, .1);

  /* Transitions */
  --transition: all .3s cubic-bezier(.4, 0, .2, 1);

  /* Overlay */
  --overlay-bg: rgba(255, 255, 255, .92);
}


/* ============================================================
   2. DARK MODE OVERRIDES
   Applied via:
     a) @media (prefers-color-scheme: dark) — system preference
     b) .dark-mode — JS manual toggle (see fap-scripts.js)
   ============================================================ */

@media (prefers-color-scheme: dark) {
  :root {
    --white: #111111;
    /* main dark background */
    --black: #ffffff;
    --gray-50: #0f0f0f;
    --gray-75: #141414;
    --gray-100: #1a1a1a;
    --gray-200: #222222;
    --gray-300: #333333;
    --gray-700: #bdbdbd;
    --gray-800: #e0e0e0;
    --gray-900: #f5f5f5;
    /* Semantic tokens — dark values */
    --text-primary: #f0f0f0;
    --text-secondary: #bdbdbd;
    --text-muted: #999999;
    --surface: #111111;
    --surface-alt: #1a1a1a;
    --overlay-bg: rgba(17, 17, 17, .92);
  }
}

.light-mode {
  --white: #ffffff;
  --black: #000000;
  --gray-50: #fafafa;
  --gray-75: #f7f7f9;
  --gray-100: #f5f5f5;
  --gray-200: #eeeeee;
  --gray-300: #e0e0e0;
  --gray-700: #333333;
  --gray-800: #1a1a1a;
  --gray-900: #000000;
  /* Semantic tokens — light */
  --text-primary: #0a0a0a;
  --text-secondary: #1f1f1f;
  --text-muted: #444444;
  --surface: #ffffff;
  --surface-alt: #f5f5f5;
  --overlay-bg: rgba(255, 255, 255, .92);
}


/* JS toggle — class applied to <html> by fap-scripts.js */
.dark-mode {
  --white: #111111;
  --black: #ffffff;
  --gray-50: #0f0f0f;
  --gray-75: #141414;
  --gray-100: #1a1a1a;
  --gray-200: #222222;
  --gray-300: #333333;
  --gray-700: #bdbdbd;
  --gray-800: #e0e0e0;
  --gray-900: #f5f5f5;
  /* Semantic tokens — dark */
  --text-primary: #f0f0f0;
  --text-secondary: #bdbdbd;
  --text-muted: #999999;
  --surface: #111111;
  --surface-alt: #1a1a1a;
  --overlay-bg: rgba(17, 17, 17, .92);
}




/* ============================================================
   3. BASE RESET & TYPOGRAPHY — TASK-012
   ============================================================ */

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  font-family: var(--font-primary);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  /* was --gray-800; now uses semantic token */
  background-color: var(--surface);
  /* was --white; now uses semantic token */
  overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--text-primary);
  /* was --gray-900 */
  line-height: 1.2;
}

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

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

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

/* Reduced motion — respect user preference */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}


/* ============================================================
   4. SCROLLBAR
   Thin, primary-colored thumb on gray-200 track
   ============================================================ */

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: var(--gray-200);
}

::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-600);
}

/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--primary) var(--gray-200);
}


/* ============================================================
   5. KADENCE VARIABLE OVERRIDES
   Map Kadence's own CSS vars to our design tokens so that
   any Kadence component that uses its own variables
   automatically respects our brand colors.
   ============================================================ */

:root {
  /* Kadence palette vars → our brand */
  --global-palette1: var(--primary);
  --global-palette2: var(--primary-600);
  --global-palette3: var(--gray-800);
  --global-palette4: var(--gray-700);
  --global-palette5: var(--gray-300);
  --global-palette6: var(--gray-200);
  --global-palette7: var(--gray-100);
  --global-palette8: var(--white);
  --global-palette9: var(--black);

  /* Kadence body font */
  --global-body-font-family: var(--font-primary);
  --global-heading-font-family: var(--font-heading);

  /* Kadence content width */
  --global-content-width: var(--container-max-width);
}


/* ============================================================
   5b. DARK MODE BACKGROUND OVERRIDES
   Kadence's Customizer writes hardcoded hex values for body
   background as inline  in <head>, which beats our
   external file by cascade order. !important is required here
   specifically to override those Kadence inline styles.
   Applied for BOTH OS preference and JS toggle paths.
   ============================================================ */

@media (prefers-color-scheme: dark) {

  body,
  #page,
  #wrapper,
  #inner-wrap,
  #masthead,
  #footer-wrap {
    background-color: #111111 !important;
    color: #f0f0f0 !important;
  }
}

.dark-mode body,
.dark-mode #page,
.dark-mode #wrapper,
.dark-mode #inner-wrap,
.dark-mode #masthead,
.dark-mode #footer-wrap {
  background-color: #111111 !important;
  color: #f0f0f0 !important;
}

/* Ensure light-mode class fully resets when explicitly toggled */
.light-mode body,
.light-mode #page,
.light-mode #wrapper,
.light-mode #inner-wrap,
.light-mode #masthead,
.light-mode #footer-wrap {
  background-color: #ffffff !important;
  color: #0a0a0a !important;
}

/* Masthead nav link colours — Kadence palette overrides can leave links white-on-white in light mode */
.light-mode #masthead a,
.light-mode #masthead nav a {
  color: #0a0a0a !important;
}

.dark-mode #masthead a,
.dark-mode #masthead nav a {
  color: #f0f0f0 !important;
}

@media (prefers-color-scheme: light) {

  #masthead a,
  #masthead nav a {
    color: #0a0a0a !important;
  }
}

@media (prefers-color-scheme: dark) {

  #masthead a,
  #masthead nav a {
    color: #f0f0f0 !important;
  }
}



/* ============================================================
   6. UTILITY CLASSES
   ============================================================ */

.jk-container {
  max-width: var(--container-max-width);
  margin-inline: auto;
  padding-inline: 1rem;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}


/* ============================================================
   7. HOMEPAGE LAYOUT WRAPPER
   ============================================================ */

.jk-homepage {
  max-width: var(--container-max-width);
  margin-inline: auto;
  display: grid;
  gap: 4rem;
  padding-block: 2rem;
  padding-inline: 1rem;
}

/* Remove Kadence's default inner content padding on the homepage */
.jk-homepage~* .content-wrap,
.home #inner-wrap>.content-wrap {
  padding: 0;
  max-width: none;
}


/* ============================================================
   8. HERO SECTION — TASK-003 (layout), TASK-004 (animation), TASK-005 (CTA)
   ============================================================ */

/* .jk-homepage-hero — no padding needed, homepage grid gap handles spacing */

.jk-hero__container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 3rem;
}

/* ── Text column ── */

.jk-hero__title {
  font-family: var(--font-heading);
  font-size: 2.75rem;
  font-weight: 800;
  line-height: 1.15;
  color: var(--hero-accent);
  margin-bottom: .75rem;
}

.jk-hero__title span {
  display: block;
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-top: .25rem;
}

.jk-hero__subtitle {
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.jk-hero__description {
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 2rem;
}

.jk-hero__buttons {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
}

/* ── Mascot column — TASK-004 ── */

.jk-hero__image {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Orange radial glow behind mascot */
.jk-hero__image::before {
  content: '';
  position: absolute;
  inset: 0;
  width: 90%;
  height: 75%;
  margin: auto;
  background: var(--hero-accent);
  border-radius: 50%;
  filter: blur(70px);
  opacity: .55;
  z-index: 0;
}

.jk-hero__image img {
  position: relative;
  z-index: 1;
  max-width: 100%;
  height: auto;
  transform: scaleX(-1);
  /* mirror mascot */
  animation: jkHeroFloat 4s ease-in-out infinite;
}

/* Floating animation — TASK-004 */
@keyframes jkHeroFloat {

  0%,
  100% {
    transform: scaleX(-1) translateY(0);
  }

  50% {
    transform: scaleX(-1) translateY(-12px);
  }
}

/* Respect reduced motion — LEAD_REFERENCE.md constraint */
@media (prefers-reduced-motion: reduce) {
  .jk-hero__image img {
    animation: none;
  }
}

/* ── Hero responsive ── */
@media (max-width: 768px) {
  .jk-hero__container {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .jk-hero__image {
    order: -1;
    /* image stacks above text on mobile */
    max-width: 320px;
    margin-inline: auto;
    margin-bottom: 1.5rem;
  }

  .jk-hero__buttons {
    justify-content: center;
  }

  .jk-hero__title {
    font-size: 2rem;
  }
}

@media (max-width: 480px) {
  .jk-hero__title {
    font-size: 1.75rem;
  }

  .jk-hero__title span {
    font-size: 1.2rem;
  }
}


/* ============================================================
   9. LATEST EPISODE SECTION — TASK-006
   ============================================================ */

.jk-latest-episode {
  padding-block: 1rem;
}

.jk-latest-episode__container {
  display: grid;
  grid-template-columns: 340px 1fr;
  align-items: center;
  gap: 3rem;
  border-radius: var(--border-radius);
  transition: var(--transition);
}

/* Card hover — LEAD_REFERENCE.md Section 2 spec: translateY(-4px) + orange border glow */
.jk-latest-episode__container:hover {
  transform: translateY(-4px);
  box-shadow: 0 0 0 2px var(--primary), var(--shadow-lg);
}

@media (prefers-reduced-motion: reduce) {
  .jk-latest-episode__container:hover {
    transform: none;
  }
}

/* ── Artwork ── */

.jk-latest-episode__artwork {
  position: relative;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(0, 0, 0, .15);
  aspect-ratio: 2 / 3;
  background: var(--surface-alt);
}

.jk-latest-episode__artwork img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.jk-latest-episode__artwork-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.jk-latest-episode__artwork-placeholder svg {
  width: 100%;
  max-width: 160px;
}

/* ── Text ── */

.jk-latest-episode__label {
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: .5rem;
}

.jk-latest-episode__title {
  font-family: var(--font-heading);
  font-size: 1.85rem;
  font-weight: 800;
  line-height: 1.2;
  color: var(--text-primary);
  margin-bottom: .4rem;
}

.jk-latest-episode__title a {
  color: inherit;
  text-decoration: none;
}

.jk-latest-episode__title a:hover {
  color: var(--primary);
}

.jk-latest-episode__num {
  color: var(--primary);
}

.jk-latest-episode__date {
  font-size: .9rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.jk-latest-episode__excerpt {
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 1.75rem;
}

.jk-latest-episode__buttons {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .75rem;
}

.jk-latest-episode__archive-link {
  font-size: .9rem;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
  margin-left: .25rem;
}

.jk-latest-episode__archive-link:hover {
  color: var(--primary-600);
  text-decoration: underline;
}

/* ── Mobile ── */

@media (max-width: 768px) {
  .jk-latest-episode__container {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .jk-latest-episode__artwork {
    max-width: 280px;
    margin-inline: auto;
  }

  .jk-latest-episode__buttons {
    justify-content: center;
  }

  .jk-latest-episode__archive-link {
    width: 100%;
    text-align: center;
    margin-left: 0;
  }
}


/* ============================================================
   10. GLOBAL BUTTONS — TASK-005 (Browse Episodes CTA)
   Border radius: 12px standard, 24px pill, 999px badge
   ============================================================ */

.jk-btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .8rem 1.75rem;
  font-family: var(--font-primary);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--border-radius);
  border: 2px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  line-height: 1;
}

.jk-btn--primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.jk-btn--primary:hover,
.jk-btn--primary:focus-visible {
  background: var(--primary-700);
  border-color: var(--primary-700);
  color: #fff;
  transform: translateY(-2px);
}

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

.jk-btn--outline:hover,
.jk-btn--outline:focus-visible {
  background: var(--primary);
  color: #fff;
  transform: translateY(-2px);
}

.jk-btn--pill {
  border-radius: var(--border-radius-pill);
}

.jk-btn--patreon {
  background: var(--patreon);
  color: #fff;
  border-color: var(--patreon);
}

.jk-btn--patreon:hover,
.jk-btn--patreon:focus-visible {
  background: var(--patreon-hover);
  border-color: var(--patreon-hover);
  color: #fff;
}


/* ============================================================
   11. STICKY AUDIO PLAYER — TASK-013
   ============================================================ */

.jk-sticky-player {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: var(--primary);
  color: #fff;
  padding: .75rem 1.25rem;
  display: none;
  /* JS adds .active class to show */
  align-items: center;
  gap: 1rem;
  box-shadow: 0 -2px 8px rgba(0, 0, 0, .25);
  z-index: 9999;
}

.jk-sticky-player.active {
  display: flex;
}

.jk-sticky-player__title {
  flex: 1;
  font-weight: 600;
  font-size: 1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.jk-sticky-player audio {
  flex-shrink: 0;
  width: 300px;
  max-width: 50%;
}

.jk-sticky-player__close {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 1.25rem;
  cursor: pointer;
  padding: .25rem .5rem;
  line-height: 1;
  flex-shrink: 0;
  opacity: .8;
  transition: opacity .2s;
}

.jk-sticky-player__close:hover {
  opacity: 1;
}

@media (max-width: 600px) {
  .jk-sticky-player {
    flex-wrap: wrap;
  }

  .jk-sticky-player audio {
    width: 100%;
    max-width: 100%;
    order: 3;
  }
}


/* ============================================================
   12. BACK TO TOP — TASK-015
   ============================================================ */

.jk-back-to-top {
  position: fixed;
  bottom: 5rem;
  right: 1.5rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  border: none;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .3s, transform .3s;
  pointer-events: none;
}

.jk-back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.jk-back-to-top:hover {
  background: var(--primary-700);
}


/* ============================================================
   13. SCROLL REVEAL — TASK-015
   Elements with .jk-reveal start invisible and slide up on enter.
   JS (IntersectionObserver) adds .revealed when in viewport.
   ============================================================ */

.jk-reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .5s ease, transform .5s ease;
}

.jk-reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .jk-reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}


/* ============================================================
   14. EPISODE BADGE — TASK-014
   Pill-shaped badge: "EP 123"
   Used in Latest Episode section and archive cards.
   Parsed from post title via /FAP[-\s]?(\d+)/i regex.
   ============================================================ */

.jk-episode-badge {
  display: inline-flex;
  align-items: center;
  padding: .25rem .75rem;
  border-radius: var(--border-radius-badge);
  /* 999px */
  background: var(--primary);
  color: #fff;
  font-family: var(--font-heading);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  line-height: 1;
  user-select: none;
}

/* Subtle hover state for when badge is inside a clickable card */
a:hover .jk-episode-badge,
button:hover .jk-episode-badge {
  background: var(--primary-700);
}


/* ============================================================
   15. RECENT BLOG POSTS GRID — TASK-007
   3-col grid of blog post cards. Square image + title only.
   Category: fap-blog. Mobile: 2-col tablet, 1-col phone.
   ============================================================ */

/* ── Section wrapper ── */

.jk-recent-posts {
  padding-block: 1rem;
}

/* ── Reusable section header — centered heading ── */

.jk-section-header {
  text-align: center;
  margin-bottom: 2rem;
}

.jk-section-title {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
  margin-bottom: .5rem;
}

/* ── Card grid ── */

.jk-posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

/* ── Individual card ── */

.jk-post-card {
  display: flex;
  flex-direction: column;
  border-radius: var(--border-radius);
  overflow: hidden;
  background: var(--surface-alt);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.jk-post-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

@media (prefers-reduced-motion: reduce) {
  .jk-post-card:hover {
    transform: none;
  }
}

/* ── Square image wrapper (1:1 aspect ratio) ── */

.jk-post-card__image-link {
  display: block;
  flex-shrink: 0;
}

.jk-post-card__image {
  position: relative;
  width: 100%;
  padding-top: 100%;
  /* 1:1 */
  background: var(--surface-alt);
  overflow: hidden;
}

.jk-post-card__image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .4s ease;
}

.jk-post-card:hover .jk-post-card__image img {
  transform: scale(1.04);
}

.jk-post-card__image-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.jk-post-card__image-placeholder svg {
  width: 60%;
  height: 60%;
}

/* ── Card body ── */

.jk-post-card__body {
  padding: 1rem;
  text-align: center;
  background: var(--surface-alt);
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.jk-post-card__title {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
  margin: 0;
}

.jk-post-card__title a {
  color: var(--text-primary);
  text-decoration: none;
}

.jk-post-card__title a:hover {
  color: var(--primary);
}

/* ── View All row ── */

.jk-view-all {
  text-align: center;
  margin-top: 2.5rem;
}

/* ── Mobile breakpoints ── */

/* Tablet: 2 columns */
@media (max-width: 768px) {
  .jk-posts-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Phone: 1 column */
@media (max-width: 480px) {
  .jk-posts-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   16. AFFILIATE CARDS GRID — TASK-008
   ============================================================ */

/* ── Section wrapper ── */

.jk-affiliates {
  padding: 5rem 0;
}

.jk-affiliates__intro {
  text-align: center;
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.8;
  margin-top: .75rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

/* ── 2×2 card grid ── */

.jk-affiliates__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.75rem;
  margin-top: 3rem;
}

/* ── Individual card ── */

.jk-affiliate-card {
  position: relative;
  background: var(--surface-alt);
  border: 1px solid var(--gray-200);
  border-radius: var(--border-radius);
  overflow: hidden;
  transition: var(--transition);
}

/* Orange top gradient bar — hidden until hover */
.jk-affiliate-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  opacity: 0;
  transition: opacity .25s ease;
}

.jk-affiliate-card:hover {
  transform: translateY(-6px);
  border-color: rgba(230, 126, 34, .25);
  box-shadow: 0 12px 40px rgba(230, 126, 34, .12);
}

.jk-affiliate-card:hover::before {
  opacity: 1;
}

/* ── Full-card link wrapping the content ── */

.jk-affiliate-card__link {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2rem 1.5rem;
  text-decoration: none;
  color: inherit;
  height: 100%;
}

/* ── Logo / icon area ── */

.jk-affiliate-card__icon {
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  position: relative;
  /* for tracking pixel absolute children */
}

.jk-affiliate-card__icon img {
  max-height: 70px;
  max-width: 180px;
  width: auto;
  object-fit: contain;
}

/* Inner anchor used by Impact Radius embed (card 2) — strip decoration */
.jk-affiliate-card__icon a {
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
}

/* Emoji icon variant (Our Merch card) */
.jk-affiliate-card__icon--emoji span {
  font-size: 3rem;
  line-height: 1;
}

/* ── Card body ── */

.jk-affiliate-card__body {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
}

.jk-affiliate-card__title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 .6rem;
}

.jk-affiliate-card__desc {
  font-size: .92rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin: 0 0 1.25rem;
  flex: 1;
}

.jk-affiliate-card__cta {
  margin-top: auto;
}

/* ── Responsive ── */

/* Tablet: still 2 columns, slightly tighter gap */
@media (max-width: 768px) {
  .jk-affiliates__grid {
    gap: 1.25rem;
  }
}

/* Phone: single column */
@media (max-width: 480px) {
  .jk-affiliates__grid {
    grid-template-columns: 1fr;
  }
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
  .jk-affiliate-card {
    border-color: var(--gray-700);
  }
}

.dark-mode .jk-affiliate-card {
  border-color: var(--gray-700);
}


/* ============================================================
   17. SUPPORT / PATREON SECTION — TASK-009
   ============================================================ */

/* ── Divider above section ── */

.jk-support__divider {
  border: none;
  border-top: 1px solid var(--gray-200);
  width: 50%;
  margin: 4rem auto;
}

/* Dark mode divider */
@media (prefers-color-scheme: dark) {
  .jk-support__divider {
    border-top-color: var(--gray-700);
  }
}

.dark-mode .jk-support__divider {
  border-top-color: var(--gray-700);
}

/* ── Section wrapper ── */

.jk-support {
  padding: 1rem 0 5rem;
}

.jk-support__inner {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

/* ── Intro paragraph ── */

.jk-support__intro {
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.8;
  margin-top: 1rem;
}

/* ── Perks list ── */

.jk-support__perks {
  list-style: none;
  padding: 0;
  margin: 1.75rem auto 0;
  max-width: 500px;
  text-align: left;
}

.jk-support__perks li {
  margin-bottom: 1rem;
  line-height: 1.7;
  color: var(--text-secondary);
  font-size: 1rem;
}

/* ── CTA wrapper ── */

.jk-support__cta {
  margin-top: 2.25rem;
  text-align: center;
}


/* ============================================================
   18. MEET THE HOSTS SECTION — TASK-010
   ============================================================ */

/* ── Section wrapper ── */

.jk-hosts {
  padding: 5rem 0;
  background: var(--gray-75);
}

.jk-hosts__inner {
  max-width: 900px;
  margin: 0 auto;
}

/* ── Intro description ── */

.jk-hosts__description {
  text-align: center;
  color: var(--text-secondary);
  font-size: 1.1rem;
  line-height: 1.8;
  margin-top: 1rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

/* ── 2-column host grid ── */

.jk-hosts__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  margin-top: 2.5rem;
}

/* ── Individual host card ── */

.jk-host-card {
  background: var(--surface-alt);
  border-radius: var(--border-radius);
  padding: 2.25rem 2rem;
  text-align: center;
  transition: var(--transition);
}

.jk-host-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

/* ── Circular avatar ── */

.jk-host-card__avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: var(--gray-300);
  border: 3px solid var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
}

.jk-host-card__avatar-letter {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
}

/* ── Host name ── */

.jk-host-card__name {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: .6rem;
}

/* ── Host bio ── */

.jk-host-card__bio {
  font-size: .95rem;
  line-height: 1.7;
  color: var(--text-secondary);
  margin: 0;
}

/* ── Responsive ── */

/* Mobile: single column */
@media (max-width: 768px) {
  .jk-hosts__grid {
    grid-template-columns: 1fr;
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
  }
}


/* ============================================================
   19. SINGLE EPISODE PAGE
   Layout for single-podcast.php — content lives outside
   Kadence's .content-wrap, so width must be set here.
   ============================================================ */

/* Outer page wrapper — full-width centering + side padding */
.jk-episode {
  max-width: var(--container-max-width);
  margin-inline: auto;
  padding-inline: 1.5rem;
  padding-block: 2rem;
}

/* Block-editor content zone — readable line length */
.jk-episode__content {
  max-width: 860px;
  margin-inline: auto;
  padding-inline: 1rem;
  margin-bottom: 3rem;
}

/* Tablet — tighten horizontal padding */
@media (max-width: 768px) {
  .jk-episode {
    padding-inline: 1rem;
  }
}

/* Mobile — minimal padding, full-width audio */
@media (max-width: 600px) {
  .jk-episode {
    padding-inline: 0.75rem;
    padding-block: 1.25rem;
  }

  .jk-episode__content {
    padding-inline: 0;
  }

  .jk-episode__content .wp-block-audio audio {
    width: 100%;
  }
}

/* Small phone — reduce further */
@media (max-width: 480px) {
  .jk-episode {
    padding-inline: 0.5rem;
  }
}


/* Episode page — two-column layout: main content + sidebar */
.jk-episode__layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 2rem;
  align-items: start;
}

.jk-episode__main {
  min-width: 0;
  /* prevent grid blowout */
}

.jk-episode__sidebar {
  position: sticky;
  top: 2rem;
  /* Empty placeholder — future: tag cloud, WooCommerce, related eps */
}

/* Collapse sidebar at tablet width */
@media (max-width: 940px) {
  .jk-episode__layout {
    grid-template-columns: 1fr;
  }

  .jk-episode__sidebar {
    display: none;
  }
}

/* ── Episode prev / next navigation ──────────────────────── */

.jk-episode-nav {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 2rem 0;
  border-top: 1px solid var(--border-color, rgba(128, 128, 128, 0.2));
  margin-top: 2rem;
}

.jk-episode-nav__prev,
.jk-episode-nav__next {
  flex: 1;
}

.jk-episode-nav__next {
  display: flex;
  justify-content: flex-end;
}

.jk-episode-nav__link {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
  padding: 0.75rem 1.25rem;
  border-radius: 8px;
  border: 1px solid var(--border-color, rgba(128, 128, 128, 0.2));
  transition: background 0.2s, border-color 0.2s;
  max-width: 280px;
}

.jk-episode-nav__link:hover {
  background: var(--subtle-bg, rgba(128, 128, 128, 0.08));
  border-color: var(--primary, #e8692a);
  color: inherit;
}

.jk-episode-nav__meta {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.jk-episode-nav__dir {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--primary, #e8692a);
  font-weight: 700;
}

.jk-episode-nav__title {
  font-size: 0.88rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.jk-episode-nav__arrow {
  font-size: 1.25rem;
  flex-shrink: 0;
  color: var(--primary, #e8692a);
}

@media (max-width: 600px) {
  .jk-episode-nav {
    flex-direction: column;
    padding: 1.25rem 0;
  }

  .jk-episode-nav__next {
    justify-content: flex-start;
  }
}

/* ── Star ratings — light / dark mode via CSS classes ─────────── */

.fap-stars {
  font-size: 1.2rem;
  letter-spacing: 2px;
}

.fap-star--filled {
  color: #ff9800;
}

.fap-star--empty {
  color: rgba(128, 128, 128, 0.25);
}

/* Dark mode: make empty stars nearly invisible */
[data-theme="dark"] .fap-star--empty,
body.dark-mode .fap-star--empty {
  color: rgba(255, 255, 255, 0.15);
}

.fap-score-label {
  font-size: 0.9rem;
  color: var(--text-muted, #888);
}

/* ============================================================
   20. SINGLE CHARACTER PAGE
   Layout for single-fap-character.php — two-column: sidebar
   (portrait + VA info) left, character info right.
   ============================================================ */

.jk-char-page {
  max-width: var(--container-max-width);
  margin-inline: auto;
  padding-inline: 1.5rem;
  padding-block: 2rem;
}

.jk-char-page__inner {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 2.5rem;
  align-items: start;
}

/* Sidebar — portrait + VA cards */
.jk-char-page__sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.jk-char-page__portrait img {
  width: 100%;
  border-radius: 8px;
  display: block;
}

.jk-char-page__va {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.jk-char-page__va img {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
}

.jk-char-page__va-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.6;
}

.jk-char-page__va-name {
  font-size: 0.9rem;
  font-weight: 600;
}

/* Main content — name, role badge, description */
.jk-char-page__name {
  margin-top: 0;
  margin-bottom: 0.5rem;
}

.jk-char-page__role {
  display: inline-block;
  padding: 0.2em 0.75em;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 1.25rem;
  background: var(--global-palette3, #6d3fc0);
  color: #fff;
}

.jk-char-page__role--main {
  background: var(--global-palette1, #4a2a9c);
}

.jk-char-page__role--supporting {
  background: var(--global-palette3, #6d3fc0);
}

.jk-char-page__role--background {
  background: var(--global-palette5, #999);
}

.jk-char-page__desc {
  line-height: 1.7;
  max-width: 70ch;
}

/* Tablet — collapse to single column */
@media (max-width: 768px) {
  .jk-char-page__inner {
    grid-template-columns: 1fr;
  }

  .jk-char-page__sidebar {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 1.5rem;
  }

  .jk-char-page__portrait {
    width: 160px;
    flex-shrink: 0;
  }
}

/* Mobile */
@media (max-width: 480px) {
  .jk-char-page {
    padding-inline: 0.75rem;
  }

  .jk-char-page__sidebar {
    flex-direction: column;
  }

  .jk-char-page__portrait {
    width: 100%;
  }
}

/* ────────────────────────────────────────────────────────────── */
/* HERO CARD REDESIGN STYLES */
/* ────────────────────────────────────────────────────────────── */
:root {
  --fap-card-bg-light: #ffffff;
  --fap-card-border-light: rgba(0, 0, 0, 0.1);
  --fap-text-light: #333333;
  --fap-muted-light: #666666;
  --fap-tab-bg-light: var(--gray-200);
  --fap-tab-hover-light: rgba(255, 127, 0, 0.1);

  --fap-card-bg-dark: #1a1a1d;
  --fap-card-border-dark: rgba(255, 255, 255, 0.1);
  --fap-text-dark: #f0f0f0;
  --fap-muted-dark: #a0a0a0;
  --fap-tab-bg-dark: rgba(255, 255, 255, 0.05);
  --fap-tab-hover-dark: rgba(255, 127, 0, 0.2);

  --fap-accent: var(--primary, #FF7F00);
  --fap-accent-hover: var(--primary-600, #e57000);
  --fap-primary: var(--primary, #FF7F00);
}

/* Dark Mode Support (System Theme) */
@media (prefers-color-scheme: dark) {
  .fap-podcast-hero-card {
    --bg-color: var(--fap-card-bg-dark);
    --border-color: var(--fap-card-border-dark);
    --text-color: var(--fap-text-dark);
    --muted-color: var(--fap-muted-dark);
    --tab-bg: var(--fap-tab-bg-dark);
    --tab-hover: var(--fap-tab-hover-dark);
  }
}

@media (prefers-color-scheme: light) {
  .fap-podcast-hero-card {
    --bg-color: var(--fap-card-bg-light);
    --border-color: var(--fap-card-border-light);
    --text-color: var(--fap-text-light);
    --muted-color: var(--fap-muted-light);
    --tab-bg: var(--fap-tab-bg-light);
    --tab-hover: var(--fap-tab-hover-light);
  }
}

/* JS theme toggle — hero card follows site class, overrides system preference */
.dark-mode .fap-podcast-hero-card {
  --bg-color: var(--fap-card-bg-dark);
  --border-color: var(--fap-card-border-dark);
  --text-color: var(--fap-text-dark);
  --muted-color: var(--fap-muted-dark);
  --tab-bg: var(--fap-tab-bg-dark);
  --tab-hover: var(--fap-tab-hover-dark);
}

.light-mode .fap-podcast-hero-card {
  --bg-color: var(--fap-card-bg-light);
  --border-color: var(--fap-card-border-light);
  --text-color: var(--fap-text-light);
  --muted-color: var(--fap-muted-light);
  --tab-bg: var(--fap-tab-bg-light);
  --tab-hover: var(--fap-tab-hover-light);
}

/* Fallback default if JS/custom overrides aren't present (matching requested dark theme) */
.fap-podcast-hero-card {
  --bg-color: var(--fap-card-bg-dark);
  --border-color: var(--fap-card-border-dark);
  --text-color: var(--fap-text-dark);
  --muted-color: var(--fap-muted-dark);
  --tab-bg: var(--fap-tab-bg-dark);
  --tab-hover: var(--fap-tab-hover-dark);

  background-color: var(--bg-color);
  color: var(--text-color);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 30px;
  margin-top: 30px;
  margin-bottom: 40px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  font-family: inherit;
}

/* Top Section Grid */
.jk-anilist__panel {
  position: relative;
}

.fap-hero-banner {
  width: calc(100% + 60px);
  margin-left: -30px;
  margin-top: -30px;
  margin-bottom: 30px;
  height: 250px;
  background-size: cover;
  background-position: center;
  border-radius: 12px 12px 0 0;
  border-bottom: 1px solid var(--border-color);
}

.fap-hero-top {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 30px;
  margin-bottom: 30px;
}

@media (max-width: 768px) {
  .fap-hero-top {
    grid-template-columns: 1fr;
  }
}

/* Left: Cover */
.fap-hero-cover img {
  width: 100%;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
  object-fit: cover;
  aspect-ratio: 2/3;
}

/* Right: Content */
.fap-hero-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.fap-hero-meta h1 {
  margin: 0 0 5px 0;
  font-size: 28px;
  font-weight: 800;
  color: var(--text-color);
  line-height: 1.2;
}

.fap-hero-meta h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--muted-color);
}

/* Play Button */
.fap-play-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background-color: var(--fap-accent);
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  padding: 12px 24px;
  border: none;
  border-radius: 30px;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.1s;
  align-self: flex-start;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.fap-play-btn:hover {
  background-color: var(--fap-accent-hover);
  color: #fff;
}

.fap-play-btn:active {
  transform: scale(0.98);
}

.fap-play-btn svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

/* Host Ratings */
.fap-ratings-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
}

.fap-rating-item {
  display: flex;
  flex-direction: column;
  background-color: var(--tab-bg);
  border: 1px solid var(--border-color);
  padding: 10px 15px;
  border-radius: 8px;
  text-align: center;
  min-width: 80px;
}

.fap-rating-item span.r-name {
  font-size: 11px;
  text-transform: uppercase;
  color: var(--muted-color);
  letter-spacing: 1px;
  margin-bottom: 2px;
}

.fap-rating-item span.r-val {
  font-size: 24px;
  font-weight: 800;
  line-height: 1;
  color: var(--fap-accent);
}

/* Details List */
.fap-hero-details dl {
  display: grid;
  grid-template-columns: 140px 1fr;
  column-gap: 20px;
  row-gap: 0;
  margin: 0;
  border-top: 1px solid var(--border-color);
  padding-top: 15px;
}

.fap-hero-details dt {
  font-weight: 600;
  color: var(--muted-color);
  padding: 12px 0;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  font-size: 14px;
}

.fap-hero-details dd {
  margin: 0;
  font-weight: 500;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-color);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

/* Genres/Pills */
.fap-hero-genres {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 15px;
}

.fap-genre-pill {
  background-color: transparent;
  color: var(--muted-color);
  font-size: 13px;
  font-weight: 400;
  padding: 4px 10px;
  border-radius: 4px;
  border: 1px solid var(--border-color);
  text-transform: none;
}

/* Outer Tabs (Seasons) */
.jk-anilist__tabs {
  display: flex;
  gap: 15px;
  margin-bottom: 25px !important;
  flex-wrap: wrap;
  padding-bottom: 15px;
  border-bottom: 2px solid var(--border-color);
}

.jk-anilist__tab {
  background-color: var(--tab-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-color);
  font-size: 15px;
  font-weight: 600;
  padding: 10px 20px;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
}

.jk-anilist__tab:hover {
  border-color: var(--fap-accent);
  color: var(--fap-accent);
}

.jk-anilist__tab[aria-selected="true"] {
  background-color: var(--fap-accent);
  border-color: var(--fap-accent);
  color: #fff;
  box-shadow: 0 4px 15px rgba(255, 127, 0, 0.4);
}

.jk-anilist__panel[hidden] {
  display: none !important;
}

/* Tabs Wrapper (Inner) */
.fap-tabs-wrapper {
  border-top: 1px solid var(--border-color);
  padding-top: 20px;
}

.fap-tabs-nav {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.fap-tab-btn {
  background-color: var(--tab-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-color);
  font-size: 15px;
  font-weight: 600;
  padding: 10px 20px;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
}

.fap-tab-btn:hover {
  background-color: var(--tab-hover);
  border-color: var(--fap-accent);
  color: var(--fap-accent);
}

.fap-tab-btn.active,
.fap-tab-btn[aria-selected="true"] {
  background-color: var(--fap-accent);
  border-color: var(--fap-accent);
  color: #fff;
}

.fap-tab-pane {
  display: none;
  animation: fapFadeIn 0.3s ease-in-out;
  line-height: 1.6;
  color: var(--text-color);
}

.fap-tab-pane.active {
  display: block;
}

.fap-tab-pane h3 {
  color: var(--text-color);
  margin-bottom: 15px;
}

/* Characters & Staff Grids (Adapted from previous styles) */
.fap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 20px;
}

.fap-grid-item {
  background: var(--tab-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
}

.fap-grid-item img {
  width: 100%;
  aspect-ratio: 2/3;
  object-fit: cover;
  display: block;
}

.fap-grid-info {
  padding: 10px;
  text-align: center;
}

.fap-grid-info strong {
  display: block;
  font-size: 14px;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fap-grid-info span {
  display: block;
  font-size: 12px;
  color: var(--muted-color);
}

@keyframes fapFadeIn {
  from {
    opacity: 0;
    transform: translateY(5px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================================
   21. EPISODE NAVIGATION
   ============================================================ */

.jk-episode-nav {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color, var(--gray-300));
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.jk-episode-nav__prev,
.jk-episode-nav__next {
  flex: 1;
  display: flex;
}

.jk-episode-nav__next {
  justify-content: flex-end;
  text-align: right;
}

.jk-episode-nav__link {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.5rem;
  border-radius: var(--border-radius);
  background: var(--surface-alt);
  color: var(--text-primary);
  text-decoration: none;
  transition: var(--transition);
  border: 1px solid transparent;
  max-width: 100%;
}

.jk-episode-nav__link:hover {
  background: var(--surface);
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(255, 127, 0, 0.15);
  transform: translateY(-2px);
}

.dark-mode .jk-episode-nav__link {
  border: 1px solid var(--gray-200);
}

.dark-mode .jk-episode-nav__link:hover {
  background: var(--surface);
  border-color: var(--primary);
}

.jk-episode-nav__meta {
  display: flex;
  flex-direction: column;
}

.jk-episode-nav__dir {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--primary);
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.jk-episode-nav__title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.1rem;
  line-height: 1.3;
}

.jk-episode-nav__arrow {
  font-size: 1.5rem;
  color: var(--primary);
  transition: var(--transition);
}

.jk-episode-nav__link:hover .jk-episode-nav__arrow {
  transform: scale(1.1);
}

.jk-episode-nav__link--prev:hover .jk-episode-nav__arrow {
  transform: translateX(-4px) scale(1.1);
}

.jk-episode-nav__link--next:hover .jk-episode-nav__arrow {
  transform: translateX(4px) scale(1.1);
}