/* =====================================================================
   Additions for the dynamic blog (pagination, breadcrumb, FAQ, preview)
   Uses the colour variables already defined in blog.css / blog-details.css
   ===================================================================== */

/* ---------- Listing ---------- */
a.category-filter {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.hero-page {
  font-size: 0.45em;
  letter-spacing: 0;
  color: rgba(255, 255, 255, 0.6);
  font-weight: 500;
}

a.article-category:hover {
  filter: brightness(0.95);
}

.featured-content .featured-title {
  color: var(--navy, #102c4b);
  font-size: clamp(18px, 2vw, 25px);
  line-height: 1.35;
  font-weight: 600;
  letter-spacing: -1px;
  margin-bottom: 15px;
}

.featured-content .featured-title a {
  color: inherit;
}

.featured-content .featured-title a:hover {
  color: var(--blue, #245b91);
}

.blog-image img,
.featured-image img {
  height: auto;
}

.journal-breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  font-size: 12px;
  color: var(--muted, #697787);
}

.journal-breadcrumb li + li::before {
  content: "/";
  margin-right: 6px;
  opacity: 0.5;
}

.journal-breadcrumb a {
  color: var(--blue, #245b91);
}

.journal-pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 48px;
}

.page-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 42px;
  height: 42px;
  padding: 0 14px;
  justify-content: center;
  border: 1px solid var(--border, #e5e9ef);
  border-radius: 50px;
  color: var(--navy, #102c4b);
  font-size: 13px;
  font-weight: 700;
  background: #fff;
  transition: all 0.2s ease;
}

.page-link-btn:hover {
  border-color: var(--navy, #102c4b);
  color: var(--navy, #102c4b);
}

.page-link-btn.active {
  background: var(--navy, #102c4b);
  border-color: var(--navy, #102c4b);
  color: #fff;
}

.page-gap {
  color: var(--muted, #697787);
  padding: 0 4px;
}

/* ---------- Details ---------- */
a.category-pill {
  text-decoration: none;
}

.article-lead {
  font-size: 1.2rem;
  line-height: 1.8;
  margin-bottom: 1.5rem;
}

.article-body figure {
  margin: 2rem 0;
}

.article-body figure img,
.article-body img {
  max-width: 100%;
  height: auto;
}

.article-body figcaption {
  text-align: center;
  font-size: 0.85rem;
  color: var(--bs-secondary-color, #6c757d);
  margin-top: 0.5rem;
}

.article-body h3 {
  font-weight: 700;
  margin: 2rem 0 0.8rem;
  font-size: 1.35rem;
}

.article-body table {
  width: 100%;
  margin: 1.5rem 0;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.article-body th,
.article-body td {
  border: 1px solid var(--card-border, #e5e9ef);
  padding: 0.6rem 0.8rem;
  vertical-align: top;
}

.article-body th {
  background: var(--soft-bg, #f6f7fb);
}

.article-body iframe {
  max-width: 100%;
  border: 0;
  border-radius: 0.75rem;
}

.author-initial {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent, #6366f1);
  color: #fff;
  font-weight: 700;
  flex-shrink: 0;
}

.author-initial-lg {
  width: 90px;
  height: 90px;
  font-size: 2rem;
}

.back-top {
  position: fixed;
  right: 20px;
  bottom: 90px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 0;
  background: var(--accent, #6366f1);
  color: #fff;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  box-shadow: 0 10px 25px -8px rgba(15, 23, 42, 0.45);
}

.preview-bar {
  background: #fff3cd;
  color: #664d03;
  text-align: center;
  padding: 10px 16px;
  font-size: 14px;
}

.preview-bar a {
  margin-left: 8px;
  font-weight: 600;
}

/* ---------- FAQ ---------- */
.post-faq {
  margin-top: 3rem;
}

.post-faq > h2 {
  font-weight: 700;
  margin-bottom: 1.25rem;
  scroll-margin-top: 90px;
}

.faq-list {
  display: grid;
  gap: 0.75rem;
}

.faq-item {
  border: 1px solid var(--card-border, #e5e9ef);
  border-radius: 0.85rem;
  background: var(--bs-body-bg, #fff);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.faq-item[open] {
  border-color: rgba(99, 102, 241, 0.35);
  box-shadow: 0 12px 30px -18px rgba(15, 23, 42, 0.35);
}

.faq-item summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  font-weight: 600;
  font-size: 1.02rem;
  line-height: 1.5;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary i {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(99, 102, 241, 0.1);
  color: var(--accent, #6366f1);
  transition: transform 0.25s ease;
}

.faq-item[open] summary i {
  transform: rotate(45deg);
}

.faq-item summary:focus-visible {
  outline: 2px solid var(--accent, #6366f1);
  outline-offset: 2px;
  border-radius: 0.85rem;
}

.faq-answer {
  padding: 0 1.25rem 1.1rem;
  color: var(--bs-secondary-color, #555);
  line-height: 1.8;
}

.faq-answer p:last-child {
  margin-bottom: 0;
}

@media (prefers-reduced-motion: reduce) {
  .faq-item summary i {
    transition: none;
  }
}

/* ---------- Bootstrap 5 utilities used by the blog templates ----------
   (the site header loads Bootstrap 4 CSS, which does not include these) */
.gap-1 { gap: .25rem !important; }
.gap-2 { gap: .5rem !important; }
.gap-3 { gap: 1rem !important; }
.gap-4 { gap: 1.5rem !important; }
.me-1 { margin-right: .25rem !important; }
.me-2 { margin-right: .5rem !important; }
.ms-2 { margin-left: .5rem !important; }
.fw-semibold { font-weight: 600 !important; }
.fw-medium { font-weight: 500 !important; }
.rounded-4 { border-radius: 1rem !important; }
.text-body { color: inherit !important; }
.fs-2 { font-size: calc(1.325rem + .9vw) !important; }
.row.g-3 { row-gap: 1rem; }
.row.g-4 { row-gap: 1.5rem; }
@media (min-width: 576px) {
  .text-sm-start { text-align: left !important; }
  .text-sm-end { text-align: right !important; }
}
.post-meta > * { white-space: nowrap; }
