/* Blog yazısı sayfası (blog-yazi.php) ve panel önizlemesi (post.html).
   styles.css'ten sonra yüklenir; sadece yazı sayfasını etkiler. */

/* ---------- Üst bölüm: başlık + kapak ---------- */
.article-hero { padding: 40px 0 0; text-align: left; border-top: none; }
.article-hero .wrap { max-width: 1180px; }
.article-crumbs { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 0.85rem; color: var(--text-soft); margin: 0 0 22px; }
.article-crumbs a { color: var(--text-soft); font-weight: 600; }
.article-crumbs a:hover { color: var(--orange); }
.article-crumbs span[aria-hidden] { opacity: 0.5; }
.article-meta { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; font-size: 0.85rem; font-weight: 600; color: var(--text-soft); text-transform: uppercase; letter-spacing: 0.04em; }
.article-meta .article-tag { color: #12161A; background: var(--orange); padding: 5px 12px; border-radius: 999px; letter-spacing: 0.08em; }
.article-hero h1 { margin: 16px 0 0; font-size: clamp(2rem, 4.2vw, 3.4rem); line-height: 1.08; letter-spacing: -0.02em; max-width: 920px; }
.article-lede { margin: 18px 0 0; font-size: 1.15rem; line-height: 1.6; color: var(--text-soft); max-width: 760px; }
.article-cover { display: block; width: 100%; height: auto; aspect-ratio: 1200 / 630; object-fit: cover; margin: 36px 0 0; border-radius: 18px; border: 1px solid var(--line-strong); background: var(--surface-2); box-shadow: 0 24px 60px rgba(0,0,0,0.35); }

/* ---------- Gövde: yazı + yan panel ---------- */
.article-body { padding: 56px 0 96px; text-align: left; border-top: none; }
.article-body .wrap { max-width: 1180px; }
.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 64px; align-items: start; }
.article-main { min-width: 0; max-width: 760px; }
.article-aside { position: sticky; top: 104px; display: flex; flex-direction: column; gap: 20px; }

.aside-card { background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-card); padding: 22px; }
.aside-card h2 { font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-soft); margin: 0 0 14px; font-family: var(--font-body); font-weight: 700; }
.toc { list-style: none; margin: 0; padding: 0; counter-reset: toc; }
.toc li { counter-increment: toc; }
.toc a { display: grid; grid-template-columns: 26px 1fr; gap: 6px; padding: 8px 10px; margin: 0 -10px; border-radius: 8px; color: var(--text); font-size: 0.92rem; line-height: 1.4; font-weight: 500; }
.toc a::before { content: counter(toc, decimal-leading-zero); color: var(--orange); font-weight: 700; font-size: 0.8rem; padding-top: 2px; }
.toc a:hover, .toc a.is-active { background: var(--surface-2); color: var(--orange); }

.share-row { display: flex; gap: 10px; flex-wrap: wrap; }
.share-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 14px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line-strong); color: var(--text); font: 600 0.85rem var(--font-body); cursor: pointer; }
.share-btn:hover { border-color: var(--orange); color: var(--orange); }
.share-btn svg { width: 18px; height: 18px; flex-shrink: 0; }

.cta-card { background: radial-gradient(ellipse 260px 180px at 100% 0%, rgba(255,163,0,0.22), transparent 70%), var(--surface); border-color: rgba(255,163,0,0.35); }
.cta-card .cta-title { font-family: var(--font-display); font-weight: 800; font-size: 1.25rem; line-height: 1.2; margin: 0 0 8px; color: var(--text); }
.cta-card p { margin: 0 0 16px; color: var(--text-soft); font-size: 0.92rem; line-height: 1.55; }
.cta-card .btn { width: 100%; justify-content: center; text-align: center; }
.cta-card .btn + .btn { margin-top: 10px; }
.cta-card .btn-ghost { display: inline-flex; align-items: center; padding: 12px 18px; border-radius: var(--radius); border: 1px solid var(--line-strong); color: var(--text); font-weight: 600; }
.cta-card .btn-ghost:hover { border-color: var(--orange); color: var(--orange); }

/* ---------- Yazı içeriği ---------- */
.post-content { font-size: 1.08rem; }
.post-content > *:first-child { margin-top: 0; }
body:not(.admin-body) .post-content p,
body:not(.admin-body) .post-content li { color: #C9D1D8; }
.post-content p { line-height: 1.8; font-size: 1.08rem; margin: 0 0 1.2em; }
.post-content a { color: var(--orange); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.post-content a:hover { color: #FFC24D; }
.post-content strong { color: var(--text); }
.post-content h2 { font-size: clamp(1.5rem, 2.4vw, 1.95rem); line-height: 1.2; margin: 2.2em 0 0.7em; padding-top: 0.2em; scroll-margin-top: 110px; letter-spacing: -0.01em; }
.post-content h2::before { content: ""; display: block; width: 44px; height: 4px; border-radius: 2px; background: var(--orange); margin-bottom: 16px; }
.post-content h3 { font-size: 1.22rem; margin: 1.7em 0 0.5em; scroll-margin-top: 110px; color: var(--text); }
.post-content ul, .post-content ol { margin: 0 0 1.4em; padding: 0; list-style: none; }
.post-content li { position: relative; line-height: 1.7; margin: 0 0 0.7em; padding-left: 30px; }
.post-content ul > li::before { content: ""; position: absolute; left: 6px; top: 0.72em; width: 8px; height: 8px; border-radius: 2px; background: var(--orange); transform: rotate(45deg); }
.post-content ol { counter-reset: li; }
.post-content ol > li { counter-increment: li; }
.post-content ol > li::before { content: counter(li); position: absolute; left: 0; top: 0.15em; width: 22px; height: 22px; border-radius: 50%; background: rgba(255,163,0,0.15); color: var(--orange); font-size: 0.78rem; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.post-content blockquote { margin: 1.6em 0; padding: 20px 24px; border-left: 4px solid var(--orange); border-radius: 0 12px 12px 0; background: var(--surface); font-size: 1.1rem; font-style: italic; }
.post-content blockquote p:last-child { margin-bottom: 0; }

/* Tablo: geniş ekranda tam genişlik, dar ekranda yana kaydırılır. */
.post-content table { display: block; width: 100%; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; border-collapse: separate; border-spacing: 0; margin: 1.6em 0 2em; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--surface); font-size: 0.98rem; }
.post-content table tbody, .post-content table thead { display: table; width: 100%; border-collapse: collapse; }
.post-content th, .post-content td { padding: 14px 18px; text-align: left; vertical-align: top; line-height: 1.5; border-bottom: 1px solid var(--line); min-width: 180px; }
.post-content tr:last-child td { border-bottom: none; }
.post-content th { background: var(--surface-2); color: var(--orange); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700; }
.post-content td:first-child { color: var(--text); font-weight: 600; }
body:not(.admin-body) .post-content td { color: #C9D1D8; }
.post-content tr:nth-child(even) td { background: rgba(255,255,255,0.02); }

/* ---------- İlgili yazılar ---------- */
.article-related { margin-top: 72px; padding-top: 40px; border-top: 1px solid var(--line); }
.article-related h2 { font-size: 1.6rem; margin: 0 0 24px; }
.article-related .blog-grid { margin-top: 0; text-align: left; }

/* ---------- Dar ekranlar ---------- */
@media (max-width: 1024px) {
  .article-layout { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .article-main { max-width: none; }
  .article-aside { position: static; order: -1; }
  .article-aside .cta-card { display: none; }
  .article-main .article-end-cards .cta-card { display: block; }
}
@media (max-width: 640px) {
  .article-hero { padding-top: 24px; }
  .article-cover { margin-top: 24px; border-radius: 12px; }
  .article-body { padding: 32px 0 64px; }
  .post-content, .post-content p { font-size: 1.02rem; }
  .post-content th, .post-content td { padding: 12px 14px; min-width: 150px; }
}
/* Yazının sonundaki kartlar: paylaş her zaman; Haydar Game Zone kartı sadece
   dar ekranda (geniş ekranda yan panelde duruyor). */
.article-end-cards { display: grid; gap: 20px; margin-top: 48px; }
.article-end-cards .cta-card { display: none; }
