/* ==================================
   Tharendell Blog — Codex Layout
   Fantasy tome / spellbook vibes
   ================================== */

/* Layout: main + sidebar */
.th-blog--codex .th-blog-inner {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 1.2fr);
  gap: 40px;
  max-width: 1200px;
  margin: 60px auto;
  padding: 0 20px;
}

/* Codex entry container */
.th-codex-entry {
  position: relative;
  background: #14100b;
  border-radius: 14px;
  margin-bottom: 28px;
  padding: 22px 22px 20px 22px;
  border: 1px solid rgba(244,207,116,0.4);
  box-shadow:
    0 0 0 1px rgba(0,0,0,0.8),
    0 18px 35px rgba(0,0,0,0.6);
}

/* Inner “etched” border */
.th-codex-entry::before {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 10px;
  border: 1px dashed rgba(244,207,116,0.25);
  pointer-events: none;
}

/* Header (title + meta) */
.th-codex-header {
  margin-bottom: 10px;
  position: relative;
  z-index: 1;
}

.th-codex-title a {
  color: var(--th-gold);
  text-decoration: none;
  letter-spacing: 1px;
  font-family: "Cinzel Decorative", serif;
}
.th-codex-title a:hover {
  text-decoration: underline;
}

.th-codex-meta {
  font-size: 0.85rem;
  opacity: 0.9;
  margin-top: 4px;
  color: #d1cbb5;
}

.th-codex-meta .th-codex-sep {
  padding: 0 0.35rem;
}

/* Make all meta links match the Tharendell gold vibe */
.th-codex-meta a {
  color: var(--th-gold);
  text-decoration: none;
}

.th-codex-meta a:hover {
  color: #ffe7a8;
  text-decoration: underline;
}

/* Body text */
.th-codex-body {
  position: relative;
  z-index: 1;
  color: #e5d8b0;
  font-size: 1rem;
  line-height: 1.55;
}

/* Codex sidebar */
.th-codex-sidebar {
  background: radial-gradient(circle at top, rgba(244,207,116,0.18), #12100e);
  border-radius: 14px;
  padding: 22px;
  border: 1px solid rgba(244,207,116,0.5);
  box-shadow:
    0 0 0 1px rgba(0,0,0,0.8),
    0 16px 30px rgba(0,0,0,0.6);
}

.th-codex-sidebar .sidebar-title {
  font-family: "Cinzel Decorative", serif;
  letter-spacing: 1px;
}

/* In-sidebar lists */
.th-codex-sidebar .sidebar-widget ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.th-codex-sidebar .sidebar-widget li {
  margin-bottom: 6px;
}

.th-codex-sidebar .sidebar-widget a {
  color: #f0e4bf;
  text-decoration: none;
}
.th-codex-sidebar .sidebar-widget a:hover {
  color: #fff8cf;
  text-decoration: underline;
}

/* Pagination */
.th-pagination {
  text-align: center;
  margin-top: 30px;
}
.th-pagination .page-numbers {
  color: var(--th-gold);
  padding: 6px 10px;
}
.th-pagination .current {
  text-decoration: underline;
}

/* Responsive */
@media (max-width: 900px) {
  .th-blog--codex .th-blog-inner {
    grid-template-columns: 1fr;
  }

  .th-codex-sidebar {
    margin-top: 32px;
  }
}
