/* ============================================
   GLOBAL V2 STYLESHEET
   Path: /assets/css/global-v2.css
   Purpose: Consolidated styles for new templates
   Primary use: Character profiles and study pages
   Version: 2.0.0
   Last Updated: 2024-12-15
   ============================================ */

/* ============================================
   CSS VARIABLES
   ============================================ */
:root {
  /* Primary Colors */
  --primary-dark: #0a0a0a;
  --primary-light: #ffffff;
  
  /* Accent Colors */
  --accent-blue: #00b4d8;
  --accent-purple: #7209b7;
  --accent-rose: #e11d48;
  --accent-gold: #d4af37;
  --accent-green: #10b981;
  
  /* Neutral Colors */
  --text-gray: #6b7280;
  --bg-gray: #f5f5f5;
  --border-light: #e5e7eb;
  --muted: #6b7280; 
  --muted-2: #9ca3af;
  --panel: #f8fafc;
  --bg: #ffffff;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1);
  --shadow: rgba(0,0,0,.05);
  
  /* Semantic Colors */
  --ring: #d1d5db;
  --success: #10b981;
  --warning: #f59e0b;
  --info: #3b82f6;
  
  /* Layout */
  --max-width-content: 1100px;
  --max-width-wide: 1400px;
}

/* ============================================
   BASE RESET & DEFAULTS
   ============================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  line-height: 1.6;
  color: var(--primary-dark);
  background: linear-gradient(to bottom, #fafafa 0%, #f3f4f6 100%);
  overflow-x: hidden;
  font-size: 16px;
}

/* ============================================
   NAVIGATION
   ============================================ */
nav {
  position: fixed;
  width: 100%;
  top: 0;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  z-index: 1000;
  padding: 1rem 2rem;
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
}

nav.scrolled {
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.nav-container {
  max-width: var(--max-width-wide);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
  color: var(--primary-dark);
  transition: transform 0.3s ease;
}

.logo:hover {
  transform: scale(1.05);
}

.logo-icon {
  width: 40px;
  height: 40px;
}

.logo-text {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-gray);
  font-weight: 500;
  transition: all 0.3s ease;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  min-height: 44px;
  display: flex;
  align-items: center;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary-dark);
  background-color: rgba(0, 0, 0, 0.05);
}

.dropdown {
  position: relative;
}

.dropdown-toggle::after {
  content: '▾';
  font-size: 0.8rem;
  margin-left: 0.25rem;
  display: inline-block;
  transition: transform 0.3s ease;
}

.dropdown:hover .dropdown-toggle::after {
  transform: rotate(180deg);
}

.dropdown-content {
  display: none;
  position: absolute;
  background-color: var(--primary-light);
  min-width: 200px;
  box-shadow: 0 8px 16px rgba(0,0,0,0.1);
  border-radius: 8px;
  z-index: 1;
  top: 100%;
  margin-top: 0.5rem;
  padding: 0.5rem 0;
  border: 1px solid var(--border-light);
}

.dropdown-content a {
  color: var(--text-gray);
  padding: 0.75rem 1rem;
  text-decoration: none;
  display: block;
  transition: all 0.3s ease;
}

.dropdown-content a:hover {
  background-color: var(--bg-gray);
  color: var(--primary-dark);
  padding-left: 1.5rem;
}

.dropdown:hover .dropdown-content {
  display: block;
}

.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  flex-direction: column;
  gap: 4px;
}

.mobile-menu-toggle span {
  display: block;
  width: 25px;
  height: 3px;
  background: var(--primary-dark);
  transition: all 0.3s ease;
  border-radius: 2px;
}

.mobile-menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -6px);
}

/* ============================================
   ACCESSIBILITY
   ============================================ */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--primary-dark);
  color: white;
  padding: 8px 16px;
  text-decoration: none;
  z-index: 2000;
  border-radius: 0 0 8px 0;
}

.skip-link:focus {
  top: 0;
}

/* ============================================
   CONTENT LAYOUT
   ============================================ */
.content-section { 
  max-width: var(--max-width-content); 
  margin: 0 auto; 
  padding: 6rem 1rem 2rem;
}

.container {
  max-width: var(--max-width-wide);
  margin: 0 auto;
  padding: 4rem 2rem;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
.section-title { 
  font-size: 2.2rem; 
  margin: .25rem 0 1.5rem; 
  display: flex; 
  align-items: center; 
  gap: .75rem; 
  color: #1a202c;
  font-weight: 800;
  letter-spacing: -0.025em;
}

.section-icon { 
  font-size: 1.2em; 
  background: linear-gradient(135deg, var(--accent-purple) 0%, var(--accent-rose) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-subtitle {
  color: var(--text-gray);
  font-size: 1rem;
}

/* ============================================
   BREADCRUMBS
   ============================================ */
.breadcrumbs { 
  font-size: .9rem; 
  color: var(--muted); 
  margin-bottom: 1rem; 
}

.breadcrumbs a { 
  color: inherit; 
  text-decoration: none; 
  transition: color 0.2s;
}

.breadcrumbs a:hover { 
  color: var(--accent-blue); 
}

/* ============================================
   CARDS & PANELS
   ============================================ */
.theology-card { 
  background: var(--bg); 
  border: 1px solid var(--border-light); 
  border-radius: 16px; 
  padding: 1.5rem 1.75rem; 
  margin: 1.5rem 0; 
  box-shadow: 0 4px 6px -1px var(--shadow), 0 2px 4px -1px var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
}

.theology-card h3 { 
  margin: .1rem 0 1rem; 
  color: #1a202c;
  font-size: 1.4rem;
  font-weight: 700;
}

@media (hover: hover) {
  .theology-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px var(--shadow-lg), 0 4px 6px -2px var(--shadow);
  }
}

.panel {
  background: var(--panel);
  border-radius: 12px;
  padding: 1.25rem;
}

.panel h4 {
  margin-top: 0;
  margin-bottom: 0.75rem;
  color: var(--accent-purple);
}

/* ============================================
   GRID SYSTEMS
   ============================================ */
.grid-2 { 
  display: grid; 
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); 
  gap: 1.5rem; 
}

.grid-3 { 
  display: grid; 
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); 
  gap: 1.5rem; 
}

.grid-4 { 
  display: grid; 
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); 
  gap: 1rem; 
}

/* ============================================
   TAGS & BADGES
   ============================================ */
.tag { 
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  border: 1px solid var(--ring); 
  border-radius: 999px; 
  padding: .2rem .75rem; 
  font-size: .85rem; 
  margin: .15rem .35rem .15rem 0; 
  background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
  font-weight: 500;
  transition: all 0.2s;
}

.tag:hover {
  background: linear-gradient(135deg, var(--accent-purple) 0%, var(--accent-rose) 100%);
  color: white;
  border-color: transparent;
}

.tag.primary {
  background: linear-gradient(135deg, var(--accent-purple) 0%, var(--accent-rose) 100%);
  color: white;
  border-color: transparent;
}

/* ============================================
   TABLES
   ============================================ */
.table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

table { 
  width: 100%; 
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 8px;
  overflow: hidden;
  margin: 1rem 0;
}

thead th { 
  background: linear-gradient(135deg, var(--panel) 0%, #e5e7eb 100%);
  font-weight: 600; 
  color: #1a202c;
  text-align: left;
  padding: .8rem .75rem;
}

th, td { 
  border-top: 1px solid var(--border-light); 
  padding: .75rem; 
  vertical-align: top; 
  text-align: left; 
}

tbody tr:hover {
  background: var(--panel);
}

/* ============================================
   KEY INSIGHTS & CALLOUTS
   ============================================ */
.key-insight {
  background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
  border-left: 4px solid #3b82f6;
  padding: 1rem 1.25rem;
  border-radius: 8px;
  margin: 1.5rem 0;
}

.key-insight strong {
  color: #1e40af;
}

.significance { 
  background: var(--panel);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  margin-top: 1.5rem;
  border-left: 4px solid var(--success);
}

.significance h4 { 
  margin: .2rem 0 .75rem; 
  color: var(--success);
  font-size: 1.1rem;
}

/* ============================================
   META DATA
   ============================================ */
.meta { 
  display: flex; 
  gap: 1rem; 
  flex-wrap: wrap; 
  margin: 1rem 0; 
}

.meta .kv { 
  background: linear-gradient(135deg, #fff 0%, var(--panel) 100%);
  border: 1px solid var(--ring); 
  border-radius: 12px; 
  padding: .5rem .9rem; 
  font-size: .95rem; 
  transition: all 0.2s;
}

.meta .kv:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 6px -1px var(--shadow);
}

/* ========================================
   PAGE NAVIGATION (Flexible for 4, 5, 6+ pages)
   ======================================== */
.page-navigation {
  background: linear-gradient(135deg, #f0f4ff 0%, #e8eeff 100%);
  border: 2px solid #4a5fff;
  padding: 1.5rem;
  border-radius: 12px;
  margin: 2rem auto;
  max-width: 1100px; /* Default width */
}

/* Adaptive width based on number of items */
.page-navigation:has(.page-nav-item:nth-child(6)) {
  max-width: 1200px; /* Wider for 6+ items */
}

.page-navigation:not(:has(.page-nav-item:nth-child(5))) {
  max-width: 900px; /* Narrower for 4 items only */
}

.page-navigation h3 {
  color: #2a3aaa;
  margin-bottom: 1.5rem;
  font-size: 1.2rem;
  text-align: center;
}

/* Flexbox for better orphan handling */
.page-nav-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center; /* This centers orphaned items */
}

.page-nav-item {
  flex: 0 1 calc(20% - 1rem); /* Default: 5 items per row */
  min-width: 180px;
  max-width: 220px;
  background: white;
  border: 1px solid #d0d8ff;
  padding: 1.25rem;
  text-align: center;
  border-radius: 8px;
  transition: all 0.3s ease;
  text-decoration: none;
  display: block;
  position: relative;
  min-height: 120px;
  cursor: pointer;
}

/* Adjust for different numbers of items */
.page-nav-grid:has(.page-nav-item:nth-child(6)) .page-nav-item {
  flex: 0 1 calc(16.666% - 1rem); /* 6 items per row */
  min-width: 160px;
  max-width: 200px;
}

.page-nav-grid:not(:has(.page-nav-item:nth-child(5))) .page-nav-item {
  flex: 0 1 calc(25% - 1rem); /* 4 items per row */
  min-width: 200px;
  max-width: 250px;
}

.page-nav-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(74, 95, 255, 0.15);
  border-color: #4a5fff;
}

.page-nav-item.current {
  background: #4a5fff;
  color: white;
  border-color: #4a5fff;
  cursor: default;
}

.page-nav-item h4 {
  color: #4a5fff;
  font-size: 0.95rem;
  margin: 0 0 0.5rem;
}

.page-nav-item.current h4 {
  color: white;
}

/* Text styles within nav items */
.nav-subtitle {
  font-size: 0.85rem;
  color: #666;
  margin: 0.3rem 0;
}

.page-nav-item.current .nav-subtitle {
  color: rgba(255, 255, 255, 0.9);
}

.nav-status {
  font-weight: bold;
  font-size: 0.85rem;
  margin-top: 0.5rem;
}

.page-nav-item.current .nav-status {
  background: rgba(255, 255, 255, 0.2);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  display: inline-block;
}

.nav-link {
  color: #2a3aaa;
  font-size: 0.85rem;
  display: inline-block;
  transition: transform 0.3s ease;
  position: absolute;
  bottom: 1rem;
  right: 1rem;
}

.page-nav-item:hover .nav-link {
  transform: translateX(3px);
}

/* ========================================
   RESPONSIVE BREAKPOINTS
   ======================================== */

/* Large screens: Keep all items in one row */
@media (min-width: 1100px) {
  .page-nav-item {
    max-width: none; /* Remove max-width on large screens */
  }
}

/* Medium screens: 3 columns or 2x2 for 4 items */
@media (min-width: 700px) and (max-width: 1099px) {
  .page-navigation {
    max-width: 800px;
  }
  
  .page-nav-item {
    flex: 0 1 calc(33.333% - 1rem);
    min-width: 200px;
    max-width: 250px;
  }
  
  /* 4 items: 2x2 layout */
  .page-nav-grid:not(:has(.page-nav-item:nth-child(5))) .page-nav-item {
    flex: 0 1 calc(50% - 1rem);
    max-width: 300px;
  }
}

/* Small tablets: 2 columns */
@media (min-width: 500px) and (max-width: 699px) {
  .page-navigation {
    max-width: 600px;
  }
  
  .page-nav-item {
    flex: 0 1 calc(50% - 1rem);
    min-width: 200px;
    max-width: 280px;
  }
}

/* Mobile: Single column */
@media (max-width: 499px) {
  .page-navigation {
    padding: 1rem;
    margin: 1rem -1rem;
    border-radius: 0;
    border-left: none;
    border-right: none;
    max-width: 100%;
  }
  
  .page-navigation h3 {
    font-size: 1rem;
    margin-bottom: 1rem;
  }
  
  .page-nav-grid {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .page-nav-item {
    flex: 1 1 100%;
    min-width: auto;
    max-width: none;
    padding: 0.75rem;
    border-radius: 6px;
    min-height: auto;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
  }
  
  .page-nav-item h4 {
    font-size: 0.85rem;
  }
  
  .nav-link {
    position: static;
    margin-top: 0.5rem;
  }
  
  .nav-subtitle {
    flex: 1;
    text-align: left;
    margin-left: 0;
  }
}

/* ========================================
   BIBLIOGRAPHY SECTION
   ======================================== */
.bibliography-section {
  max-width: 100%;
  margin: 3rem auto;
}

.bibliography-section summary {
  cursor: pointer;
  list-style: none;
  outline: none;
}

.bibliography-header {
  background: var(--bg, #fff);
  border: 1px solid var(--border-light, #e2e8f0);
  border-radius: 16px;
  padding: 1.5rem 1.75rem;
  margin: 1.5rem 0;
  cursor: pointer;
  user-select: none;
  transition: all 0.3s ease;
}

.bibliography-header:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.bibliography-content {
  padding: 2rem 0;
  animation: slideDown 0.3s ease-out;
  max-width: 100%;
  overflow-x: auto;
}

.bibliography-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.bibliography-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.bibliography-text {
  flex: 1;
  min-width: 0; /* Prevents text overflow */
}

.bibliography-title {
  margin: 0;
  color: #1a202c;
  font-size: 1.4rem;
  word-break: break-word;
}

.bibliography-subtitle {
  margin: 0.25rem 0 0;
  color: var(--muted, #64748b);
  font-size: 0.9rem;
}

.expand-indicator {
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

details[open] .expand-indicator {
  transform: rotate(180deg);
}

/* Source entries */
.source-category {
  margin-bottom: 2.5rem;
}

.source-category h4 {
  color: var(--accent-purple, #667eea);
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.source-entry {
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-light, #e2e8f0);
}

.source-entry:last-child {
  border-bottom: none;
}

.source-citation {
  margin-bottom: 0.5rem;
  line-height: 1.6;
}

.source-usage {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 0.5rem;
  flex-wrap: wrap;
}

.usage-tag {
  /* Gradient pill style matching nav buttons */
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.9rem;
  background: linear-gradient(135deg, #e11d48, #7209b7); /* red to purple gradient */
  color: white;
  border-radius: 25px; /* Pill shape */
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  min-height: 32px;
  transition: all 0.2s ease;
}

.usage-tag:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(225, 29, 72, 0.25);
}

.usage-note {
  color: var(--muted, #64748b);
  font-size: 0.9rem;
}

.citation-note {
  background: #f8f9ff;
  border: 1px solid #d0d8ff;
  border-radius: 8px;
  padding: 1.5rem;
  margin-top: 2rem;
}

.citation-note p {
  margin: 0.5rem 0;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .bibliography-header {
    padding: 1rem;
    border-radius: 8px;
  }
  
  .bibliography-title {
    font-size: 1.1rem;
  }
  
  .bibliography-subtitle {
    font-size: 0.85rem;
  }
  
  .bibliography-content {
    padding: 1rem 0;
  }
  
  .source-usage {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
}

/* Animation */
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ========================================
   ENHANCED BIBLIOGRAPHY VARIANT
   Beautiful gradient header version
   Use class="bibliography-section enhanced" for this style
   ======================================== */
.bibliography-section.enhanced {
  margin: 3rem 0;
  border: 2px solid var(--border-light);
  border-radius: 12px;
  overflow: hidden;
  background: white;
}

.bibliography-section.enhanced .bibliography-header {
  padding: 1.5rem;
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-rose));
  color: white;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: none;
  margin: 0;
}

.bibliography-section.enhanced .bibliography-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
}

.bibliography-section.enhanced .bibliography-icon {
  font-size: 2rem;
  color: white;
}

.bibliography-section.enhanced .bibliography-title {
  margin: 0;
  color: white;
  font-size: 1.3rem;
  font-weight: 700;
}

.bibliography-section.enhanced .bibliography-subtitle {
  margin: 0.25rem 0 0 0;
  color: rgba(255, 255, 255, 0.95);
  font-size: 0.95rem;
}

.bibliography-section.enhanced .bibliography-content {
  padding: 2rem;
  background: #f8fafc;
}

.bibliography-section.enhanced .source-category h4 {
  color: var(--accent-purple);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--accent-gold);
}

.bibliography-section.enhanced .source-entry {
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: white;
  border-radius: 8px;
  border-left: 3px solid var(--accent-purple);
  border-bottom: none;
}

.bibliography-section.enhanced .usage-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.9rem;
  background: linear-gradient(135deg, #e11d48, #7209b7); /* red to purple gradient */
  color: white;
  border-radius: 25px; /* Fuller pill shape */
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  min-height: 32px;
  transition: all 0.2s ease;
}

.bibliography-section.enhanced .usage-note {
  color: var(--text-gray);
  font-size: 0.9rem;
  font-style: italic;
}

.bibliography-section.enhanced .citation-note {
  margin-top: 2rem;
  padding: 1.5rem;
  background: white;
  border-radius: 8px;
  border: 2px solid var(--accent-gold);
}

.bibliography-section.enhanced .expand-indicator {
  transition: transform 0.3s ease;
  color: white;
}

.bibliography-section.enhanced[open] .expand-indicator {
  transform: rotate(180deg);
}

.bibliography-section.enhanced .expand-indicator svg {
  color: white;
}

/* Mobile responsiveness for enhanced version */
@media (max-width: 768px) {
  .bibliography-section.enhanced .bibliography-header {
    padding: 1rem;
  }
  
  .bibliography-section.enhanced .bibliography-title {
    font-size: 1.1rem;
  }
  
  .bibliography-section.enhanced .bibliography-icon {
    font-size: 1.5rem;
  }
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .bibliography-header {
    padding: 1rem;
    border-radius: 8px;
  }
  
  .bibliography-title {
    font-size: 1.1rem;
  }
  
  .bibliography-subtitle {
    font-size: 0.85rem;
  }
  
  .bibliography-content {
    padding: 1rem 0;
  }
  
  .source-usage {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
}

/* ============================================
   ANIMATIONS - CONSOLIDATED SECTION
   Place this single section in global-v2.css
   Remove all duplicate keyframe definitions
   ============================================ */

/* === KEYFRAME DEFINITIONS === */

/* Vertical slide animations */
@keyframes fadeSlideDown {
  from { 
    opacity: 0; 
    transform: translateY(var(--slide-distance, 20px)); 
  }
  to { 
    opacity: 1; 
    transform: translateY(0); 
  }
}

/* Horizontal slide animations */
@keyframes fadeSlideLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Fade only animation */
@keyframes fadeIn {
  from { 
    opacity: 0; 
  }
  to { 
    opacity: 1; 
  }
}

/* Loading spinner */
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Skeleton loading */
@keyframes loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* === ANIMATION CLASSES === */

/* Scroll-triggered animations */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  will-change: transform, opacity;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Direct animation applications */
.fade-in {
  animation: fadeSlideDown 0.6s ease-out;
}

.fade-slide-down {
  animation: fadeSlideDown 0.6s ease-out;
}

.fade-slide-left {
  animation: fadeSlideLeft 0.6s ease-out;
}

/* Timeline specific animations */
.timeline-item {
  position: relative;
  padding: 1rem 1rem 1rem 1.5rem;
  margin-bottom: 1rem;
  opacity: 1;
  transform: translateX(0);
  border-left: 3px solid transparent;
  background: rgba(248, 250, 252, 0.5);
  border-radius: 0 8px 8px 0;
  transition: all 0.3s ease;
  animation: fadeSlideLeft 0.6s ease-out backwards;
}

/* Stagger animation for timeline items */
.timeline-item:nth-child(1) { animation-delay: 0.1s; }
.timeline-item:nth-child(2) { animation-delay: 0.2s; }
.timeline-item:nth-child(3) { animation-delay: 0.3s; }
.timeline-item:nth-child(4) { animation-delay: 0.4s; }
.timeline-item:nth-child(5) { animation-delay: 0.5s; }
.timeline-item:nth-child(6) { animation-delay: 0.6s; }
.timeline-item:nth-child(7) { animation-delay: 0.7s; }
.timeline-item:nth-child(8) { animation-delay: 0.8s; }

/* Tab content animation */
.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: fadeIn 0.5s ease-in;
}

/* Bibliography content animation */
.bibliography-content {
  padding: 2rem 0;
  animation: fadeSlideDown 0.3s ease-out;
  max-width: 100%;
  overflow-x: auto;
}

/* Loading animations */
.loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid var(--border-light);
  border-top-color: var(--accent-blue);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
}

/* === ANIMATION UTILITIES === */

/* Delay utilities */
.animation-delay-100 { animation-delay: 0.1s; }
.animation-delay-200 { animation-delay: 0.2s; }
.animation-delay-300 { animation-delay: 0.3s; }
.animation-delay-400 { animation-delay: 0.4s; }
.animation-delay-500 { animation-delay: 0.5s; }

/* Duration utilities */
.animation-fast { animation-duration: 0.3s; }
.animation-normal { animation-duration: 0.6s; }
.animation-slow { animation-duration: 1s; }

/* Easing utilities */
.animation-ease-in { animation-timing-function: ease-in; }
.animation-ease-out { animation-timing-function: ease-out; }
.animation-ease-in-out { animation-timing-function: ease-in-out; }


/* ========================================
   PATTERN CARDS (for consistency)
   ======================================== */
.pattern-box {
  padding: 1rem;
  border-radius: 8px;
  height: 100%;
}

.pattern-box h4 {
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.pattern-box ul {
  margin: 0;
  padding-left: 1.2rem;
  font-size: 0.9rem;
}

.pattern-box ul li {
  margin: 0.3rem 0;
}

/* ========================================
   KEY INSIGHTS (Standardized)
   ======================================== */
.key-insight {
  background: linear-gradient(135deg, #f8f9ff 0%, #f0f4ff 100%);
  border-left: 4px solid #4a5fff;
  padding: 1.5rem;
  margin: 2rem 0;
  border-radius: 8px;
}

.key-insight strong {
  color: #2a3aaa;
  display: block;
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

/* ========================================
   NAVIGATION FOOTER
   ======================================== */
.nav-footer {
  background: #f8f9ff;
  border: 1px solid #d0d8ff;
  padding: 1.5rem;
  border-radius: 12px;
  margin-top: 3rem;
}

.nav-footer h3 {
  margin-bottom: 1rem;
  color: #2a3aaa;
}

.nav-footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.nav-footer .cross-ref {
  display: block;
  padding: 0.75rem;
  background: white;
  border: 1px solid #d0d8ff;
  border-radius: 6px;
  text-decoration: none;
  color: #4a5fff;
  transition: all 0.3s ease;
  text-align: center;
}

.nav-footer .cross-ref:hover {
  background: #4a5fff;
  color: white;
  transform: translateY(-2px);
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .nav-footer-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   UI ELEMENTS
   ============================================ */
.section-divider { 
  height: 2px; 
  background: linear-gradient(90deg, transparent, var(--border-light), transparent);
  margin: 3rem 0; 
  border: 0; 
}

.note { 
  font-size: .9rem; 
  color: var(--muted); 
  font-style: italic;
  margin-top: 1rem;
}

.cross-ref {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.5rem 0.75rem;
  min-height: 44px;
  background: var(--panel);
  border: 1px solid var(--border-light);
  border-radius: 6px;
  font-size: 0.85rem;
  color: var(--accent-blue);
  transition: all 0.2s;
  text-decoration: none;
  margin: 0.25rem;
}

.cross-ref:hover {
  background: var(--accent-blue);
  color: white;
  transform: translateX(2px);
}

/* ============================================
   PROGRESS INDICATORS
   ============================================ */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-purple), var(--accent-rose));
  z-index: 1001;
  transition: width 0.2s ease;
  width: 0%;
}

.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: linear-gradient(135deg, var(--accent-purple) 0%, var(--accent-rose) 100%);
  color: white;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(114, 9, 183, 0.3);
  z-index: 999;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(114, 9, 183, 0.4);
}

/* ============================================
   QUICK NAVIGATION SIDEBAR
   ============================================ */
.quick-nav-sidebar {
  position: fixed;
  right: 2rem;
  top: 50%;
  transform: translateY(-50%);
  display: none;
  flex-direction: column;
  gap: 0.5rem;
  z-index: 500;
}

@media (min-width: 1400px) {
  .quick-nav-sidebar {
    display: flex;
  }
}

.quick-nav-item {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--border-light);
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
}

.quick-nav-item:hover,
.quick-nav-item.active {
  background: linear-gradient(135deg, var(--accent-purple) 0%, var(--accent-rose) 100%);
  transform: scale(1.5);
}

.quick-nav-item::before {
  content: attr(data-label);
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--primary-dark);
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.quick-nav-item:hover::before {
  opacity: 1;
}

/* ============================================
   BUTTONS
   ============================================ */
.primary-button {
  background: var(--primary-dark);
  color: white;
  padding: 1rem 2rem;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 2px solid transparent;
}

.primary-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

.secondary-button {
  background: transparent;
  color: var(--primary-dark);
  padding: 1rem 2rem;
  border: 2px solid var(--primary-dark);
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1rem;
  transition: all 0.3s ease;
}

.secondary-button:hover {
  background: var(--primary-dark);
  color: white;
  transform: translateY(-3px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

/* Tab Buttons - Pill-shaped like bibliography tags */
.tab-button {
  padding: 0.6rem 1.25rem;
  background: #f8f9fa;
  border: 2px solid #e9ecef;
  color: #6b7280;
  cursor: pointer;
  font-weight: 600;
  border-radius: 25px; /* Pill shape */
  transition: all 0.3s ease;
  font-family: inherit;
  font-size: 0.95rem;
  min-height: 44px; /* Touch-friendly */
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.tab-button:hover {
  background: #e9ecef;
  border-color: #dee2e6;
  transform: translateY(-2px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Active tab - matches bibliography tag gradient */
.tab-button.active {
  background: linear-gradient(135deg, #e11d48, #7209b7); /* red to purple gradient */
  color: white;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(225, 29, 72, 0.25);
  transform: translateY(0);
}

/* Tab Content */
.tab-content {
  display: none;
  animation: fadeIn 0.5s ease-in;
}

.tab-content.active {
  display: block;
}

@keyframes fadeIn {
  from { 
    opacity: 0; 
    transform: translateY(10px); 
  }
  to { 
    opacity: 1; 
    transform: translateY(0); 
  }
}

/* Mobile responsiveness for tabs */
@media (max-width: 768px) {
  .tab-nav {
    gap: 0.5rem;
  }
  
  .tab-button {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    min-height: 40px;
  }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
/* Spacing */
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.py-1 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-2 { padding-top: 1rem; padding-bottom: 1rem; }

/* Text */
.text-center { text-align: center; }
.text-muted { color: var(--text-gray); }
.font-bold { font-weight: 700; }

/* Display */
.hidden { display: none; }
.block { display: block; }
.inline-block { display: inline-block; }

/* ============================================
   LOADING STATES
   ============================================ */
.loading {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 400px;
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid var(--border-light);
  border-top-color: var(--accent-blue);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ============================================
   EMPTY STATES
   ============================================ */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-gray);
}

.empty-state-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
  opacity: 0.3;
}

.empty-state-text {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.empty-state-subtext {
  font-size: 1rem;
  opacity: 0.8;
}

/* ============================================
   FOOTER
   ============================================ */
footer {
  background: linear-gradient(135deg, var(--primary-dark) 0%, #2c2c2c 100%);
  color: var(--primary-light);
  text-align: center;
  padding: 3rem 2rem;
  margin-top: 6rem;
  position: relative;
  overflow: hidden;
}

footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 50% 0%, rgba(114, 9, 183, 0.1) 0%, transparent 70%);
}

footer p {
  position: relative;
  z-index: 1;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 65px;
    right: -100%;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background: white;
    flex-direction: column;
    padding: 2rem;
    gap: 1rem;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    transition: right 0.3s ease;
  }

  .nav-links.active {
    right: 0;
  }

  .mobile-menu-toggle {
    display: flex;
  }

  .dropdown-content {
    position: static;
    display: block;
    box-shadow: none;
    background: var(--bg-gray);
    margin-left: 1rem;
    margin-top: 0.5rem;
    border-radius: 0;
    border: none;
    border-left: 2px solid var(--border-light);
  }
  
  .dropdown-toggle::after {
    display: none;
  }
  
  .content-section {
    padding: 5rem 1rem 2rem;
  }
  
  .section-title {
    font-size: 1.8rem;
  }
  
  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr;
  }
  
  .back-to-top {
    bottom: 1rem;
    right: 1rem;
  }
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
  nav, .mobile-menu-toggle, .reading-progress, 
  .skip-link, .back-to-top, .quick-nav-sidebar, footer {
    display: none;
  }
  
  .theology-card {
    page-break-inside: avoid;
    box-shadow: none;
    border: 1px solid #000;
  }
  
  .animate-on-scroll {
    opacity: 1 !important;
    transform: none !important;
  }
  
  details[open] summary ~ * {
    display: block !important;
  }
}
/* ===== Character Profile Components (moved from template v5.4) ===== */
  
    /* Hebrew/Greek Text - Character Profile Specific */
    .hebrew, .hebrew-large {
      font-family: 'SBL Hebrew', 'Ezra SIL', serif;
      direction: rtl;
      unicode-bidi: embed;
      color: var(--accent-purple);
    }

    .greek, .greek-large {
      font-family: 'SBL Greek', 'Times New Roman', serif;
      direction: ltr;
      unicode-bidi: normal;
      color: var(--accent-purple);
    }

    .hebrew-large, .greek-large {
      font-size: 1.5rem;
      font-weight: bold;
    }

    .hebrew-inline, .greek-inline {
      display: inline-block;
      padding: 0 0.3rem;
      color: var(--accent-purple);
    }

    .hebrew-inline {
      font-family: 'SBL Hebrew', 'Ezra SIL', serif;
      direction: rtl;
      unicode-bidi: embed;
    }

    .greek-inline {
      font-family: 'SBL Greek', 'Times New Roman', serif;
    }

    /* Timeline - Character Specific */
.timeline {
  position: relative;
  padding-left: 2rem;
  margin: 1.5rem 0;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--accent-purple) 0%, var(--accent-rose) 100%);
  border-radius: 2px;
}

/* Keep loaded class for backward compatibility */
.timeline-item.loaded {
  /* No-op - animation handled above */
}
/* Timeline dot */
.timeline-item::before {
  content: '';
  position: absolute;
  left: -2.35rem;
  top: 1.3rem;
  width: 10px;
  height: 10px;
  background: var(--accent-purple);
  border: 3px solid white;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(114, 9, 183, 0.2);
  transition: all 0.3s ease;
}

/* Hover effects */
.timeline-item:hover {
  background: white;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border-left-color: var(--accent-gold);
  transform: translateX(5px);
}

/* Make the dot glow on hover */
.timeline-item:hover::before {
  background: var(--accent-rose);
  transform: scale(1.3);
  box-shadow: 0 0 0 5px rgba(225, 29, 72, 0.2);
}

/* Timeline Card - if used separately from theology-card */
.timeline-card {
  background: var(--bg);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  padding: 1.5rem 1.75rem;
  margin: 1.5rem 0;
  box-shadow: 0 4px 6px -1px var(--shadow);
}

.timeline-card h3 {
  margin: .1rem 0 1rem;
  color: #1a202c;
  font-size: 1.4rem;
  font-weight: 700;
}

/* Stagger animation for multiple timeline items */
.timeline-item:nth-child(1) { animation-delay: 0.1s; }
.timeline-item:nth-child(2) { animation-delay: 0.2s; }
.timeline-item:nth-child(3) { animation-delay: 0.3s; }
.timeline-item:nth-child(4) { animation-delay: 0.4s; }
.timeline-item:nth-child(5) { animation-delay: 0.5s; }
.timeline-item:nth-child(6) { animation-delay: 0.6s; }
.timeline-item:nth-child(7) { animation-delay: 0.7s; } 
.timeline-item:nth-child(8) { animation-delay: 0.8s; }

    /* Chiasm Structure - Character Specific */
    .chiasm-card {
      background: var(--bg);
      border: 1px solid var(--border-light);
      border-radius: 16px;
      padding: 1.5rem 1.75rem;
      margin: 1.5rem 0;
      box-shadow: 0 4px 6px -1px var(--shadow);
    }

    .chiasm-card h3 {
      margin: .1rem 0 1rem;
      color: #1a202c;
      font-size: 1.4rem;
      font-weight: 700;
    }

    .chiasm-structure {
      font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
      background: linear-gradient(135deg, var(--panel) 0%, #f9fafb 100%);
      border: 2px dashed var(--ring);
      border-radius: 12px;
      padding: 1.25rem;
      margin: 1rem 0;
    }

    .chiasm-line {
      padding: .3rem 0;
      transition: background 0.2s;
    }

    .chiasm-center {
      padding: .75rem 1rem;
      margin: .75rem 0;
      border-left: 4px solid var(--accent-blue);
      background: linear-gradient(90deg, #ecfeff 0%, #cffafe 100%);
      border-radius: 8px;
      font-weight: 600;
    }

    .indent-1 { padding-left: 1.5rem; }
    .indent-2 { padding-left: 3rem; }
    .indent-3 { padding-left: 4.5rem; }
    .indent-4 { padding-left: 6rem; }

    /* Word Study - Character Specific */
    .word-study {
      background: linear-gradient(135deg, #fefce8 0%, #fef3c7 100%);
      border: 1px solid #fbbf24;
      margin: 1.5rem 0;
      padding: 1.5rem 1.75rem;
      border-radius: 16px;
    }

    .word-study h4 {
      margin: .5rem 0 .75rem;
      color: #92400e;
    }

    /* Character Type Badge */
    .character-type-badge {
      display: inline-flex;
      align-items: center;
      gap: 0.5rem;
      padding: 0.5rem 1rem;
      background: linear-gradient(135deg, var(--info) 0%, #60a5fa 100%);
      color: white;
      border-radius: 999px;
      font-size: 0.875rem;
      font-weight: 600;
      margin: 1rem 0;
    }

    /* Complexity Indicator */
    .complexity-indicator {
      display: flex;
      align-items: center;
      gap: 0.5rem;
      margin: 1rem 0;
      padding: 0.75rem;
      background: var(--panel);
      border-radius: 8px;
      border: 1px solid var(--border-light);
    }

    .complexity-indicator .label {
      font-weight: 600;
      color: var(--muted);
      font-size: 0.875rem;
    }

    .complexity-level {
      display: flex;
      gap: 0.25rem;
    }

    .complexity-dot {
      width: 12px;
      height: 12px;
      border-radius: 50%;
      background: var(--border-light);
    }

    .complexity-dot.filled {
      background: linear-gradient(135deg, var(--accent-purple) 0%, var(--accent-rose) 100%);
    }

    /* Optional & Enhancement Indicators */
    .optional-indicator {
      display: inline-block;
      padding: 0.125rem 0.5rem;
      background: var(--warning);
      color: white;
      border-radius: 4px;
      font-size: 0.75rem;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.05em;
      margin-left: 0.5rem;
    }

    .enhancement-indicator {
      display: inline-block;
      padding: 0.125rem 0.5rem;
      background: linear-gradient(135deg, var(--accent-purple) 0%, var(--accent-rose) 100%);
      color: white;
      border-radius: 4px;
      font-size: 0.75rem;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.05em;
      margin-left: 0.5rem;
    }

    /* Study Questions */
    .question-list {
      counter-reset: question;
      list-style: none;
      padding: 0;
    }

    .question-list li {
      counter-increment: question;
      position: relative;
      padding-left: 3rem;
      margin-bottom: 1.5rem;
      color: #475569;
      line-height: 1.7;
    }

    .question-list li::before {
      content: counter(question);
      position: absolute;
      left: 0;
      top: 0;
      width: 32px;
      height: 32px;
      background: var(--panel);
      border-radius: 8px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-weight: 600;
      color: var(--accent-purple);
      border: 1px solid var(--border-light);
    }

    /* Profile Status Indicator */
    .profile-status-indicator {
      display: inline-flex;
      align-items: center;
      gap: 0.5rem;
      padding: 0.5rem 1rem;
      background: var(--warning);
      color: white;
      border-radius: 999px;
      font-size: 0.875rem;
      font-weight: 600;
      margin: 1rem 0;
    }

    .profile-status-indicator.incomplete {
      background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    }

    /* Improved touch targets for mobile */
    .tag {
      display: inline-flex;
      align-items: center;
      min-height: 44px; /* Better mobile UX */
      border: 1px solid var(--ring);
      border-radius: 999px;
      padding: .4rem .75rem;
      font-size: .85rem;
      margin: .15rem .35rem .15rem 0;
      background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
      font-weight: 500;
      transition: all 0.2s;
    }

    /* Bibliography Styles */
    .bibliography-section summary {
      cursor: pointer;
      list-style: none;
      outline: none;
    }

    .bibliography-section[open] .expand-indicator {
      transform: rotate(180deg);
    }

    .expand-indicator {
      transition: transform 0.3s ease;
    }

    .source-category {
      margin-bottom: 2.5rem;
      padding-bottom: 2rem;
      border-bottom: 1px solid var(--border-light);
    }

    .source-category:last-child {
      border-bottom: none;
    }

    .source-category h4 {
      color: var(--accent-purple);
      margin-bottom: 1rem;
    }

    .source-entry {
      background: var(--bg);
      border: 1px solid var(--border-light);
      border-radius: 12px;
      padding: 1.25rem;
      margin-bottom: 1rem;
      transition: all 0.3s ease;
    }

    .source-entry:hover {
      box-shadow: var(--shadow);
      transform: translateX(4px);
      border-color: var(--accent-purple);
    }

    .source-citation {
      color: #111827;
      line-height: 1.6;
      margin-bottom: 0.75rem;
    }

    .source-citation strong {
      color: var(--accent-purple);
      font-weight: 600;
    }

    .source-usage {
      display: flex;
      align-items: center;
      gap: 1rem;
      flex-wrap: wrap;
    }

    .usage-tag {
      display: inline-flex;
      align-items: center;
      min-height: 36px;
      padding: 0.25rem 0.75rem;
      background: linear-gradient(135deg, var(--accent-purple) 0%, var(--accent-rose) 100%);
      color: white;
      border-radius: 25px;
      font-size: 0.8rem;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.05em;
    }

    .usage-note {
      color: var(--muted);
      font-size: 0.9rem;
      font-style: italic;
      flex: 1;
    }

    .citation-note {
      background: var(--panel);
      border-radius: 12px;
      padding: 1.5rem;
      margin-top: 2rem;
      border-left: 4px solid var(--accent-blue);
    }

    .citation-note p {
      color: #475569;
      line-height: 1.6;
      margin-bottom: 0.75rem;
    }

    /* ========================================
   BIBLIOGRAPHY SVG ARROW ENHANCEMENT
   Add to global-v2.css after existing bibliography styles
   ======================================== */

/* SVG Arrow styling for bibliography expand indicator */
.bibliography-section .expand-indicator svg {
  transition: transform 0.3s ease;
  width: 24px;
  height: 24px;
  color: var(--muted);
}

.bibliography-section[open] .expand-indicator svg {
  transform: rotate(180deg);
}

/* Hide the old text-based indicator if present */
.bibliography-section .expand-indicator:not(:has(svg)) {
  transition: transform 0.3s ease;
}

.bibliography-section[open] .expand-indicator:not(:has(svg)) {
  transform: rotate(180deg);
}
    /* Song Links (for women with songs) */
    .song-link {
      display: inline-flex;
      align-items: center;
      gap: 0.25rem;
      padding: 0.5rem 0.75rem;
      background: linear-gradient(135deg, var(--accent-purple) 0%, var(--accent-rose) 100%);
      color: white;
      border-radius: 20px;
      font-size: 0.85rem;
      font-weight: 600;
      text-decoration: none;
      margin: 0.25rem;
      transition: all 0.2s;
    }

    .song-link:hover {
      transform: translateY(-2px);
      box-shadow: 0 4px 12px rgba(114, 9, 183, 0.3);
    }

    /* Multi-page indicator */
    .multi-page-indicator {
      display: inline-block;
      padding: 0.25rem 0.5rem;
      background: var(--info);
      color: white;
      border-radius: 4px;
      font-size: 0.75rem;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.05em;
      margin-left: 0.5rem;
    }

    /* Women-specific styles */
    body.woman-profile .tag.primary {
      background: linear-gradient(135deg, var(--accent-purple) 0%, var(--accent-rose) 100%);
    }

    body.woman-profile .cross-ref:hover {
      background: linear-gradient(135deg, var(--accent-purple) 0%, var(--accent-rose) 100%);
    }

    /* Responsive adjustments for character-specific elements */
    @media (max-width: 768px) {
      .indent-1 { padding-left: 1rem; }
      .indent-2 { padding-left: 2rem; }
      .indent-3 { padding-left: 3rem; }
      .indent-4 { padding-left: 4rem; }
    }
  /* --- Mobile nav fixes (append at end of global-v2.css) --- */

/* 1) Make dropdowns tap-friendly on mobile using :focus-within
   (works without changing HTML/JS) */
@media (max-width: 768px) {
  /* Default: keep submenu hidden in the drawer */
  .nav-links .dropdown .dropdown-content {
    display: none;
    margin: 0.25rem 0 0.5rem 0;
    padding: 0.25rem 0;
    border-left: 3px solid var(--border-light);
    background: #fafafa;
  }

  /* Show submenu when the parent gets focus (tap on the toggle) */
  .nav-links .dropdown:focus-within .dropdown-content {
    display: block;
  }

  /* Make the top-level toggle clearly tappable */
  .nav-links .dropdown > .dropdown-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 48px;
    padding: 0.75rem 0.75rem;
    background: #fff;
    border: 1px solid var(--border-light);
    border-radius: 8px;
  }

  /* Add an inline caret that rotates when focused */
  .nav-links .dropdown > .dropdown-toggle::after {
    content: '▸';
    margin-left: 0.5rem;
    transition: transform .2s ease;
  }
  .nav-links .dropdown:focus-within > .dropdown-toggle::after {
    transform: rotate(90deg);
  }

  /* Submenu items look like a simple list in the drawer */
  .nav-links .dropdown .dropdown-content a {
    padding: 0.6rem 0.75rem 0.6rem 1.25rem;
    border-radius: 6px;
    margin: 0.15rem 0;
  }

  /* Improve vertical rhythm & touch area inside the drawer */
  .nav-links a {
    min-height: 48px;
    padding: 0.75rem;
  }

  /* Prevent long menus from pushing content horizontally */
  .nav-links {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* 2) Tighten the fixed header overlap on small screens
   (so the first card isn’t cramped under the nav) */
@media (max-width: 768px) {
  .content-section {
    padding-top: 6.5rem; /* was 5rem in base; gives more breathing room */
  }
}

/* 3) Page Navigation card (on Eve pages) — make it extra-mobile friendly */
@media (max-width: 768px) {
  .page-navigation {
    border-top: 1px solid #d0d8ff;
    border-bottom: 1px solid #d0d8ff;
    border-left: none;
    border-right: none;
    border-radius: 0;
    margin-left: -1rem;
    margin-right: -1rem;
  }
  .page-nav-item {
    text-align: left;
  }
}
/* Optional: subtle hero treatment just for About */
body.about-page .section-title {
  background: linear-gradient(135deg, var(--bg-soft, #f0f4ff), #e8eeff);
  border: 2px solid var(--accent-blue, #4a5fff);
  padding: 1rem 1.25rem;
  border-radius: 1rem;
}
/* ============================================
   MOBILE MENU OVERLAY - Add to global-v2.css
   ============================================ */

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-menu-overlay.active {
    display: block;
    opacity: 1;
}

/* Prevent body scroll when menu is open */
body.menu-open {
    overflow: hidden;
}

/* Enhanced dropdown states for mobile */
@media (max-width: 768px) {
    .nav-links .dropdown.active .dropdown-content {
        display: block !important;
    }
    
    .nav-links .dropdown.active .dropdown-toggle::after {
        transform: rotate(180deg);
    }
}
/* Responsive grid for page navigation */
.page-nav-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

/* Force 3 columns on larger screens */
@media (min-width: 1024px) {
  .page-nav-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Force 2 columns on medium screens */
@media (min-width: 640px) and (max-width: 1023px) {
  .page-nav-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}