/* =========================================
   Bear His Cross - Main Styles (Dark Theme)
   With Fixed Mobile Menu + Audio Player
   ========================================= */

:root {
  --bhc-bg: #000913;
  --bhc-bg-alt: #000e22;
  --bhc-section: #001331;
  --bhc-section-alt: #001840;
  --bhc-card: #001d4f;
  --bhc-border: #00276d;
  --bhc-accent: #a01000;
  --bhc-accent-hover: #850d00;
  --bhc-text: #ffffff;
  --bhc-text-muted: #c4d0f7;
  --bhc-heading: #ffffff;
  --bhc-shadow-soft: 0 18px 35px rgba(0, 0, 0, 0.55);
  --bhc-radius-lg: 24px;
  --bhc-radius-md: 18px;
  --bhc-radius-pill: 999px;
  --bhc-max-width: 1120px;
}

/* ---------- Base ---------- */

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background: radial-gradient(circle at top, #001331 0, #000913 45%, #000e22 100%);
  color: var(--bhc-text);
  line-height: 1.6;
  padding-bottom: 0; /* Will be adjusted by JS when player opens */
}

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

/* ---------- Layout helpers ---------- */

.container {
  width: 100%;
  max-width: var(--bhc-max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.section {
  padding: 2.5rem 0;
}

.section-alt {
  background: radial-gradient(circle at top, #001331 0, #000913 70%);
}

.section-subscribe {
  background: radial-gradient(circle at top, #001840 0, #000913 70%);
}

/* ---------- Typography ---------- */

h1,
h2,
h3,
h4 {
  margin: 0 0 0.5em;
  color: var(--bhc-heading);
  line-height: 1.2;
}

p {
  margin: 0 0 0.9em;
  color: var(--bhc-text-muted);
}

a {
  color: var(--bhc-accent);
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}

a:hover,
a:focus-visible {
  color: #ffffff;
}

/* ---------- Header ---------- */

.bhc-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(18px);
  background: rgba(0, 9, 19, 0.95);
  border-bottom: 1px solid rgba(0, 39, 109, 0.7);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 0.75rem 1.25rem;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  z-index: 1001;
}

.brand-title {
  font-size: 1.1rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--bhc-text);
}

.brand-subtitle {
  font-size: 0.8rem;
  color: var(--bhc-text-muted);
}

/* Desktop Navigation - Always visible on desktop */
.desktop-nav {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.desktop-nav a {
  color: var(--bhc-text-muted);
  transition: color 0.2s ease;
}

.desktop-nav a:hover {
  color: var(--bhc-accent);
}

.nav-cta {
  padding: 0.55rem 1.15rem;
  border-radius: var(--bhc-radius-pill);
  border: 1px solid var(--bhc-accent);
  color: #ffffff !important;
  background: linear-gradient(135deg, var(--bhc-accent), var(--bhc-accent-hover));
  box-shadow: var(--bhc-shadow-soft);
}

.nav-cta:hover {
  background: var(--bhc-accent-hover);
  transform: translateY(-1px);
}

/* Mobile Hamburger Button */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  width: 32px;
  height: 32px;
  padding: 0;
  z-index: 10001;
  position: relative;
}

.nav-toggle span {
  display: block;
  height: 3px;
  width: 100%;
  background: var(--bhc-text);
  border-radius: 999px;
  transition: all 0.3s ease;
}

/* Hamburger Animation */
body.nav-open .nav-toggle span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

body.nav-open .nav-toggle span:nth-child(2) {
  opacity: 0;
}

body.nav-open .nav-toggle span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* Mobile Menu Overlay - Hidden by default */
.mobile-menu-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.mobile-menu {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, rgba(0, 19, 49, 0.98) 0%, rgba(0, 9, 19, 0.98) 100%);
  backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  transform: translateY(-100%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 10000;
}

/* When nav is open */
body.nav-open .mobile-menu-overlay {
  display: block;
  opacity: 1;
}

body.nav-open .mobile-menu {
  transform: translateY(0);
}

body.nav-open {
  overflow: hidden;
}

/* Mobile Menu Header */
.mobile-menu-header {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 5rem 2rem 2rem;
  border-bottom: 1px solid rgba(0, 39, 109, 0.4);
  text-align: center;
}

.mobile-brand-title {
  font-size: 1.6rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--bhc-text);
  font-weight: 700;
}

.mobile-brand-subtitle {
  font-size: 0.9rem;
  color: var(--bhc-text-muted);
  letter-spacing: 0.05em;
}

/* Mobile Navigation Links */
.mobile-nav {
  display: flex;
  flex-direction: column;
  padding: 2rem 0;
  flex: 1;
  justify-content: center;
}

.mobile-nav a {
  padding: 1.25rem 2.5rem;
  font-size: 1.2rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--bhc-text);
  text-align: center;
  transition: all 0.2s ease;
}

.mobile-nav a:hover,
.mobile-nav a:active {
  background: rgba(0, 39, 109, 0.2);
  color: var(--bhc-accent);
}

.mobile-nav-cta {
  margin: 2rem 2.5rem !important;
  padding: 1rem 2rem !important;
  border-radius: var(--bhc-radius-pill);
  border: 2px solid var(--bhc-accent) !important;
  background: linear-gradient(135deg, var(--bhc-accent), var(--bhc-accent-hover)) !important;
  color: #ffffff !important;
  text-align: center;
  font-weight: 600;
  font-size: 1.1rem !important;
  box-shadow: var(--bhc-shadow-soft);
}

.mobile-nav-cta:hover {
  background: var(--bhc-accent-hover) !important;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(160, 16, 0, 0.5);
}

/* Mobile Close Button */
.mobile-nav-close {
  position: absolute;
  top: 2rem;
  right: 2rem;
  background: rgba(0, 39, 109, 0.3);
  border: 1px solid rgba(0, 39, 109, 0.5);
  border-radius: 50%;
  color: var(--bhc-text);
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 10002;
}

.mobile-nav-close:hover {
  background: rgba(160, 16, 0, 0.3);
  border-color: var(--bhc-accent);
  color: var(--bhc-accent);
  transform: rotate(90deg);
}

/* Desktop styles - desktop nav always visible, mobile hidden */
@media (min-width: 1170px) {
  .nav-toggle {
    display: none !important;
  }

  .desktop-nav {
    display: flex;
  }

  .mobile-menu-overlay,
  .mobile-menu {
    display: none !important;
  }
  
  .mobile-nav-close {
    display: none !important;
  }
}

/* Mobile/Tablet - show hamburger and mobile menu, hide desktop nav */
@media (max-width: 1169px) {
  .nav-toggle {
    display: flex;
  }

  .desktop-nav {
    display: none;
  }
  
  /* Mobile menu shown when nav-open class is added to body */
  body.nav-open .mobile-menu-overlay {
    display: block !important;
  }
  
  body.nav-open .mobile-menu {
    display: flex !important;
  }
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  padding: 3rem 0 2.5rem;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: brightness(0.35);
  transform: scale(1.05);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top, rgba(0, 19, 49, 0.9), #000913);
}

.hero-content {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 2.4rem;
  align-items: center;
}

.hero-text {
  max-width: 640px;
}

.hero-kicker {
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--bhc-text-muted);
}

.hero h1 {
  font-size: clamp(2rem, 2.8rem, 3.1rem);
  margin-bottom: 0.3rem;
}

.hero-description {
  max-width: 32rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

/* Hero card */

.hero-card {
  background: radial-gradient(circle at top, #00225e 0, #000913 75%);
  border-radius: var(--bhc-radius-lg);
  border: 1px solid rgba(0, 39, 109, 0.9);
  box-shadow: var(--bhc-shadow-soft);
  padding: 1.1rem 1.1rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.hero-card-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--bhc-text-muted);
}

.hero-card-title {
  font-size: 1.1rem;
}

.hero-card-image {
  border-radius: 16px;
  overflow: hidden;
}

/* ---------- Buttons & links ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.4rem;
  border-radius: var(--bhc-radius-pill);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease,
    transform 0.1s ease, box-shadow 0.18s ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--bhc-accent), var(--bhc-accent-hover));
  color: #ffffff;
  box-shadow: var(--bhc-shadow-soft);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: var(--bhc-accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 22px 45px rgba(0, 0, 0, 0.7);
}

.btn-outline {
  background: transparent;
  border-color: var(--bhc-border);
  color: var(--bhc-text-muted);
}

.btn-outline:hover,
.btn-outline:focus-visible {
  background: rgba(0, 19, 49, 0.9);
  color: var(--bhc-text);
}

.btn-secondary {
  background: #001840;
  color: #ffffff;
  border-color: rgba(0, 39, 109, 0.8);
}

.btn-secondary:hover {
  background: #00225e;
}

.btn-full {
  width: 100%;
  justify-content: center;
}

.link-arrow {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--bhc-text-muted);
}

.link-arrow::after {
  content: "→";
  margin-left: 0.4rem;
}

/* ---------- Section headings ---------- */

.section-heading {
  margin-bottom: 1.6rem;
}

.section-heading h2 {
  font-size: 1.4rem;
}

.section-heading p {
  font-size: 0.95rem;
}

/* ---------- Grids ---------- */

.grid {
  display: grid;
  gap: 1.5rem;
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.grid-3-desktop {
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

/* ---------- Cards ---------- */

.card {
  background: radial-gradient(circle at top, #001840 0, #000e22 75%);
  border-radius: var(--bhc-radius-md);
  border: 1px solid rgba(0, 39, 109, 0.85);
  box-shadow: var(--bhc-shadow-soft);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.card-media img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.card-media-centered {
  display: flex;
  justify-content: center;
  padding-top: 1.2rem;
}

/* Host Image Container */
.host-media {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1.2rem 0;
  height: auto !important;
}

.host-media img {
  width: 150px;
  height: 150px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid rgba(160, 16, 0, 0.9);
}

.host-image {
  width: 150px;
  height: 150px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 50%;
  display: block;
  border: 3px solid rgba(160, 16, 0, 0.9);
  margin: 0 auto;
}

.card-body {
  padding: 1rem 1.1rem 1.2rem;
}

.card-meta {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--bhc-text-muted);
}

.card-title {
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.card-text {
  font-size: 0.9rem;
}

.card-actions {
  margin-top: 0.85rem;
}

/* Episodes / Topics / Blog variations */

.episode-card .card-media img,
.topic-card .card-media img,
.blog-card .card-media img {
  height: 210px;
}

/* ---------- About ---------- */

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 2rem;
  align-items: flex-start;
}

.about-verse {
  font-style: italic;
  color: var(--bhc-text-muted);
}

/* ---------- Subscribe ---------- */

.subscribe-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 2rem;
  align-items: center;
}

.subscribe-links {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.4rem;
  font-size: 0.9rem;
}

/* ---------- Section footer ---------- */

.section-footer {
  margin-top: 1.6rem;
}

/* ---------- Audio Player ---------- */

.audio-player {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 13, 34, 0.98);
  backdrop-filter: blur(20px);
  border-top: 1px solid rgba(0, 39, 109, 0.7);
  padding: 0.75rem 1rem;
  display: none;
  flex-direction: column;
  gap: 0.75rem;
  z-index: 100;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.6);
}

.audio-player.active {
  display: flex;
}

.audio-close {
  position: absolute;
  top: 0.5rem;
  right: 0.75rem;
  background: none;
  border: none;
  color: var(--bhc-text-muted);
  font-size: 1.75rem;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
  line-height: 1;
}

.audio-close:hover {
  color: var(--bhc-accent);
}

.audio-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-right: 2rem;
}

.audio-artwork {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}

.audio-text {
  flex: 1;
  min-width: 0;
}

.audio-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--bhc-text);
  margin: 0 0 0.15rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.audio-time {
  font-size: 0.75rem;
  color: var(--bhc-text-muted);
  margin: 0;
}

.audio-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.audio-btn-play {
  background: linear-gradient(135deg, var(--bhc-accent), var(--bhc-accent-hover));
  border: none;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(160, 16, 0, 0.4);
}

.audio-btn-play:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 16px rgba(160, 16, 0, 0.6);
}

.audio-btn-play:active {
  transform: scale(0.95);
}

.audio-progress-container {
  flex: 1;
  position: relative;
}

.audio-seek {
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: rgba(0, 39, 109, 0.5);
  outline: none;
  -webkit-appearance: none;
  cursor: pointer;
}

.audio-seek::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--bhc-accent);
  cursor: pointer;
  transition: transform 0.2s ease;
}

.audio-seek::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.audio-seek::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--bhc-accent);
  cursor: pointer;
  border: none;
  transition: transform 0.2s ease;
}

.audio-seek::-moz-range-thumb:hover {
  transform: scale(1.2);
}

.audio-seek::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(
    to right,
    var(--bhc-accent) 0%,
    var(--bhc-accent) var(--seek-progress, 0%),
    rgba(0, 39, 109, 0.5) var(--seek-progress, 0%),
    rgba(0, 39, 109, 0.5) 100%
  );
}

/* Desktop layout - horizontal */
@media (min-width: 768px) {
  .audio-player {
    flex-direction: row;
    align-items: center;
    padding: 1rem 1.5rem;
  }

  .audio-info {
    flex: 0 0 280px;
  }

  .audio-controls {
    flex: 1;
  }
}

/* ---------- Footer ---------- */

.bhc-footer {
  border-top: 1px solid rgba(0, 39, 109, 0.6);
  padding: 1.2rem 0 1.6rem;
  background: #000913;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.8rem;
  color: var(--bhc-text-muted);
}

.footer-scripture {
  font-style: italic;
}

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
  .hero-content {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-card {
    order: -1;
  }

  .about-grid,
  .subscribe-inner {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 600px) {
  .section {
    padding: 2rem 0;
  }

  .hero {
    padding-top: 2.2rem;
  }

  .hero h1 {
    font-size: 1.9rem;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .audio-artwork {
    width: 40px;
    height: 40px;
  }

  .audio-btn-play {
    width: 40px;
    height: 40px;
  }
}
