/* Early Christian Beliefs index — theme-token-native (works in every light/dark palette). */

body.ecb-index-body {
  background: var(--thf-bg);
  color: var(--thf-text);
}

.ecb-page,
.ecb-page * {
  box-sizing: border-box;
}

.ecb-page.content-wrapper {
  padding: 0 !important;
}

.ecb-shell {
  width: min(1200px, 100%);
  margin: 0 auto;
  padding: 0 22px 72px;
}

/* ---------- Hero ---------- */
.ecb-hero {
  background: linear-gradient(135deg, #3d3632 0%, #262320 100%);
  border-bottom: 4px solid var(--thf-accent, #bd926f);
  color: #fff;
  padding: 46px 22px 40px;
  margin-bottom: 34px;
}

.ecb-hero-inner {
  width: min(1200px, 100%);
  margin: 0 auto;
}

.ecb-breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 18px;
}

.ecb-breadcrumb a { color: var(--thf-accent-2, #face68); text-decoration: none; }
.ecb-breadcrumb a:hover { color: #fff; text-decoration: none; }
.ecb-breadcrumb i { font-size: 10px; color: rgba(255, 255, 255, .5); }
.ecb-breadcrumb span { color: rgba(255, 255, 255, .82); }

.ecb-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--thf-accent-2, #face68);
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.ecb-eyebrow::before {
  content: "";
  width: 34px;
  height: 2px;
  background: var(--thf-accent, #bd926f);
  display: inline-block;
}

.ecb-hero h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(32px, 4.6vw, 54px);
  line-height: 1.06;
  margin: 0 0 16px;
  color: #fff;
  max-width: 15ch;
}

.ecb-lead {
  font-size: 17.5px;
  line-height: 1.66;
  color: rgba(255, 255, 255, .84);
  margin: 0;
  max-width: 65ch;
}

.ecb-hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.ecb-stat {
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 13px;
  color: rgba(255, 255, 255, .78);
}

.ecb-stat strong { color: #fff; font-weight: 800; }

.ecb-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.ecb-button {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: var(--thf-accent, #bd926f);
  border: 1px solid var(--thf-accent, #bd926f);
  color: #fff;
  font-weight: 800;
  font-size: 14.5px;
  padding: 11px 18px;
  border-radius: 8px;
  text-decoration: none;
  transition: transform .12s ease, background .12s ease;
}

.ecb-button:hover { background: #a67d5a; border-color: #a67d5a; color: #fff; text-decoration: none; transform: translateY(-1px); }

.ecb-button.secondary {
  background: transparent;
  border-color: rgba(255, 255, 255, .34);
  color: #fff;
}

.ecb-button.secondary:hover { background: rgba(255, 255, 255, .1); border-color: #fff; }

/* ---------- Sections ---------- */
.ecb-section { margin: 0 0 42px; }

.ecb-section-header {
  border-bottom: 1px solid var(--thf-border);
  padding-bottom: 12px;
  margin-bottom: 22px;
}

.ecb-section-header h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(23px, 2.8vw, 30px);
  line-height: 1.15;
  margin: 0;
  color: var(--thf-heading);
}

.ecb-section-kicker {
  margin: 7px 0 0;
  color: var(--thf-text-2);
  font-size: 15px;
  line-height: 1.5;
}

/* ---------- Featured "Start Here" ---------- */
.ecb-featured-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(288px, 1fr));
  gap: 16px;
}

.ecb-featured-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--thf-surface);
  border: 1px solid var(--thf-border);
  border-radius: 14px;
  padding: 22px 20px 18px;
  text-decoration: none;
  color: var(--thf-text);
  overflow: hidden;
  transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease;
}

.ecb-featured-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--thf-accent, #bd926f), var(--thf-accent-2, #face68));
  opacity: 0;
  transition: opacity .14s ease;
}

.ecb-featured-card:hover {
  transform: translateY(-3px);
  border-color: var(--thf-accent, #bd926f);
  box-shadow: 0 14px 30px var(--thf-shadow);
  text-decoration: none;
  color: var(--thf-text);
}

.ecb-featured-card:hover::before { opacity: 1; }

.ecb-featured-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 11px;
  background: color-mix(in srgb, var(--thf-accent, #bd926f) 15%, transparent);
  color: var(--thf-link, #9c6b45);
  font-size: 19px;
  margin-bottom: 14px;
}

.ecb-featured-label {
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--thf-link, #9c6b45);
  margin-bottom: 8px;
}

.ecb-featured-card h3 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 20px;
  line-height: 1.22;
  margin: 0 0 9px;
  color: var(--thf-heading);
}

.ecb-featured-card p {
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--thf-text-2);
  margin: 0 0 16px;
}

.ecb-featured-cta {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: auto;
  font-size: 13.5px;
  font-weight: 800;
  color: var(--thf-link, #9c6b45);
}

.ecb-featured-cta i { font-size: 11px; transition: transform .14s ease; }
.ecb-featured-card:hover .ecb-featured-cta i { transform: translateX(4px); }

/* ---------- Toolbar (search + A–Z) ---------- */
.ecb-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 26px;
}

.ecb-search {
  flex: 1 1 320px;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 10px;
  background: var(--thf-surface);
  border: 1px solid var(--thf-border);
  border-radius: 10px;
  padding: 11px 15px;
}

.ecb-search:focus-within { border-color: var(--thf-accent, #bd926f); }
.ecb-search i { color: var(--thf-link, #9c6b45); }

.ecb-search input {
  border: 0;
  background: transparent;
  outline: 0;
  width: 100%;
  min-width: 0;
  font-size: 16px;
  color: var(--thf-text);
}

.ecb-alpha {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ecb-alpha a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 33px;
  padding: 7px 8px;
  border: 1px solid var(--thf-border);
  border-radius: 7px;
  background: var(--thf-surface);
  color: var(--thf-text-2);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  transition: border-color .12s ease, color .12s ease;
}

.ecb-alpha a:hover {
  border-color: var(--thf-accent, #bd926f);
  color: var(--thf-link, #9c6b45);
  text-decoration: none;
}

/* ---------- A–Z groups ---------- */
.ecb-group { margin-bottom: 30px; scroll-margin-top: 84px; }
.ecb-group[hidden] { display: none; }

.ecb-group-heading {
  display: flex;
  align-items: baseline;
  gap: 11px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px;
  color: var(--thf-heading);
  margin: 0 0 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--thf-accent, #bd926f);
}

.ecb-group-heading span {
  font-family: "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 12px;
  font-weight: 800;
  color: var(--thf-text-2);
  background: var(--thf-surface-2);
  border-radius: 999px;
  padding: 2px 9px;
}

.ecb-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(255px, 1fr));
  gap: 10px;
}

.ecb-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: var(--thf-surface);
  border: 1px solid var(--thf-border);
  border-radius: 10px;
  padding: 14px 15px;
  text-decoration: none;
  color: var(--thf-text);
  min-height: 54px;
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}

.ecb-card:hover {
  transform: translateY(-2px);
  border-color: var(--thf-accent, #bd926f);
  box-shadow: 0 8px 20px var(--thf-shadow);
  text-decoration: none;
  color: var(--thf-text);
}

.ecb-card-title {
  font-size: 15.5px;
  font-weight: 600;
  line-height: 1.32;
  color: var(--thf-heading);
}

.ecb-card:hover .ecb-card-title { color: var(--thf-link, #9c6b45); }

.ecb-card-arrow {
  flex: none;
  font-size: 11px;
  color: var(--thf-text-2);
  opacity: .55;
  transition: transform .12s ease, opacity .12s ease;
}

.ecb-card:hover .ecb-card-arrow { opacity: 1; transform: translateX(3px); color: var(--thf-link, #9c6b45); }

/* ---------- Verse / passage studies ---------- */
.ecb-verses { scroll-margin-top: 84px; }

.ecb-book-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 26px;
}

.ecb-book-nav a {
  display: inline-flex;
  align-items: center;
  padding: 7px 13px;
  border: 1px solid var(--thf-border);
  border-radius: 999px;
  background: var(--thf-surface);
  color: var(--thf-text-2);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: border-color .12s ease, color .12s ease;
}

.ecb-book-nav a:hover {
  border-color: var(--thf-accent, #bd926f);
  color: var(--thf-link, #9c6b45);
  text-decoration: none;
}

.ecb-chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ecb-chip {
  display: inline-flex;
  align-items: center;
  padding: 9px 14px;
  background: var(--thf-surface);
  border: 1px solid var(--thf-border);
  border-radius: 8px;
  color: var(--thf-text);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: transform .12s ease, border-color .12s ease, color .12s ease;
}

.ecb-chip:hover {
  transform: translateY(-1px);
  border-color: var(--thf-accent, #bd926f);
  color: var(--thf-link, #9c6b45);
  text-decoration: none;
}

/* Elements JS filters use display:flex/inline-flex, which beats the UA [hidden]
   rule — restore hiding explicitly so search can remove non-matching items. */
.ecb-card[hidden],
.ecb-chip[hidden],
.ecb-book-nav a[hidden] { display: none !important; }

/* ---------- Empty state ---------- */
.ecb-empty {
  background: var(--thf-surface);
  border: 1px dashed var(--thf-border);
  border-radius: 12px;
  padding: 26px;
  text-align: center;
  color: var(--thf-text-2);
  font-size: 15px;
}

.ecb-empty[hidden] { display: none; }

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
  .ecb-hero { padding: 34px 18px 30px; }
  .ecb-shell { padding: 0 15px 54px; }
  .ecb-featured-grid { grid-template-columns: 1fr; }
  .ecb-card-grid { grid-template-columns: 1fr; }
  .ecb-search { flex-basis: 100%; }
}
