/*
Theme Name: FaithWave Radio
Theme URI: https://faithwave.radio
Author: FaithWave
Author URI: https://faithwave.radio
Description: A lightweight, professional internet radio theme for Bible study broadcasting. Built for FaithWave Radio, English Bible Study on all 31,102 verses.
Version: 1.3.0
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: faithwave-radio
Tags: radio, audio, bible, christian, custom-background, custom-logo, mobile-first
*/

/* =====================================================================
   DESIGN TOKENS
   ===================================================================== */
:root {
  /* Brand Colours */
  --fw-midnight:    #0D1B2A;
  --fw-navy:        #1A2E45;
  --fw-gold:        #F2AE30;
  --fw-gold-light:  #F7CC72;
  --fw-gold-dark:   #C8891A;
  --fw-cream:       #FAFAF8;
  --fw-warm-white:  #F5F3EF;
  --fw-text:        #1C1C1E;
  --fw-text-muted:  #6B7280;
  --fw-text-light:  #9CA3AF;
  --fw-border:      #E5E7EB;
  --fw-border-dark: #D1D5DB;

  /* Semantic */
  --fw-bg:          var(--fw-cream);
  --fw-surface:     #FFFFFF;
  --fw-surface-2:   var(--fw-warm-white);
  --fw-live-red:    #EF4444;
  --fw-success:     #10B981;

  /* Typography */
  --fw-font-ui:     'Inter', system-ui, -apple-system, sans-serif;
  --fw-font-serif:  'Merriweather', Georgia, 'Times New Roman', serif;

  /* Font Sizes (fluid) */
  --fw-text-xs:     0.75rem;
  --fw-text-sm:     0.875rem;
  --fw-text-base:   1rem;
  --fw-text-lg:     1.125rem;
  --fw-text-xl:     1.25rem;
  --fw-text-2xl:    1.5rem;
  --fw-text-3xl:    1.875rem;
  --fw-text-4xl:    2.25rem;

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

  /* Layout */
  --fw-max-width:   1200px;
  --fw-content-width: 800px;
  --fw-player-height: 72px;
  --fw-radius-sm:   0.375rem;
  --fw-radius:      0.5rem;
  --fw-radius-lg:   0.75rem;
  --fw-radius-xl:   1rem;
  --fw-radius-full: 9999px;

  /* Shadows */
  --fw-shadow-sm:   0 1px 2px 0 rgb(0 0 0 / 0.05);
  --fw-shadow:      0 4px 6px -1px rgb(0 0 0 / 0.07), 0 2px 4px -2px rgb(0 0 0 / 0.05);
  --fw-shadow-lg:   0 10px 15px -3px rgb(0 0 0 / 0.08), 0 4px 6px -4px rgb(0 0 0 / 0.05);
  --fw-shadow-xl:   0 20px 25px -5px rgb(0 0 0 / 0.10), 0 8px 10px -6px rgb(0 0 0 / 0.05);
  --fw-shadow-player: 0 -4px 24px rgb(0 0 0 / 0.12);

  /* Transitions */
  --fw-transition:  150ms ease;
  --fw-transition-slow: 300ms ease;
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
  :root {
    --fw-bg:          var(--fw-midnight);
    --fw-surface:     var(--fw-navy);
    --fw-surface-2:   #1F3450;
    --fw-text:        #F9FAFB;
    --fw-text-muted:  #9CA3AF;
    --fw-text-light:  #6B7280;
    --fw-border:      #2D4A6A;
    --fw-border-dark: #3D5A7A;
    --fw-shadow-player: 0 -4px 24px rgb(0 0 0 / 0.40);
  }
}

/* =====================================================================
   CSS 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(--fw-font-ui);
  font-size: var(--fw-text-base);
  line-height: 1.6;
  color: var(--fw-text);
  background-color: var(--fw-bg);
  min-height: 100vh;
  padding-bottom: var(--fw-player-height);
  overflow-x: hidden;
}

a {
  color: var(--fw-gold-dark);
  text-decoration: none;
  transition: color var(--fw-transition);
}
a:hover { color: var(--fw-gold); text-decoration: underline; }

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

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

/* =====================================================================
   LAYOUT UTILITIES
   ===================================================================== */
.fw-container {
  width: 100%;
  max-width: var(--fw-max-width);
  margin-inline: auto;
  padding-inline: var(--fw-space-4);
}

@media (min-width: 640px)  { .fw-container { padding-inline: var(--fw-space-6); } }
@media (min-width: 1024px) { .fw-container { padding-inline: var(--fw-space-8); } }

.fw-content-width { max-width: var(--fw-content-width); margin-inline: auto; }

.fw-grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--fw-space-6);
}
@media (min-width: 768px) { .fw-grid-2 { grid-template-columns: repeat(2, 1fr); } }

.fw-grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--fw-space-4);
}

.fw-flex { display: flex; }
.fw-items-center { align-items: center; }
.fw-gap-2 { gap: var(--fw-space-2); }
.fw-gap-4 { gap: var(--fw-space-4); }

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

/* =====================================================================
   SITE HEADER
   ===================================================================== */
.fw-site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--fw-midnight);
  border-bottom: 1px solid rgba(242, 174, 48, 0.2);
  backdrop-filter: blur(8px);
}

.fw-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: var(--fw-space-4);
}

/* Logo */
.fw-logo {
  display: flex;
  align-items: center;
  gap: var(--fw-space-3);
  text-decoration: none;
  flex-shrink: 0;
}
.fw-logo:hover { text-decoration: none; }

.fw-logo .custom-logo-link {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  line-height: 0;
}

.fw-logo-image,
.fw-logo .custom-logo {
  display: block;
  width: 40px;
  height: 40px;
  max-width: 40px;
  object-fit: contain;
  border-radius: var(--fw-radius-sm);
  flex-shrink: 0;
}

.fw-logo-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--fw-radius);
  background: linear-gradient(135deg, var(--fw-gold) 0%, var(--fw-gold-dark) 100%);
  font-size: var(--fw-text-lg);
  font-weight: 800;
  color: var(--fw-midnight);
  letter-spacing: -0.05em;
  flex-shrink: 0;
}

.fw-logo-text {
  display: none;
  flex-direction: column;
}
@media (min-width: 480px) { .fw-logo-text { display: flex; } }

.fw-logo-name {
  font-size: var(--fw-text-base);
  font-weight: 700;
  color: #FFFFFF;
  letter-spacing: -0.01em;
  line-height: 1;
}
.fw-logo-tagline {
  font-size: var(--fw-text-xs);
  color: var(--fw-gold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 500;
  margin-top: 2px;
}

/* Live badge */
.fw-live-badge {
  display: none;
  align-items: center;
  gap: var(--fw-space-2);
  padding: 4px 10px;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  border-radius: var(--fw-radius-full);
  font-size: var(--fw-text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fw-live-red);
}
.fw-live-badge.is-live { display: flex; }

.fw-live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--fw-live-red);
  animation: fw-pulse 1.5s ease-in-out infinite;
}

@keyframes fw-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(0.8); }
}

/* Navigation */
.fw-nav {
  display: none;
  align-items: center;
  gap: var(--fw-space-1);
}
@media (min-width: 768px) { .fw-nav { display: flex; } }

.fw-nav a {
  padding: var(--fw-space-2) var(--fw-space-3);
  font-size: var(--fw-text-sm);
  font-weight: 500;
  color: rgba(255,255,255,0.8);
  border-radius: var(--fw-radius-sm);
  transition: all var(--fw-transition);
  text-decoration: none;
}
.fw-nav a:hover, .fw-nav a.active {
  color: #FFFFFF;
  background: rgba(255,255,255,0.1);
  text-decoration: none;
}

/* Header actions */
.fw-header-actions {
  display: flex;
  align-items: center;
  gap: var(--fw-space-3);
}

/* Mobile menu toggle */
.fw-menu-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--fw-radius);
  cursor: pointer;
  color: #FFFFFF;
  transition: all var(--fw-transition);
}
.fw-menu-toggle:hover { background: rgba(255,255,255,0.15); }
@media (min-width: 768px) { .fw-menu-toggle { display: none; } }

/* Mobile nav drawer */
.fw-mobile-nav {
  display: none;
  flex-direction: column;
  background: var(--fw-midnight);
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: var(--fw-space-4);
  gap: var(--fw-space-2);
}
.fw-mobile-nav.is-open { display: flex; }

.fw-mobile-nav a {
  padding: var(--fw-space-3) var(--fw-space-4);
  color: rgba(255,255,255,0.85);
  font-weight: 500;
  border-radius: var(--fw-radius);
  transition: all var(--fw-transition);
  text-decoration: none;
}
.fw-mobile-nav a:hover {
  background: rgba(255,255,255,0.08);
  color: #FFFFFF;
  text-decoration: none;
}

/* =====================================================================
   HERO SECTION
   ===================================================================== */
.fw-hero {
  background: linear-gradient(160deg, var(--fw-midnight) 0%, #1A2E45 60%, #0F2236 100%);
  position: relative;
  overflow: hidden;
  padding: var(--fw-space-12) 0 var(--fw-space-16);
}

/* Decorative circles */
.fw-hero::before,
.fw-hero::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  opacity: 0.07;
  pointer-events: none;
}
.fw-hero::before {
  width: 600px; height: 600px;
  background: var(--fw-gold);
  top: -200px; right: -150px;
}
.fw-hero::after {
  width: 400px; height: 400px;
  background: var(--fw-gold);
  bottom: -100px; left: -100px;
}

.fw-hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 720px;
  margin-inline: auto;
}

.fw-hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--fw-space-2);
  font-size: var(--fw-text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--fw-gold);
  margin-bottom: var(--fw-space-4);
}

.fw-hero-title {
  font-size: clamp(var(--fw-text-2xl), 5vw, var(--fw-text-4xl));
  font-weight: 800;
  color: #FFFFFF;
  letter-spacing: -0.02em;
  margin-bottom: var(--fw-space-4);
  line-height: 1.1;
}

.fw-hero-title span {
  background: linear-gradient(90deg, var(--fw-gold) 0%, var(--fw-gold-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.fw-hero-subtitle {
  font-size: var(--fw-text-lg);
  color: rgba(255,255,255,0.65);
  margin-bottom: var(--fw-space-8);
  font-weight: 400;
  line-height: 1.6;
}

/* Now Playing card in hero */
.fw-now-playing-card {
  background: rgba(255,255,255,0.06);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--fw-radius-xl);
  padding: var(--fw-space-6);
  margin-bottom: var(--fw-space-8);
  text-align: left;
  transition: all var(--fw-transition-slow);
}

.fw-now-playing-label {
  font-size: var(--fw-text-xs);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--fw-gold);
  font-weight: 600;
  margin-bottom: var(--fw-space-3);
  display: flex;
  align-items: center;
  gap: var(--fw-space-2);
}

.fw-now-playing-title {
  font-size: var(--fw-text-xl);
  font-weight: 700;
  color: #FFFFFF;
  margin-bottom: var(--fw-space-2);
}

.fw-now-playing-ref {
  font-size: var(--fw-text-sm);
  color: var(--fw-gold-light);
  font-weight: 500;
  margin-bottom: var(--fw-space-4);
}

.fw-now-playing-verse {
  font-family: var(--fw-font-serif);
  font-size: var(--fw-text-base);
  color: rgba(255,255,255,0.75);
  font-style: italic;
  line-height: 1.7;
  border-left: 3px solid var(--fw-gold);
  padding-left: var(--fw-space-4);
}

/* Hero play button */
.fw-play-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--fw-space-3);
  padding: var(--fw-space-4) var(--fw-space-8);
  background: linear-gradient(135deg, var(--fw-gold) 0%, var(--fw-gold-dark) 100%);
  color: var(--fw-midnight);
  font-size: var(--fw-text-lg);
  font-weight: 700;
  border: none;
  border-radius: var(--fw-radius-full);
  cursor: pointer;
  transition: all var(--fw-transition);
  box-shadow: 0 4px 16px rgba(242, 174, 48, 0.4);
  text-decoration: none;
  min-width: 180px;
}
.fw-play-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(242, 174, 48, 0.5);
  text-decoration: none;
  color: var(--fw-midnight);
}
.fw-play-btn:active { transform: translateY(0); }
.fw-play-btn .fw-play-icon { font-size: var(--fw-text-xl); }

/* =====================================================================
   STICKY AUDIO PLAYER
   ===================================================================== */
#fw-player {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 200;
  height: var(--fw-player-height);
  background: var(--fw-midnight);
  border-top: 1px solid rgba(242, 174, 48, 0.25);
  box-shadow: var(--fw-shadow-player);
  display: flex;
  align-items: center;
}

.fw-player-inner {
  display: flex;
  align-items: center;
  gap: var(--fw-space-3);
  width: 100%;
  padding-inline: var(--fw-space-4);
  max-width: var(--fw-max-width);
  margin-inline: auto;
}

.fw-player-art {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: var(--fw-radius);
  background: linear-gradient(135deg, var(--fw-gold) 0%, var(--fw-gold-dark) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--fw-text-lg);
  font-weight: 700;
  color: var(--fw-midnight);
  overflow: hidden;
}
.fw-player-art img { width: 100%; height: 100%; object-fit: cover; }

.fw-player-info {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}
.fw-player-title {
  font-size: var(--fw-text-sm);
  font-weight: 600;
  color: #FFFFFF;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fw-player-ref {
  font-size: var(--fw-text-xs);
  color: var(--fw-gold-light);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.fw-player-controls {
  display: flex;
  align-items: center;
  gap: var(--fw-space-2);
  flex-shrink: 0;
}

.fw-ctrl-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: rgba(255,255,255,0.7);
  cursor: pointer;
  transition: all var(--fw-transition);
  font-size: 18px;
}
.fw-ctrl-btn:hover { background: rgba(255,255,255,0.1); color: #FFFFFF; }

.fw-ctrl-btn.fw-play-pause {
  width: 44px;
  height: 44px;
  background: var(--fw-gold);
  color: var(--fw-midnight);
}
.fw-ctrl-btn.fw-play-pause:hover {
  background: var(--fw-gold-light);
  color: var(--fw-midnight);
  transform: scale(1.05);
}

/* Volume control */
.fw-volume-wrap {
  display: none;
  align-items: center;
  gap: var(--fw-space-2);
}
@media (min-width: 640px) { .fw-volume-wrap { display: flex; } }

.fw-volume-slider {
  width: 80px;
  height: 4px;
  -webkit-appearance: none;
  appearance: none;
  background: linear-gradient(to right, var(--fw-gold) 0%, var(--fw-gold) 80%, rgba(255,255,255,0.2) 80%);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}
.fw-volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: #FFFFFF;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

/* Player status */
.fw-player-status {
  display: none;
  align-items: center;
  gap: 6px;
  font-size: var(--fw-text-xs);
  color: rgba(255,255,255,0.5);
}
@media (min-width: 1024px) { .fw-player-status { display: flex; } }

.fw-player-status.is-playing { color: var(--fw-gold); }
.fw-player-status.is-loading { color: rgba(255,255,255,0.5); }
.fw-player-status.is-error   { color: var(--fw-live-red); }

/* =====================================================================
   SECTIONS: COMMON
   ===================================================================== */
.fw-section {
  padding: var(--fw-space-12) 0;
}

.fw-section-alt {
  background: var(--fw-surface-2);
}

.fw-section-header {
  text-align: center;
  margin-bottom: var(--fw-space-10);
}
.fw-section-eyebrow {
  font-size: var(--fw-text-xs);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--fw-gold-dark);
  font-weight: 700;
  margin-bottom: var(--fw-space-2);
}
.fw-section-title {
  font-size: clamp(var(--fw-text-2xl), 4vw, var(--fw-text-3xl));
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--fw-text);
}
.fw-section-desc {
  font-size: var(--fw-text-base);
  color: var(--fw-text-muted);
  margin-top: var(--fw-space-3);
  max-width: 520px;
  margin-inline: auto;
  line-height: 1.6;
}

/* Card base */
.fw-card {
  background: var(--fw-surface);
  border: 1px solid var(--fw-border);
  border-radius: var(--fw-radius-lg);
  overflow: hidden;
  transition: all var(--fw-transition);
  box-shadow: var(--fw-shadow-sm);
}
.fw-card:hover {
  box-shadow: var(--fw-shadow-lg);
  border-color: var(--fw-gold);
  transform: translateY(-2px);
}

/* =====================================================================
   SCHEDULE SECTION
   ===================================================================== */
.fw-schedule-list {
  display: flex;
  flex-direction: column;
  gap: var(--fw-space-2);
}

.fw-schedule-item {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  align-items: center;
  gap: var(--fw-space-4);
  padding: var(--fw-space-4);
  background: var(--fw-surface);
  border: 1px solid var(--fw-border);
  border-radius: var(--fw-radius-lg);
  transition: all var(--fw-transition);
}
.fw-schedule-item:hover { border-color: var(--fw-gold); box-shadow: var(--fw-shadow); }
.fw-schedule-item.is-current {
  border-color: var(--fw-gold);
  background: rgba(242, 174, 48, 0.04);
  box-shadow: 0 0 0 2px rgba(242, 174, 48, 0.2);
}

.fw-schedule-time {
  font-size: var(--fw-text-sm);
  font-weight: 700;
  color: var(--fw-text-muted);
  text-align: center;
  line-height: 1.2;
}
.fw-schedule-item.is-current .fw-schedule-time { color: var(--fw-gold-dark); }

.fw-schedule-info {}
.fw-schedule-title {
  font-size: var(--fw-text-sm);
  font-weight: 600;
  color: var(--fw-text);
  margin-bottom: 2px;
}
.fw-schedule-ref {
  font-size: var(--fw-text-xs);
  color: var(--fw-text-muted);
}

.fw-schedule-badge {
  font-size: var(--fw-text-xs);
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--fw-radius-full);
  background: rgba(242, 174, 48, 0.1);
  color: var(--fw-gold-dark);
  border: 1px solid rgba(242, 174, 48, 0.2);
  white-space: nowrap;
}
.fw-schedule-badge.live {
  background: rgba(239, 68, 68, 0.1);
  color: var(--fw-live-red);
  border-color: rgba(239, 68, 68, 0.3);
}

/* =====================================================================
   BROWSE BIBLE SECTION
   ===================================================================== */
.fw-testament-tabs {
  display: flex;
  gap: var(--fw-space-2);
  margin-bottom: var(--fw-space-6);
  border-bottom: 2px solid var(--fw-border);
}
.fw-tab-btn {
  padding: var(--fw-space-3) var(--fw-space-6);
  font-size: var(--fw-text-sm);
  font-weight: 600;
  color: var(--fw-text-muted);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  transition: all var(--fw-transition);
}
.fw-tab-btn:hover { color: var(--fw-text); }
.fw-tab-btn.active { color: var(--fw-gold-dark); border-bottom-color: var(--fw-gold); }

.fw-books-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--fw-space-3);
}

.fw-book-card {
  padding: var(--fw-space-4);
  background: var(--fw-surface);
  border: 1px solid var(--fw-border);
  border-radius: var(--fw-radius-lg);
  cursor: pointer;
  transition: all var(--fw-transition);
  text-align: left;
  width: 100%;
}
.fw-book-card:hover {
  border-color: var(--fw-gold);
  box-shadow: var(--fw-shadow);
  transform: translateY(-1px);
}
.fw-book-card:focus {
  outline: 2px solid var(--fw-gold);
  outline-offset: 2px;
}

.fw-book-name {
  font-size: var(--fw-text-sm);
  font-weight: 700;
  color: var(--fw-text);
  margin-bottom: var(--fw-space-2);
}
.fw-book-meta {
  font-size: var(--fw-text-xs);
  color: var(--fw-text-muted);
  margin-bottom: var(--fw-space-3);
}

.fw-book-progress {
  height: 4px;
  background: var(--fw-border);
  border-radius: 2px;
  overflow: hidden;
}
.fw-book-progress-fill {
  height: 100%;
  background: linear-gradient(to right, var(--fw-gold), var(--fw-gold-light));
  border-radius: 2px;
  transition: width var(--fw-transition-slow);
}

/* =====================================================================
   ABOUT / LOGO SECTION
   ===================================================================== */
.fw-about-section {
  background: linear-gradient(135deg, var(--fw-midnight) 0%, var(--fw-navy) 100%);
  padding: var(--fw-space-16) 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.fw-about-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23F2AE30' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.fw-about-inner {
  position: relative;
  z-index: 1;
}

/* Logo placeholder box */
.fw-logo-showcase {
  width: 180px;
  height: 180px;
  margin: 0 auto var(--fw-space-8);
  border-radius: var(--fw-radius-xl);
  background: rgba(255,255,255,0.06);
  border: 2px dashed rgba(242, 174, 48, 0.4);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--fw-space-2);
  color: rgba(255,255,255,0.3);
  font-size: var(--fw-text-sm);
  transition: all var(--fw-transition);
}
.fw-logo-showcase.has-logo {
  border-style: solid;
  border-color: rgba(242, 174, 48, 0.3);
  background: transparent;
  overflow: hidden;
}
.fw-logo-showcase img { width: 100%; height: 100%; object-fit: contain; }

.fw-about-title {
  font-size: clamp(var(--fw-text-xl), 3vw, var(--fw-text-3xl));
  font-weight: 800;
  color: #FFFFFF;
  margin-bottom: var(--fw-space-4);
  letter-spacing: -0.02em;
}
.fw-about-desc {
  font-size: var(--fw-text-lg);
  color: rgba(255,255,255,0.65);
  max-width: 560px;
  margin: 0 auto var(--fw-space-8);
  line-height: 1.7;
}

.fw-stats-row {
  display: flex;
  justify-content: center;
  gap: var(--fw-space-8);
  flex-wrap: wrap;
}
.fw-stat {
  text-align: center;
}
.fw-stat-number {
  font-size: var(--fw-text-3xl);
  font-weight: 800;
  color: var(--fw-gold);
  display: block;
  letter-spacing: -0.02em;
}
.fw-stat-label {
  font-size: var(--fw-text-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.5);
  font-weight: 600;
}

/* =====================================================================
   EPISODE PAGE
   ===================================================================== */
.fw-episode-header {
  background: linear-gradient(160deg, var(--fw-midnight), var(--fw-navy));
  padding: var(--fw-space-12) 0 var(--fw-space-16);
  text-align: center;
  color: #FFFFFF;
}

.fw-episode-book-badge {
  display: inline-block;
  padding: var(--fw-space-1) var(--fw-space-4);
  background: rgba(242, 174, 48, 0.15);
  border: 1px solid rgba(242, 174, 48, 0.3);
  border-radius: var(--fw-radius-full);
  font-size: var(--fw-text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--fw-gold);
  margin-bottom: var(--fw-space-4);
}

.fw-episode-title { font-size: clamp(var(--fw-text-2xl), 4vw, var(--fw-text-3xl)); font-weight: 800; margin-bottom: var(--fw-space-3); }
.fw-episode-meta { color: rgba(255,255,255,0.6); font-size: var(--fw-text-sm); }

.fw-episode-body {
  padding: var(--fw-space-10) 0;
}

.fw-episode-hero-grid {
  align-items: center;
  display: grid;
  gap: var(--fw-space-8);
  text-align: left;
}

.fw-episode-reference {
  color: var(--fw-gold-light);
  font-family: var(--fw-font-serif);
  font-size: var(--fw-text-lg);
  margin-bottom: var(--fw-space-2);
}

.fw-episode-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--fw-space-2) var(--fw-space-5);
}

.fw-episode-artwork {
  align-items: center;
  aspect-ratio: 1;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--fw-radius-xl);
  display: flex;
  justify-content: center;
  justify-self: center;
  max-width: 240px;
  overflow: hidden;
  width: 100%;
}

.fw-episode-artwork img { height: 100%; object-fit: cover; width: 100%; }
.fw-episode-artwork .fw-logo-placeholder { color: var(--fw-gold); font-size: var(--fw-text-4xl); font-weight: 800; }

.fw-episode-player,
.fw-inline-state {
  background: var(--fw-surface);
  border: 1px solid var(--fw-border);
  border-radius: var(--fw-radius-lg);
  margin-bottom: var(--fw-space-8);
  padding: var(--fw-space-6);
}

.fw-episode-player audio { display: block; margin-top: var(--fw-space-3); width: 100%; }
.fw-inline-state { display: grid; gap: var(--fw-space-1); }
.fw-inline-state span { color: var(--fw-text-muted); }

.fw-scripture-excerpt {
  border-left: 4px solid var(--fw-gold);
  color: var(--fw-text-muted);
  font-family: var(--fw-font-serif);
  line-height: 1.8;
  margin: 0 0 var(--fw-space-10);
  padding-left: var(--fw-space-6);
}

.fw-scripture-excerpt cite { display: block; font-family: var(--fw-font-ui); font-size: var(--fw-text-sm); font-style: normal; font-weight: 700; margin-top: var(--fw-space-3); }
.fw-transcript h2 { margin-bottom: var(--fw-space-6); }

.fw-episode-nav {
  border-top: 1px solid var(--fw-border);
  display: grid;
  gap: var(--fw-space-4);
  grid-template-columns: 1fr;
  margin-top: var(--fw-space-12);
  padding-top: var(--fw-space-8);
}

.fw-episode-nav a { border: 1px solid var(--fw-border); border-radius: var(--fw-radius-lg); display: grid; gap: var(--fw-space-1); padding: var(--fw-space-4); text-decoration: none; }
.fw-episode-nav a:last-child { text-align: right; }
.fw-episode-nav span { color: var(--fw-text-muted); font-size: var(--fw-text-xs); text-transform: uppercase; letter-spacing: .08em; }

/* Bible study library */
.fw-library-filters {
  align-items: end;
  background: var(--fw-surface);
  border: 1px solid var(--fw-border);
  border-radius: var(--fw-radius-lg);
  display: grid;
  gap: var(--fw-space-4);
  margin-bottom: var(--fw-space-8);
  padding: var(--fw-space-5);
}

.fw-library-filters label { display: grid; gap: var(--fw-space-2); }
.fw-library-filters label > span { color: var(--fw-text-muted); font-size: var(--fw-text-xs); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.fw-library-filters select,
.fw-library-filters input { background: var(--fw-bg); border: 1px solid var(--fw-border-dark); border-radius: var(--fw-radius); color: var(--fw-text); min-height: 44px; padding: var(--fw-space-2) var(--fw-space-3); width: 100%; }
.fw-filter-clear { align-self: center; font-weight: 600; text-align: center; }

.fw-library-list { display: grid; gap: var(--fw-space-3); }
.fw-library-card { background: var(--fw-surface); border: 1px solid var(--fw-border); border-radius: var(--fw-radius-lg); transition: border-color var(--fw-transition), box-shadow var(--fw-transition); }
.fw-library-card:hover { border-color: var(--fw-gold-dark); box-shadow: var(--fw-shadow); }
.fw-library-card-link { align-items: center; color: inherit; display: flex; gap: var(--fw-space-4); padding: var(--fw-space-5); text-decoration: none; }
.fw-library-play { align-items: center; background: var(--fw-midnight); border-radius: 50%; color: var(--fw-gold); display: flex; flex: 0 0 44px; height: 44px; justify-content: center; padding-left: 2px; }
.fw-library-card-copy { display: grid; gap: 2px; min-width: 0; }
.fw-library-reference { color: var(--fw-gold-dark); font-family: var(--fw-font-serif); font-size: var(--fw-text-sm); font-weight: 700; }
.fw-library-title { font-size: var(--fw-text-lg); font-weight: 700; }
.fw-library-meta { color: var(--fw-text-muted); font-size: var(--fw-text-sm); }

.fw-coverage-summary { align-items: center; display: flex; gap: var(--fw-space-4); margin-top: var(--fw-space-5); max-width: 520px; }
.fw-coverage-summary .fw-book-progress { flex: 1; margin: 0; }
.fw-coverage-summary strong { color: var(--fw-gold-light); }

.fw-chapter-grid { display: grid; gap: var(--fw-space-3); grid-template-columns: repeat(2, minmax(0, 1fr)); }
.fw-chapter-card { background: var(--fw-surface); border: 1px solid var(--fw-border); border-radius: var(--fw-radius); color: inherit; display: grid; gap: 2px; padding: var(--fw-space-4); position: relative; text-decoration: none; }
.fw-chapter-card:hover,
.fw-chapter-card.has-studies { border-color: var(--fw-gold-dark); }
.fw-chapter-card span { color: var(--fw-text-muted); font-size: var(--fw-text-xs); }
.fw-chapter-card .fw-chapter-percent { color: var(--fw-gold-dark); font-weight: 700; position: absolute; right: var(--fw-space-3); top: var(--fw-space-3); }

@media (min-width: 640px) {
  .fw-episode-hero-grid { grid-template-columns: minmax(0, 1fr) 220px; }
  .fw-episode-nav { grid-template-columns: 1fr 1fr; }
  .fw-chapter-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (min-width: 900px) {
  .fw-library-filters { grid-template-columns: 1.5fr .7fr 1.2fr auto auto; }
  .fw-chapter-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}

/* =====================================================================
   FOOTER
   ===================================================================== */
.fw-footer {
  background: var(--fw-midnight);
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: var(--fw-space-10) 0 var(--fw-space-6);
  color: rgba(255,255,255,0.6);
}

.fw-footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--fw-space-8);
  margin-bottom: var(--fw-space-8);
}
@media (min-width: 640px) { .fw-footer-grid { grid-template-columns: 2fr 1fr 1fr; } }

.fw-footer-brand .fw-logo { margin-bottom: var(--fw-space-4); }
.fw-footer-desc { font-size: var(--fw-text-sm); line-height: 1.6; color: rgba(255,255,255,0.5); }

.fw-footer-col-title {
  font-size: var(--fw-text-xs);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #FFFFFF;
  font-weight: 700;
  margin-bottom: var(--fw-space-4);
}

.fw-footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--fw-space-2);
}
.fw-footer-links a {
  font-size: var(--fw-text-sm);
  color: rgba(255,255,255,0.55);
  transition: color var(--fw-transition);
  text-decoration: none;
}
.fw-footer-links a:hover { color: var(--fw-gold); text-decoration: none; }

.fw-footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: var(--fw-space-6);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: var(--fw-space-4);
  font-size: var(--fw-text-xs);
  color: rgba(255,255,255,0.35);
}

/* =====================================================================
   UTILITIES
   ===================================================================== */
.fw-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--fw-space-2);
  padding: var(--fw-space-2) var(--fw-space-5);
  font-size: var(--fw-text-sm);
  font-weight: 600;
  border-radius: var(--fw-radius-full);
  cursor: pointer;
  transition: all var(--fw-transition);
  text-decoration: none;
  border: none;
  white-space: nowrap;
}
.fw-btn-primary {
  background: var(--fw-gold);
  color: var(--fw-midnight);
  box-shadow: 0 2px 8px rgba(242, 174, 48, 0.3);
}
.fw-btn-primary:hover {
  background: var(--fw-gold-light);
  color: var(--fw-midnight);
  transform: translateY(-1px);
  text-decoration: none;
}
.fw-btn-outline {
  background: transparent;
  color: var(--fw-text);
  border: 1px solid var(--fw-border-dark);
}
.fw-btn-outline:hover {
  border-color: var(--fw-gold);
  color: var(--fw-gold-dark);
  text-decoration: none;
}
.fw-btn-ghost {
  background: transparent;
  color: rgba(255,255,255,0.8);
  border: 1px solid rgba(255,255,255,0.2);
}
.fw-btn-ghost:hover {
  background: rgba(255,255,255,0.08);
  color: #FFFFFF;
  text-decoration: none;
}

/* Animations */
@keyframes fw-fade-in-up {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fw-animate-in {
  animation: fw-fade-in-up 0.5s ease forwards;
}
.fw-animate-delay-1 { animation-delay: 0.1s; opacity: 0; }
.fw-animate-delay-2 { animation-delay: 0.2s; opacity: 0; }
.fw-animate-delay-3 { animation-delay: 0.3s; opacity: 0; }

/* =====================================================================
   RESPONSIVE TWEAKS
   ===================================================================== */
@media (max-width: 480px) {
  .fw-schedule-item { grid-template-columns: 60px 1fr; }
  .fw-schedule-badge { display: none; }
  .fw-books-grid { grid-template-columns: repeat(2, 1fr); }
}

/* =====================================================================
   LOADING SKELETON
   ===================================================================== */
.fw-skeleton {
  background: linear-gradient(90deg, var(--fw-border) 25%, var(--fw-border-dark) 50%, var(--fw-border) 75%);
  background-size: 200% 100%;
  animation: fw-shimmer 1.5s infinite;
  border-radius: var(--fw-radius);
}
@keyframes fw-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* =====================================================================
   WORDPRESS BLOCKS: basic compatibility
   ===================================================================== */
.entry-content h1, .entry-content h2, .entry-content h3 { margin: 1.5em 0 0.5em; }
.entry-content p  { margin-bottom: 1.2em; line-height: 1.7; }
.entry-content ul, .entry-content ol { margin: 1em 0 1em 1.5em; }
.entry-content blockquote {
  border-left: 4px solid var(--fw-gold);
  padding-left: var(--fw-space-5);
  font-family: var(--fw-font-serif);
  font-style: italic;
  color: var(--fw-text-muted);
  margin: 1.5em 0;
}

/* =====================================================================
   ADMIN SCHEDULER (wp-admin page)
   ===================================================================== */
.fw-admin-scheduler {
  max-width: 900px;
}
.fw-admin-scheduler h2 { font-family: var(--fw-font-ui); }

.fw-scheduler-controls {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

/* =====================================================================
   WORDPRESS NAVIGATION MENUS
   ===================================================================== */
.fw-nav-list,
.fw-mobile-nav-list,
.fw-footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
}

.fw-nav-list {
  display: flex;
  align-items: center;
  gap: var(--fw-space-1);
}

.fw-nav .current-menu-item > a,
.fw-nav .current_page_item > a {
  color: #FFFFFF;
  background: rgba(255,255,255,0.1);
}

.fw-mobile-nav-list {
  display: flex;
  flex-direction: column;
  gap: var(--fw-space-2);
}

.fw-mobile-nav-list a {
  display: block;
}

.fw-live-badge.is-setup,
.fw-live-badge.is-standby {
  display: flex;
  color: var(--fw-gold-light);
  background: rgba(242, 174, 48, 0.10);
  border-color: rgba(242, 174, 48, 0.28);
}

.fw-live-badge.is-setup .fw-live-dot,
.fw-live-badge.is-standby .fw-live-dot {
  background: var(--fw-gold);
  animation: none;
}

/* =====================================================================
   INNER PAGES, ARCHIVES, SEARCH, AND EMPTY STATES
   ===================================================================== */
.fw-page-header {
  background: linear-gradient(160deg, var(--fw-midnight), var(--fw-navy));
  padding: var(--fw-space-12) 0;
  color: #FFFFFF;
  text-align: center;
}

.fw-page-kicker {
  color: var(--fw-gold);
  font-size: var(--fw-text-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  margin-bottom: var(--fw-space-3);
  text-transform: uppercase;
}

.fw-page-title {
  color: #FFFFFF;
  font-size: clamp(var(--fw-text-2xl), 5vw, var(--fw-text-4xl));
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.fw-page-desc {
  color: rgba(255,255,255,0.70);
  font-size: var(--fw-text-lg);
  line-height: 1.65;
  margin: var(--fw-space-4) auto 0;
  max-width: 680px;
}

.fw-page-desc p {
  margin: 0;
}

.fw-page-body {
  padding: var(--fw-space-10) 0 var(--fw-space-16);
}

.fw-content-list {
  display: grid;
  gap: var(--fw-space-4);
}

.fw-content-card {
  border-top: 1px solid var(--fw-border);
  padding: var(--fw-space-6) 0;
}

.fw-content-card:first-child {
  border-top: 0;
}

.fw-content-meta {
  color: var(--fw-gold-dark);
  font-size: var(--fw-text-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  margin-bottom: var(--fw-space-2);
  text-transform: uppercase;
}

.fw-content-title {
  font-size: var(--fw-text-xl);
  margin-bottom: var(--fw-space-3);
}

.fw-content-title a {
  color: var(--fw-text);
}

.fw-content-excerpt {
  color: var(--fw-text-muted);
}

.fw-pagination {
  margin-top: var(--fw-space-8);
}

.fw-pagination .nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--fw-space-2);
  justify-content: center;
}

.fw-pagination .page-numbers {
  border: 1px solid var(--fw-border-dark);
  border-radius: var(--fw-radius);
  padding: var(--fw-space-2) var(--fw-space-3);
}

.fw-pagination .current {
  background: var(--fw-gold);
  border-color: var(--fw-gold);
  color: var(--fw-midnight);
  font-weight: 700;
}

.fw-empty-state {
  background: var(--fw-surface);
  border: 1px solid var(--fw-border);
  border-radius: var(--fw-radius-lg);
  margin-inline: auto;
  max-width: 680px;
  padding: var(--fw-space-10) var(--fw-space-6);
  text-align: center;
}

.fw-empty-state h2 {
  margin-bottom: var(--fw-space-3);
}

.fw-empty-state p {
  color: var(--fw-text-muted);
  margin: 0 auto var(--fw-space-6);
  max-width: 520px;
}

.fw-error-page {
  align-items: center;
  background: linear-gradient(160deg, var(--fw-midnight), var(--fw-navy));
  display: flex;
  min-height: calc(100vh - 64px - var(--fw-player-height));
  padding: var(--fw-space-16) 0;
  text-align: center;
}

.fw-error-code {
  color: var(--fw-gold);
  font-size: clamp(4rem, 14vw, 8rem);
  font-weight: 800;
  letter-spacing: -0.06em;
  line-height: 0.85;
  margin-bottom: var(--fw-space-6);
}

.fw-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--fw-space-3);
  justify-content: center;
  margin-top: var(--fw-space-8);
}

.fw-search-form {
  margin: var(--fw-space-6) auto 0;
  max-width: 560px;
}

.fw-search-form form {
  display: flex;
  gap: var(--fw-space-2);
}

.fw-search-form input[type="search"] {
  border: 1px solid rgba(255,255,255,0.28);
  border-radius: var(--fw-radius-full);
  flex: 1;
  min-width: 0;
  padding: var(--fw-space-3) var(--fw-space-5);
}

.fw-search-form input[type="submit"] {
  background: var(--fw-gold);
  border: 0;
  border-radius: var(--fw-radius-full);
  color: var(--fw-midnight);
  cursor: pointer;
  font-weight: 700;
  padding: var(--fw-space-3) var(--fw-space-5);
}

.fw-play-btn:disabled,
.fw-ctrl-btn:disabled {
  cursor: not-allowed;
  filter: saturate(0.35);
  opacity: 0.68;
  transform: none;
}

.fw-player-status.is-setup {
  color: var(--fw-gold-light);
}

.fw-book-card-empty {
  cursor: default;
}

.fw-book-card-empty:hover {
  border-color: var(--fw-border);
  box-shadow: none;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }

  .fw-animate-delay-1,
  .fw-animate-delay-2,
  .fw-animate-delay-3 {
    opacity: 1;
    transform: none;
  }
}
