/* ==========================================================================
   pages.css — Styles for single, archive, page, search, 404, about
   Mero Enotes Theme
   ========================================================================== */

/* ── POST LAYOUT ─────────────────────────────────────────────────────── */
/* Single post — WITH sidebar (2-column grid) */
.post-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 36px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 48px 24px;
}

/* Single post — NO sidebar (full reading width) */
.post-layout.no-sidebar {
  grid-template-columns: 1fr;
  max-width: 860px;
}

/* Post content always fills its column */
.post-content,
.post-main {
  width: 100%;
  min-width: 0;
}

/* ── SORT BAR ────────────────────────────────────────────────────────── */
.sort-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  border: 1.5px solid #E8ECF0;
  border-radius: 12px;
  padding: 10px 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}

.sort-left,
.sort-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sort-label {
  font-size: .78rem;
  font-weight: 600;
  color: #637083;
}

.sort-btn {
  padding: 6px 14px;
  border-radius: 20px;
  border: 1.5px solid #E8ECF0;
  background: #fff;
  color: #637083;
  font-size: .8rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: all .15s;
  font-family: 'Plus Jakarta Sans', sans-serif;
  display: inline-block;
}

.sort-btn:hover {
  border-color: #0F1F3D;
  color: #0F1F3D;
}

.sort-btn.active {
  background: #E8311A;
  color: #fff;
  border-color: #E8311A;
}

.view-btn {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1.5px solid #E8ECF0;
  background: #fff;
  color: #637083;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .15s;
  padding: 0;
}

.view-btn:hover {
  border-color: #0F1F3D;
  color: #0F1F3D;
}

.view-btn.active {
  background: #0F1F3D;
  color: #fff;
  border-color: #0F1F3D;
}

/* ── LIST VIEW ───────────────────────────────────────────────────────── */
.posts-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.posts-list .note-card-v2 {
  flex-direction: row;
  align-items: center;
  height: auto;
  gap: 16px;
}

.posts-list .nc-top {
  margin-bottom: 0;
  flex-shrink: 0;
}

.posts-list .nc-body {
  margin-bottom: 0;
}

.posts-list .nc-title {
  -webkit-line-clamp: 1;
  line-clamp: 1;
}

.posts-list .nc-excerpt {
  display: none;
}

.posts-list .nc-footer {
  border-top: none;
  padding-top: 0;
  flex-shrink: 0;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

/* ── PAGINATION ──────────────────────────────────────────────────────── */
.nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 48px 0 24px;
  flex-wrap: wrap;
}

.nav-links .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 42px;
  height: 42px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1.5px solid #E8ECF0;
  font-weight: 700;
  font-size: .88rem;
  color: #0F1F3D;
  background: #fff;
  text-decoration: none;
  transition: all .15s;
}

.nav-links .page-numbers:hover {
  border-color: #E8311A;
  color: #E8311A;
  background: #FFF0ED;
}

.nav-links .page-numbers.current {
  background: #E8311A;
  color: #fff !important;
  border-color: #E8311A;
}

.nav-links .prev,
.nav-links .next {
  padding: 0 18px;
  background: #F7F8FA;
}

.nav-links .prev:hover,
.nav-links .next:hover {
  background: #E8311A;
  color: #fff;
  border-color: #E8311A;
}

.pag-arrow {
  font-size: 1rem;
  font-weight: 900;
  line-height: 1;
}

.pag-text {
  font-size: .82rem;
}

.nav-links .dots {
  border: none;
  background: transparent;
  color: #637083;
  cursor: default;
  pointer-events: none;
}

@media (max-width: 480px) {
  .sort-bar {
    flex-direction: column;
    align-items: flex-start;
  }

  .posts-list .note-card-v2 {
    flex-direction: column;
  }

  .nav-links {
    gap: 5px;
  }

  .nav-links .page-numbers {
    min-width: 36px;
    height: 36px;
    font-size: .8rem;
    padding: 0 10px;
  }

  .pag-text {
    display: none;
  }

  .pag-arrow {
    font-size: 1.1rem;
  }
}


/* ── VARIABLES (match main theme tokens) ─────────────────────────────── */
:root {
  --color-red: #E8311A;
  --color-red-dk: #C1121F;
  --color-navy: #0F1F3D;
  --color-navy-md: #1A3A6B;
  --color-white: #FFFFFF;
  --color-bg: #F7F8FA;
  --color-text: #1C2B3A;
  --color-muted: #637083;
  --color-border: #E8ECF0;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, .06);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, .08);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, .12);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
}

/* ── BREADCRUMB BAR ──────────────────────────────────────────────────── */
.breadcrumb-bar {
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  padding: 12px 0;
}

.breadcrumb-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  font-size: .85rem;
  font-weight: 600;
}

.breadcrumb-nav a {
  color: var(--color-red);
  text-decoration: none;
  transition: opacity .15s;
}

.breadcrumb-nav a:hover {
  opacity: .75;
}

.breadcrumb-sep {
  color: var(--color-muted);
}

.breadcrumb-current {
  color: var(--color-muted);
}

.breadcrumb-hero {
  margin-top: 20px;
  opacity: .75;
}

.breadcrumb-hero a {
  color: rgba(255, 255, 255, .8);
}

.breadcrumb-hero .breadcrumb-sep,
.breadcrumb-hero .breadcrumb-current {
  color: rgba(255, 255, 255, .6);
}

/* ── POST HERO ───────────────────────────────────────────────────────── */
.post-hero {
  background: linear-gradient(135deg, var(--color-navy) 0%, var(--color-navy-md) 100%);
  padding: 56px 0 48px;
}

.post-hero .container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

.category-badge {
  display: inline-block;
  background: var(--color-red);
  color: var(--color-white);
  font-size: .78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .8px;
  padding: 4px 14px;
  border-radius: 40px;
  margin-bottom: 16px;
  text-decoration: none;
}

.post-hero-title {
  color: var(--color-white);
  font-family: 'Fraunces', Georgia, serif;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  line-height: 1.2;
  margin: 0 0 16px;
  max-width: 800px;
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  color: rgba(255, 255, 255, .75);
  font-size: .88rem;
  font-weight: 500;
}

.pdf-badge {
  background: rgba(255, 255, 255, .15);
  border: 1px solid rgba(255, 255, 255, .3);
  color: var(--color-white);
  border-radius: 40px;
  padding: 2px 12px;
  font-size: .78rem;
  font-weight: 700;
}

.pdf-badge-small {
  background: #FFF3F0;
  color: var(--color-red);
  border-radius: 40px;
  padding: 2px 10px;
  font-size: .72rem;
  font-weight: 700;
  margin-left: 4px;
}

/* ── POST LAYOUT ─────────────────────────────────────────────────────── */
.post-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 32px;
  max-width: 1180px;
  margin: 48px auto;
  padding: 0 24px;
  align-items: start;
}

/* ── POST CONTENT ────────────────────────────────────────────────────── */
.post-content {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 36px;
  box-shadow: var(--shadow-md);
  min-width: 0;
}

.post-content .entry-content h2 {
  color: var(--color-navy);
  font-size: 1.4rem;
  margin: 32px 0 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--color-bg);
}

.post-content .entry-content h3 {
  color: var(--color-navy);
  font-size: 1.15rem;
  margin: 24px 0 10px;
}

.post-content .entry-content p {
  line-height: 1.85;
  color: var(--color-text);
  margin-bottom: 18px;
}

.post-content .entry-content ul,
.post-content .entry-content ol {
  padding-left: 24px;
  margin-bottom: 18px;
}

.post-content .entry-content li {
  line-height: 1.7;
  margin-bottom: 6px;
}

.post-content .entry-content a {
  color: var(--color-red);
}

.post-content .entry-content img {
  max-width: 100%;
  border-radius: var(--radius-sm);
  margin: 16px 0;
}

.post-content .entry-content blockquote {
  border-left: 4px solid var(--color-red);
  margin: 20px 0;
  padding: 16px 20px;
  background: #FFF8F7;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--color-muted);
  font-style: italic;
}

/* PDF VIEWER */
.pdf-section {
  margin: 32px 0;
}

.pdf-section-title {
  color: var(--color-navy);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 14px;
}

.pdf-viewer {
  width: 100%;
  height: 580px;
  border: none;
  border-radius: var(--radius-md);
  border: 2px solid var(--color-border);
  background: var(--color-bg);
}

/* DOWNLOAD BUTTON */
.btn-download {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 16px;
  text-align: center;
  background: var(--color-red);
  color: var(--color-white);
  border-radius: var(--radius-md);
  font-weight: 800;
  font-size: 1.05rem;
  margin: 16px 0;
  transition: transform .15s, background .15s;
  text-decoration: none;
}

.btn-download:hover {
  transform: translateY(-2px);
  background: var(--color-red-dk);
  color: var(--color-white);
}

/* TAGS */
.entry-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 20px 0;
  border-top: 1px solid var(--color-border);
  margin-top: 24px;
}

.tags-label {
  color: var(--color-muted);
  font-size: .85rem;
  font-weight: 700;
}

.tag-chip {
  background: var(--color-bg);
  color: var(--color-navy);
  border: 1px solid var(--color-border);
  border-radius: 40px;
  padding: 4px 14px;
  font-size: .8rem;
  font-weight: 600;
  text-decoration: none;
  transition: background .15s, border-color .15s;
}

.tag-chip:hover {
  background: var(--color-red);
  color: var(--color-white);
  border-color: var(--color-red);
}

/* SHARE BUTTONS */
.share-section {
  border-top: 1px solid var(--color-border);
  padding-top: 20px;
  margin-top: 8px;
}

.share-label {
  display: block;
  font-size: .85rem;
  font-weight: 700;
  color: var(--color-muted);
  margin-bottom: 10px;
}

.share-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.share-btn {
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: .85rem;
  text-decoration: none;
  transition: opacity .15s, transform .15s;
}

.share-btn:hover {
  opacity: .85;
  transform: translateY(-1px);
}

.share-facebook {
  background: #1877F2;
  color: var(--color-white);
}

.share-whatsapp {
  background: #25D366;
  color: var(--color-white);
}

.share-telegram {
  background: #26A5E4;
  color: var(--color-white);
}

/* AUTHOR BOX */
.author-box {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: var(--color-bg);
  border-radius: var(--radius-md);
  padding: 20px;
  margin: 28px 0;
  border: 1px solid var(--color-border);
}

.author-avatar {
  border-radius: 50%;
  width: 72px;
  height: 72px;
  flex-shrink: 0;
}

.author-name {
  font-weight: 800;
  font-size: 1rem;
  color: var(--color-navy);
  margin-bottom: 6px;
}

.author-bio {
  font-size: .88rem;
  color: var(--color-muted);
  line-height: 1.65;
  margin: 0;
}

/* COMMENTS */
.comments-section {
  margin-top: 32px;
  border-top: 2px solid var(--color-bg);
  padding-top: 32px;
}

/* ── POST SIDEBAR ────────────────────────────────────────────────────── */
.post-sidebar {
  position: sticky;
  top: 24px;
}

.sidebar-widget {
  background: var(--color-white);
  border-radius: var(--radius-md);
  padding: 20px;
  border: 1.5px solid var(--color-border);
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}

.sidebar-widget h4 {
  font-size: .78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--color-muted);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--color-border);
}

.sidebar-notes-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-note-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 4px;
  border-bottom: 1px solid var(--color-bg);
  text-decoration: none;
  transition: background .15s;
  border-radius: 6px;
}

.sidebar-note-item:hover {
  background: var(--color-bg);
  padding: 8px 8px;
}

.sidebar-note-title {
  font-size: .85rem;
  font-weight: 600;
  color: var(--color-navy);
  line-height: 1.4;
  flex: 1;
}

.sidebar-note-date {
  font-size: .75rem;
  color: var(--color-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.sidebar-note-ranked {
  gap: 10px;
}

.sidebar-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--color-navy);
  color: var(--color-white);
  font-size: .72rem;
  font-weight: 800;
  flex-shrink: 0;
}

/* UPLOAD CTA */
.sidebar-upload-cta {
  background: linear-gradient(135deg, var(--color-navy) 0%, var(--color-navy-md) 100%);
  border: none;
  text-align: center;
}

.sidebar-upload-cta h4 {
  color: rgba(255, 255, 255, .7);
  border-bottom-color: rgba(255, 255, 255, .15);
}

.upload-cta-icon {
  font-size: 2rem;
  margin-bottom: 8px;
}

.upload-cta-title {
  font-size: 1rem;
  font-weight: 800;
  color: var(--color-white);
  margin-bottom: 8px;
}

.sidebar-upload-cta p {
  font-size: .85rem;
  color: rgba(255, 255, 255, .75);
  line-height: 1.55;
  margin-bottom: 16px;
}

.btn-upload {
  display: block;
  background: var(--color-red);
  color: var(--color-white);
  font-weight: 800;
  font-size: .9rem;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: background .15s, transform .15s;
}

.btn-upload:hover {
  background: var(--color-red-dk);
  transform: translateY(-1px);
}

/* ── RELATED POSTS SECTION ───────────────────────────────────────────── */
.related-posts-section {
  background: var(--color-bg);
  padding: 56px 0;
  margin-top: 48px;
  border-top: 1px solid var(--color-border);
}

.related-posts-section .container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

.section-heading {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.6rem;
  color: var(--color-navy);
  margin-bottom: 28px;
}

.related-posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

/* ── NOTE CARDS (shared across archive, search, related) ─────────────── */
.note-card {
  background: var(--color-white);
  border-radius: var(--radius-md);
  border: 1.5px solid var(--color-border);
  overflow: hidden;
  transition: box-shadow .2s, transform .2s;
  display: flex;
  flex-direction: column;
}

.note-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.note-card-top-border {
  height: 4px;
  background: linear-gradient(90deg, var(--color-red), var(--color-navy-md));
}

.note-card-thumb {
  overflow: hidden;
  max-height: 180px;
}

.note-card-thumb img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  transition: transform .3s;
}

.note-card:hover .note-card-thumb img {
  transform: scale(1.04);
}

.note-card-body {
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.note-card-cats {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}

.note-cat-badge {
  background: #FFF3F0;
  color: var(--color-red);
  border-radius: 40px;
  padding: 2px 12px;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .4px;
  text-transform: uppercase;
}

.note-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-navy);
  margin: 0 0 10px;
  line-height: 1.4;
}

.note-card-title a {
  color: inherit;
  text-decoration: none;
}

.note-card-title a:hover {
  color: var(--color-red);
}

.note-card-excerpt {
  font-size: .85rem;
  color: var(--color-muted);
  line-height: 1.65;
  flex: 1;
  margin-bottom: 16px;
}

.note-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--color-bg);
  padding-top: 12px;
  margin-top: auto;
}

.note-card-date {
  font-size: .78rem;
  color: var(--color-muted);
  font-weight: 500;
}

.note-card-link {
  font-size: .82rem;
  font-weight: 800;
  color: var(--color-red);
  text-decoration: none;
  transition: gap .15s;
}

.note-card-link:hover {
  text-decoration: underline;
}

/* ── POSTS GRID (archive & search) ──────────────────────────────────── */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  padding: 40px 0;
}

/* ── PAGINATION ──────────────────────────────────────────────────────── */
.pagination-wrapper {
  display: flex;
  justify-content: center;
  margin: 20px 0 56px;
}

.pagination-wrapper .nav-links {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}

.pagination-wrapper .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--color-border);
  font-weight: 700;
  font-size: .88rem;
  color: var(--color-navy);
  text-decoration: none;
  background: var(--color-white);
  transition: background .15s, border-color .15s, color .15s;
}

.pagination-wrapper .page-numbers:hover {
  background: var(--color-bg);
  border-color: var(--color-navy);
}

.pagination-wrapper .page-numbers.current {
  background: var(--color-red);
  color: var(--color-white);
  border-color: var(--color-red);
}

.pagination-wrapper .page-numbers.dots {
  border: none;
  background: none;
}

/* ── ARCHIVE HERO ────────────────────────────────────────────────────── */
.archive-hero {
  background: linear-gradient(135deg, var(--color-navy) 0%, var(--color-navy-md) 100%);
  padding: 56px 0 48px;
  text-align: center;
}

.archive-hero .container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

.archive-hero-icon {
  font-size: 3.5rem;
  margin-bottom: 12px;
  line-height: 1;
}

.archive-hero-title {
  color: var(--color-white);
  font-family: 'Fraunces', Georgia, serif;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  margin: 0 0 12px;
  line-height: 1.15;
}

.archive-hero-desc {
  color: rgba(255, 255, 255, .75);
  font-size: 1rem;
  margin: 0 auto 16px;
  max-width: 600px;
}

.archive-count-badge {
  display: inline-block;
  background: rgba(255, 255, 255, .15);
  border: 1px solid rgba(255, 255, 255, .3);
  color: var(--color-white);
  border-radius: 40px;
  padding: 6px 18px;
  font-size: .85rem;
  font-weight: 700;
  margin-bottom: 20px;
}

.archive-hero-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  font-size: .83rem;
  color: rgba(255, 255, 255, .65);
}

.archive-hero-breadcrumb a {
  color: rgba(255, 255, 255, .8);
  text-decoration: none;
}

.archive-hero-breadcrumb a:hover {
  color: var(--color-white);
}

/* ── FILTER BAR ──────────────────────────────────────────────────────── */
.filter-bar {
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.filter-bar .container,
.filter-bar-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 52px;
  gap: 12px;
}

.filter-label {
  font-size: .8rem;
  font-weight: 700;
  color: var(--color-muted);
  white-space: nowrap;
}

.filter-btn {
  padding: 5px 14px;
  border-radius: 40px;
  font-size: .82rem;
  font-weight: 700;
  color: var(--color-navy);
  background: none;
  border: 1.5px solid var(--color-border);
  text-decoration: none;
  transition: background .15s, border-color .15s, color .15s;
  white-space: nowrap;
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--color-red);
  color: var(--color-white);
  border-color: var(--color-red);
}

.filter-bar-left,
.filter-bar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.view-toggle-btn {
  background: none;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  width: 34px;
  height: 34px;
  font-size: 1rem;
  cursor: pointer;
  color: var(--color-muted);
  transition: background .15s, color .15s;
}

.view-toggle-btn.active {
  background: var(--color-navy);
  color: var(--color-white);
  border-color: var(--color-navy);
}

/* ── NO RESULTS ──────────────────────────────────────────────────────── */
.no-posts-found {
  text-align: center;
  padding: 80px 24px;
}

.no-posts-emoji {
  font-size: 4rem;
  margin-bottom: 16px;
}

.no-posts-title {
  font-size: 1.6rem;
  color: var(--color-navy);
  margin-bottom: 10px;
}

.no-posts-desc {
  color: var(--color-muted);
  max-width: 460px;
  margin: 0 auto 24px;
  line-height: 1.7;
}

.btn-primary-red {
  display: inline-block;
  background: var(--color-red);
  color: var(--color-white);
  font-weight: 800;
  padding: 14px 28px;
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: background .15s, transform .15s;
}

.btn-primary-red:hover {
  background: var(--color-red-dk);
  transform: translateY(-2px);
  color: var(--color-white);
}

/* ── SEARCH HERO ─────────────────────────────────────────────────────── */
.search-hero {
  padding-bottom: 52px;
}

.search-hero-form {
  margin: 24px 0 8px;
  max-width: 600px;
}

.search-filter-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  height: auto;
  padding-top: 10px;
  padding-bottom: 10px;
}

.search-form-large {
  display: flex;
  gap: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, .15);
  background: var(--color-white);
  max-width: 600px;
}

.search-input-large {
  flex: 1;
  padding: 14px 20px;
  border: none;
  outline: none;
  font-size: 1rem;
  color: var(--color-text);
  font-family: inherit;
}

.search-submit-btn {
  background: var(--color-red);
  color: var(--color-white);
  border: none;
  padding: 14px 22px;
  font-size: .9rem;
  font-weight: 800;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  transition: background .15s;
}

.search-submit-btn:hover {
  background: var(--color-red-dk);
}

/* SUGGESTED SEARCHES */
.suggested-searches {
  margin: 24px 0;
}

.suggested-label {
  font-size: .88rem;
  color: var(--color-muted);
  margin-bottom: 12px;
  font-weight: 600;
}

.suggested-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.suggested-chip {
  background: var(--color-bg);
  border: 1.5px solid var(--color-border);
  color: var(--color-navy);
  border-radius: 40px;
  padding: 6px 16px;
  font-size: .85rem;
  font-weight: 700;
  text-decoration: none;
  transition: all .15s;
}

.suggested-chip:hover {
  background: var(--color-navy);
  color: var(--color-white);
  border-color: var(--color-navy);
}

/* ── 404 PAGE ────────────────────────────────────────────────────────── */
.not-found-section {
  padding: 80px 24px;
  min-height: 70vh;
  display: flex;
  align-items: center;
}

.not-found-section .container {
  max-width: 1180px;
  margin: 0 auto;
  width: 100%;
}

.not-found-inner {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

.not-found-404 {
  font-family: 'Fraunces', Georgia, serif;
  font-size: clamp(5rem, 15vw, 9rem);
  color: var(--color-red);
  line-height: 1;
  opacity: .25;
  margin-bottom: 0;
}

.not-found-title {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 2rem;
  color: var(--color-navy);
  margin: -12px 0 12px;
}

.not-found-desc {
  color: var(--color-muted);
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 28px;
}

.not-found-search {
  margin-bottom: 32px;
  max-width: 460px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 32px;
}

.not-found-ql-label {
  font-size: .85rem;
  font-weight: 700;
  color: var(--color-muted);
  margin-bottom: 12px;
}

.not-found-links-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 28px;
}

.not-found-link-btn {
  background: var(--color-bg);
  border: 1.5px solid var(--color-border);
  color: var(--color-navy);
  border-radius: var(--radius-sm);
  padding: 8px 16px;
  font-size: .85rem;
  font-weight: 700;
  text-decoration: none;
  transition: all .15s;
}

.not-found-link-btn:hover {
  background: var(--color-navy);
  color: var(--color-white);
  border-color: var(--color-navy);
}

/* ── FULL WIDTH LAYOUT (no sidebar — archive, page, search, 404) ──── */
.full-width-layout {
  max-width: 1180px;
  margin: 0 auto;
  padding: 48px 24px;
  width: 100%;
  box-sizing: border-box;
}

/* ── PAGE CONTENT BOX (static pages centered card) ──────────────────── */
.page-content-box {
  max-width: 800px;
  margin: 0 auto;
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 48px;
  box-shadow: var(--shadow-md);
  border: 1.5px solid var(--color-border);
}

.page-content-box h1 {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 2rem;
  color: var(--color-navy);
  margin-bottom: 24px;
}

.page-article .entry-content h1,
.page-article .entry-content h2 {
  color: var(--color-navy);
  font-family: 'Fraunces', Georgia, serif;
  margin: 28px 0 14px;
}

.page-article .entry-content p {
  line-height: 1.85;
  color: var(--color-text);
  margin-bottom: 18px;
}

.page-article .entry-content ul,
.page-article .entry-content ol {
  padding-left: 24px;
  margin-bottom: 18px;
}

.page-article .entry-content li {
  line-height: 1.7;
  margin-bottom: 8px;
}

.page-article .entry-content a {
  color: var(--color-red);
}

.page-article .entry-content img {
  max-width: 100%;
  border-radius: var(--radius-sm);
  margin: 12px 0;
}

/* ── ABOUT PAGE ──────────────────────────────────────────────────────── */
.about-hero-badge {
  display: inline-block;
  background: rgba(255, 255, 255, .15);
  border: 1px solid rgba(255, 255, 255, .3);
  color: var(--color-white);
  border-radius: 40px;
  padding: 5px 16px;
  font-size: .8rem;
  font-weight: 700;
  margin-bottom: 14px;
}

.about-hero-sub {
  color: rgba(255, 255, 255, .78);
  font-size: 1.05rem;
  max-width: 560px;
  line-height: 1.6;
  margin-bottom: 8px;
}

.about-mission {
  padding: 72px 24px;
  background: var(--color-white);
}

.about-mission .container {
  max-width: 1180px;
  margin: 0 auto;
}

.about-mission-inner {
  text-align: center;
  max-width: 700px;
  margin: 0 auto;
}

.about-mission-icon {
  font-size: 3rem;
  margin-bottom: 16px;
}

.about-mission-title {
  font-family: 'Fraunces', Georgia, serif;
  font-size: clamp(1.5rem, 3vw, 2rem);
  color: var(--color-navy);
  margin-bottom: 16px;
}

.about-mission-text {
  color: var(--color-muted);
  font-size: 1.05rem;
  line-height: 1.8;
}

.about-stats {
  background: var(--color-bg);
  padding: 64px 24px;
}

.about-stats .container {
  max-width: 1180px;
  margin: 0 auto;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.stat-card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 32px 20px;
  text-align: center;
  border: 1.5px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s, transform .2s;
  position: relative;
}

.stat-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.stat-number {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 2.8rem;
  color: var(--color-red);
  font-weight: 900;
  line-height: 1;
  margin-bottom: 6px;
}

.stat-label {
  font-size: .88rem;
  font-weight: 700;
  color: var(--color-muted);
}

.stat-icon {
  font-size: 1.6rem;
  margin-top: 10px;
  opacity: .4;
}

.about-story {
  padding: 72px 24px;
  background: var(--color-white);
}

.about-story .container {
  max-width: 1180px;
  margin: 0 auto;
}

.about-story-inner {
  max-width: 800px;
  margin: 0 auto;
}

.about-page-content h2 {
  font-family: 'Fraunces', Georgia, serif;
  color: var(--color-navy);
  font-size: 1.6rem;
  margin: 32px 0 14px;
}

.about-page-content p {
  line-height: 1.85;
  color: var(--color-text);
  margin-bottom: 18px;
}

.about-page-content ul {
  padding-left: 20px;
}

.about-page-content li {
  line-height: 1.7;
  margin-bottom: 8px;
  color: var(--color-text);
}

.about-team {
  background: linear-gradient(135deg, var(--color-navy) 0%, var(--color-navy-md) 100%);
  padding: 72px 24px;
  text-align: center;
}

.about-team .container {
  max-width: 1180px;
  margin: 0 auto;
}

.about-team-inner {
  max-width: 600px;
  margin: 0 auto;
}

.about-team-heart {
  font-size: 3rem;
  margin-bottom: 16px;
}

.about-team-title {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 2rem;
  color: var(--color-white);
  margin-bottom: 16px;
}

.about-team-desc {
  color: rgba(255, 255, 255, .78);
  font-size: 1rem;
  line-height: 1.75;
  margin-bottom: 20px;
}

.about-team-location {
  display: inline-flex;
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .2);
  color: var(--color-white);
  border-radius: 40px;
  padding: 8px 20px;
  font-size: .88rem;
  font-weight: 600;
}

.about-contact {
  padding: 72px 24px;
  background: var(--color-bg);
}

.about-contact .container {
  max-width: 1180px;
  margin: 0 auto;
}

.text-center {
  text-align: center;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 32px 0 48px;
}

.contact-card {
  background: var(--color-white);
  border-radius: var(--radius-md);
  padding: 28px 20px;
  text-align: center;
  border: 1.5px solid var(--color-border);
  box-shadow: var(--shadow-sm);
}

.contact-card-icon {
  font-size: 2rem;
  margin-bottom: 10px;
}

.contact-card-label {
  font-size: .78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: var(--color-muted);
  margin-bottom: 6px;
}

.contact-card-value {
  font-size: .95rem;
  font-weight: 700;
  color: var(--color-navy);
  text-decoration: none;
  word-break: break-word;
}

a.contact-card-value:hover {
  color: var(--color-red);
}

.contact-form-wrapper {
  max-width: 640px;
  margin: 0 auto;
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 36px;
  box-shadow: var(--shadow-md);
}

.contact-form-title {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.5rem;
  color: var(--color-navy);
  margin-bottom: 24px;
  text-align: center;
}

.simple-contact-form .form-input,
.simple-contact-form .form-textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: .95rem;
  font-family: inherit;
  color: var(--color-text);
  background: var(--color-bg);
  margin-bottom: 14px;
  box-sizing: border-box;
  outline: none;
  transition: border-color .15s;
}

.simple-contact-form .form-input:focus,
.simple-contact-form .form-textarea:focus {
  border-color: var(--color-red);
}

.simple-contact-form .form-textarea {
  resize: vertical;
}

.simple-contact-form .btn-primary-red {
  width: 100%;
  text-align: center;
}

/* ── RESPONSIVE ──────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 900px) {
  .post-layout {
    grid-template-columns: 1fr;
  }

  .post-sidebar {
    position: static;
  }

  .related-posts-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .posts-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .contact-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin: 32px auto 48px;
  }
}

@media (max-width: 640px) {
  .post-content {
    padding: 24px 18px;
  }

  .post-layout {
    padding: 0 16px;
    margin: 28px auto;
  }

  .posts-grid {
    grid-template-columns: 1fr;
    padding: 24px 0;
  }

  .related-posts-grid {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .filter-bar-inner,
  .filter-bar .container {
    flex-wrap: wrap;
    height: auto;
    padding: 10px 16px;
  }

  .archive-hero-icon {
    font-size: 2.5rem;
  }

  .page-content-inner {
    padding: 24px 18px;
  }

  .not-found-links-row {
    flex-direction: column;
    align-items: center;
  }

  .post-hero {
    padding: 40px 0 36px;
  }
}

@media (max-width: 480px) {
  .not-found-404 {
    font-size: 5rem;
  }

  .share-buttons {
    flex-direction: column;
  }

  .author-box {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* ── SIDEBAR V2 — RELATED CARDS ──────────────────── */
.post-sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: sticky;
  top: 80px;
  align-self: flex-start;
}

.sidebar-widget-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-left: 10px;
  margin-bottom: 16px;
}

.sidebar-widget-header h4 {
  font-size: .88rem;
  font-weight: 800;
  color: #0F1F3D;
  margin: 0;
}

.sidebar-view-all {
  font-size: .75rem;
  font-weight: 700;
  color: #E8311A;
  text-decoration: none;
}

.sidebar-view-all:hover {
  text-decoration: underline;
}

.related-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.related-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 12px;
  border: 1.5px solid #E8ECF0;
  text-decoration: none;
  color: inherit;
  transition: border-color .2s, transform .2s, box-shadow .2s;
  background: #fff;
}

.related-card:hover {
  border-color: var(--rc-color, #E8311A);
  transform: translateX(4px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, .06);
}

.rc-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.rc-info {
  flex: 1;
  min-width: 0;
}

.rc-subject {
  display: block;
  font-size: .65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: #637083;
  margin-bottom: 3px;
}

.rc-title {
  font-size: .82rem;
  font-weight: 700;
  color: #1C2B3A;
  line-height: 1.35;
  margin: 0 0 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.rc-date {
  font-size: .68rem;
  color: #637083;
}

.rc-arrow {
  font-size: 1rem;
  font-weight: 700;
  flex-shrink: 0;
  transition: transform .15s;
}

.related-card:hover .rc-arrow {
  transform: translateX(4px);
}

/* ── SIDEBAR CTA ─────────────────────────────────── */
.sidebar-cta {
  background: linear-gradient(135deg, #0F1F3D, #1A3A6B) !important;
  border: none !important;
  text-align: center;
}

.sidebar-cta-icon {
  font-size: 2rem;
  margin-bottom: 10px;
}

.sidebar-cta h4 {
  font-size: 1rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 8px;
}

.sidebar-cta p {
  font-size: .8rem;
  color: rgba(255, 255, 255, .65);
  line-height: 1.5;
  margin-bottom: 16px;
}

.sidebar-cta-btn {
  display: block;
  padding: 10px 20px;
  background: #E8311A;
  color: #fff;
  border-radius: 8px;
  font-weight: 700;
  font-size: .85rem;
  text-decoration: none;
  transition: background .15s, transform .15s;
}

.sidebar-cta-btn:hover {
  background: #C1121F;
  transform: translateY(-1px);
  color: #fff;
}

/* ── AUTHOR BOX V2 ───────────────────────────────── */
.author-label {
  display: block;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: #637083;
  margin-bottom: 4px;
}

.author-name {
  display: block;
  font-size: 1.1rem;
  font-weight: 800;
  color: #0F1F3D;
  margin-bottom: 8px;
  text-decoration: none;
}

.author-name:hover {
  color: #E8311A;
}

.author-avatar img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .1);
}

.author-links {
  display: flex;
  gap: 10px;
}

.author-social {
  font-size: .78rem;
  font-weight: 700;
  color: #E8311A;
  text-decoration: none;
  background: #FFF0ED;
  padding: 4px 12px;
  border-radius: 20px;
  transition: background .15s, color .15s;
}

.author-social:hover {
  background: #E8311A;
  color: #fff;
}

/* ── SHARE LABEL FIX ─────────────────────────────── */
.share-label {
  font-size: .82rem;
  font-weight: 700;
  color: #637083;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: .5px;
}

@media (max-width: 580px) {
  .author-box {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .author-links {
    justify-content: center;
  }

  .share-btn {
    flex: 1;
    justify-content: center;
  }
}

/* ── SIMPLE COMMENTS ─────────────────────────────────────────────────── */
.comments-section {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 2px solid #E8ECF0;
}

.comments-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #0F1F3D;
  margin-bottom: 24px;
}

/* Comment list */
.comment-list {
  list-style: none;
  padding: 0;
  margin: 0 0 36px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.comment-item {
  background: #F7F8FA;
  border: 1.5px solid #E8ECF0;
  border-radius: 12px;
  padding: 16px 20px;
}

.comment-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  gap: 12px;
}

.comment-author-name {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .88rem;
  font-weight: 700;
  color: #0F1F3D;
}

.comment-avatar {
  border-radius: 50%;
  width: 32px !important;
  height: 32px !important;
}

.comment-date {
  font-size: .72rem;
  color: #637083;
}

.comment-text {
  font-size: .9rem;
  color: #1C2B3A;
  line-height: 1.7;
}

.comment-text p {
  margin: 0;
}

/* Comment form */
.comment-form-wrapper {
  background: #fff;
  border: 1.5px solid #E8ECF0;
  border-radius: 16px;
  padding: 28px 24px;
}

.comment-form-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #0F1F3D;
  margin-bottom: 20px;
}

.simple-comment-form p {
  margin: 0 0 16px;
}

.simple-comment-form label {
  display: block;
  font-size: .8rem;
  font-weight: 700;
  color: #0F1F3D;
  margin-bottom: 6px;
}

.required {
  color: #E8311A;
}

.simple-comment-form input[type="text"],
.simple-comment-form textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid #E8ECF0;
  border-radius: 10px;
  font-size: .9rem;
  font-family: inherit;
  color: #1C2B3A;
  background: #F7F8FA;
  transition: border-color .15s;
  resize: vertical;
  box-sizing: border-box;
}

.simple-comment-form input[type="text"]:focus,
.simple-comment-form textarea:focus {
  outline: none;
  border-color: #0F1F3D;
  background: #fff;
}

.comment-submit-btn {
  padding: 12px 28px;
  background: #E8311A;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: .88rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: background .15s, transform .15s;
}

.comment-submit-btn:hover {
  background: #C1121F;
  transform: translateY(-1px);
}

.comments-closed {
  font-size: .88rem;
  color: #637083;
  font-style: italic;
  margin-top: 16px;
}

@media (max-width: 480px) {
  .comment-form-wrapper {
    padding: 20px 16px;
  }

  .comment-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
}

/* ════════════════════════════════════════════════════
   CHAPTER LIST SIDEBAR WIDGET
   ════════════════════════════════════════════════════ */

/* Sticky sidebar container */
.post-sidebar {
  position: sticky;
  top: 80px;
  align-self: flex-start;
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--sw-color, #E8311A) #f0f0f0;
}

.post-sidebar::-webkit-scrollbar {
  width: 4px;
}

.post-sidebar::-webkit-scrollbar-thumb {
  background: var(--sw-color, #E8311A);
  border-radius: 4px;
}

/* Widget shell */
.chapter-widget {
  background: #fff;
  border-radius: 16px;
  border: 1.5px solid #E8ECF0;
  overflow: hidden;
  padding: 0;
}

/* Widget header */
.cw-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: var(--sw-light, #FFF5F3);
  border-bottom: 1.5px solid #E8ECF0;
  gap: 8px;
}

.cw-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.cw-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.cw-subject {
  font-size: .85rem;
  font-weight: 800;
  color: #0F1F3D;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cw-count {
  font-size: .7rem;
  color: #637083;
  font-weight: 500;
  margin-top: 2px;
}

.cw-view-all {
  font-size: .72rem;
  font-weight: 700;
  color: var(--sw-color, #E8311A);
  text-decoration: none;
  white-space: nowrap;
  padding: 4px 10px;
  border-radius: 20px;
  background: var(--sw-bg, #FFF0ED);
  transition: background .15s, color .15s;
  flex-shrink: 0;
}

.cw-view-all:hover {
  background: var(--sw-color, #E8311A);
  color: #fff;
}

/* Progress bar */
.cw-progress-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px;
  border-bottom: 1px solid #F0F2F5;
}

.cw-progress-bar {
  flex: 1;
  height: 5px;
  background: #F0F2F5;
  border-radius: 10px;
  overflow: hidden;
}

.cw-progress-fill {
  height: 100%;
  border-radius: 10px;
  transition: width .5s ease;
}

.cw-progress-text {
  font-size: .68rem;
  font-weight: 700;
  color: #637083;
  white-space: nowrap;
}

/* Chapter list */
.chapter-list {
  list-style: none;
  padding: 6px 0;
  margin: 0;
  max-height: 360px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #E8ECF0 transparent;
}

.chapter-list::-webkit-scrollbar {
  width: 3px;
}

.chapter-list::-webkit-scrollbar-thumb {
  background: #E8ECF0;
  border-radius: 3px;
}

.chapter-item {
  margin: 0;
}

.chapter-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  text-decoration: none;
  color: #1C2B3A;
  transition: background .12s;
}

.chapter-link:hover {
  background: var(--sw-light, #FFF5F3);
}

.chapter-item.current .chapter-link {
  background: var(--sw-light, #FFF5F3);
}

/* Chapter number badge */
.chap-num {
  width: 22px;
  height: 22px;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .68rem;
  font-weight: 800;
  flex-shrink: 0;
}

/* Chapter title */
.chap-title {
  flex: 1;
  font-size: .8rem;
  line-height: 1.4;
  color: #1C2B3A;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Arrow */
.chap-arrow {
  font-size: 1rem;
  color: #C0C8D4;
  flex-shrink: 0;
  opacity: 0;
  transition: opacity .12s, color .12s;
}

.chapter-link:hover .chap-arrow {
  opacity: 1;
  color: var(--sw-color, #E8311A);
}

/* Current chapter pulsing dot */
.chap-current-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
  animation: chapDotPulse 2s ease-in-out infinite;
}

@keyframes chapDotPulse {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: .5;
    transform: scale(.75);
  }
}

/* Prev / Next chapter nav strip */
.chap-nav {
  display: flex;
  gap: 1px;
  border-top: 1.5px solid #E8ECF0;
  background: #E8ECF0;
}

.chap-nav-btn {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 14px;
  text-decoration: none;
  color: #1C2B3A;
  background: #fff;
  font-size: .75rem;
  font-weight: 600;
  transition: background .12s, color .12s;
  min-height: 50px;
}

.chap-nav-btn:hover {
  background: var(--sw-light, #FFF5F3);
  color: var(--sw-color, #E8311A);
}

.chap-prev {
  border-radius: 0 0 0 13px;
}

.chap-next {
  border-radius: 0 0 13px 0;
  justify-content: flex-end;
  text-align: right;
}

.chap-nav-label {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.chap-nav-label small {
  font-size: .62rem;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: #637083;
  font-weight: 700;
}

/* Upload CTA */
.sidebar-widget.sidebar-cta {
  background: linear-gradient(135deg, #0F1F3D, #1A3A6B);
  border-radius: 16px;
  border: none;
  padding: 24px 18px;
  text-align: center;
}

/* Responsive: sidebar stacks above post on mobile */
@media (max-width: 768px) {
  .post-layout {
    display: flex;
    flex-direction: column;
  }

  .post-sidebar {
    position: static;
    max-height: none;
    overflow-y: visible;
    order: -1;
  }

  .chapter-list {
    max-height: 220px;
  }

  .sidebar-cta {
    display: none;
  }
}

/* ── RELATED POSTS SECTION (single.php) ─────────────────────────── */
.related-posts-section {
  padding: 48px 0;
  background: #F7F8FA;
  border-top: 1px solid #E8ECF0;
}

.related-posts-section .section-heading {
  font-family: 'Fraunces', serif;
  font-size: 1.4rem;
  font-weight: 900;
  color: #0F1F3D;
  margin-bottom: 24px;
  font-style: italic;
}

.related-posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  align-items: stretch;
}

/* Individual card */
.note-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 14px;
  border: 1.5px solid #E8ECF0;
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .04);
}

.note-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, .1);
}

/* Colored top border strip */
.note-card-top-border {
  height: 3px;
  background: #E8311A;
  flex-shrink: 0;
}

/* Thumbnail (optional) */
.note-card-thumb {
  flex-shrink: 0;
  overflow: hidden;
}

.note-card-thumb img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  display: block;
}

/* Body — grows to push footer down */
.note-card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 16px 18px;
}

.note-card-cats {
  margin-bottom: 8px;
}

.note-cat-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: .65rem;
  font-weight: 800;
  letter-spacing: .5px;
  text-transform: uppercase;
  background: #FFF0ED;
  color: #E8311A;
}

.note-card-title {
  margin-bottom: 8px;
  flex: 1;
  /* push footer down */
}

.note-card-title a {
  font-size: .95rem;
  font-weight: 700;
  color: #0F1F3D;
  text-decoration: none;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
}

.note-card-title a:hover {
  color: #E8311A;
}

.note-card-excerpt {
  font-size: .8rem;
  color: #637083;
  line-height: 1.6;
  margin-bottom: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Footer — ALWAYS at the bottom */
.note-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1.5px solid #F0F2F5;
  margin-top: auto;
  /* ← pins footer to bottom */
  gap: 8px;
  flex-wrap: wrap;
}

.note-card-date {
  font-size: .72rem;
  color: #637083;
}

.note-card-link {
  font-size: .75rem;
  font-weight: 700;
  color: #E8311A;
  text-decoration: none;
  white-space: nowrap;
}

.note-card-link:hover {
  text-decoration: underline;
}

@media (max-width: 768px) {
  .related-posts-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .related-posts-grid {
    grid-template-columns: 1fr;
  }
}