/*
 * /blog and /blog/{slug} — Direction A page styles (artboards Blog.dc.html, BlogYazi.dc.html).
 * Page-local p-blog-* classes only; shared s-* classes come from /assets/css/site.css and are
 * composed, never restyled. Views: resources/views/site/blog/{index,show,_card}.php.
 */

/* category label with the 8px square marker (cards, featured kicker) */
.p-blog-cat {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-weight: 500;
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--accent-text);
}
.p-blog-cat::before {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--accent);
}

/* Blog/BlogYazi artboards: the breadcrumb sits clamp(20px,3vw,44px) above the eyebrow (shared default is 24–48px) */
.p-blog-crumbs { margin-bottom: clamp(20px, 3vw, 44px); }

/* ------------------------------------------------------------ index hero */
.p-blog-hero { padding-block: clamp(8px, 1.4vw, 20px) clamp(64px, 6vw, 96px); }
.p-blog-hero__title { max-width: 17em; }
.p-blog-hero__facts {
  margin: 16px 0 0;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
}

/* -------------------------------------------------------- featured post */
.p-blog-featured {
  margin-top: clamp(40px, 4.4vw, 64px);
  display: flex;
  flex-wrap: wrap;
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--line);
}
.p-blog-featured__main {
  flex: 3 1 520px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: clamp(24px, 3.4vw, 56px);
  background: var(--surface);
}
.p-blog-featured__kicker {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  font-family: var(--mono);
  font-weight: 500;
  font-size: 13px;
  line-height: 1.4;
  color: var(--accent-text);
}
.p-blog-featured__kicker .p-blog-cat { display: inline-flex; font-size: inherit; }
.p-blog-featured__title { font-size: clamp(30px, 4.4vw, 64px); }
.p-blog-featured__link { text-decoration: none; }
.p-blog-featured__excerpt {
  margin: 0;
  max-width: 34em;
  font-size: var(--fs-lede);
  line-height: 1.6;
  color: var(--muted);
  text-wrap: pretty;
}
.p-blog-featured__foot {
  margin-top: auto;
  padding-top: clamp(8px, 1.6vw, 24px);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
}
.p-blog-featured__meta {
  margin: 0;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--muted);
}
.p-blog-featured__aside {
  flex: 2 1 340px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 32px;
  padding: clamp(24px, 3.4vw, 56px);
  background: var(--raised);
}
.p-blog-featured__label {
  margin: 0;
  font-family: var(--mono);
  font-weight: 500;
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--muted);
}
.p-blog-featured__terms { border-bottom: 1px solid var(--line-strong); }
.p-blog-featured__term {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding-block: clamp(14px, 1.4vw, 20px);
  border-top: 1px solid var(--line-strong);
}
.p-blog-featured__num {
  flex: none;
  min-width: 2ch;
  font-family: var(--mono);
  font-weight: 500;
  font-size: 13px;
  line-height: 1;
  color: var(--accent-text);
}
.p-blog-featured__term-text {
  min-width: 0;
  font-family: var(--display);
  font-weight: 700;
  font-stretch: 118%;
  font-size: var(--fs-h3);
  line-height: 1.15;
  letter-spacing: -0.015em;
  overflow-wrap: anywhere;
}

/* ------------------------------------------------------------ all posts */
.p-blog-list__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px 48px;
}
.p-blog-list__title { flex: 1 1 400px; min-width: 0; }
.p-blog-search { flex: 0 1 400px; min-width: 0; }
.p-blog-list__filters {
  margin-top: clamp(24px, 2.4vw, 32px);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
}
.p-blog-grid { --s-min: 520px; margin-top: clamp(24px, 3vw, 40px); }
.p-blog-none { margin-top: clamp(24px, 3vw, 40px); }
.p-blog-empty {
  margin-top: clamp(24px, 3vw, 40px);
  padding: clamp(20px, 2.2vw, 32px);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-lg);
}
.p-blog-empty p { margin: 0; font-size: 16px; line-height: 1.6; color: var(--muted); }

/* post card (index grid; --sm = "Devamı") */
.p-blog-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: clamp(20px, 2.2vw, 32px);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--bg);
}
.p-blog-card--sm { padding: clamp(20px, 1.8vw, 28px); border-radius: var(--r-md); }
.p-blog-card__title { margin-top: 8px; }
.p-blog-card__link { display: block; min-height: 44px; text-decoration: none; }
.p-blog-card__excerpt { max-width: 40em; text-wrap: pretty; }
.p-blog-card--sm .p-blog-card__excerpt { max-width: none; }
.p-blog-card__meta {
  margin: auto 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--muted);
}
.p-blog-card__meta .s-icon { color: var(--accent-text); }

/* ------------------------------------------------------------- article */
.p-blog-post { padding-top: clamp(8px, 1.4vw, 20px); }
.p-blog-post__title { max-width: 14em; }
.p-blog-post__dek { max-width: 38em; }
.p-blog-post__meta {
  margin: clamp(16px, 1.6vw, 24px) 0 0;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
}
/* body left, "Bu yazıda" right; wrap-reverse puts the aside above the body when they no longer fit */
.p-blog-post__layout {
  margin-top: clamp(40px, 4.4vw, 64px);
  padding-block: clamp(40px, 4.4vw, 64px) clamp(64px, 6vw, 96px);
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap-reverse;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px clamp(48px, 6vw, 96px);
}
.p-blog-post__main { flex: 1 1 560px; min-width: 0; max-width: 68ch; font-size: 18px; }
.p-blog-post__main :is(h2, h3, li)[id] { scroll-margin-top: 24px; }
.p-blog-post__actions {
  margin-top: clamp(40px, 4vw, 56px);
  padding-top: 32px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.p-blog-toc {
  flex: 0 1 380px;
  min-width: 0;
  padding: clamp(24px, 2.4vw, 32px);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
}
.p-blog-toc__title { margin: 0; }
.p-blog-toc__summary { margin-top: 16px; }
.p-blog-toc__list { margin-top: 24px; font-size: 16px; font-weight: 600; line-height: 1.3; }

/* "Devamı" */
.p-blog-more__grid { margin-top: var(--head-gap); }

/* Topic hubs (category links) */
.p-blog-topics { margin-top: clamp(32px, 4vw, 48px); }
.p-blog-topics__list { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.p-blog-topics__list .s-chip { text-decoration: none; }
.p-blog-post__cat { color: inherit; text-decoration: none; }
.p-blog-post__cat:hover { text-decoration: underline; }

/* Article: quick answer, FAQ, sources, tags */
.p-blog-quick { margin: clamp(20px, 3vw, 32px) 0 0; padding: clamp(16px, 2.4vw, 24px); border: 1px solid var(--line-strong); border-left: 3px solid var(--accent); border-radius: var(--r-md, 12px); background: var(--surface, transparent); max-width: 72ch; }
.p-blog-quick__title { margin: 0 0 8px; }
.p-blog-quick__text { margin: 0; font-size: 1.05em; line-height: 1.6; color: var(--text); }
.p-blog-faq, .p-blog-sources { margin-top: clamp(32px, 4vw, 48px); max-width: 72ch; }
.p-blog-faq__q { margin: 24px 0 6px; }
.p-blog-faq__a { margin: 0; line-height: 1.65; color: var(--muted); }
.p-blog-sources__list { margin: 12px 0 0; padding-left: 1.25em; line-height: 1.6; }
.p-blog-sources__list li { margin: 6px 0; }
.p-blog-sources__list a { text-underline-offset: 3px; }
.p-blog-tags { list-style: none; margin: clamp(24px, 3vw, 36px) 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.p-blog-tags__item { padding: 4px 12px; border: 1px solid var(--line-strong); border-radius: var(--r-pill); font-size: 13px; color: var(--muted); }

/* Long-form articles: wide comparison tables and definition lists must never push the page sideways on a phone */
.p-blog-post .s-prose table { overflow-wrap: anywhere; }
.p-blog-post .s-prose dt { margin-top: 14px; font-weight: 600; color: var(--text); }
.p-blog-post .s-prose dd { margin: 4px 0 0; color: var(--muted); }
@media (max-width: 640px) {
  .p-blog-post .s-prose table { font-size: 14px; }
  .p-blog-post .s-prose th, .p-blog-post .s-prose td { padding: 8px 6px; }
}
