/* ===========================================================
   Tekil yazı — okunabilirlik (yalnızca is_singular('post'))
   inc/single-post-reading.php tarafından yüklenir.
   Yalnızca tema token'ları kullanılır → koyu tema / admin renkleri geçerli.
   =========================================================== */

/* ── Gövde tipografisi ─────────────────────────────────────── */
.article .article-body {
	font-size: 18px;
	line-height: 1.75;
	color: var(--c-fg);
	font-feature-settings: "kern", "liga";
	-webkit-font-smoothing: antialiased;
	overflow-wrap: break-word;
}
/* Metin blokları ideal satır uzunluğunda (~68 karakter); görseller sütunu doldurur */
.article .article-body > :where(p, h2, h3, h4, ul, ol, blockquote, .wp-block-quote, .wp-block-list, dl, pre, table) {
	max-width: 68ch;
}
.article .article-body p {
	font-size: inherit;
	line-height: inherit;
	margin: 0 0 1.3em;
	text-wrap: pretty;
	hyphens: auto;
	-webkit-hyphens: auto;
}
.article .article-body strong, .article .article-body b { font-weight: 700; color: var(--c-fg); }

/* Bağlantılar: renk + her zaman görünür alt çizgi (renk körlüğü için yalnız renge güvenme) */
.article .article-body a {
	color: var(--c-1);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
	text-decoration-color: color-mix(in srgb, var(--c-1) 45%, transparent);
	transition: text-decoration-color .15s ease;
}
.article .article-body a:hover { text-decoration-color: currentColor; text-decoration-thickness: 2px; }
.article .article-body a:focus-visible,
.post-toc a:focus-visible,
.post-related-item:focus-visible,
.popular-link:focus-visible {
	outline: 2px solid var(--c-1);
	outline-offset: 3px;
	border-radius: 3px;
}

/* ── Ara başlıklar ─────────────────────────────────────────── */
.article .article-body h2 {
	font-family: var(--t-display);
	font-weight: 750;
	font-size: clamp(22px, 2.4vw, 28px);
	line-height: 1.25;
	letter-spacing: -0.02em;
	margin: 1.9em 0 0.6em;
	text-wrap: balance;
	scroll-margin-top: calc(var(--header-h, 64px) + 24px);
}
.article .article-body h3 {
	font-family: var(--t-display);
	font-weight: 700;
	font-size: clamp(19px, 2vw, 22px);
	line-height: 1.3;
	letter-spacing: -0.015em;
	margin: 1.6em 0 0.5em;
	text-wrap: balance;
	scroll-margin-top: calc(var(--header-h, 64px) + 24px);
}
.article .article-body h2 + p,
.article .article-body h3 + p { margin-top: 0; }
/* Başlık hedefi (içindekilerden atlanınca) kısa süre vurgulanır */
.article .article-body :is(h2, h3):target { animation: se-target-flash 1.6s ease-out 1; }
@keyframes se-target-flash {
	0%   { background: var(--c-1-soft); box-shadow: 0 0 0 8px var(--c-1-soft); }
	100% { background: transparent; box-shadow: 0 0 0 8px transparent; }
}

/* ── Listeler ──────────────────────────────────────────────── */
.article .article-body :is(ul, ol) {
	margin: 0 0 1.4em;
	padding-left: 1.4em;
}
.article .article-body li { margin: 0 0 0.45em; padding-left: 0.2em; }
.article .article-body li::marker { color: var(--c-1); font-weight: 700; }
.article .article-body li > :is(ul, ol) { margin: 0.45em 0 0; }

/* ── Alıntı ────────────────────────────────────────────────── */
.article .article-body :is(blockquote, .wp-block-quote) {
	margin: 2em 0;
	padding: 20px 24px;
	background: var(--c-1-soft);
	border-left: 3px solid var(--c-1);
	border-radius: 0 var(--r-sm) var(--r-sm) 0;
	font-family: var(--t-display);
	font-weight: 600;
	font-size: 20px;
	line-height: 1.45;
	letter-spacing: -0.01em;
}
.article .article-body :is(blockquote, .wp-block-quote) p { margin: 0 0 0.5em; }
.article .article-body :is(blockquote, .wp-block-quote) p:last-of-type { margin-bottom: 0; }
.article .article-body :is(blockquote, .wp-block-quote) cite {
	display: block;
	margin-top: 12px;
	font-family: var(--t-body);
	font-style: normal;
	font-weight: 600;
	font-size: 14px;
	letter-spacing: 0;
	color: var(--c-fg-dim);
}
.article .article-body :is(blockquote, .wp-block-quote) cite::before { content: "— "; }

/* ── Görseller ve galeri ───────────────────────────────────── */
.article .article-body :is(figure, .wp-block-image) { margin: 2em 0; }
.article .article-body img { max-width: 100%; height: auto; border-radius: var(--r-sm); }
.article .article-body figcaption,
.article .article-body .wp-element-caption {
	margin-top: 8px;
	font-size: 13px;
	line-height: 1.5;
	color: var(--c-fg-dim);
	text-align: left;
}
.article .article-body .wp-block-gallery {
	gap: 8px;
	margin: 2em 0;
}
.article .article-body .wp-block-gallery .wp-block-image { margin: 0; }
.article .article-body .wp-block-gallery img { border-radius: var(--r-xs, 4px); }
.article .article-body img.se-zoomable { cursor: zoom-in; }

/* ── Tablo ─────────────────────────────────────────────────── */
.article .article-body table { width: 100%; border-collapse: collapse; font-size: 15px; margin: 0 0 1.5em; }
.article .article-body :is(th, td) { padding: 10px 12px; border-bottom: 1px solid var(--c-divider); text-align: left; vertical-align: top; }
.article .article-body th { font-weight: 700; background: var(--c-surface); }

/* ── Özet (lede) ve künye ──────────────────────────────────── */
.article .lede { text-wrap: pretty; }
.article .byline .when-updated { color: var(--c-fg-dim); }

/* ── İçindekiler ───────────────────────────────────────────── */
.post-toc {
	margin: 0 0 32px;
	max-width: 68ch;
	border: 1px solid var(--c-border);
	border-radius: var(--r-md);
	background: var(--c-surface);
}
.post-toc summary {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 14px 18px;
	cursor: pointer;
	font-family: var(--t-mono);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: var(--ls-wider, .08em);
	text-transform: uppercase;
	color: var(--c-fg-dim);
	list-style: none;
}
.post-toc summary::-webkit-details-marker { display: none; }
.post-toc summary::after {
	content: "";
	margin-left: auto;
	width: 8px; height: 8px;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(45deg);
	transition: transform .2s ease;
}
.post-toc details[open] summary::after { transform: rotate(-135deg); }
.post-toc-count {
	padding: 1px 7px;
	border-radius: var(--r-pill, 999px);
	background: var(--c-1-soft);
	color: var(--c-1);
}
.post-toc ol {
	margin: 0;
	padding: 0 18px 16px 40px;
	counter-reset: none;
}
.post-toc li { margin: 0 0 6px; font-size: 15px; line-height: 1.45; }
.post-toc li::marker { color: var(--c-fg-faint, var(--c-fg-dim)); font-weight: 600; }
.post-toc a { color: var(--c-fg); text-decoration: none; }
.post-toc a:hover { color: var(--c-1); text-decoration: underline; text-underline-offset: 3px; }
.post-toc a.is-active { color: var(--c-1); font-weight: 600; }

/* ── İlgili yazılar ────────────────────────────────────────── */
.post-related { margin: 40px 0 8px; }
.post-related-title {
	font-family: var(--t-display);
	font-weight: 700;
	font-size: 22px;
	letter-spacing: -0.02em;
	margin: 0 0 14px;
}
.post-related-list {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 16px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.post-related-item {
	display: flex;
	flex-direction: column;
	gap: 10px;
	color: var(--c-fg);
	text-decoration: none;
}
.post-related-img {
	display: block;
	width: 100%;
	aspect-ratio: 16 / 10;
	object-fit: cover;
	border-radius: var(--r-sm);
	background: var(--c-surface-2, var(--c-surface));
}
.post-related-text { display: flex; flex-direction: column; gap: 4px; }
.post-related-name {
	font-weight: 650;
	font-size: 15px;
	line-height: 1.35;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.post-related-item:hover .post-related-name { color: var(--c-1); }
.post-related-date { font-size: 12px; color: var(--c-fg-dim); }

/* ── En çok okunanlar (erişilebilir bağlantı) ──────────────── */
.popular-list .popular-link {
	display: flex;
	gap: 12px;
	align-items: flex-start;
	color: inherit;
	text-decoration: none;
}
.popular-list .popular-link .popular-title,
.popular-list .popular-link .popular-meta { display: block; }
.popular-list .popular-link:hover .popular-title { color: var(--c-1); }

/* ── Yazı içi görsel görüntüleyici (assets/js/single-post.js) ─ */
.se-lightbox {
	position: fixed;
	inset: 0;
	z-index: 9999;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(10, 10, 16, .92);
	padding: 48px 56px;
}
.se-lightbox[hidden] { display: none; }
.se-lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 4px; }
.se-lightbox button {
	position: absolute;
	width: 44px; height: 44px;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, .12);
	color: #fff;
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
}
.se-lightbox button:hover { background: rgba(255, 255, 255, .24); }
.se-lightbox button:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.se-lightbox .se-lb-close { top: 14px; right: 14px; }
.se-lightbox .se-lb-prev { left: 10px; top: 50%; transform: translateY(-50%); }
.se-lightbox .se-lb-next { right: 10px; top: 50%; transform: translateY(-50%); }
.se-lightbox .se-lb-count {
	position: absolute;
	bottom: 16px;
	left: 50%;
	transform: translateX(-50%);
	color: rgba(255, 255, 255, .8);
	font-family: var(--t-mono);
	font-size: 12px;
}
body.se-lb-open { overflow: hidden; }

/* ── Mobil ─────────────────────────────────────────────────── */
@media (max-width: 768px) {
	.article .article-body { font-size: 17px; line-height: 1.7; }
	.article .article-body h2 { margin-top: 1.6em; }
	.article .article-body :is(blockquote, .wp-block-quote) { font-size: 18px; padding: 16px 18px; margin: 1.6em 0; }
	.post-related-list { grid-template-columns: 1fr; gap: 12px; }
	.post-related-item { flex-direction: row; align-items: center; gap: 12px; }
	.post-related-img { width: 112px; flex: 0 0 112px; aspect-ratio: 4 / 3; }
	.se-lightbox { padding: 56px 8px; }
}

/* ── Hareket azaltma tercihi ───────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
	.article .article-body :is(h2, h3):target { animation: none; }
	.read-progress-bar { transition: none; }
	html { scroll-behavior: auto !important; }
}

/* ── Yazdırma ──────────────────────────────────────────────── */
@media print {
	.read-progress, .share-rail, .article-sidebar, .post-nav, .comments, .post-related, .post-toc, .crumbs { display: none !important; }
	.article-wrap { display: block; max-width: none; }
	.article .article-body { font-size: 12pt; line-height: 1.5; color: #000; }
	.article .article-body a { color: #000; text-decoration: underline; }
	.article .article-body a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 10pt; color: #444; }
}
