/* =====================================================================
   blog.css — blog list, article page, sidebar (loaded only on blog pages)
   Uses the variables defined in style.css (--navy, --red, --paper …)
   ===================================================================== */

/* ---------- category pills ---------- */
.blog-pills { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 36px; }
.blog-pills a {
  padding: 8px 18px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--white);
  color: var(--ink);
  font-weight: 600;
  font-size: .92rem;
  text-decoration: none;
  transition: all .15s ease;
}
.blog-pills a:hover { border-color: var(--navy); color: var(--navy); }
.blog-pills a.active { background: var(--navy); border-color: var(--navy); color: var(--white); }

/* ---------- post cards ---------- */
.blog-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: box-shadow .2s ease, transform .2s ease;
}
.blog-card:hover { box-shadow: var(--shadow-card); transform: translateY(-4px); }
/* Show the whole image (never crop it); upload 1200 x 630 images for a consistent look */
.blog-card-media { display: block; background: var(--paper); overflow: hidden; }
.blog-card-media img { width: 100%; height: auto; display: block; }
.blog-card-placeholder {
  display: flex; align-items: center; justify-content: center; aspect-ratio: 16 / 9;
  color: var(--navy); opacity: .35; font-size: 2.6rem;
}
.blog-card-body { padding: 22px 22px 24px; display: flex; flex-direction: column; flex-grow: 1; }
.blog-meta { font-size: .84rem; color: var(--ink-soft); display: flex; flex-wrap: wrap; gap: 6px 14px; margin-bottom: 10px; }
.blog-meta .cat { color: var(--red); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; font-size: .76rem; }
.blog-card h2, .blog-card h3 { font-size: 1.15rem; line-height: 1.4; margin-bottom: 10px; }
.blog-card h2 a, .blog-card h3 a { color: var(--navy-deep); text-decoration: none; }
.blog-card h2 a:hover, .blog-card h3 a:hover { color: var(--red); }
.blog-card p { color: var(--ink-soft); flex-grow: 1; margin-bottom: 16px; }
.blog-readmore { font-weight: 700; color: var(--navy); text-decoration: none; }
.blog-readmore:hover { color: var(--red); }

/* ---------- pagination ---------- */
.blog-pagination { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 44px; }
.blog-pagination a, .blog-pagination span {
  min-width: 42px; padding: 9px 14px; text-align: center;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--white); color: var(--ink); font-weight: 600; text-decoration: none;
}
.blog-pagination a:hover { border-color: var(--navy); color: var(--navy); }
.blog-pagination .current { background: var(--navy); border-color: var(--navy); color: var(--white); }
.blog-pagination .gap { border: none; background: none; }

.blog-empty { text-align: center; padding: 56px 20px; border: 1px dashed var(--border); border-radius: var(--radius-md); background: var(--white); }

/* ---------- article ---------- */
.post-hero-meta { color: rgba(255,255,255,.8); font-size: .95rem; display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 14px; }
.post-hero-meta i { margin-right: 6px; }
.post-preview-bar { background: #FFF4CE; border-bottom: 1px solid #E8D080; color: #5A4A00; text-align: center; padding: 10px 16px; font-weight: 600; }

.post-featured { border-radius: var(--radius-md); overflow: hidden; margin-bottom: 30px; background: var(--paper); }
.post-featured img { width: 100%; height: auto; display: block; }

.blog-content { font-size: 1.1rem; line-height: 1.85; color: var(--ink); overflow-wrap: break-word; }
.blog-content > *:first-child { margin-top: 0; }
.blog-content h2 { font-size: 1.6rem; margin: 2.1rem 0 .8rem; }
.blog-content h3 { font-size: 1.3rem; margin: 1.8rem 0 .7rem; }
.blog-content h4 { font-size: 1.1rem; margin: 1.5rem 0 .6rem; }
.blog-content p { margin-bottom: 1.15rem; }
.blog-content ul, .blog-content ol { margin: 0 0 1.25rem; padding-left: 1.4rem; }
.blog-content li { margin-bottom: .45rem; }
.blog-content a { color: var(--navy-mid); text-decoration: underline; text-underline-offset: 3px; }
.blog-content a:hover { color: var(--red); }
.blog-content img { max-width: 100%; height: auto; border-radius: var(--radius-md); margin: 1.2rem 0; }
.blog-content blockquote {
  margin: 1.8rem 0; padding: 4px 0 4px 22px; border-left: 4px solid var(--red);
  font-family: var(--font-head); font-style: italic; color: var(--navy-deep);
}
.blog-content table { width: 100%; margin-bottom: 1.3rem; border-collapse: collapse; }
.blog-content th, .blog-content td { border: 1px solid var(--border); padding: 10px 12px; }
.blog-content th { background: var(--paper); }
.blog-content .ql-align-center { text-align: center; }
.blog-content .ql-align-right { text-align: right; }

.post-share { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 36px; padding-top: 22px; border-top: 1px solid var(--border); }
.post-share strong { margin-right: 6px; color: var(--navy-deep); }
.post-share a {
  width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; border: 1px solid var(--border); color: var(--navy); text-decoration: none; font-size: 1.1rem;
}
.post-share a:hover { background: var(--navy); border-color: var(--navy); color: var(--white); }

.post-note { margin-top: 28px; padding: 16px 20px; background: var(--paper); border-left: 4px solid var(--navy); border-radius: var(--radius-sm); font-size: .95rem; color: var(--ink-soft); }

/* ---------- sidebar ---------- */
.blog-side .widget { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 24px; margin-bottom: 24px; }
.blog-side .widget h2, .blog-side .widget h3 { font-size: 1.1rem; margin-bottom: 14px; }
.blog-side .widget-cta { background: var(--navy-deep); border-color: var(--navy-deep); color: #fff; }
.blog-side .widget-cta p, .blog-side .widget-cta li, .blog-side .widget-cta a:not(.btn-eira) { color: #fff; }
.blog-side .widget-cta h2, .blog-side .widget-cta h3 { color: var(--white); }
.recent-list { list-style: none; padding: 0; margin: 0; }
.recent-list li { padding: 10px 0; border-bottom: 1px solid var(--border); }
.recent-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.recent-list a { color: var(--navy-deep); font-weight: 600; text-decoration: none; line-height: 1.4; display: block; }
.recent-list a:hover { color: var(--red); }
.recent-list small { color: var(--ink-soft); }
@media (min-width: 992px) { .blog-side { position: sticky; top: calc(var(--header-height) + 20px); } }

/* A paragraph that is only a bold line (typical pasted "heading") gets heading-like spacing */
.blog-content p:has(> strong:only-child) { margin-top: 1.9rem; margin-bottom: .6rem; color: var(--navy-deep); }
