/* BibleGenerator.com Brand Styling - Enhanced with Graphic Design System */

/* ========================================
   PHASE 2 & 3: DESIGN SYSTEM VARIABLES
   Golden Ratio (φ = 1.618) + Fibonacci
   ======================================== */

:root {
  /* Golden Ratio HSL Color System - Primary Blue */
  --blue-50: hsl(217, 91%, 97%);
  --blue-100: hsl(217, 91%, 94%);
  --blue-200: hsl(217, 91%, 88%);
  --blue-300: hsl(217, 91%, 76%);
  --blue-500: hsl(217, 91%, 60%);
  --blue-600: hsl(217, 91%, 48%);
  --blue-700: hsl(217, 91%, 35%);
  --blue-900: hsl(217, 91%, 18%);

  /* Gray Scale with Consistent Saturation */
  --gray-50: hsl(218, 20%, 97%);
  --gray-100: hsl(218, 20%, 95%);
  --gray-200: hsl(218, 16%, 90%);
  --gray-300: hsl(218, 13%, 80%);
  --gray-400: hsl(218, 12%, 65%);
  --gray-500: hsl(218, 11%, 55%);
  --gray-600: hsl(218, 13%, 45%);
  --gray-700: hsl(218, 15%, 35%);
  --gray-800: hsl(218, 17%, 25%);
  --gray-900: hsl(218, 18%, 12%);

  /* Fibonacci Border Radii */
  --radius-sm: 3px;    /* Fibonacci: 3 */
  --radius-md: 5px;    /* Fibonacci: 5 */
  --radius-lg: 8px;    /* Fibonacci: 8 */
  --radius-xl: 13px;   /* Fibonacci: 13 */
  --radius-2xl: 21px;  /* Fibonacci: 21 */

  /* Elevation Shadow System */
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-2: 0 2px 4px rgba(0, 0, 0, 0.08);
  --shadow-3: 0 4px 8px rgba(0, 0, 0, 0.12);
  --shadow-4: 0 8px 16px rgba(0, 0, 0, 0.16);
  --shadow-5: 0 16px 32px rgba(0, 0, 0, 0.20);

  /* 8pt Baseline Grid */
  --space-1: 8px;   /* 8px × 1 */
  --space-2: 16px;  /* 8px × 2 */
  --space-3: 24px;  /* 8px × 3 */
  --space-4: 32px;  /* 8px × 4 */
  --space-5: 40px;  /* 8px × 5 */
  --space-6: 48px;  /* 8px × 6 */
  --space-8: 64px;  /* 8px × 8 */
  --space-10: 80px; /* 8px × 10 */
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  line-height: 1.6;
  color: #111827; /* gray-900 */
  background: linear-gradient(to bottom, rgba(239, 246, 255, 0.2), white, rgba(239, 246, 255, 0.1)); /* from-blue-50/20 via-white to-blue-50/10 */
  min-height: 100vh;
}

.container {
  max-width: 1280px; /* max-w-7xl */
  margin: 0 auto;
  padding: 0 1rem;
}

/* Navigation - Exact match to Navigation.jsx */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.95); /* bg-white/95 */
  backdrop-filter: blur(12px); /* backdrop-blur-sm */
  border-bottom: 1px solid #f3f4f6; /* border-gray-100 */
  z-index: 10;
  padding: 0.75rem 0;
}

.nav .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.25rem;
  font-weight: 400;
  letter-spacing: 0.1em; /* tracking-widest */
  color: #111827; /* gray-900 */
  text-decoration: none;
  transition: color 0.2s;
}

.logo:hover {
  color: #4b5563; /* gray-700 */
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.nav-links a {
  color: #4b5563; /* gray-600 */
  text-decoration: none;
  transition: color 0.2s;
  font-size: 0.875rem;
}

.nav-links a:hover {
  color: #111827; /* gray-900 */
}

.search-container {
  display: none;
}

@media (min-width: 640px) {
  .search-container {
    display: block;
  }
}

.search-input {
  padding: 0.5rem 1rem;
  border: 1px solid #e5e7eb; /* gray-200 */
  border-radius: 0.5rem;
  font-size: 0.875rem;
  background: white;
  transition: all 0.2s;
  min-width: 200px;
}

.search-input:focus {
  outline: none;
  border-color: #1e3a8a; /* blue-900 */
  box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.1);
}

/* Language Selector - Exact match to LanguageSelector.jsx */
.lang-selector {
  position: relative;
}

.lang-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #4b5563; /* gray-600 */
  background: transparent;
  border: none;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s;
}

.lang-btn:hover {
  color: #111827; /* gray-900 */
  background: #f3f4f6; /* gray-100 */
}

.lang-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 0.5rem;
  background: white;
  border: 1px solid #e5e7eb; /* gray-200 */
  border-radius: 0.5rem;
  box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
  max-height: 20rem;
  overflow-y: auto;
  min-width: 14rem;
  z-index: 20;
}

.lang-dropdown a {
  display: block;
  padding: 0.5rem 1rem;
  color: #374151; /* gray-700 */
  text-decoration: none;
  font-size: 0.875rem;
  transition: background 0.2s;
}

.lang-dropdown a:hover {
  background: #f3f4f6; /* gray-100 */
}

/* Main Content - Matches pt-16 from TopicPageClient */
.main {
  min-height: calc(100vh - 200px);
  padding-top: 4rem; /* pt-16 */
  padding-bottom: 2rem;
}

/* Topic Page - Enhanced to match React components exactly */
.topic-page {
  max-width: 56rem;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.topic-page-enhanced {
  position: relative;
}

.topic-bg-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(239, 246, 255, 0.3), rgba(255, 255, 255, 0.5), transparent);
  pointer-events: none;
}

.topic-content-wrapper {
  position: relative;
  max-width: 80rem; /* max-w-5xl */
  margin: 0 auto;
  padding: 0 1.5rem;
  padding-top: 4rem;
  padding-bottom: 4rem;
}

/* Header Section */
.topic-header-enhanced {
  text-align: center;
  margin-bottom: 3rem;
}

.topic-title-section {
  margin-bottom: 1.5rem;
}

.topic-title-main {
  font-size: 3rem; /* text-5xl */
  font-weight: 200; /* font-extralight */
  color: #111827; /* gray-900 */
  margin-bottom: 1rem;
  letter-spacing: -0.025em; /* tracking-tight */
  line-height: 1.1; /* leading-tight */
}

@media (min-width: 768px) {
  .topic-title-main {
    font-size: 3.75rem; /* md:text-6xl */
  }
}

.topic-title-label {
  display: block;
  font-size: 1.5rem; /* text-2xl */
  color: #6b7280; /* gray-500 */
  font-weight: 300; /* font-light */
  margin-bottom: 0.5rem;
  letter-spacing: 0.025em; /* tracking-wide */
}

@media (min-width: 768px) {
  .topic-title-label {
    font-size: 1.875rem; /* md:text-3xl */
  }
}

.topic-description-wrapper {
  max-width: 56rem; /* max-w-4xl */
  margin: 0 auto 2.5rem;
}

.topic-description {
  font-size: 1.25rem; /* text-xl */
  color: #4b5563; /* gray-600 */
  font-weight: 300; /* font-light */
  line-height: 1.625; /* leading-relaxed */
}

@media (min-width: 768px) {
  .topic-description {
    font-size: 1.5rem; /* md:text-2xl */
  }
}

/* Stats Section */
.topic-stats-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

@media (min-width: 640px) {
  .topic-stats-section {
    flex-direction: row;
  }
}

.verse-count-badge {
  display: inline-flex;
  align-items: center;
  padding: 1rem 2rem;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
  color: #374151; /* gray-700 */
  border-radius: 1rem; /* rounded-2xl */
  font-size: 1.125rem; /* text-lg */
  font-weight: 500; /* font-medium */
  border: 1px solid rgba(229, 231, 235, 0.5); /* border-gray-200/50 */
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.verse-count-icon {
  width: 1.5rem;
  height: 1.5rem;
  margin-right: 0.75rem;
  color: #3b82f6; /* blue-500 */
}

.verse-count-number {
  font-weight: 600; /* font-semibold */
  color: #111827; /* gray-900 */
}

.verse-count-label {
  margin-left: 0.25rem;
}

/* Tier Badges */
.tier-badge {
  padding: 0.75rem 1.5rem;
  border-radius: 1rem; /* rounded-2xl */
  font-size: 1rem; /* text-base */
  font-weight: 500; /* font-medium */
  border: 1px solid;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.tier-major {
  background: rgba(239, 246, 255, 0.8); /* blue-50/80 */
  color: #1d4ed8; /* blue-700 */
  border-color: rgba(191, 219, 254, 0.5); /* blue-200/50 */
}

.tier-popular {
  background: rgba(240, 253, 244, 0.8); /* green-50/80 */
  color: #15803d; /* green-700 */
  border-color: rgba(187, 247, 208, 0.5); /* green-200/50 */
}

.tier-featured {
  background: rgba(255, 251, 235, 0.8); /* amber-50/80 */
  color: #b45309; /* amber-700 */
  border-color: rgba(253, 230, 138, 0.5); /* amber-200/50 */
}

/* Intro/Outro Sections */
.topic-intro-enhanced, .topic-outro-enhanced {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  border-radius: 1rem; /* rounded-2xl */
  padding: 2.5rem;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(243, 244, 246, 0.5); /* border-gray-100/50 */
  margin-bottom: 2.5rem;
}

.intro-text, .outro-text {
  color: #374151; /* gray-700 */
  line-height: 1.625; /* leading-relaxed */
  font-size: 1.25rem; /* text-xl */
  font-weight: 300; /* font-light */
  text-align: center;
  max-width: none;
}

.intro-fallback {
  text-align: center;
}

.intro-subtext {
  color: #4b5563; /* gray-600 */
  font-size: 1.125rem; /* text-lg */
  font-weight: 300; /* font-light */
  margin-top: 1rem;
}

/* Synonyms Section */
.synonyms-section {
  text-align: center;
  margin-bottom: 2rem;
}

.synonyms-label {
  font-size: 1rem; /* text-base */
  color: #6b7280; /* gray-500 */
  margin-bottom: 1rem;
  font-weight: 500; /* font-medium */
}

.synonyms-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

.synonym-badge {
  padding: 0.5rem 1rem;
  background: rgba(239, 246, 255, 0.8); /* blue-50/80 */
  color: #1d4ed8; /* blue-700 */
  font-size: 0.875rem; /* text-sm */
  border-radius: 0.75rem; /* rounded-xl */
  font-weight: 500; /* font-medium */
  border: 1px solid rgba(191, 219, 254, 0.5); /* border-blue-200/50 */
  transition: background-color 0.2s;
  cursor: default;
}

.synonym-badge:hover {
  background: rgba(219, 234, 254, 0.8); /* blue-100/80 */
}

/* Featured Verses Section */
.featured-verses-section {
  margin: 3rem 0;
  max-width: 72rem; /* max-w-6xl */
  margin-left: auto;
  margin-right: auto;
}

.start-here-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(240, 253, 244, 1); /* green-50 */
  border: 1px solid rgba(187, 247, 208, 1); /* green-200 */
  border-radius: 9999px; /* rounded-full */
  margin-bottom: 1rem;
}

.check-icon {
  width: 1.25rem; /* w-5 */
  height: 1.25rem; /* h-5 */
  color: #16a34a; /* green-600 */
}

.start-here-text {
  font-size: 0.875rem; /* text-sm */
  font-weight: 600; /* font-semibold */
  color: #15803d; /* green-700 */
  text-transform: uppercase;
  letter-spacing: 0.05em; /* tracking-wide */
}

.featured-heading {
  font-size: 1.5rem; /* text-2xl */
  font-weight: 300; /* font-light */
  color: #111827; /* gray-900 */
  margin-bottom: 0.75rem;
}

@media (min-width: 768px) {
  .featured-heading {
    font-size: 1.875rem; /* md:text-3xl */
  }
}

.featured-subheading {
  color: #4b5563; /* gray-600 */
  max-width: 32rem; /* max-w-2xl */
  margin: 0 auto;
}

.featured-verse-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-top: 2rem;
}

@media (min-width: 768px) {
  .featured-verse-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .featured-verse-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.featured-verse-container {
  position: relative;
}

.featured-badge-wrapper {
  position: absolute;
  top: -0.75rem; /* -top-3 */
  left: 1rem; /* left-4 */
  z-index: 10;
}

.featured-badge {
  padding: 0.25rem 0.75rem; /* px-3 py-1 */
  background: #16a34a; /* bg-green-600 */
  color: white;
  font-size: 0.75rem; /* text-xs */
  font-weight: 600; /* font-semibold */
  border-radius: 9999px; /* rounded-full */
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.featured-ring {
  border: 2px solid rgba(187, 247, 208, 1) !important; /* ring-2 ring-green-200 */
}

.featured-divider {
  margin-top: 3rem;
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  max-width: 56rem; /* max-w-4xl */
  margin-left: auto;
  margin-right: auto;
}

.featured-divider-line {
  flex: 1;
  height: 1px;
}

.featured-divider-left {
  background: linear-gradient(to right, transparent, #d1d5db, #d1d5db); /* via-gray-300 to-gray-300 */
}

.featured-divider-right {
  background: linear-gradient(to left, transparent, #d1d5db, #d1d5db); /* via-gray-300 to-gray-300 */
}

.featured-divider-text {
  font-size: 0.875rem; /* text-sm */
  color: #6b7280; /* gray-500 */
  font-weight: 500; /* font-medium */
  text-transform: uppercase;
  letter-spacing: 0.05em; /* tracking-wide */
}

.text-center {
  text-align: center;
}

.mb-8 {
  margin-bottom: 2rem;
}

/* Verses Section */
.verses {
  margin: 3rem 0;
}

.verses-section {
  margin: 2rem 0;
}

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

.verses-divider {
  width: 4rem;
  height: 1px;
  background: linear-gradient(to right, transparent, #d1d5db, transparent);
  margin: 0 auto 1rem;
}

.verses-title {
  font-size: 1.5rem; /* text-2xl */
  font-weight: 300; /* font-light */
  color: #1f2937; /* gray-800 */
  letter-spacing: 0.025em; /* tracking-wide */
  margin: 1rem 0;
}

.verses h2 {
  font-size: 1.5rem;
  font-weight: 500;
  color: #111827;
  margin-bottom: 1.5rem;
  text-align: center;
}

.verse-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Verse Grid - Matches React TopicVerses */
.verse-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 768px) {
  .verse-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1280px) {
  .verse-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Verse Cards - Exact match to VerseCard.jsx */
.verse-card {
  background: rgba(255, 255, 255, 0.9); /* bg-white/90 */
  backdrop-filter: blur(12px); /* backdrop-blur-sm */
  border-radius: var(--radius-xl); /* Fibonacci: 13px */
  border: 1px solid rgba(243, 244, 246, 0.5); /* border-gray-100/50 */
  box-shadow: var(--shadow-2); /* Elevation: card rest */
  padding: var(--space-3);
  transition: all 0.3s;
}

.verse-card:hover {
  box-shadow: var(--shadow-3); /* Elevation: card hover */
}

.verse-content {
  margin-bottom: 1rem;
}

.quote-mark-open, .quote-mark-close {
  font-size: 1.875rem; /* text-3xl */
  color: #d1d5db; /* gray-300 */
  font-family: Georgia, serif;
  line-height: 1;
}

.quote-mark-open {
  margin-bottom: 0.5rem;
}

.quote-mark-close {
  text-align: right;
  margin-top: 0.5rem;
}

.verse-text {
  font-size: 1.125rem; /* text-lg */
  line-height: 1.625; /* leading-relaxed */
  color: #1f2937; /* gray-800 */
  font-weight: 300; /* font-light */
  letter-spacing: 0.025em; /* tracking-wide */
  text-indent: 1rem; /* indent-4 */
  margin: 0;
}

.verse-footer {
  padding-top: 1rem;
  border-top: 1px solid rgba(243, 244, 246, 0.8); /* border-gray-100/80 */
  display: flex;
  flex-direction: column;
}

.verse-reference {
  color: #111827; /* gray-900 */
  font-weight: 500; /* font-medium */
  font-size: 1rem; /* text-base */
}

.verse-translation {
  color: #6b7280; /* gray-500 */
  font-size: 0.875rem; /* text-sm */
  font-weight: 300; /* font-light */
}

/* Legacy verse styling (for older pages) */
.verse {
  background: white;
  border: 1px solid #f3f4f6;
  border-radius: 0.5rem;
  padding: 1.5rem;
  transition: all 0.2s;
}

.verse:hover {
  background: rgba(239, 246, 255, 0.5);
  border-color: #e5e7eb;
}

.verse-ref {
  display: block;
  font-style: normal;
  font-size: 0.875rem;
  color: #6b7280;
  font-weight: 500;
}

/* Load More Button */
.load-more-section {
  margin-top: 2.5rem;
  display: flex;
  justify-content: center;
}

.load-more-btn {
  padding: 0.5rem 1.5rem;
  background: #2563eb; /* bg-blue-600 */
  color: white;
  border: none;
  border-radius: 0.375rem; /* rounded-md */
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s;
}

.load-more-btn:hover {
  background: #1d4ed8; /* bg-blue-700 */
}

.load-more-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Related Topics - Matches RelatedTopics component */
.related-topics {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid #f3f4f6; /* border-gray-100 */
}

.related-topics h2 {
  font-size: 1.5rem;
  font-weight: 500;
  color: #111827; /* gray-900 */
  margin-bottom: 1rem;
  text-align: center;
}

.topic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}

.topic-card {
  background: white;
  border: 1px solid #f3f4f6; /* border-gray-100 */
  border-radius: var(--radius-lg); /* Fibonacci: 8px */
  padding: var(--space-2);
  text-decoration: none;
  color: inherit;
  transition: all 0.2s;
  box-shadow: var(--shadow-1); /* Elevation: subtle */
}

.topic-card:hover {
  background: rgba(239, 246, 255, 0.5); /* hover:bg-blue-50 */
  border-color: #e5e7eb;
  box-shadow: var(--shadow-2); /* Elevation: card rest */
}

.topic-card h3 {
  font-size: 0.875rem;
  font-weight: 500;
  color: #111827; /* gray-900 */
  margin-bottom: 0.25rem;
}

.topic-card .verse-count {
  font-size: 0.75rem;
  color: #6b7280; /* gray-500 - WCAG AA compliant 4.7:1 contrast */
}

/* Homepage */
.homepage {
  max-width: 1280px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.hero {
  text-align: center;
  padding: 4rem 1.5rem;
  margin-bottom: 3rem;
}

.hero h1 {
  font-size: 2.5rem;
  font-weight: 300;
  letter-spacing: 0.05em;
  color: #111827;
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.125rem;
  color: #6b7280;
  margin-bottom: 2rem;
}

.search-box {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  gap: 0.5rem;
}

.search-box input {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  font-size: 1rem;
  background: white;
}

.search-box input:focus {
  outline: none;
  border-color: #1e3a8a;
  box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.1);
}

.search-box button {
  padding: 0.75rem 1.5rem;
  background: #1e3a8a; /* bg-blue-900 */
  color: white;
  border: none;
  border-radius: 0.5rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}

.search-box button:hover {
  background: #1e40af; /* bg-blue-800 */
}

.featured-topics, .popular-topics, .browse-all {
  margin: 3rem 0;
}

.featured-topics h2, .popular-topics h2, .browse-all h2 {
  font-size: 1.875rem;
  font-weight: 300;
  letter-spacing: 0.05em;
  color: #111827;
  margin-bottom: 1.5rem;
  text-align: center;
}

.topic-grid.large {
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}

.topic-card.featured {
  border: 2px solid #1e3a8a;
}

.topic-preview {
  font-size: 0.875rem;
  color: #6b7280;
  margin: 0.5rem 0;
  line-height: 1.5;
}

.alphabet-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  max-width: 800px;
  margin: 0 auto;
}

.letter-link {
  display: inline-block;
  width: 2.5rem;
  height: 2.5rem;
  line-height: 2.5rem;
  text-align: center;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 0.375rem;
  text-decoration: none;
  color: #374151;
  font-weight: 500;
  transition: all 0.2s;
}

.letter-link:hover {
  background: #1e3a8a;
  color: white;
  border-color: #1e3a8a;
}

/* Footer - Exact match to Footer.js */
.footer {
  background: white;
  border-top: 1px solid #f3f4f6; /* border-gray-100 */
  padding: 1rem 0;
  margin-top: 3rem;
  text-align: center;
}

.footer .container {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.footer a {
  color: #4b5563; /* gray-600 */
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 0.2s;
}

.footer a:hover {
  color: #1e3a8a; /* blue-900 */
}

/* Responsive */
@media (max-width: 768px) {
  .nav .container {
    flex-direction: column;
    gap: 0.75rem;
  }

  .nav-links {
    flex-direction: column;
    gap: 0.5rem;
  }

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

  .topic-header h1 {
    font-size: 1.875rem;
  }

  .search-box {
    flex-direction: column;
  }

  .topic-grid {
    grid-template-columns: 1fr;
  }
}

/* ========================================
   HOMEPAGE STYLING
   Matches StaticHomePage.jsx + TrueRandomVerse.jsx
   ======================================== */

/* Homepage Main Container */
.homepage-main {
  min-height: 100vh;
  background: linear-gradient(to bottom, rgba(239, 246, 255, 1), white); /* from-blue-50 to-white */
}

/* Hero Section */
.homepage-hero {
  max-width: 72rem; /* max-w-6xl */
  margin: 0 auto;
  padding: 6rem 2rem; /* py-24 px-8 */
  text-align: center;
}

.hero-title {
  font-size: 4.209rem; /* Perfect Fourth scale step 6: 67.34px */
  color: #111827; /* text-gray-900 */
  font-weight: 300; /* font-light */
  margin-bottom: 2rem; /* 32px = 8px × 4 - baseline grid */
  letter-spacing: -0.025em; /* Negative tracking for large sizes */
  line-height: 1.189; /* 80px = 8px × 10 - baseline grid */
}

.hero-tagline {
  font-size: 1.777rem; /* Perfect Fourth scale step 3: 28.43px */
  color: #4b5563; /* text-gray-600 */
  font-weight: 300; /* font-light */
  margin-bottom: 4rem; /* 64px = 8px × 8 - baseline grid */
  max-width: 42rem; /* max-w-2xl */
  margin-left: auto;
  margin-right: auto;
  line-height: 1.352; /* 40px = 8px × 5 - baseline grid */
}

/* Random Verse Card */
.random-verse-card {
  background: white;
  border-radius: 1rem;
  padding: 3rem 2rem; /* 48px 32px - baseline grid multiples */
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  margin-bottom: 5rem; /* 80px = 8px × 10 - baseline grid */
  max-width: 56rem;
  margin-left: auto;
  margin-right: auto;
}

.random-verse-text {
  font-size: 2.369rem; /* Perfect Fourth scale step 4: 37.89px */
  color: #111827; /* text-gray-900 */
  line-height: 1.265; /* 48px = 8px × 6 - baseline grid */
  margin-bottom: 3rem; /* 48px = 8px × 6 - baseline grid */
  font-weight: 300; /* font-light */
  text-align: center;
  min-height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (min-width: 768px) {
  .random-verse-text {
    font-size: 3.157rem; /* Perfect Fourth scale step 5: 50.51px - larger on desktop */
    line-height: 1.265; /* 64px = 8px × 8 - baseline grid */
  }
}

.random-verse-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid #f3f4f6; /* border-gray-100 */
  padding-top: 2rem; /* pt-8 */
}

.verse-details {
  display: flex;
  flex-direction: column;
}

.verse-reference-home {
  font-size: 1.25rem; /* text-xl */
  font-weight: 500; /* font-medium */
  color: #111827; /* text-gray-900 */
}

.verse-translation-home {
  color: #6b7280; /* text-gray-500 */
}

.refresh-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border: 1px solid #d1d5db; /* border-gray-300 */
  border-radius: 0.375rem;
  color: #4b5563; /* text-gray-600 */
  background: white;
  cursor: pointer;
  transition: all 0.2s;
}

.refresh-btn:hover {
  color: #3b82f6; /* text-blue-500 */
  border-color: #3b82f6; /* border-blue-500 */
}

.refresh-btn.refreshing .refresh-icon {
  animation: spin 0.5s linear;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.refresh-icon {
  width: 1rem;
  height: 1rem;
}

/* Popular Topics Section */
.popular-section {
  margin-bottom: 5rem; /* mb-20 */
}

.popular-heading {
  font-size: 3.157rem; /* Perfect Fourth scale step 5: 50.51px */
  color: #111827; /* text-gray-900 */
  font-weight: 300; /* font-light */
  margin-bottom: 1rem; /* 16px = 8px × 2 - baseline grid */
  letter-spacing: 0.015em; /* Reduced tracking for better proportion */
  line-height: 1.265; /* 64px = 8px × 8 - baseline grid */
}

.popular-subheading {
  font-size: 1.125rem; /* text-lg */
  color: #4b5563; /* text-gray-600 */
  margin-bottom: 3rem; /* mb-12 */
  max-width: 42rem; /* max-w-2xl */
  margin-left: auto;
  margin-right: auto;
}

.popular-topics-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  max-width: 80rem; /* max-w-5xl */
  margin: 0 auto;
}

@media (min-width: 768px) {
  .popular-topics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .popular-topics-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.popular-topic-card {
  display: block;
  background: white;
  padding: 1.5rem;
  border-radius: 0.75rem; /* rounded-xl */
  transition: all 0.3s;
  border: 1px solid #f3f4f6; /* border-gray-100 */
  text-decoration: none;
}

.popular-topic-card:hover {
  background: rgba(239, 246, 255, 1); /* hover:bg-blue-50 */
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); /* hover:shadow-lg */
}

.popular-topic-title {
  font-size: 1.25rem; /* text-xl */
  font-weight: 300; /* font-light */
  color: #111827; /* text-gray-900 */
  margin-bottom: 0.5rem; /* mb-2 */
  transition: color 0.3s;
}

.popular-topic-card:hover .popular-topic-title {
  color: #1e3a8a; /* group-hover:text-blue-900 */
}

.popular-topic-count {
  font-size: 0.875rem; /* text-sm */
  color: #6b7280; /* text-gray-500 - WCAG AA compliant */
}

/* Complete Collection Section */
.collection-section {
  text-align: center;
}

.collection-heading {
  font-size: 3.157rem; /* Perfect Fourth scale step 5: 50.51px */
  color: #111827; /* text-gray-900 */
  font-weight: 300; /* font-light */
  margin-bottom: 1rem; /* 16px = 8px × 2 - baseline grid */
  letter-spacing: 0.015em; /* Reduced tracking for better proportion */
  line-height: 1.265; /* 64px = 8px × 8 - baseline grid */
}

.collection-subheading {
  font-size: 1.125rem; /* text-lg */
  color: #4b5563; /* text-gray-600 */
  margin-bottom: 2rem; /* mb-8 */
  max-width: 42rem; /* max-w-2xl */
  margin-left: auto;
  margin-right: auto;
}

/* Statistics Card */
.stats-card {
  background: white;
  border-radius: 0.75rem; /* rounded-xl */
  padding: 2rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  border: 1px solid #f3f4f6; /* border-gray-100 */
  margin-bottom: 3rem; /* mb-12 */
  max-width: 64rem; /* max-w-4xl */
  margin-left: auto;
  margin-right: auto;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

@media (min-width: 768px) {
  .stats-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.stat-item {
  text-align: center;
}

.stat-value {
  font-size: 1.875rem; /* text-3xl */
  font-weight: 300; /* font-light */
  margin-bottom: 0.5rem; /* mb-2 */
}

.stat-blue {
  color: #2563eb; /* text-blue-600 */
}

.stat-green {
  color: #16a34a; /* text-green-600 */
}

.stat-purple {
  color: #9333ea; /* text-purple-600 */
}

.stat-orange {
  color: #ea580c; /* text-orange-600 */
}

.stat-label {
  font-size: 0.875rem; /* text-sm */
  color: #4b5563; /* text-gray-600 */
  font-weight: 300; /* font-light */
  letter-spacing: 0.05em; /* tracking-wide */
}

/* Browse Toggle Section */
.browse-toggle-section {
  margin-bottom: 3rem; /* mb-12 */
}

.browse-toggle-btn {
  background: #2563eb; /* bg-blue-600 */
  color: white;
  padding: 0.75rem 2rem; /* px-8 py-3 */
  border-radius: 0.5rem; /* rounded-lg */
  font-weight: 300; /* font-light */
  cursor: pointer;
  transition: background-color 0.3s;
  border: none;
  letter-spacing: 0.05em; /* tracking-wide */
}

.browse-toggle-btn:hover {
  background: #1d4ed8; /* hover:bg-blue-700 */
}

/* All Topics Container */
.all-topics-container {
  margin-bottom: 3rem;
}

.all-topics-container.hidden {
  display: none;
}

.loading-spinner {
  background: white;
  border-radius: 0.75rem; /* rounded-xl */
  padding: 3rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  border: 1px solid #f3f4f6;
  max-width: 64rem;
  margin: 0 auto;
  text-align: center;
}

.loading-spinner.hidden {
  display: none;
}

.spinner {
  width: 3rem;
  height: 3rem;
  border: 2px solid #e5e7eb;
  border-top-color: #2563eb;
  border-radius: 50%;
  margin: 0 auto 1rem;
  animation: spin 1s linear infinite;
}

.loading-text {
  font-size: 1.125rem; /* text-lg */
  color: #4b5563; /* text-gray-600 */
  font-weight: 300; /* font-light */
}

.error-text {
  color: #dc2626; /* text-red-600 */
  font-size: 1rem;
}

/* Organized Topics Display */
.organized-topics {
  display: flex;
  flex-direction: column;
  gap: 3rem;
  max-width: 72rem; /* max-w-6xl */
  margin: 0 auto;
}

.organized-topics.hidden {
  display: none;
}

.letter-section {
  background: white;
  border-radius: 0.75rem; /* rounded-xl */
  padding: 2rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  border: 1px solid #f3f4f6;
}

.letter-heading {
  font-size: 1.875rem; /* text-3xl */
  font-weight: 300; /* font-light */
  color: #2563eb; /* text-blue-600 */
  margin-bottom: 1.5rem; /* mb-6 */
  letter-spacing: 0.1em; /* tracking-wider */
  text-align: center;
  border-bottom: 1px solid #e5e7eb; /* border-gray-200 */
  padding-bottom: 1rem; /* pb-4 */
}

.letter-count {
  font-size: 1rem; /* text-base */
  font-weight: 400; /* font-normal */
  color: #6b7280; /* text-gray-500 */
  margin-left: 1rem;
}

.letter-topics-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  max-height: 24rem; /* max-h-96 */
  overflow-y: auto;
}

@media (min-width: 768px) {
  .letter-topics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .letter-topics-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.letter-topic-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  border-radius: 0.5rem; /* rounded-lg */
  transition: background-color 0.2s;
  border: 1px solid #f3f4f6; /* border-gray-100 */
  text-decoration: none;
}

.letter-topic-link:hover {
  background: rgba(239, 246, 255, 1); /* hover:bg-blue-50 */
}

.letter-topic-title {
  font-weight: 300; /* font-light */
  color: #1f2937; /* text-gray-800 */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-right: 0.5rem;
}

.letter-topic-link:hover .letter-topic-title {
  color: #1e3a8a; /* group-hover:text-blue-900 */
}

.letter-topic-count {
  font-size: 0.875rem; /* text-sm */
  color: #6b7280; /* text-gray-500 */
  font-weight: 300; /* font-light */
  flex-shrink: 0;
}

/* Journey Prompt */
.journey-prompt {
  background: white;
  border-radius: 0.75rem; /* rounded-xl */
  padding: 3rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  border: 1px solid #f3f4f6;
  max-width: 64rem; /* max-w-4xl */
  margin: 0 auto;
}

.journey-prompt.hidden {
  display: none;
}

.journey-heading {
  font-size: 1.875rem; /* text-3xl */
  font-weight: 300; /* font-light */
  color: #111827; /* text-gray-900 */
  margin-bottom: 1.5rem; /* mb-6 */
  letter-spacing: 0.05em; /* tracking-wide */
}

.journey-description {
  font-size: 1.125rem; /* text-lg */
  color: #4b5563; /* text-gray-600 */
  font-weight: 300; /* font-light */
  margin-bottom: 2rem; /* mb-8 */
  line-height: 1.75; /* leading-relaxed */
}

.journey-cta-text {
  color: #6b7280; /* text-gray-500 */
  font-weight: 300; /* font-light */
  letter-spacing: 0.05em; /* tracking-wide */
}

/* Call to Action Section */
.cta-section {
  margin-top: 6rem; /* mt-24 */
  background: white;
  border-radius: 0.75rem; /* rounded-xl */
  padding: 3rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  border: 1px solid #f3f4f6;
  max-width: 64rem; /* max-w-4xl */
  margin-left: auto;
  margin-right: auto;
}

.cta-heading {
  font-size: 1.875rem; /* text-3xl */
  font-weight: 300; /* font-light */
  color: #111827; /* text-gray-900 */
  margin-bottom: 1.5rem; /* mb-6 */
  letter-spacing: 0.05em; /* tracking-wide */
}

.cta-description {
  font-size: 1.125rem; /* text-lg */
  color: #4b5563; /* text-gray-600 */
  font-weight: 300; /* font-light */
  margin-bottom: 2rem; /* mb-8 */
  line-height: 1.75; /* leading-relaxed */
}

.cta-buttons {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  justify-content: center;
}

@media (min-width: 640px) {
  .cta-buttons {
    flex-direction: row;
  }
}

.cta-btn {
  padding: 0.75rem 2rem; /* px-8 py-3 */
  border-radius: 0.5rem; /* rounded-lg */
  font-weight: 300; /* font-light */
  transition: all 0.3s;
  letter-spacing: 0.05em; /* tracking-wide */
  text-decoration: none;
  text-align: center;
}

.cta-primary {
  background: #2563eb; /* bg-blue-600 */
  color: white;
}

.cta-primary:hover {
  background: #1d4ed8; /* hover:bg-blue-700 */
}

.cta-secondary {
  background: white;
  color: #2563eb; /* text-blue-600 */
  border: 1px solid #bfdbfe; /* border-blue-200 */
}

.cta-secondary:hover {
  background: rgba(239, 246, 255, 1); /* hover:bg-blue-50 */
}

/* Responsive adjustments for smaller screens */
@media (max-width: 640px) {
  .hero-title {
    font-size: 2.5rem; /* Smaller on mobile */
  }

  .hero-tagline {
    font-size: 1.125rem; /* Smaller on mobile */
  }

  .random-verse-text {
    font-size: 1.5rem; /* Smaller on mobile */
    min-height: 100px;
  }

  .popular-heading,
  .collection-heading {
    font-size: 1.875rem; /* Smaller on mobile */
  }

  .random-verse-footer {
    flex-direction: column;
    gap: 1rem;
  }

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

/* Utility class for hidden elements */
.hidden {
  display: none;
}

/* ========================================
   BROWSE/LIBRARY PAGE STYLING
   ======================================== */

/* Browse Page Main */
.browse-page-main {
  min-height: 100vh;
  background: white;
}

/* Hero Section */
.browse-hero {
  background: linear-gradient(to bottom, rgba(239, 246, 255, 1), white); /* from-blue-50 to-white */
  padding: 4rem 0; /* py-16 */
}

.browse-hero-content {
  max-width: 80rem; /* max-w-5xl */
  margin: 0 auto;
  padding: 0 1.5rem; /* px-6 */
  text-align: center;
}

.browse-title {
  font-size: 2.25rem; /* text-4xl */
  font-weight: 300; /* font-light */
  color: #111827; /* text-gray-900 */
  margin-bottom: 1rem; /* mb-4 */
}

.browse-subtitle {
  color: #4b5563; /* text-gray-600 */
  font-weight: 300; /* font-light */
  font-size: 1.125rem; /* text-lg */
}

/* Search Section */
.browse-search-section {
  padding: 3rem 0; /* py-12 */
}

.browse-container {
  max-width: 72rem; /* max-w-6xl */
  margin: 0 auto;
  padding: 0 1.5rem; /* px-6 */
}

.search-wrapper {
  margin-bottom: 2rem; /* mb-8 */
}

.browse-search-input {
  width: 100%;
  padding: 0.75rem 1rem; /* px-4 py-3 */
  border: 1px solid #e5e7eb; /* border-gray-200 */
  border-radius: 0.5rem; /* rounded-lg */
  color: #111827; /* text-gray-900 */
  font-size: 1rem;
}

.browse-search-input::placeholder {
  color: #9ca3af; /* placeholder-gray-400 */
}

.browse-search-input:focus {
  outline: none;
  box-shadow: 0 0 0 2px #3b82f6; /* focus:ring-2 focus:ring-blue-500 */
  border-color: transparent;
}

.search-results-info {
  margin-top: 0.5rem; /* mt-2 */
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.875rem; /* text-sm */
  color: #6b7280; /* text-gray-500 */
}

.clear-search-btn {
  color: #2563eb; /* text-blue-600 */
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  transition: color 0.2s;
}

.clear-search-btn:hover {
  color: #1e40af; /* hover:text-blue-800 */
}

/* Alphabet Navigation */
.alphabet-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-top: 2rem;
}

.alphabet-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.375rem; /* rounded-md */
  background: #f3f4f6; /* bg-gray-100 */
  color: #4b5563; /* text-gray-600 */
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s;
}

.alphabet-link:hover,
.alphabet-link.active {
  background: #2563eb; /* bg-blue-600 */
  color: white;
}

/* Topics Section */
.browse-topics-section {
  padding-bottom: 4rem; /* pb-16 */
}

.search-results-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-bottom: 2rem;
}

@media (min-width: 768px) {
  .search-results-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .search-results-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Letter Sections */
.letter-sections {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.letter-section {
  scroll-margin-top: 100px; /* Account for fixed nav */
}

.letter-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem; /* mb-6 */
  padding-bottom: 0.75rem; /* pb-3 */
  border-bottom: 2px solid #e5e7eb; /* border-gray-200 */
}

.letter-title {
  font-size: 2.25rem; /* text-4xl */
  font-weight: 300; /* font-light */
  color: #2563eb; /* text-blue-600 */
  letter-spacing: 0.1em; /* tracking-wider */
}

.letter-count {
  font-size: 1rem; /* text-base */
  color: #6b7280; /* text-gray-500 */
  font-weight: 300; /* font-light */
}

.letter-topics-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 640px) {
  .letter-topics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .letter-topics-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.browse-topic-card {
  display: block;
  padding: 1rem;
  background: white;
  border: 1px solid #e5e7eb; /* border-gray-200 */
  border-radius: 0.5rem; /* rounded-lg */
  text-decoration: none;
  transition: all 0.2s;
}

.browse-topic-card:hover {
  background: rgba(239, 246, 255, 1); /* hover:bg-blue-50 */
  border-color: #3b82f6; /* hover:border-blue-500 */
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.browse-topic-title {
  font-size: 1.125rem; /* text-lg */
  font-weight: 400; /* font-normal */
  color: #111827; /* text-gray-900 */
  margin-bottom: 0.25rem; /* mb-1 */
}

.browse-topic-card:hover .browse-topic-title {
  color: #1e3a8a; /* hover:text-blue-900 */
}

.browse-topic-count {
  font-size: 0.875rem; /* text-sm */
  color: #6b7280; /* text-gray-500 */
  font-weight: 300; /* font-light */
}

/* Back to Top Button */
.back-to-top-wrapper {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 50;
}

.back-to-top-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: #2563eb; /* bg-blue-600 */
  color: white;
  border: none;
  border-radius: 9999px; /* rounded-full */
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  cursor: pointer;
  transition: all 0.3s;
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
}

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

.back-to-top-btn:hover {
  background: #1d4ed8; /* hover:bg-blue-700 */
  transform: translateY(-2px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.back-to-top-icon {
  width: 1.25rem;
  height: 1.25rem;
}

/* Responsive adjustments */
@media (max-width: 640px) {
  .browse-title {
    font-size: 1.875rem; /* text-3xl */
  }

  .browse-subtitle {
    font-size: 1rem; /* text-base */
  }

  .letter-title {
    font-size: 1.875rem; /* text-3xl */
  }

  .alphabet-nav {
    gap: 0.25rem;
  }

  .alphabet-link {
    width: 2rem;
    height: 2rem;
    font-size: 0.875rem;
  }

  .back-to-top-wrapper {
    bottom: 1rem;
    right: 1rem;
  }

  .back-to-top-btn {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
  }
}

/* ========================================
   RANDOM VERSE GENERATOR PAGE STYLING
   ======================================== */

/* Random Verse Main */
.random-verse-main {
  min-height: 100vh;
  background: linear-gradient(to bottom, rgba(239, 246, 255, 0.3), white); /* subtle blue gradient */
}

/* Hero Section */
.random-verse-hero {
  background: linear-gradient(to bottom, rgba(239, 246, 255, 1), rgba(255, 255, 255, 0.5));
  padding: 3rem 0;
  text-align: center;
}

.random-verse-hero-content {
  max-width: 56rem;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.random-verse-title {
  font-size: 3rem; /* text-5xl */
  font-weight: 300; /* font-light */
  color: #111827; /* text-gray-900 */
  margin-bottom: 1rem;
  letter-spacing: 0.025em;
}

.random-verse-subtitle {
  font-size: 1.25rem; /* text-xl */
  color: #4b5563; /* text-gray-600 */
  font-weight: 300; /* font-light */
  max-width: 42rem;
  margin: 0 auto;
  line-height: 1.75;
}

/* Verse Display Section */
.random-verse-display-section {
  padding: 3rem 0 4rem;
}

.random-verse-container {
  max-width: 56rem; /* max-w-4xl */
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Main Verse Card */
.random-verse-display-card {
  background: white;
  border-radius: 1rem; /* rounded-2xl */
  padding: 3rem 2.5rem;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04); /* shadow-2xl */
  margin-bottom: 3rem;
  position: relative;
}

/* Large Quote Marks */
.quote-mark-open-large,
.quote-mark-close-large {
  font-family: Georgia, serif;
  font-size: 4rem; /* text-6xl */
  color: rgba(209, 213, 219, 0.4); /* gray-300/40 */
  line-height: 1;
  user-select: none;
}

.quote-mark-open-large {
  margin-bottom: 1rem;
}

.quote-mark-close-large {
  text-align: right;
  margin-top: 1rem;
}

/* Verse Text */
.random-verse-text-large {
  font-size: 2.25rem; /* text-4xl */
  line-height: 1.5;
  color: #111827; /* text-gray-900 */
  font-weight: 300; /* font-light */
  text-align: center;
  margin: 2rem 0;
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 768px) {
  .random-verse-text-large {
    font-size: 1.75rem; /* text-3xl */
    min-height: 150px;
  }
}

/* Verse Footer */
.random-verse-footer-section {
  border-top: 2px solid #f3f4f6; /* border-gray-100 */
  padding-top: 2rem;
  margin-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.verse-meta {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.verse-reference-large {
  font-size: 1.5rem; /* text-2xl */
  font-weight: 500; /* font-medium */
  color: #111827; /* text-gray-900 */
}

.verse-translation-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: #eff6ff; /* bg-blue-50 */
  color: #1e3a8a; /* text-blue-900 */
  border-radius: 9999px; /* rounded-full */
  font-size: 0.875rem; /* text-sm */
  font-weight: 500;
}

/* Action Buttons */
.verse-actions {
  display: flex;
  gap: 1rem;
}

.refresh-verse-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.5rem;
  background: #2563eb; /* bg-blue-600 */
  color: white;
  border: none;
  border-radius: 0.5rem; /* rounded-lg */
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.refresh-verse-btn:hover {
  background: #1d4ed8; /* hover:bg-blue-700 */
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.refresh-verse-btn.refreshing {
  animation: pulse 0.5s ease-in-out;
}

.refresh-verse-btn.refreshing .refresh-icon-large {
  animation: spin 0.5s linear;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(0.95); }
}

.refresh-icon-large {
  width: 1.5rem;
  height: 1.5rem;
}

/* Topic Link */
.verse-topic-link {
  margin-top: 1.5rem;
  text-align: center;
}

.topic-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: rgba(239, 246, 255, 1); /* bg-blue-50 */
  color: #1e3a8a; /* text-blue-900 */
  border-radius: 0.5rem; /* rounded-lg */
  text-decoration: none;
  transition: all 0.2s;
  border: 1px solid #bfdbfe; /* border-blue-200 */
}

.topic-link-btn:hover {
  background: #dbeafe; /* hover:bg-blue-100 */
  border-color: #3b82f6; /* hover:border-blue-500 */
}

.topic-link-icon {
  width: 1.25rem;
  height: 1.25rem;
}

/* How It Works Section */
.how-it-works-section {
  margin-bottom: 3rem;
}

.how-it-works-title {
  font-size: 2.25rem; /* text-4xl */
  font-weight: 300; /* font-light */
  color: #111827; /* text-gray-900 */
  text-align: center;
  margin-bottom: 2rem;
}

.how-it-works-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .how-it-works-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.how-it-works-card {
  background: white;
  padding: 2rem;
  border-radius: 0.75rem; /* rounded-xl */
  text-align: center;
  border: 1px solid #f3f4f6; /* border-gray-100 */
  transition: all 0.3s;
}

.how-it-works-card:hover {
  border-color: #3b82f6; /* hover:border-blue-500 */
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  transform: translateY(-4px);
}

.how-it-works-icon {
  width: 3rem;
  height: 3rem;
  margin: 0 auto 1rem;
  color: #2563eb; /* text-blue-600 */
}

.how-it-works-icon svg {
  width: 100%;
  height: 100%;
}

.how-it-works-card-title {
  font-size: 1.25rem; /* text-xl */
  font-weight: 500; /* font-medium */
  color: #111827; /* text-gray-900 */
  margin-bottom: 0.5rem;
}

.how-it-works-card-text {
  color: #6b7280; /* text-gray-500 */
  font-weight: 300; /* font-light */
  line-height: 1.6;
}

/* CTA Section */
.random-verse-cta {
  background: white;
  border-radius: 1rem; /* rounded-2xl */
  padding: 3rem 2.5rem;
  text-align: center;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  border: 1px solid #f3f4f6;
}

.random-verse-cta-title {
  font-size: 2.25rem; /* text-4xl */
  font-weight: 300; /* font-light */
  color: #111827; /* text-gray-900 */
  margin-bottom: 1rem;
}

.random-verse-cta-text {
  font-size: 1.125rem; /* text-lg */
  color: #4b5563; /* text-gray-600 */
  font-weight: 300; /* font-light */
  margin-bottom: 2rem;
  max-width: 42rem;
  margin-left: auto;
  margin-right: auto;
}

.random-verse-cta-buttons {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  justify-content: center;
  max-width: 32rem;
  margin: 0 auto;
}

@media (min-width: 640px) {
  .random-verse-cta-buttons {
    flex-direction: row;
  }
}

.random-verse-cta-btn {
  padding: 0.875rem 2rem;
  border-radius: 0.5rem; /* rounded-lg */
  font-weight: 500; /* font-medium */
  text-decoration: none;
  transition: all 0.3s;
  text-align: center;
}

.random-verse-cta-btn.primary {
  background: #2563eb; /* bg-blue-600 */
  color: white;
}

.random-verse-cta-btn.primary:hover {
  background: #1d4ed8; /* hover:bg-blue-700 */
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.random-verse-cta-btn.secondary {
  background: white;
  color: #2563eb; /* text-blue-600 */
  border: 1px solid #bfdbfe; /* border-blue-200 */
}

.random-verse-cta-btn.secondary:hover {
  background: rgba(239, 246, 255, 1); /* hover:bg-blue-50 */
  border-color: #3b82f6; /* hover:border-blue-500 */
}

/* Responsive Adjustments */
@media (max-width: 640px) {
  .random-verse-title {
    font-size: 2rem; /* text-4xl */
  }

  .random-verse-subtitle {
    font-size: 1.125rem; /* text-lg */
  }

  .random-verse-display-card {
    padding: 2rem 1.5rem;
  }

  .quote-mark-open-large,
  .quote-mark-close-large {
    font-size: 3rem; /* text-5xl */
  }

  .random-verse-footer-section {
    flex-direction: column;
    align-items: flex-start;
  }

  .verse-actions {
    width: 100%;
  }

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

  .how-it-works-title {
    font-size: 1.875rem; /* text-3xl */
  }

  .random-verse-cta-title {
    font-size: 1.875rem; /* text-3xl */
  }
}

/* ========================================
   SHARE BUTTONS & MODAL
   ======================================== */

/* Update verse footer to flex layout */
.verse-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(229, 231, 235, 1); /* border-gray-200 */
}

.verse-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.verse-share-btn {
  padding: 0.5rem;
  background: transparent;
  border: 1px solid rgba(229, 231, 235, 1); /* border-gray-200 */
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.verse-share-btn:hover {
  background: rgba(239, 246, 255, 1); /* bg-blue-50 */
  border-color: #2563eb; /* border-blue-600 */
}

.share-icon {
  width: 1.125rem; /* 18px */
  height: 1.125rem;
  color: #6b7280; /* text-gray-500 */
}

.verse-share-btn:hover .share-icon {
  color: #2563eb; /* text-blue-600 */
}

/* Share Modal */
.share-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.share-modal[hidden] {
  display: none;
}

.share-modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
}

.share-modal-content {
  position: relative;
  background: white;
  border-radius: var(--radius-2xl); /* Fibonacci: 21px */
  box-shadow: var(--shadow-5); /* Elevation: modal */
  width: 90%;
  max-width: 32rem;
  max-height: 90vh;
  overflow: auto;
  z-index: 10000;
}

.share-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem;
  border-bottom: 1px solid rgba(229, 231, 235, 1);
}

.share-modal-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #111827;
}

.share-modal-close {
  background: transparent;
  border: none;
  font-size: 2rem;
  color: #6b7280;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  transition: all 0.2s;
}

.share-modal-close:hover {
  background: rgba(243, 244, 246, 1);
  color: #111827;
}

.share-modal-body {
  padding: 1.5rem;
}

.share-verse-preview {
  font-size: 1.125rem;
  font-style: italic;
  color: #374151;
  margin-bottom: 0.5rem;
  line-height: 1.6;
}

.share-verse-reference {
  font-size: 0.875rem;
  font-weight: 600;
  color: #6b7280;
  margin-bottom: 1.5rem;
}

.share-buttons-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.share-platform-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1rem;
  border-radius: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  font-size: 0.9375rem;
}

.platform-icon {
  width: 1.25rem;
  height: 1.25rem;
}

.twitter-btn {
  background: #000;
  color: white;
}

.twitter-btn:hover {
  background: #1a1a1a;
}

.facebook-btn {
  background: #1877f2;
  color: white;
}

.facebook-btn:hover {
  background: #166fe5;
}

.whatsapp-btn {
  background: #25d366;
  color: white;
}

.whatsapp-btn:hover {
  background: #20bd5a;
}

.copy-btn {
  background: #6b7280;
  color: white;
}

.copy-btn:hover {
  background: #4b5563;
}

/* Responsive */
@media (max-width: 640px) {
  .share-buttons-grid {
    grid-template-columns: 1fr;
  }

  .share-modal-content {
    width: 95%;
  }

  .verse-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .verse-share-btn {
    align-self: flex-end;
  }
}

/* ========================================
   IN CONTEXT BUTTON
   ======================================== */

.verse-actions-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.verse-context-btn {
  padding: 0.5rem;
  background: transparent;
  border: 1px solid rgba(229, 231, 235, 1); /* border-gray-200 */
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.verse-context-btn:hover {
  background: rgba(254, 243, 199, 1); /* bg-yellow-100 */
  border-color: #f59e0b; /* border-yellow-500 */
}

.context-icon {
  width: 1.125rem; /* 18px */
  height: 1.125rem;
  color: #6b7280; /* text-gray-500 */
}

.verse-context-btn:hover .context-icon {
  color: #f59e0b; /* text-yellow-600 */
}

@media (max-width: 640px) {
  .verse-actions-group {
    gap: 0.375rem;
  }
}

/* ========================================
   BREADCRUMBS
   ======================================== */

.breadcrumbs {
  margin-bottom: 1.5rem;
}

.breadcrumb-list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.875rem; /* text-sm */
  color: #6b7280; /* text-gray-500 */
}

.breadcrumb-item {
  display: flex;
  align-items: center;
}

.breadcrumb-link {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  color: #6b7280; /* text-gray-500 */
  text-decoration: none;
  transition: color 0.2s;
  font-weight: 500;
}

.breadcrumb-link:hover {
  color: #2563eb; /* text-blue-600 */
}

.breadcrumb-icon {
  width: 1rem;
  height: 1rem;
}

.breadcrumb-separator {
  color: #d1d5db; /* text-gray-300 */
  font-weight: 300;
}

.breadcrumb-current {
  color: #111827; /* text-gray-900 */
  font-weight: 600;
}

.breadcrumb-text {
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .breadcrumb-list {
    font-size: 0.8125rem; /* text-xs */
  }

  .breadcrumb-text {
    max-width: 120px;
  }

  .breadcrumb-icon {
    width: 0.875rem;
    height: 0.875rem;
  }
}
