/*
 * BEF CRM tanıtım sitesi — blog sayfaları ve yazı kartları (W5; görsel yenileme 30.10.2026). İçerik bloklarının (prose: SSS,
 * video, alıntı, kod, adımlar, yazı içi çağrı, tablo) stilleri site.css §12b'de; burada liste, arşiv, yazı sayfası ve
 * .pcard (kaynaklar sayfası da yükler). Ton: kategorinin data-tint'i (blog/_looks.php) → --t-50 … --t-700 (site.css §33).
 * Görünümler: crm-api/app/Views/web/blog/*.php, partials/post_card.php.
 */

/* ============================================================ Sayfa yıkaması, liste / arşiv başlığı */
body.page-blog { background: linear-gradient(180deg, #fef5f5 0, rgba(255, 255, 255, 0) 620px) no-repeat, #fff; }
body.page-post { background: #fff; }

.blog-head { padding-block: clamp(16px, 3vw, 40px) clamp(20px, 2.6vw, 32px); }
.blog-head .crumbs { margin-bottom: 6px; }
.blog-head__in { gap: 16px; }
.blog-head__ic {
  display: grid; place-items: center; width: 54px; height: 54px; border-radius: 17px;
  background: var(--t-500); color: #fff; box-shadow: 0 14px 28px -14px color-mix(in srgb, var(--t-700) 80%, transparent);
}
.blog-head__ic .ic { width: 24px; height: 24px; }
.blog-head__title { font-size: clamp(2.3rem, 1.4rem + 2.8vw, 3.9rem); }
.blog-head__page { font-family: var(--f-sans); font-size: var(--fs-sm); font-weight: 600; letter-spacing: 0; color: var(--ink-3); vertical-align: middle; white-space: nowrap; }
.blog-head__meta { display: flex; flex-wrap: wrap; gap: 8px; }
.blog-head__meta > span { display: inline-flex; align-items: center; height: 30px; padding: 0 12px; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-size: var(--fs-xs); font-weight: 650; color: var(--ink-2); }
.blog-head__kind { background: var(--t-100) !important; border-color: transparent !important; color: var(--t-700) !important; }
.blog-head__bar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px;
  margin-top: clamp(24px, 3vw, 36px); padding: 10px; border-radius: 26px; background: #fff; border: 1px solid var(--line);
  box-shadow: var(--sh-card, 0 12px 28px -18px rgba(15, 15, 18, .22));
}
.blog-head__rss { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px; border-radius: 999px; font-size: var(--fs-sm); font-weight: 600; color: var(--ink-2); text-decoration: none; transition: background-color .2s, color .2s; }
.blog-head__rss .ic { width: 15px; height: 15px; color: #ee802f; }
.blog-head__rss:hover { background: var(--bg-2); color: var(--ink); }

.blog-cats__list { --cluster: 6px; list-style: none; margin: 0; padding: 0; }
.blog-cats__tag { gap: 8px; height: 36px; padding: 0 14px; border-color: transparent; background: var(--bg-2); font-weight: 600; }
a.blog-cats__tag:hover { background: var(--t-50); border-color: var(--t-200); color: var(--ink); }
.blog-cats__tag.is-active { background: var(--ink); border-color: var(--ink); color: #fff; }
li[data-tint] > .blog-cats__tag.is-active { background: var(--t-500); border-color: var(--t-500); }
.blog-cats__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--t-500); flex: none; }
.blog-cats__tag.is-active .blog-cats__dot { background: #fff; }
.blog-cats__n { font-size: var(--fs-xs); font-variant-numeric: tabular-nums; color: var(--ink-4); }
.blog-cats__tag.is-active .blog-cats__n { color: rgba(255, 255, 255, .75); }

/* ============================================================ Yazı kartı (kapak: görsel ya da kategori tonunda tipografik kapak) */
.pcard { gap: 16px; }
.pcard__media { position: relative; border-radius: 20px; border-color: color-mix(in srgb, var(--t-200) 70%, var(--line)); box-shadow: 0 1px 2px rgba(15, 15, 18, .04); transition: box-shadow .4s var(--ease), transform .4s var(--ease); }
.pcard:hover .pcard__media { transform: translateY(-3px); box-shadow: 0 26px 48px -28px color-mix(in srgb, var(--t-700) 55%, transparent); }
.pcard__ph {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; gap: 10px;
  padding: clamp(16px, 2vw, 22px); color: var(--t-ink);
  background-color: var(--t-50);
  background-image: radial-gradient(color-mix(in srgb, var(--t-500) 18%, transparent) 1.1px, transparent 1.4px);
  background-size: 18px 18px; background-position: 9px 9px;
}
.pcard__ph-ic {
  display: grid; place-items: center; width: 56px; height: 56px; border-radius: 17px;
  background: var(--t-500); color: #fff; box-shadow: 0 16px 30px -16px color-mix(in srgb, var(--t-700) 85%, transparent);
  transition: transform .5s var(--ease);
}
.pcard__ph-ic .ic { width: 26px; height: 26px; }
.pcard:hover .pcard__ph-ic { transform: rotate(-6deg) scale(1.06); }
.pcard__ph-cat { padding: 4px 11px; border-radius: 999px; background: #fff; color: var(--t-700); font-size: var(--fs-xs); font-weight: 700; box-shadow: 0 1px 2px rgba(15, 15, 18, .06); }
.pcard__ph-lines { position: absolute; right: clamp(16px, 2vw, 22px); bottom: clamp(16px, 2vw, 22px); display: grid; gap: 6px; width: 38%; }
.pcard__ph-lines i { display: block; height: 7px; border-radius: 4px; background: color-mix(in srgb, var(--t-500) 22%, #fff); }
.pcard__ph-lines i:nth-child(2) { width: 82%; }
.pcard__ph-lines i:nth-child(3) { width: 58%; background: color-mix(in srgb, var(--t-500) 40%, #fff); }
.pcard__ph .ic { stroke-width: 1.9; }
.pcard__body { --stack: 8px; }
.pcard__cat { display: inline-flex; align-items: center; gap: 7px; color: var(--t-700); }
.pcard__cat::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--t-500); }
.pcard--ph .pcard__cat { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.pcard__title { font-family: var(--f-sans); font-size: 1.25rem; font-weight: 650; letter-spacing: -.018em; line-height: 1.28; }
.pcard:hover .pcard__title a { text-decoration: none; color: var(--t-700); }
.pcard__meta { gap: 6px 14px; }
.pcard__meta > span { display: inline-flex; align-items: center; gap: 5px; }
.pcard__meta .ic { width: 13px; height: 13px; }
.pcard__meta .pcard__by { gap: 7px; font-weight: 600; color: var(--ink-2); }
.pcard__by img { width: 20px; height: 20px; border-radius: 50%; flex: none; }
.pcard__meta .pcard__by + time::before { content: "·"; margin-right: 9px; color: var(--ink-4); }
.pcard__meta time + span::before { content: "·"; margin-right: 9px; color: var(--ink-4); }

/* Öne çıkan (büyük, yatay) */
.blog-featured .pcard--lg { padding: clamp(14px, 1.8vw, 20px); border-radius: clamp(22px, 2.6vw, 30px); background: #fff; border: 1px solid var(--line); box-shadow: var(--sh-card, 0 12px 28px -18px rgba(15, 15, 18, .22)); }
.pcard--lg .pcard__media { aspect-ratio: 16 / 10; border-radius: clamp(16px, 2vw, 22px); }
.pcard--lg .pcard__ph-ic { width: clamp(64px, 6vw, 84px); height: clamp(64px, 6vw, 84px); border-radius: 24px; }
.pcard--lg .pcard__ph-ic .ic { width: 36px; height: 36px; }
.pcard--lg .pcard__body { --stack: 12px; padding: clamp(4px, 1.4vw, 16px); }
.pcard--lg .pcard__title { font-family: var(--f-display); font-size: clamp(1.7rem, 1.25rem + 1.6vw, 2.6rem); font-weight: 600; line-height: 1.1; letter-spacing: -.025em; }
.pcard--lg .pcard__excerpt { -webkit-line-clamp: 4; font-size: var(--fs-lead); line-height: 1.55; color: var(--ink-2); max-width: 60ch; }
@media (min-width: 960px) { .pcard--lg { grid-template-columns: 1.1fr 1fr; gap: clamp(24px, 3vw, 48px); } }

.blog-all__h { margin-bottom: clamp(20px, 2.4vw, 30px); }
.blog-grid { --grid-gap: clamp(28px, 3vw, 44px) clamp(20px, 2.4vw, 32px); }

.blog-empty { display: flex; flex-direction: column; gap: 10px; max-width: 620px; padding: clamp(22px, 3vw, 32px); border-radius: 22px; border: 1px dashed var(--line-2); background: var(--bg-2); }

/* Sayfalama */
.pager { gap: 6px; }
.pager > a, .pager > span { min-width: 44px; height: 44px; border-radius: 999px; }
.pager a:hover { border-color: var(--ink); background: #fff; }
.pager .pager__dir { padding: 0 16px; }

/* ============================================================ Yazı sayfası */
.post-progress { position: fixed; z-index: 70; left: 0; right: 0; top: 0; height: 3px; pointer-events: none; }
.post-progress i { display: block; height: 100%; width: 100%; transform-origin: 0 50%; transform: scaleX(var(--p, 0)); background: var(--t-500, var(--accent)); border-radius: 0 3px 3px 0; }

.post { padding-block: clamp(16px, 3vw, 40px) clamp(40px, 5vw, 72px); }
.post-grid { display: grid; grid-template-columns: minmax(0, 1fr); max-width: calc(740px + var(--gutter) * 2); }

.post-head { display: flex; flex-direction: column; gap: 18px; padding-bottom: clamp(24px, 3vw, 36px); margin-bottom: clamp(24px, 3vw, 36px); border-bottom: 1px solid var(--line); }
.post-head__crumbs { margin-bottom: 4px; }
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: var(--fs-sm); color: var(--ink-3); }
.post-meta > * { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 999px; background: var(--bg-2); }
.post-meta .ic { width: 14px; height: 14px; }
.post-meta__cat { font-weight: 650; color: var(--t-700); background: var(--t-100) !important; text-decoration: none; }
.post-meta__cat i { width: 7px; height: 7px; border-radius: 50%; background: var(--t-500); }
.post-meta__cat:hover { color: var(--t-ink); background: var(--t-200) !important; }
.post-title { font-size: clamp(2.1rem, 1.4rem + 2.8vw, 3.5rem); line-height: 1.06; }
.post-lead { max-width: none; }
.post-byline { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; font-size: var(--fs-sm); color: var(--ink-3); }
.post-byline strong { color: var(--ink); font-weight: 600; }
.post-byline__who { display: inline-flex; align-items: center; gap: 10px; }
.post-byline__av { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--t-500); color: #fff; font-size: .8125rem; font-weight: 700; }

.post-cover { margin: 0 0 clamp(28px, 3.4vw, 44px); }
.post-cover img { width: 100%; border-radius: clamp(18px, 2.2vw, 26px); border: 1px solid var(--line); box-shadow: var(--sh-card, 0 12px 28px -18px rgba(15, 15, 18, .22)); }

.post-main { min-width: 0; }
.post-prose { max-width: none; }
.post-prose a { color: var(--t-700); }
.post-prose a:hover { color: var(--t-500); }
.post-prose blockquote { border-left: 3px solid var(--t-500); }

/* İçindekiler */
.toc__list { list-style: none; margin: 0; padding: 0; }
.toc__item a { display: block; padding: 6px 10px 6px 14px; border-left: 2px solid var(--line); color: var(--ink-3); text-decoration: none; font-size: var(--fs-sm); line-height: 1.4; transition: color .2s, border-color .2s, background-color .2s; }
.toc__item--sub a { padding-left: 28px; }
.toc__item a:hover { color: var(--ink); border-left-color: var(--ink-4); }
.toc__item a[aria-current] { color: var(--t-ink); font-weight: 600; border-left-color: var(--t-500); background: var(--t-50); border-radius: 0 10px 10px 0; }
.toc__h { font-size: var(--fs-xs); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ink); }

.toc--side { display: none; }
.toc--inline { margin-bottom: 32px; padding: 0 16px; border-radius: 18px; border: 1px solid var(--line); background: var(--bg-2); }
.toc--inline > summary { display: flex; align-items: center; gap: 12px; padding: 14px 0; list-style: none; cursor: pointer; }
.toc--inline > summary::-webkit-details-marker { display: none; }
.toc--inline > summary::after {
  content: ""; margin-left: auto; width: 10px; height: 10px; border-right: 1.5px solid var(--ink-3); border-bottom: 1.5px solid var(--ink-3);
  transform: translateY(-3px) rotate(45deg); transition: transform .25s var(--ease);
}
.toc--inline[open] > summary::after { transform: translateY(2px) rotate(-135deg); }
.toc__n { font-size: var(--fs-xs); font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--ink-3); }
.toc--inline nav { padding-bottom: 14px; }

@media (min-width: 1100px) {
  .post-grid--toc {
    max-width: calc(var(--maxw) + var(--gutter) * 2);
    grid-template-columns: 240px minmax(0, 740px); column-gap: clamp(48px, 5vw, 96px); justify-content: center;
  }
  .post-grid--toc .post-head, .post-grid--toc .post-main, .post-grid--toc .post-cover { grid-column: 2; }
  .post-grid--toc .toc--side {
    display: block; grid-column: 1; grid-row: 2 / span 2; align-self: start;
    position: sticky; top: calc(var(--hdr) + var(--ann) + 28px);
    max-height: calc(100vh - var(--hdr) - var(--ann) - 56px); overflow-y: auto; padding: 16px 14px 14px; border-radius: 20px; background: var(--bg-2);
  }
  .post-grid--toc .toc--side .toc__h { margin-bottom: 12px; padding-left: 4px; }
  .post-grid--toc .toc--inline { display: none; }
}

/* Etiketler, paylaş */
.post-foot { display: grid; gap: 18px; margin-top: clamp(40px, 5vw, 64px); padding: clamp(18px, 2.4vw, 24px); border-radius: 22px; background: var(--bg-2); }
.post-foot__row { display: grid; gap: 10px; }
@media (min-width: 640px) { .post-foot__row { grid-template-columns: 96px minmax(0, 1fr); align-items: start; } }
.post-foot__h { padding-top: 8px; font-size: var(--fs-xs); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); }
.post-tags, .share { --cluster: 8px; list-style: none; margin: 0; padding: 0; }
.post-tags .tag { background: #fff; }
.share__link, .share__copy { gap: 7px; height: 36px; padding: 0 14px; background: #fff; font-weight: 600; }
.share__link .ic, .share__copy .ic { width: 15px; height: 15px; }
.share__copy { font: inherit; font-size: var(--fs-sm); cursor: pointer; }
.share__copy:hover { border-color: var(--ink); color: var(--ink); }

/* İlgili yazılar, kapanış */
.post-related { background: var(--bg-2); border-top: 1px solid var(--line); }
.post-related__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 12px 24px; margin-bottom: clamp(24px, 3vw, 36px); }
.post-related .pcard__media { background: #fff; }
.post-cta { padding-top: clamp(32px, 4vw, 56px); }

@media print {
  .toc, .post-foot .share, .post-related, .post-cta, .blog-head__bar, .post-progress { display: none !important; }
  .post-grid--toc { display: block; }
}
