/* =========================================================================
   BLOG — blog.css
   Ana sitenin css/style.css dosyasının üstüne biner.
   İçindekiler:
     1. Blog başlığı (hero)
     2. Filtre + arama
     3. Yazı kartları (liste sayfası)
     4. Makale sayfası düzeni
     5. Makale tipografisi  ← blogun kalbi
     6. Bilgi kutuları, alıntı, kod, tablo
     7. İçindekiler (sağ sütun)
     8. Paylaşım, yazar kutusu, önceki/sonraki
     9. Duyarlı kırılımlar + yazdırma
   ========================================================================= */

/* ---------------------------------------------------------------
   1. BLOG HERO
   --------------------------------------------------------------- */
.blog-hero {
  position: relative;
  padding: clamp(90px, 11vw, 124px) 0 clamp(30px, 4vw, 46px);
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}
.blog-hero-bg { position: absolute; inset: 0; pointer-events: none; }
.blog-hero-bg .orb {
  position: absolute;
  top: -46%; left: 50%;
  transform: translateX(-50%);
  width: 84vw; max-width: 880px;
  aspect-ratio: 1;
  border-radius: 50%;
  filter: blur(110px);
  opacity: .34;
  background: radial-gradient(circle, var(--brand-1), transparent 66%);
  animation: none;
}
.blog-hero .container { position: relative; z-index: 1; }

.blog-hero h1 {
  font-size: clamp(2.1rem, 5.2vw, 3.4rem);
  letter-spacing: -.035em;
  margin-bottom: 18px;
}
.blog-hero .blog-giris {
  font-size: clamp(1rem, 1.3vw, 1.1rem);
  color: var(--text-soft);
  max-width: 62ch;
}

/* ---------------------------------------------------------------
   2. FİLTRE + ARAMA
   --------------------------------------------------------------- */
.blog-arac {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 34px;
}

.arama {
  position: relative;
  flex: 0 1 300px;
  min-width: 220px;
}
.arama input {
  width: 100%;
  padding: 11px 40px 11px 42px;
  border-radius: 99px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: .9rem;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.arama input:focus {
  outline: none;
  border-color: var(--brand-1);
  box-shadow: 0 0 0 3px var(--glow);
}
.arama .arama-ico {
  position: absolute;
  left: 15px; top: 50%;
  transform: translateY(-50%);
  width: 17px; height: 17px;
  fill: none; stroke: var(--text-dim);
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
  pointer-events: none;
}
.arama-temizle {
  position: absolute;
  right: 8px; top: 50%;
  transform: translateY(-50%);
  display: none;
  place-items: center;
  width: 26px; height: 26px;
  border: 0; border-radius: 50%;
  background: var(--surface-2);
  color: var(--text-dim);
  font-size: .9rem;
  cursor: pointer;
}
.arama.dolu .arama-temizle { display: grid; }

/* .blog-sonuc paylaşılan bileşen olarak css/style.css içinde. */

.bos-durum {
  padding: 60px 24px;
  text-align: center;
  border-radius: var(--radius-lg);
  border: 1px dashed var(--border-strong);
  color: var(--text-soft);
}
.bos-durum b { display: block; font-size: 1.1rem; margin-bottom: 8px; }

/* ---------------------------------------------------------------
   3. YAZI KARTLARI
   --------------------------------------------------------------- */
.yazilar {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr));
  gap: 20px;
}

.yazi-kart {
  display: flex;
  flex-direction: column;
  padding: 26px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  transition: transform var(--t), border-color var(--t), box-shadow var(--t);
}
.yazi-kart:hover {
  transform: translateY(-6px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow);
}
.yazi-kart.is-hidden { display: none; }

/* Öne çıkan yazı — ızgarada tam genişlik ve yatay düzen */
.yazi-kart.one-cikan {
  grid-column: 1 / -1;
  flex-direction: row;
  align-items: center;
  gap: clamp(24px, 4vw, 48px);
  padding: clamp(28px, 4vw, 44px);
  background: linear-gradient(120deg, var(--surface), var(--surface-2));
}
.yazi-kart.one-cikan .yazi-gorsel {
  flex: 0 0 clamp(180px, 26%, 260px);
  aspect-ratio: 4 / 3;
}
.yazi-kart.one-cikan h2 { font-size: clamp(1.35rem, 2.6vw, 1.95rem); }
.yazi-kart.one-cikan .yazi-ozet { font-size: 1rem; }

/* Kart görseli — CSS ile üretilen degrade + baş harf (dosya gerekmez) */
.yazi-gorsel {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--c1, #5B7CFA), var(--c2, #A855F7));
  margin-bottom: 20px;
  overflow: hidden;
  flex-shrink: 0;
}
.yazi-gorsel::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .13) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .13) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, #000, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, #000, transparent 75%);
}
.yazi-gorsel span {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  color: #fff;
}
.yazi-gorsel .ikon {
  width: clamp(38px, 6vw, 52px);
  height: clamp(38px, 6vw, 52px);
  stroke-width: 1.4;
  filter: drop-shadow(0 4px 14px rgba(0, 0, 0, .28));
}
.yazi-kart.one-cikan .yazi-gorsel { margin-bottom: 0; }

.yazi-govde { display: flex; flex-direction: column; flex: 1; min-width: 0; }

.yazi-ust {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-bottom: 13px;
}
.yazi-kategori {
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 99px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--ink);
  white-space: nowrap;
}
.yazi-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .78rem;
  color: var(--text-dim);
}
.yazi-meta span::before { content: "·"; margin-right: 8px; }
.yazi-meta span:first-child::before { content: none; }

.yazi-kart h2, .yazi-kart h3 {
  font-size: 1.22rem;
  line-height: 1.35;
  margin-bottom: 11px;
}
.yazi-kart a.yazi-link { color: inherit; }
.yazi-kart:hover h2, .yazi-kart:hover h3 { color: var(--ink); }

.yazi-ozet {
  font-size: .93rem;
  color: var(--text-soft);
  margin-bottom: 20px;
  flex-grow: 1;
}

.yazi-devam {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: .87rem;
  font-weight: 700;
  color: var(--ink);
  margin-top: auto;
  transition: gap var(--t-fast);
}
.yazi-devam svg {
  width: 15px; height: 15px;
  fill: none; stroke: currentColor;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.yazi-kart:hover .yazi-devam { gap: 12px; }

/* Kartın tamamı tıklanabilir olsun (başlıktaki bağlantıyı yayar) */
.yazi-link::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}
.yazi-kart { position: relative; }

/* ---------------------------------------------------------------
   4. MAKALE SAYFASI DÜZENİ
   --------------------------------------------------------------- */
.okuma-cubugu {
  position: fixed;
  left: 0; top: 0;
  z-index: 120;
  height: 3px;
  width: 0;
  background: var(--grad);
  transition: width .1s linear;
}

.makale-hero {
  padding: clamp(90px, 11vw, 120px) 0 clamp(24px, 3vw, 36px);
  position: relative;
  overflow: hidden;
}
.makale-hero::before {
  content: "";
  position: absolute;
  top: -320px; left: 50%;
  transform: translateX(-50%);
  width: 760px; height: 620px;
  border-radius: 50%;
  filter: blur(110px);
  opacity: .28;
  background: radial-gradient(circle, var(--c1, var(--brand-1)), transparent 66%);
  pointer-events: none;
}
.makale-hero .container { position: relative; z-index: 1; }


.makale-baslik {
  font-size: clamp(1.9rem, 4.6vw, 3.05rem);
  letter-spacing: -.035em;
  line-height: 1.15;
  max-width: 20ch;
  margin: 14px 0 20px;
}
.makale-ozet {
  font-size: clamp(1.02rem, 1.4vw, 1.16rem);
  color: var(--text-soft);
  max-width: 62ch;
  margin-bottom: 26px;
}

.makale-meta-satir {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.yazar-mini {
  display: flex;
  align-items: center;
  gap: 11px;
}
.yazar-avatar {
  display: grid;
  place-items: center;
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--grad);
  color: #fff;
  font-size: .82rem;
  font-weight: 800;
  flex-shrink: 0;
}
.yazar-mini b { display: block; font-size: .9rem; line-height: 1.3; }
.yazar-mini small { font-size: .78rem; color: var(--text-dim); }

/* İki sütun: içindekiler + makale */
.makale-duzen {
  display: grid;
  grid-template-columns: 1fr minmax(0, 720px) 1fr;
  gap: 40px;
  align-items: start;
  padding-bottom: clamp(48px, 6vw, 76px);
}
.makale-duzen > .icindekiler { grid-column: 1; justify-self: end; }
.makale-duzen > .makale       { grid-column: 2; }
.makale-duzen > .yan-bos      { grid-column: 3; }

/* ---------------------------------------------------------------
   5. MAKALE TİPOGRAFİSİ
   --------------------------------------------------------------- */
.makale { font-size: 1.06rem; }

.makale > p {
  line-height: 1.85;
  color: var(--text-soft);
  margin-bottom: 1.45em;
}
.makale > p:first-of-type {
  font-size: 1.15rem;
  color: var(--text);
  font-weight: 500;
}

.makale h2 {
  font-size: clamp(1.4rem, 2.6vw, 1.75rem);
  letter-spacing: -.025em;
  margin: 2.3em 0 .75em;
  scroll-margin-top: 100px;
  position: relative;
}
.makale h2:first-child { margin-top: 0; }
.makale h3 {
  font-size: 1.18rem;
  margin: 1.9em 0 .6em;
  scroll-margin-top: 100px;
}

.makale strong { color: var(--text); font-weight: 700; }
.makale em { font-style: italic; }

.makale a:not(.btn) {
  color: var(--ink);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1.5px;
  text-decoration-color: color-mix(in srgb, var(--ink) 35%, transparent);
  transition: text-decoration-color var(--t-fast);
}
.makale a:not(.btn):hover { text-decoration-color: var(--ink); }

.makale ul, .makale ol {
  margin: 0 0 1.45em 0;
  padding-left: 1.5em;
  color: var(--text-soft);
}
.makale li { margin-bottom: .65em; line-height: 1.8; }
.makale li::marker { color: var(--ink); font-weight: 700; }
.makale ul ul, .makale ol ol { margin: .6em 0 0 0; }

.makale hr {
  border: 0;
  height: 1px;
  background: var(--border);
  margin: 2.6em 0;
}

.makale img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin-bottom: 1.45em;
}
.makale figure { margin: 0 0 1.45em; }
.makale figcaption {
  font-size: .84rem;
  color: var(--text-dim);
  text-align: center;
  margin-top: -.9em;
}

/* ---------------------------------------------------------------
   6. BİLGİ KUTULARI, ALINTI, KOD, TABLO
   --------------------------------------------------------------- */
.makale blockquote {
  position: relative;
  margin: 0 0 1.45em;
  padding: 22px 26px;
  border-radius: var(--radius);
  border-left: 3px solid var(--brand-1);
  background: var(--surface-2);
  color: var(--text);
  font-size: 1.06rem;
  font-style: italic;
}
.makale blockquote p:last-child { margin-bottom: 0; }

/* Bilgi kutuları (.kutu) paylaşılan bileşen olarak css/style.css içinde. */

.makale :not(pre) > code {
  font-family: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  font-size: .86em;
  padding: 2px 7px;
  border-radius: 6px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  word-break: break-word;
}

/* Kod bloğu: üstünde dil etiketi ve kopyala butonu olan bir sarmal */
.kod-sarmal {
  margin: 0 0 1.45em;
  border-radius: var(--radius);
  background: var(--code-bg);
  border: 1px solid var(--border-strong);
  overflow: hidden;
}
.kod-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 12px 9px 18px;
  background: rgba(255, 255, 255, .04);
  border-bottom: 1px solid rgba(255, 255, 255, .07);
}
.kod-dil {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: .72rem;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: #7C8AA8;
}
.kod-kopyala {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  border-radius: 99px;
  border: 1px solid rgba(255, 255, 255, .16);
  background: rgba(255, 255, 255, .06);
  color: #C9CBE0;
  font-size: .76rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast);
}
.kod-kopyala svg {
  width: 14px; height: 14px;
  fill: none; stroke: currentColor;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.kod-kopyala:hover { background: rgba(255, 255, 255, .13); color: #fff; }
.kod-kopyala.kopyalandi {
  color: #6EE7A8;
  border-color: rgba(110, 231, 168, .4);
  background: rgba(110, 231, 168, .12);
}

.makale pre {
  margin: 0;
  padding: 18px 22px 20px;
  background: transparent;
  border: 0;
  border-radius: 0;
  overflow-x: auto;
}
.makale pre code {
  font-family: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  font-size: .84rem;
  line-height: 1.8;
  color: #C9CBE0;
  white-space: pre;
}

.tablo-sarmal { overflow-x: auto; margin-bottom: 1.45em; }
.makale table {
  width: 100%;
  border-collapse: collapse;
  font-size: .92rem;
  min-width: 460px;
}
.makale th, .makale td {
  padding: 13px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.makale th {
  font-weight: 700;
  font-size: .82rem;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: var(--text-dim);
  background: var(--surface-2);
}
.makale tbody tr:last-child td { border-bottom: 0; }
.makale td { color: var(--text-soft); }
.makale table { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }

/* ---------------------------------------------------------------
   7. İÇİNDEKİLER
   --------------------------------------------------------------- */
.icindekiler {
  position: sticky;
  top: 100px;
  width: 230px;
  padding: 20px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: .87rem;
}
.icindekiler-baslik {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 13px;
}
.icindekiler ol { list-style: none; display: grid; gap: 3px; }
.icindekiler a {
  display: block;
  padding: 7px 11px;
  border-radius: 8px;
  color: var(--text-soft);
  line-height: 1.45;
  border-left: 2px solid transparent;
  transition: all var(--t-fast);
}
.icindekiler a:hover { color: var(--text); background: var(--surface-2); }
.icindekiler a.is-active {
  color: var(--ink);
  font-weight: 700;
  border-left-color: var(--brand-1);
  background: var(--surface-2);
}
.icindekiler .seviye-3 a { padding-left: 22px; font-size: .83rem; }

/* ---------------------------------------------------------------
   8. PAYLAŞIM, YAZAR, ÖNCEKİ/SONRAKİ
   --------------------------------------------------------------- */
.makale-etiketler {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 2.4em 0 0;
  padding: 0;
}
.makale-etiketler li {
  font-size: .8rem;
  font-weight: 600;
  padding: 6px 13px;
  border-radius: 99px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-soft);
}

.paylas {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 30px;
  padding-top: 26px;
  border-top: 1px solid var(--border);
}
.paylas-etiket { font-size: .85rem; font-weight: 700; margin-right: 4px; }
.paylas a, .paylas button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 16px;
  border-radius: 99px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: .84rem;
  font-weight: 600;
  color: var(--text-soft);
  cursor: pointer;
  transition: all var(--t-fast);
}
.paylas a:hover, .paylas button:hover {
  border-color: var(--brand-1);
  color: var(--text);
  transform: translateY(-2px);
}
.paylas svg {
  width: 15px; height: 15px;
  fill: none; stroke: currentColor;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}

.yazar-kutu {
  display: flex;
  gap: 20px;
  margin-top: 44px;
  padding: 28px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
}
.yazar-kutu .yazar-avatar { width: 58px; height: 58px; font-size: 1.05rem; }
.yazar-kutu h3 { font-size: 1.05rem; margin-bottom: 4px; }
.yazar-kutu .yazar-unvan { font-size: .82rem; color: var(--text-dim); margin-bottom: 12px; }
.yazar-kutu p { font-size: .92rem; color: var(--text-soft); margin-bottom: 16px; }
.yazar-kutu .yazar-cta { display: flex; flex-wrap: wrap; gap: 9px; }

/* --- Başlık bağlantısı: bölümün adresini kopyalar --- */
.baslik-bag {
  display: inline-flex;
  align-items: center;
  margin-left: 10px;
  opacity: 0;
  color: var(--text-dim);
  transition: opacity var(--t-fast), color var(--t-fast);
}
.baslik-bag svg {
  width: 17px; height: 17px;
  fill: none; stroke: currentColor;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.makale h2:hover .baslik-bag,
.makale h3:hover .baslik-bag,
.baslik-bag:focus-visible { opacity: 1; }
.baslik-bag:hover { color: var(--ink); }
.baslik-bag.kopyalandi { opacity: 1; color: #16A34A; }
/* Dokunmatik cihazlarda üzerine gelme yok — sürekli görünür ama silik */
@media (hover: none) { .baslik-bag { opacity: .35; } }

/* --- İlgili yazılar --- */
.ilgili-yazilar { margin-top: 48px; }
.ilgili-baslik {
  font-size: 1.15rem;
  margin-bottom: 18px;
}
.ilgili-liste {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.ilgili-kart {
  display: flex;
  flex-direction: column;
  padding: 22px 24px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  transition: transform var(--t), border-color var(--t), box-shadow var(--t);
}
.ilgili-kart:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
}
.ilgili-kart .yazi-kategori { align-self: flex-start; margin-bottom: 11px; }
.ilgili-kart h3 { font-size: 1.02rem; line-height: 1.4; margin-bottom: 9px; }
.ilgili-kart:hover h3 { color: var(--ink); }
.ilgili-kart p {
  font-size: .87rem;
  color: var(--text-soft);
  line-height: 1.6;
  flex-grow: 1;
  margin-bottom: 16px;
}
.ilgili-kart .yazi-devam { margin-top: auto; }



/* ---------------------------------------------------------------
   9. DUYARLI + YAZDIRMA
   --------------------------------------------------------------- */
@media (max-width: 1180px) {
  .makale-duzen { grid-template-columns: minmax(0, 1fr); max-width: 760px; margin-inline: auto; }
  .makale-duzen > .icindekiler {
    grid-column: 1;
    position: static;
    width: 100%;
    justify-self: stretch;
    margin-bottom: 32px;
  }
  .makale-duzen > .makale  { grid-column: 1; }
  .makale-duzen > .yan-bos { display: none; }
  .icindekiler ol { grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); display: grid; }
}

@media (max-width: 860px) {
  .yazi-kart.one-cikan { flex-direction: column; align-items: stretch; }
  .yazi-kart.one-cikan .yazi-gorsel { flex: none; width: 100%; aspect-ratio: 16 / 9; margin-bottom: 20px; }
}

@media (max-width: 640px) {
  .blog-arac { flex-direction: column; align-items: stretch; }
  .arama { flex: 1 1 auto; }
  .komsu-yazilar { grid-template-columns: 1fr; }
  .komsu.sonraki { text-align: left; }
  .yazar-kutu { flex-direction: column; gap: 16px; }
  .makale { font-size: 1.02rem; }
  .makale table { min-width: 380px; }
}

@media print {
  .okuma-cubugu, .icindekiler, .paylas, .komsu-yazilar,
  .blog-cta, .geri-link, .makale-hero::before { display: none !important; }
  .makale-duzen { display: block; }
  .makale h2, .makale h3, .kutu, .makale pre, .makale table { page-break-inside: avoid; }
}
