/* Takly Blog — scoped styles
 *
 * UX-disciplines:
 *  - Fitts: post-card = volledige <a>, min-height 240-320px, pagination-buttons 56px
 *  - Proximity: 8px binnen card, 48px tussen cards
 *  - Miller: max 7 posts/pagina, max 3 tags zichtbaar
 *  - Jakob: standaard blog-grid patroon
 *  - Occam: geen decoratieve extras
 */

/* ---- Layout ---- */
/* Fixed nav (64px uit main.css) compenseren op blog-pagina's */
body > article.post,
body > main.blog-index { padding-top: 64px; }

.blog-index {
  max-width: none;
  margin: 0;
  padding: 0;
}

.post-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem var(--content-pad);
}

/* ---- Blog-hero (gradient variant) ---- */
.blog-hero--gradient {
  background:
    radial-gradient(circle at 80% 20%, rgba(232,101,10,0.15), transparent 50%),
    linear-gradient(135deg, var(--navy) 0%, var(--blue) 100%);
  padding: 3rem var(--content-pad) 2.5rem;
}
.blog-hero__inner {
  max-width: 900px;
  margin: 0 auto;
}
.blog-hero--gradient h1 {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  font-weight: 800;
  color: var(--white);
  margin: 0.5rem 0 0.75rem;
  letter-spacing: 0.5px;
}
.blog-hero__lead {
  font-size: 1.05rem;
  color: rgba(255,255,255,0.7);
  max-width: 55ch;
  line-height: 1.65;
}

/* ---- Blog-content (lichte achtergrond voor cards) ---- */
.blog-content {
  background: var(--light);
  padding: 2.5rem var(--content-pad);
  min-height: 40vh;
}
.blog-content__inner {
  max-width: 900px;
  margin: 0 auto;
}
.blog-content__count {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.25rem;
}

.blog-empty {
  padding: 2rem 0;
  color: var(--muted);
}

/* ---- Blog-CTA (donkere sectie onderaan) ---- */
.blog-cta {
  background: var(--navy);
  padding: 3rem var(--content-pad);
  text-align: center;
  position: relative;
}
.blog-cta::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--orange), transparent);
}
.blog-cta__inner {
  max-width: 600px;
  margin: 0 auto;
}
.blog-cta h2 {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
  color: var(--white);
  margin-bottom: 0.75rem;
  letter-spacing: 0.5px;
}
.blog-cta p {
  font-size: 0.95rem;
  color: rgba(255,255,255,0.6);
  line-height: 1.65;
  margin-bottom: 1.5rem;
}
.blog-cta .btn-primary {
  min-height: 56px;
  padding: 1rem 1.75rem;
}

/* ---- Breadcrumb ---- */
.breadcrumb {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 1rem;
}
.breadcrumb a {
  color: var(--blue);
  text-decoration: none;
}
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb span[aria-hidden] { margin: 0 0.4rem; color: var(--border); }
.breadcrumb--inverse { color: rgba(255,255,255,0.75); }
.breadcrumb--inverse a { color: #fff; opacity: 0.9; }
.breadcrumb--inverse span[aria-hidden] { color: rgba(255,255,255,0.4); }

/* Breadcrumb-strip: neutrale balk tussen nav en gradient-header */
.breadcrumb--strip {
  background: var(--light);
  border-bottom: 1px solid var(--border);
  margin: 0;
  padding: 0.75rem 0;
  font-size: 0.9rem;
}
.breadcrumb--strip .breadcrumb__inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 var(--content-pad);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: nowrap;
  overflow: hidden;
}
.breadcrumb--strip .breadcrumb__current {
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

/* ---- Post-grid (Jakob: standaard 2-col desktop / 1-col mobile) ---- */
.post-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}
@media (min-width: 768px) {
  .post-grid { grid-template-columns: 1fr 1fr; gap: 1.5rem; }
}
.post-grid--compact { gap: 1rem; }

/* ---- Post-card (Fitts: hele card = één <a>) ---- */
.post-card {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 1.5rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  text-decoration: none;
  color: var(--text);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  box-shadow: 0 2px 8px rgba(27,46,75,0.06);
  position: relative;
  overflow: hidden;
}
.post-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--border);
  transition: background 0.2s;
}
.post-card:hover::before { background: var(--orange); }
@media (min-width: 768px) {
  .post-card { min-height: 240px; padding: 1.75rem; }
}
.post-card:hover,
.post-card:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(27, 46, 75, 0.08);
  border-color: var(--blue);
  outline: none;
}
.post-card__header {
  margin-bottom: 0.75rem;
}
.post-card__body { flex: 1; }
.post-card__title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--navy);
  margin: 0 0 0.5rem;    /* Proximity: 8px gap */
  line-height: 1.25;
}
.post-card__excerpt {
  color: var(--muted);
  line-height: 1.55;
  margin: 0;
}
.post-card__footer {
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--muted);
}
.post-card__footer .sep { margin: 0 0.4rem; }

/* ---- Tag-pill ---- */
.tag-pill {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: rgba(232, 101, 10, 0.1);
  color: var(--orange);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-radius: 999px;
}
.tag-pill--inverse {
  background: rgba(255,255,255,0.15);
  color: #fff;
}

/* ---- Post-header (gradient, zero-design alternatief voor hero-foto) ---- */
.post-header--gradient {
  background:
    radial-gradient(circle at 20% 30%, rgba(232,101,10,0.18), transparent 45%),
    linear-gradient(135deg, var(--navy) 0%, var(--blue) 100%);
  color: var(--white);
  padding: 3.5rem 1.5rem 3rem;
  margin: 0 auto;
  max-width: 100%;
}
.post-header--gradient h1 {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: clamp(2rem, 5vw, 3.25rem);
  line-height: 1.15;
  margin: 0.75rem auto 1rem;
  max-width: 900px;
  color: #fff;
}
.post-header--gradient .tag-pill {
  margin-left: auto;
  margin-right: auto;
  display: inline-block;
}
.post-header--gradient .post-meta {
  max-width: 900px;
  margin: 0 auto;
  color: rgba(255,255,255,0.85);
  font-size: 0.9rem;
}
.post-header--gradient .post-meta a { color: #fff; }

/* Post-meta (Miller: 3 chunks, Proximity: tight) */
.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin: 0.75rem 0;
  color: var(--muted);
  font-size: 0.9rem;
}
.post-meta .sep { color: var(--border); }
.post-meta .byline { margin-left: auto; }
.post-meta .updated { font-style: italic; }

/* ---- TL;DR ---- */
.tldr {
  background: var(--light);
  border-left: 4px solid var(--orange);
  padding: 1rem 1.25rem;
  margin: 2rem 0;
  border-radius: 4px;
  color: var(--text);
  line-height: 1.6;
}
.tldr strong { color: var(--orange); }

/* ---- Post-body typografie ---- */
.post-body {
  font-size: 1.1rem;
  line-height: 1.75;
  color: var(--text);
}
.post-body h2,
.post-body h3,
.post-body h4 {
  font-family: 'Barlow Condensed', sans-serif;
  color: var(--navy);
  line-height: 1.2;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}
.post-body h2 { font-size: 1.8rem; }
.post-body h3 { font-size: 1.35rem; }
.post-body h4 { font-size: 1.15rem; }
.post-body p,
.post-body ul,
.post-body ol,
.post-body blockquote { margin: 0 0 1.25rem; }
.post-body ul, .post-body ol { padding-left: 1.5rem; }
.post-body li { margin-bottom: 0.4rem; }
.post-body a { color: var(--blue); }
.post-body a:hover { text-decoration: underline; }
.post-body code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  background: var(--light);
  padding: 0.1em 0.35em;
  border-radius: 3px;
  font-size: 0.92em;
}
.post-body pre {
  background: var(--navy);
  color: #f4f7fb;
  padding: 1rem;
  border-radius: 8px;
  overflow-x: auto;
  font-size: 0.9rem;
  line-height: 1.5;
}
.post-body pre code { background: transparent; padding: 0; color: inherit; }
.post-body blockquote {
  border-left: 4px solid var(--blue);
  padding: 0.5rem 1rem;
  color: var(--muted);
  font-style: italic;
}
.post-body img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 1.5rem 0;
}
.post-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
}
.post-body th,
.post-body td {
  padding: 0.5rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.post-body th { color: var(--navy); font-weight: 600; }

/* Heading-anchors (GEO: AI kan deep-linken) */
.post-body .heading-anchor {
  color: var(--border);
  text-decoration: none;
  margin-right: 0.4rem;
  opacity: 0;
  transition: opacity 0.15s;
}
.post-body h2:hover .heading-anchor,
.post-body h3:hover .heading-anchor,
.post-body h4:hover .heading-anchor { opacity: 1; }

/* ---- FAQ ---- */
.faq {
  margin: 3rem 0;
  padding: 1.5rem;
  background: var(--light);
  border-radius: 12px;
}
.faq h2 {
  font-family: 'Barlow Condensed', sans-serif;
  color: var(--navy);
  margin: 0 0 1rem;
}
.faq dt {
  font-weight: 600;
  color: var(--navy);
  margin-top: 1rem;
}
.faq dd {
  margin: 0.25rem 0 1rem;
  color: var(--text);
  line-height: 1.6;
}

/* ---- Sources ---- */
.sources {
  margin: 2.5rem 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.95rem;
}
.sources h2 {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.2rem;
  color: var(--navy);
  margin: 0 0 0.75rem;
}
.sources ol { padding-left: 1.5rem; color: var(--muted); }
.sources a { color: var(--blue); }

/* ---- Related + CTA ---- */
.post-footer {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}
.related h2 {
  font-family: 'Barlow Condensed', sans-serif;
  color: var(--navy);
  margin: 0 0 1.25rem;
}
/* ---- Pagination (Fitts: min 56px tap-targets) ---- */
.pagination {
  display: flex;
  gap: 1rem;
  justify-content: center;
  align-items: center;
  margin: 2rem 0 0;
  flex-wrap: wrap;
}
.pagination .btn {
  min-height: 56px;
  min-width: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 1.5rem;
  color: var(--navy);
  border-color: var(--border);
}
.pagination .btn:hover {
  border-color: var(--blue);
  background: var(--white);
}
.pagination__status {
  color: var(--muted);
  font-size: 0.95rem;
}

/* ---- Blog-index responsive ---- */
@media (min-width: 1024px) {
  .blog-hero--gradient { padding: 3.5rem 2rem 3rem; }
  .blog-content { padding: 3rem 2rem; }
  .blog-cta { padding: 4rem 2rem; }
}

