/* === INDEX PAGE OVERRIDES === */

/* Главная: центрированный header без back-link */
header {
  display: block;
  text-align: center;
  padding: 60px 20px 20px;
  border-bottom: none;
}

header h1 {
  flex: none;
  font-size: 2.4em;
  padding-right: 0;
}

header .subtitle {
  display: block;
  font-size: 1.05em;
  color: var(--text-muted);
  font-style: italic;
  max-width: 550px;
  margin: 0 auto;
}

/* Контейнер уже главной */
.container { max-width: 900px; }

/* Section groups */
.section-group { padding: 40px 0 8px; }
.section-group:first-child { padding-top: 48px; }

.section-group-header {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 24px;
  border-bottom: 2px solid var(--border);
  padding-bottom: 12px;
}

.section-group-header h2 {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1.5em;
  font-weight: normal;
  color: var(--text);
}

.section-group-header .section-books {
  font-size: 0.85em;
  color: var(--text-muted);
  font-style: italic;
}

/* Topic card grid */
.topics {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.topic-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.2s;
  text-decoration: none;
  color: inherit;
  display: block;
}

.topic-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.topic-card-icon {
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.2em;
}

.topic-card-body { padding: 0 24px 28px; }

.topic-card-body h3 {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 1.2em;
  font-weight: 600;
  margin-bottom: 6px;
}

.topic-card-body p {
  font-size: 0.9em;
  color: var(--text-muted);
  line-height: 1.6;
}

.topic-card-body .topic-refs {
  margin-top: 10px;
  font-size: 0.8em;
  color: var(--accent);
  font-family: -apple-system, sans-serif;
}

/* Placeholder card */
.topic-card--soon { opacity: 0.5; pointer-events: none; }
.topic-card--soon .topic-card-icon { background: linear-gradient(135deg, #f0ebe4, #e8e2d8); }

.soon-badge {
  display: inline-block;
  font-family: -apple-system, sans-serif;
  font-size: 0.7em;
  font-weight: 600;
  background: var(--border);
  color: var(--text-muted);
  padding: 2px 8px;
  border-radius: 4px;
  margin-left: 8px;
  vertical-align: middle;
}

/* Card theme colors */
.topic-card--sacrifices .topic-card-icon { background: linear-gradient(135deg, #fdf0ee, #fdf8eb); }
.topic-card--sacrifices h3 { color: #c0392b; }
.topic-card--purity .topic-card-icon { background: linear-gradient(135deg, #eef0f7, #eef9f2); }
.topic-card--purity h3 { color: #2c3e80; }
.topic-card--feasts .topic-card-icon { background: linear-gradient(135deg, #fdf3ec, #f5eef7); }
.topic-card--feasts h3 { color: #d35400; }
.topic-card--tabernacle .topic-card-icon { background: linear-gradient(135deg, #fdf8eb, #f8f0ea); }
.topic-card--tabernacle h3 { color: #b8860b; }
.topic-card--covenants .topic-card-icon { background: linear-gradient(135deg, #edf4fb, #fdf8eb); }
.topic-card--covenants h3 { color: #2980b9; }
.topic-card--genesis-timeline .topic-card-icon { background: linear-gradient(135deg, #f5eef7, #eef0f7); }
.topic-card--genesis-timeline h3 { color: #7b2d8e; }
.topic-card--kings .topic-card-icon { background: linear-gradient(135deg, #fdf0ee, #eef0f7); }
.topic-card--kings h3 { color: #c0392b; }
.topic-card--judges .topic-card-icon { background: linear-gradient(135deg, #eef9f2, #fdf8eb); }
.topic-card--judges h3 { color: #27ae60; }
.topic-card--major-prophets .topic-card-icon { background: linear-gradient(135deg, #eef0f7, #fdf0ee); }
.topic-card--major-prophets h3 { color: #2c3e80; }
.topic-card--minor-prophets .topic-card-icon { background: linear-gradient(135deg, #fdf0ee, #eef9f2); }
.topic-card--minor-prophets h3 { color: #c0392b; }
.topic-card--exile .topic-card-icon { background: linear-gradient(135deg, #eef0f7, #f5eef7); }
.topic-card--exile h3 { color: #7b2d8e; }
.topic-card--gospels .topic-card-icon { background: linear-gradient(135deg, #fdf8eb, #eef9f2); }
.topic-card--gospels h3 { color: #b8860b; }
.topic-card--acts .topic-card-icon { background: linear-gradient(135deg, #fdf0ee, #fdf8eb); }
.topic-card--acts h3 { color: #c0392b; }
.topic-card--pauline .topic-card-icon { background: linear-gradient(135deg, #eef0f7, #f5eef7); }
.topic-card--pauline h3 { color: #2c3e80; }
.topic-card--general-epistles .topic-card-icon { background: linear-gradient(135deg, #edf4fb, #eef9f2); }
.topic-card--general-epistles h3 { color: #2980b9; }
.topic-card--revelation .topic-card-icon { background: linear-gradient(135deg, #f5eef7, #fdf0ee); }
.topic-card--revelation h3 { color: #7b2d8e; }
.topic-card--job .topic-card-icon { background: linear-gradient(135deg, #f0ebe5, #e8ddd2); }
.topic-card--job h3 { color: #5d4037; }
.topic-card--psalms .topic-card-icon { background: linear-gradient(135deg, #fdf8eb, #f5eef7); }
.topic-card--psalms h3 { color: #b8860b; }
.topic-card--wisdom .topic-card-icon { background: linear-gradient(135deg, #eef9f2, #fdf8eb); }
.topic-card--wisdom h3 { color: #27ae60; }
.topic-card--prophecies .topic-card-icon { background: linear-gradient(135deg, #fdf0ee, #fdf8eb); }
.topic-card--prophecies h3 { color: #c0392b; }
.topic-card--wanderings .topic-card-icon { background: linear-gradient(135deg, #f0ebe5, #fdf8eb); }
.topic-card--wanderings h3 { color: #5d4037; }
.topic-card--social-laws .topic-card-icon { background: linear-gradient(135deg, #eef9f2, #edf4fb); }
.topic-card--social-laws h3 { color: #2980b9; }
.topic-card--names-of-god .topic-card-icon { background: linear-gradient(135deg, #fdf8eb, #eef0f7); }
.topic-card--names-of-god h3 { color: #b8860b; }

/* Mobile */
@media (max-width: 600px) {
  header { padding: 40px 20px 16px; }
  header h1 { font-size: 1.7em; }
  .section-group { padding: 28px 0 8px; }
  .section-group:first-child { padding-top: 32px; }
  .section-group-header h2 { font-size: 1.25em; }
  .topics { gap: 18px; }
  .topic-card-icon { height: 90px; font-size: 2.6em; }
}
