/* ─── Orthodox Bible Online — Bible Pages Stylesheet ─── */

/* ─── CSS Variables (matching index.html) ─── */
:root {
  --deep: #110E0A;
  --mahogany: #1C1410;
  --wine: #5C2234;
  --gold: #C5944A;
  --gold-light: #E2C28E;
  --gold-pale: #F0DFC0;
  --amber: #D4913D;
  --cream: #F7F0E8;
  --ivory: #FFFBF5;
  --text: #3A3028;
  --text-light: #6B5E50;
  --text-muted: #9A8D7F;
}

/* ─── Reset ─── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Libre Franklin', sans-serif;
  background: var(--deep);
  color: var(--cream);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
}
a { color: var(--gold); text-decoration: none; transition: color 0.3s; }
a:hover { color: var(--amber); }
img { max-width: 100%; height: auto; }

/* ─── Navigation (matching index.html) ─── */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(17, 14, 10, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 0 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  border-bottom: 1px solid rgba(197, 148, 74, 0.15);
}
.nav-brand {
  display: flex;
  gap: 12px;
  align-items: center;
  color: var(--gold-light);
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.2em;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
}
.nav-brand:hover { color: var(--gold-light); }
.nav-brand img { width: 36px; height: 36px; border-radius: 8px; }
.nav-links {
  display: flex;
  gap: 32px;
  align-items: center;
}
.nav-links a {
  color: rgba(226, 194, 142, 0.7);
  font-size: 0.82em;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: color 0.3s;
  text-decoration: none;
}
.nav-links a:hover { color: var(--gold-light); }
.nav-cta {
  background: linear-gradient(135deg, var(--gold), var(--amber));
  color: var(--deep) !important;
  padding: 9px 22px;
  border-radius: 6px;
  font-weight: 700 !important;
  font-size: 0.78em !important;
  letter-spacing: 0.08em;
  transition: all 0.3s;
}
.nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(197, 148, 74, 0.3);
  color: var(--deep) !important;
}
.nav-hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  flex-direction: column;
  gap: 5px;
}
.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--gold-light);
  border-radius: 2px;
  transition: all 0.3s;
}

/* ─── Page Container ─── */
.bible-page {
  position: relative;
  min-height: 100vh;
  padding-top: 64px;
}
.bible-page::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 30% 20%, rgba(92, 34, 52, 0.15) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 80% 70%, rgba(197, 148, 74, 0.06) 0%, transparent 50%);
  pointer-events: none;
}

/* ─── Breadcrumbs ─── */
.breadcrumbs {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  padding: 24px 40px 0;
  font-size: 0.82em;
  font-family: 'Libre Franklin', sans-serif;
}
.breadcrumbs a { color: var(--gold); }
.breadcrumbs a:hover { color: var(--amber); }
.breadcrumbs .separator { margin: 0 8px; color: var(--text-muted); }
.breadcrumbs .current { color: var(--gold-light); }

/* ─── Chapter Content ─── */
.chapter-content,
.bible-index-content {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  padding: 40px;
}
.chapter-header {
  text-align: center;
  margin-bottom: 40px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(197, 148, 74, 0.15);
}
.chapter-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2em, 4vw, 3em);
  font-weight: 600;
  color: var(--ivory);
  line-height: 1.2;
  margin-bottom: 8px;
}
.chapter-subtitle {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.1em;
  color: var(--gold);
  font-style: italic;
}
.index-intro {
  color: var(--text-muted);
  margin-top: 12px;
  font-size: 0.95em;
}

/* ─── Audio Banner ─── */
.audio-banner {
  max-width: 700px;
  margin: 0 auto 32px;
  text-align: center;
  padding: 14px 20px;
  background: rgba(197, 148, 74, 0.08);
  border: 1px solid rgba(197, 148, 74, 0.15);
  border-radius: 8px;
  font-size: 0.9em;
  color: var(--gold-light);
}
.audio-banner i {
  margin-right: 8px;
  color: var(--gold);
}
.audio-banner a {
  color: var(--gold);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.audio-banner a:hover { color: var(--amber); }

/* ─── Inline Chapter Heading (book index pages) ─── */
.inline-chapter-heading {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.4em;
  font-weight: 600;
  color: var(--gold);
  margin-bottom: 16px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

/* ─── Scripture Text ─── */
.scripture-text {
  max-width: 700px;
  margin: 0 auto;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.15em;
  line-height: 2.0;
  color: var(--cream);
}
.verse { margin-bottom: 4px; }
.verse-num {
  font-size: 0.7em;
  color: var(--gold);
  vertical-align: super;
  margin-right: 3px;
  font-family: 'Libre Franklin', sans-serif;
  font-weight: 600;
}

/* ─── Chapter Navigation (prev/next) ─── */
.chapter-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid rgba(197, 148, 74, 0.15);
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}
.chapter-nav a,
.chapter-nav .disabled {
  padding: 12px 24px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(197, 148, 74, 0.25);
  border-radius: 8px;
  color: var(--gold-light);
  font-family: 'Libre Franklin', sans-serif;
  font-size: 0.88em;
  font-weight: 500;
  transition: all 0.2s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.chapter-nav a:hover {
  background: rgba(197, 148, 74, 0.15);
  border-color: var(--gold);
  color: var(--gold);
}
.chapter-nav .disabled {
  opacity: 0.3;
  pointer-events: none;
  cursor: default;
}
.chapter-nav-top {
  margin-top: 0;
  margin-bottom: 32px;
  padding-top: 0;
  padding-bottom: 32px;
  border-top: none;
  border-bottom: 1px solid rgba(197, 148, 74, 0.15);
}

/* ─── Chapter Selector Grid ─── */
.chapter-selector {
  max-width: 700px;
  margin: 40px auto 0;
  padding-top: 32px;
  border-top: 1px solid rgba(197, 148, 74, 0.15);
}
.chapter-selector h3 {
  font-family: 'Cormorant Garamond', serif;
  color: var(--gold-light);
  font-size: 1.2em;
  margin-bottom: 16px;
  text-align: center;
}
.chapter-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
}
.chapter-grid a {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(197, 148, 74, 0.2);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--gold-light);
  font-family: 'Libre Franklin', sans-serif;
  font-size: 0.85em;
  font-weight: 500;
  transition: all 0.2s;
  text-decoration: none;
}
.chapter-grid a:hover {
  background: rgba(197, 148, 74, 0.15);
  border-color: var(--gold);
  color: var(--gold);
}
.chapter-grid a.active {
  background: var(--gold);
  color: var(--deep);
  border-color: var(--gold);
  font-weight: 700;
}

/* ─── Book Description ─── */
.book-description {
  max-width: 700px;
  margin: 0 auto 32px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.95em;
  line-height: 1.7;
}

/* ─── Related Books ─── */
.related-books {
  max-width: 700px;
  margin: 40px auto 0;
  padding-top: 32px;
  border-top: 1px solid rgba(197, 148, 74, 0.15);
}
.related-books h3 {
  font-family: 'Cormorant Garamond', serif;
  color: var(--gold-light);
  font-size: 1.2em;
  margin-bottom: 16px;
  text-align: center;
}
.related-books-grid {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ─── App Download CTA Section ─── */
.app-cta-section {
  max-width: 700px;
  margin: 48px auto 0;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(197, 148, 74, 0.15);
  border-radius: 12px;
  padding: 32px;
  text-align: center;
}
.app-cta-section h3 {
  font-family: 'Cormorant Garamond', serif;
  color: var(--gold-light);
  font-size: 1.3em;
  margin-bottom: 8px;
}
.app-cta-section h3 i { margin-right: 8px; }
.app-cta-section p {
  color: var(--text-muted);
  font-size: 0.95em;
  margin-bottom: 20px;
  line-height: 1.6;
}
.cta-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, var(--gold), var(--amber));
  color: var(--deep);
  padding: 14px 32px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.95em;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: all 0.3s;
  text-decoration: none;
  box-shadow: 0 4px 24px rgba(197, 148, 74, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}
.cta-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(197, 148, 74, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  color: var(--deep);
}
.store-badges {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 16px;
}
.store-badges a {
  display: block;
  transition: transform 0.3s, opacity 0.3s;
  opacity: 0.85;
}
.store-badges a:hover {
  transform: translateY(-2px);
  opacity: 1;
}
.store-badges img { height: 44px; width: auto; border-radius: 8px; }

/* ─── Bible Index Page ─── */
.bible-index-content {
  max-width: 1000px;
}
.canon-group {
  margin-bottom: 48px;
}
.canon-group h2 {
  font-family: 'Cormorant Garamond', serif;
  color: var(--gold-light);
  font-size: 1.8em;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(197, 148, 74, 0.15);
}
.books-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

/* ─── Book Card ─── */
.book-card {
  display: block;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(197, 148, 74, 0.12);
  border-radius: 10px;
  padding: 20px;
  transition: all 0.3s;
  text-decoration: none;
}
.book-card:hover {
  border-color: rgba(197, 148, 74, 0.3);
  background: rgba(255, 255, 255, 0.06);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}
.book-card h3,
.book-card h4 {
  font-family: 'Cormorant Garamond', serif;
  color: var(--ivory);
  font-size: 1.15em;
  margin-bottom: 4px;
}
.book-card .orthodox-name {
  display: block;
  font-size: 0.82em;
  color: var(--gold);
  font-style: italic;
  margin-bottom: 8px;
}
.book-card .chapter-count {
  display: block;
  font-size: 0.8em;
  color: var(--text-muted);
}

/* ─── Footer (matching index.html) ─── */
.footer {
  background: #0A0806;
  color: rgba(240, 223, 192, 0.35);
  padding: 48px 40px 36px;
  font-size: 0.82em;
}
.footer a { color: rgba(240, 223, 192, 0.5); text-decoration: none; }
.footer a:hover { color: var(--gold-light); }
.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 32px;
}
.footer-brand {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.3em;
  color: rgba(240, 223, 192, 0.5);
  font-weight: 600;
  margin-bottom: 8px;
}
.footer-links {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
}
.footer-social {
  display: flex;
  gap: 16px;
}
.footer-social a {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(240, 223, 192, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(240, 223, 192, 0.4);
  transition: all 0.3s;
  font-size: 0.9em;
}
.footer-social a:hover {
  background: rgba(197, 148, 74, 0.15);
  color: var(--gold-light);
}
.footer-disclaimer {
  max-width: 1100px;
  margin: 24px auto 0;
  padding-top: 20px;
  border-top: 1px solid rgba(240, 223, 192, 0.06);
  font-size: 0.78em;
  color: rgba(240, 223, 192, 0.28);
  line-height: 1.5;
  text-align: center;
}
.footer-bottom {
  max-width: 1100px;
  margin: 32px auto 0;
  padding-top: 24px;
  border-top: 1px solid rgba(240, 223, 192, 0.06);
}

/* ─── Responsive ─── */
@media (max-width: 1024px) {
  .chapter-content,
  .bible-index-content { padding: 32px 24px; }
  .breadcrumbs { padding: 20px 24px 0; }
}

@media (max-width: 768px) {
  .site-nav { padding: 0 20px; }
  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: rgba(17, 14, 10, 0.97);
    flex-direction: column;
    padding: 20px;
    gap: 16px;
    border-bottom: 1px solid rgba(197, 148, 74, 0.15);
  }
  .nav-links.open { display: flex; }
  .nav-hamburger { display: flex; }
  .chapter-content,
  .bible-index-content { padding: 24px 16px; }
  .breadcrumbs { padding: 16px 16px 0; }
  .chapter-nav {
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
    text-align: center;
  }
  .chapter-nav a,
  .chapter-nav .disabled { justify-content: center; }
  .books-list { grid-template-columns: 1fr 1fr; }
  .footer { padding: 32px 20px 24px; }
  .footer-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .footer-links { justify-content: center; }
  .related-books-grid { flex-direction: column; }
}

@media (max-width: 480px) {
  .chapter-title { font-size: 1.8em; }
  .chapter-grid a { width: 34px; height: 34px; font-size: 0.8em; }
  .scripture-text { font-size: 1.05em; line-height: 1.85; }
  .books-list { grid-template-columns: 1fr; }
  .app-cta-section { padding: 24px 16px; }
  .cta-primary { padding: 12px 24px; font-size: 0.88em; }
  .store-badges { flex-direction: column; align-items: center; }
}
