/* Homiletics Analysis — Site Styles */

:root {
  --navy: #1a2e4a;
  --gold: #8b6914;
  --light-gold: #f5f0e8;
  --text: #2c2c2c;
  --muted: #666;
  --border: #d4c5a9;
  --white: #ffffff;
  --max-width: 860px;
}

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

body {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 17px;
  line-height: 1.7;
  color: var(--text);
  background: var(--white);
}

/* ── Header ── */
header {
  background: var(--navy);
  color: var(--white);
  padding: 2rem;
  border-bottom: 4px solid var(--gold);
}

header h1 {
  font-size: 1.6rem;
  font-weight: normal;
  letter-spacing: 0.02em;
}

header .subtitle {
  font-size: 0.95rem;
  color: #aabbd0;
  margin-top: 0.3rem;
}

header .home {
  display: inline-block;
  color: #aabbd0;
  text-decoration: none;
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
}

header .home:hover { color: var(--white); }

header .downloads {
  margin-top: 1rem;
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 0.45rem 1rem;
  background: var(--gold);
  color: var(--white);
  text-decoration: none;
  font-family: -apple-system, sans-serif;
  font-size: 0.85rem;
  border-radius: 3px;
  transition: background 0.2s;
}

.btn:hover { background: #a07820; }

/* ── Site index ── */
.site-header {
  background: var(--navy);
  color: var(--white);
  padding: 3rem 2rem;
  border-bottom: 4px solid var(--gold);
  text-align: center;
}

.site-header h1 { font-size: 2rem; font-weight: normal; }
.site-header .subtitle { color: #aabbd0; margin-top: 0.5rem; }

main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

main section { margin-bottom: 3rem; }

main h2 {
  font-size: 1.3rem;
  color: var(--navy);
  border-bottom: 2px solid var(--border);
  padding-bottom: 0.4rem;
  margin-bottom: 1.5rem;
  font-weight: normal;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.book-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.5rem;
}

.book h3 {
  font-size: 1rem;
  color: var(--navy);
  margin-bottom: 0.5rem;
  font-weight: bold;
}

.book ul { list-style: none; }

.book li { margin-bottom: 0.2rem; }

.book a {
  color: var(--gold);
  text-decoration: none;
  font-size: 0.95rem;
  font-family: -apple-system, sans-serif;
}

.book a:hover { text-decoration: underline; color: var(--navy); }

/* ── Analysis page ── */
.analysis {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
}

.analysis h1 { font-size: 1.8rem; color: var(--navy); margin-bottom: 1rem; }

.analysis h2 {
  font-size: 1.1rem;
  color: var(--navy);
  margin: 2rem 0 0.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.analysis h3 { font-size: 1rem; color: var(--gold); margin: 1.2rem 0 0.3rem; }

.analysis p { margin-bottom: 1rem; }

.analysis ul, .analysis ol {
  margin: 0.5rem 0 1rem 1.5rem;
}

.analysis li { margin-bottom: 0.4rem; }

/* ── Tables (shared) ── */
.analysis table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0 1.5rem;
  font-size: 0.92rem;
  font-family: -apple-system, sans-serif;
  table-layout: fixed;
}

.analysis th {
  background: var(--navy);
  color: var(--white);
  padding: 0.5rem 0.75rem;
  text-align: left;
  font-weight: normal;
}

.analysis td {
  padding: 0.45rem 0.75rem;
  border-bottom: 1px solid var(--border);
  overflow-wrap: break-word;
}

.analysis tr:nth-child(even) td { background: var(--light-gold); }

/* ── Content Table column widths ── */
/* Columns: Verse | Content | Notes */
.analysis .content-table th:nth-child(1),
.analysis .content-table td:nth-child(1) {
  width: 8%;
}

.analysis .content-table th:nth-child(2),
.analysis .content-table td:nth-child(2) {
  width: 62%;
}

.analysis .content-table th:nth-child(3),
.analysis .content-table td:nth-child(3) {
  width: 30%;
}

/* ── Divisions Table column widths ── */
/* Columns: # | Verses | Label/Title */
.analysis .divisions-table th:nth-child(1),
.analysis .divisions-table td:nth-child(1) {
  width: 5%;
}

.analysis .divisions-table th:nth-child(2),
.analysis .divisions-table td:nth-child(2) {
  width: 20%;
}

.analysis .divisions-table th:nth-child(3),
.analysis .divisions-table td:nth-child(3) {
  width: 75%;
}

/* ── Misc ── */
strong { color: var(--navy); }

blockquote {
  border-left: 3px solid var(--gold);
  padding-left: 1rem;
  color: var(--muted);
  margin: 1rem 0;
  font-style: italic;
}

/* ── Footer ── */
footer {
  text-align: center;
  padding: 2rem;
  color: var(--muted);
  font-family: -apple-system, sans-serif;
  font-size: 0.85rem;
  border-top: 1px solid var(--border);
  margin-top: 3rem;
}

/* ── Responsive ── */
@media (max-width: 600px) {
  header h1 { font-size: 1.3rem; }
  .book-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
}

/* ── About page ── */
.about-content h2 {
  font-size: 1.2rem;
  color: var(--navy);
  border-bottom: 2px solid var(--border);
  padding-bottom: 0.4rem;
  margin: 2.5rem 0 1rem;
  font-weight: normal;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.about-content p {
  margin-bottom: 1.1rem;
}

.framework-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.5rem;
  margin: 1.5rem 0 2rem;
}

.framework-item {
  background: var(--light-gold);
  border-left: 3px solid var(--gold);
  padding: 1rem 1.25rem;
  border-radius: 0 3px 3px 0;
}

.framework-item h3 {
  color: var(--navy);
  font-size: 0.95rem;
  margin-bottom: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.framework-item p {
  font-size: 0.92rem;
  margin-bottom: 0;
  color: var(--text);
}

/* ── Search bar ── */
.search-container {
  margin: 1.5rem 0 2rem;
}

.search-container input {
  width: 100%;
  padding: 0.65rem 1rem;
  font-size: 1rem;
  font-family: -apple-system, sans-serif;
  border: 2px solid var(--border);
  border-radius: 4px;
  outline: none;
  color: var(--text);
}

.search-container input:focus {
  border-color: var(--gold);
}

.search-results {
  margin-top: 1rem;
  font-family: -apple-system, sans-serif;
  font-size: 0.9rem;
  color: var(--muted);
}

/* ── Book Index Grid (Sprint 1) ── */
.abbrev-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.abbrev-item {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0.25rem;
  background: var(--light-gold);
  border: 1px solid var(--border);
  border-bottom: 2px solid var(--gold);
  color: var(--navy);
  text-decoration: none;
  font-family: -apple-system, sans-serif;
  font-size: 0.85rem;
  font-weight: bold;
  border-radius: 3px;
  text-align: center;
  transition: background 0.15s, color 0.15s;
}

.abbrev-item:hover {
  background: var(--navy);
  color: var(--white);
  border-bottom-color: var(--gold);
}

@media (max-width: 600px) {
  .abbrev-grid {
    grid-template-columns: repeat(auto-fill, minmax(52px, 1fr));
    gap: 0.4rem;
  }
  .abbrev-item {
    font-size: 0.78rem;
    padding: 0.45rem 0.2rem;
  }
}

/* ── Sticky Navigation Bar ── */
.sticky-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--navy);
  padding: 0.5rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  border-bottom: 2px solid var(--gold);
}

.sticky-nav a {
  color: #aabbd0;
  text-decoration: none;
  font-family: -apple-system, sans-serif;
  font-size: 0.88rem;
  white-space: nowrap;
}

.sticky-nav a:hover { color: var(--white); }

.sticky-nav .nav-title {
  color: var(--white);
  font-family: -apple-system, sans-serif;
  font-size: 0.88rem;
  font-weight: bold;
  flex: 1;
  text-align: center;
}

/* ── Passage Analyses Grid ── */
.passage-sections {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.passage-chapter-group {
  background: var(--light-gold);
  border: 1px solid var(--border);
  border-left: 3px solid var(--gold);
  border-radius: 0 3px 3px 0;
  padding: 0.75rem 1rem;
}

.passage-chapter-heading {
  font-family: -apple-system, sans-serif;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 0.5rem;
  font-weight: normal;
}

.passage-link-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.passage-link {
  display: inline-block;
  padding: 0.3rem 0.6rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 3px;
  color: var(--navy);
  text-decoration: none;
  font-family: -apple-system, sans-serif;
  font-size: 0.82rem;
  transition: background 0.15s, color 0.15s;
}

.passage-link:hover {
  background: var(--navy);
  color: var(--white);
}

@media (max-width: 600px) {
  .passage-link { font-size: 0.78rem; padding: 0.25rem 0.5rem; }
}
