/* ============================================
 SAGAS OF THE INFINITE: PLATES OF METAL
 Main Stylesheet — PINK DIVIDER EDITION
 ONLY horizontal division elements recolored
 ============================================ */

/* ============================================
 BASIC RESET
 ============================================ */

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

/* ============================================
 ROOT VARIABLES
 ============================================ */

:root {
  --bg-dark: #0a0a0a;
  --bg-medium: #1a1a1a;

  --text-primary: #e0e0e0;
  --text-bright: #ffffff;

  --neon-blue: #00d9ff;
  --neon-purple: #b84fff;
  --neon-green: #39ff14;
  --neon-pink: #ff006e;

  --border-color: #333333;

  --spacing-small: 0.5rem;
  --spacing-medium: 1rem;
  --spacing-large: 2rem;
  --spacing-xlarge: 4rem;

  --font-main: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  --font-heading: 'Arial Black', sans-serif;
}

/* ============================================
 BASE PAGE
 ============================================ */

body {
  background-color: var(--bg-dark);
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--spacing-large);
}

/* ============================================
 NAVIGATION
 ============================================ */

.main-nav {
  background-color: var(--bg-medium);
  border-bottom: 2px solid var(--neon-pink); /* CHANGED */
  position: sticky;
  top: 0;
  z-index: 1000;
}

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

.site-logo a {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  color: var(--neon-blue);
  text-decoration: none;
  letter-spacing: 2px;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: var(--spacing-large);
}

.nav-links a {
  color: var(--text-primary);
  text-decoration: none;
  font-weight: bold;
  letter-spacing: 1px;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--neon-blue);
}

/* ============================================
 HEADINGS
 ============================================ */

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  color: var(--text-bright);
  margin-bottom: var(--spacing-medium);
}

.page-header {
  text-align: center;
  margin-bottom: var(--spacing-xlarge);
  padding-bottom: var(--spacing-large);
  border-bottom: 3px solid var(--neon-pink); /* CHANGED */
}

/* ============================================
 SONG HEADER CARD
 ============================================ */

.song-header {
  display: grid;
  grid-template-columns: 350px 1fr;
  gap: var(--spacing-large);
  background-color: var(--bg-medium);
  padding: var(--spacing-large);
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

/* ============================================
 SCRIPTURE & LYRICS
 ============================================ */

.two-column {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-large);
}

.scripture-column,
.lyrics-column {
  background-color: var(--bg-medium);
  padding: var(--spacing-large);
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.scripture-column h3,
.lyrics-column h3 {
  border-bottom: 2px solid var(--neon-pink); /* CHANGED */
  padding-bottom: var(--spacing-small);
}

/* ============================================
 SONG FEED
 ============================================ */

.song-entry {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: var(--spacing-medium);
  background-color: var(--bg-medium);
  padding: var(--spacing-medium);
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

/* ============================================
 PAGINATION
 ============================================ */

.pagination {
  text-align: center;
  margin-top: var(--spacing-xlarge);
  padding-top: var(--spacing-large);
  border-top: 2px solid var(--neon-pink); /* CHANGED */
}

/* ============================================
 FOOTER
 ============================================ */

.site-footer {
  background-color: var(--bg-medium);
  border-top: 2px solid var(--neon-pink); /* CHANGED */
  padding: var(--spacing-large);
  text-align: center;
  margin-top: auto;
}



/* ============================================
 GLOBAL LINK STYLING (NON-HEADER)
 ============================================ */

/* Base link color */
a {
  color: var(--neon-blue);
  font-weight: normal;
  text-decoration: none;
  transition: color 0.25s ease;
}

/* Hover: slightly brighter */
a:hover {
  color: #85EAF9; /* lighter neon blue */
}

/* Visited: slightly darker */
a:visited {
  color: #009BB6; /* darker but still neon */
}

/* ============================================
 HEADER LINKS — EXPLICIT OVERRIDE
 (Preserves existing header look)
 ============================================ */

.main-nav a,
.site-logo a {
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Header hover remains unchanged */
.main-nav a:hover {
  color: var(--neon-blue);
}



/* ============================================
   MAP PAGE STYLES
   ============================================ */

.map-page {
    /* Inherits main padding */
}

.map-instructions {
    text-align: center;
    color: var(--text-primary);
    font-style: italic;
    margin-top: var(--spacing-small);
}

.map-container {
    max-width: 900px;
    margin: 0 auto;
}

/* Main sections (Hebrew Bible, Book of Mormon, etc.) */
.map-section {
    margin-bottom: var(--spacing-large);
    background-color: var(--bg-medium);
    border-radius: 8px;
    border: 2px solid var(--border-color);
    overflow: hidden;
}

/* Toggle buttons for collapsible sections */
.map-toggle {
    width: 100%;
    background-color: transparent;
    border: none;
    color: var(--text-bright);
    text-align: left;
    padding: var(--spacing-medium);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: var(--spacing-small);
    font-size: 1rem;
    font-family: var(--font-main);
    transition: background-color 0.3s ease;
}

.map-toggle:hover {
    background-color: rgba(0, 217, 255, 0.1);
}

.map-toggle.expanded {
    background-color: rgba(0, 217, 255, 0.05);
}

/* Toggle icon (arrow) */
.toggle-icon {
    color: var(--neon-blue);
    font-size: 0.9rem;
    transition: transform 0.3s ease;
    min-width: 20px;
}

/* Section titles styling */
.section-title {
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--neon-blue);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.subsection-title {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--neon-purple);
}

.book-title {
    font-size: 1rem;
    font-weight: bold;
    color: var(--text-bright);
}

.psalter-title {
    font-size: 1rem;
    font-weight: bold;
    color: var(--neon-green);
}

.subbook-title {
    font-size: 0.95rem;
    font-weight: bold;
    color: var(--text-bright);
}

/* Category titles (non-clickable headers) */
.category-title {
    font-size: 1rem;
    color: var(--neon-purple);
    padding: var(--spacing-medium);
    margin: var(--spacing-medium) 0 var(--spacing-small) 0;
    border-bottom: 1px solid var(--border-color);
}

/* Content sections (hidden by default) */
.map-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

.map-content.show {
    max-height: 10000px; /* Large enough to show all content */
    transition: max-height 0.6s ease;
}

/* Subsections (Torah, Nevi'im, etc.) */
.map-subsection {
    margin-left: var(--spacing-medium);
    border-left: 2px solid var(--border-color);
}

.map-subsection .map-toggle {
    padding-left: var(--spacing-large);
}

/* Books within subsections */
.map-book {
    margin-left: var(--spacing-medium);
    border-left: 2px solid var(--border-color);
}

.map-book .map-toggle {
    padding-left: var(--spacing-large);
}

/* Psalters (special nested level) */
.map-psalter {
    margin-left: var(--spacing-medium);
    border-left: 2px solid var(--border-color);
}

.map-psalter .map-toggle {
    padding-left: var(--spacing-large);
}

/* Sub-books (POGP contents) */
.map-subbook {
    margin-left: var(--spacing-medium);
    border-left: 2px solid var(--border-color);
}

.map-subbook .map-toggle {
    padding-left: var(--spacing-large);
}

/* Categories (non-collapsible groupings) */
.map-category {
    margin-left: var(--spacing-medium);
}

/* Chapter/Psalm/Sura lists */
.chapter-list,
.psalm-list,
.sura-list {
    list-style: none;
    padding: var(--spacing-medium);
    padding-left: var(--spacing-xlarge);
    margin: 0;
}

.chapter-list li,
.psalm-list li,
.sura-list li {
    padding: var(--spacing-small) 0;
    color: var(--text-primary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.chapter-list li:last-child,
.psalm-list li:last-child,
.sura-list li:last-child {
    border-bottom: none;
}

/* Active links in lists */
.chapter-list a,
.psalm-list a,
.sura-list a {
    color: var(--neon-blue);
    text-decoration: none;
    transition: color 0.3s ease;
}

.chapter-list a:hover,
.psalm-list a:hover,
.sura-list a:hover {
    color: var(--neon-purple);
    text-decoration: underline;
}

/* Incomplete items (non-links) */
.chapter-list li:not(:has(a)),
.psalm-list li:not(:has(a)),
.sura-list li:not(:has(a)) {
    color: var(--text-primary);
    opacity: 0.6;
}

/* AUTO-GREYING for sections without links */
.map-toggle.no-links {
    opacity: 0.4;
    cursor: default;
}

.map-toggle.no-links:hover {
    background-color: transparent;
}

.map-content.no-links {
    opacity: 0.4;
}

.map-content.no-links .chapter-list li,
.map-content.no-links .psalm-list li,
.map-content.no-links .sura-list li {
    opacity: 0.6;
}

/* Special styling for Sura list to handle location tags */
.sura-list li {
    font-size: 0.95rem;
    line-height: 1.6;
}


/* ============================================
   MAP PAGE RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .section-title {
        font-size: 1.1rem;
    }
    
    .subsection-title {
        font-size: 1rem;
    }
    
    .book-title,
    .psalter-title {
        font-size: 0.95rem;
    }
    
    .map-subsection,
    .map-book,
    .map-psalter,
    .map-subbook {
        margin-left: var(--spacing-small);
    }
    
    .map-subsection .map-toggle,
    .map-book .map-toggle,
    .map-psalter .map-toggle,
    .map-subbook .map-toggle {
        padding-left: var(--spacing-medium);
    }
    
    .chapter-list,
    .psalm-list,
    .sura-list {
        padding-left: var(--spacing-large);
    }
    
    .category-title {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .map-toggle {
        padding: var(--spacing-small);
        font-size: 0.9rem;
    }
    
    .section-title {
        font-size: 1rem;
    }
    
    .chapter-list,
    .psalm-list,
    .sura-list {
        padding-left: var(--spacing-medium);
        font-size: 0.9rem;
    }
}







/* ============================================
 Added per ChatGPT
 ============================================ */

.map-toggle.future {
  opacity: 0.7;
  font-style: italic;
}

.map-content.future {
  opacity: 0.7;
}

.future-note {
  max-width: 70ch;
  line-height: 1.5;
}

/* ============================================
 End of Addition per ChatGPT
 ============================================ */








/* ============================================
 MOBILE
 ============================================ */

@media (max-width: 768px) {
  .two-column {
    grid-template-columns: 1fr;
  }

  main {
    padding: var(--spacing-medium);
  }
}
