/* Makale okuma deneyimi — içindekiler, okuma ölçüsü, tablo, satış bandı.
   Tüm içerik sayfalarında yüklenir; JS yoksa hiçbir şeyi bozmaz. */

/* --- Okuma ölçüsü: satır başına ~72 karakter (ölçülen medyan 82'ydi) --- */
.makale-govde p,
.guide-content p,
article p,
main p {
  max-width: 72ch;
}

/* --- Sayfa başı künye: okuma süresi + güncelleme --- */
.mk-kunye {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 14px 0 22px;
  color: #6b7c91;
  font-size: .82rem;
}

.mk-kunye-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border: 1px solid rgba(16, 35, 63, .12);
  border-radius: 999px;
  background: #fff;
  font-weight: 600;
}

.mk-kunye-chip b {
  color: #10233f;
  font-weight: 800;
}

/* --- İçindekiler --- */
.mk-toc {
  margin: 26px 0 30px;
  padding: 18px 20px;
  border: 1px solid rgba(16, 35, 63, .10);
  border-left: 3px solid #ff5a1f;
  border-radius: 14px;
  background: linear-gradient(180deg, #fffdfb, #fff7f2);
}

.mk-toc-baslik {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 10px;
  color: #10233f;
  font-size: .82rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.mk-toc-baslik span {
  color: #8a99ab;
  font-size: .74rem;
  letter-spacing: 0;
  text-transform: none;
  font-weight: 600;
}

.mk-toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: mk;
  columns: 2;
  column-gap: 34px;
}

.mk-toc li {
  counter-increment: mk;
  margin: 0 0 9px;
  break-inside: avoid;
  font-size: .86rem;
  line-height: 1.45;
}

.mk-toc li::before {
  content: counter(mk) ".";
  display: inline-block;
  min-width: 18px;
  color: #ff5a1f;
  font-weight: 800;
}

.mk-toc a {
  color: #24384f;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.mk-toc a:hover,
.mk-toc a:focus-visible {
  color: #ef4b23;
  border-bottom-color: rgba(239, 75, 35, .4);
}

.mk-toc a.aktif {
  color: #ef4b23;
  font-weight: 700;
}

/* --- Uzun içindekiler: 18'den fazla bölümde kendi içinde kaydır --- */
.mk-toc.mk-toc-uzun ol {
  columns: auto; /* sabit yükseklikli çok-kolon kutusu taşan maddeleri yana yeni kolona atar, görünmez olur */
  max-height: 320px;
  overflow-y: auto;
  padding-right: 6px;
  scrollbar-width: thin;
}

.mk-toc-uzun ol::-webkit-scrollbar {
  width: 8px;
}

.mk-toc-uzun ol::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(16, 35, 63, .18);
}

/* --- Tablolar: yatay kaydırma + başlık sabit + zebra --- */
.mk-tablo {
  margin: 22px 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid rgba(16, 35, 63, .10);
  border-radius: 12px;
}

/* Genislik: tablo içeriğine göre büyür, sarmalayıcı yatay kaydırır.
   width:100% kalırsa hücreler sıkışır, nowrap başlıklar kırpılır (mobilde okunamaz). */
.mk-tablo table {
  display: table;
  width: auto;
  min-width: 100%;
  max-width: none;
  margin: 0;
  border-collapse: collapse;
  font-size: .88rem;
}

.mk-tablo thead th {
  position: sticky;
  top: 0;
  background: #f8fafc;
  color: #10233f;
  font-weight: 800;
  text-align: left;
  white-space: nowrap;
}

.mk-tablo tbody tr:nth-child(even) {
  background: #fcfdfe;
}

.mk-tablo th,
.mk-tablo td {
  padding: 10px 14px;
  border-bottom: 1px solid rgba(16, 35, 63, .07);
  vertical-align: top;
}

.mk-tablo tbody tr:last-child td {
  border-bottom: 0;
}

/* --- Makale sonu satış bandı --- */
.mk-cta {
  margin: 34px 0 10px;
  padding: 24px 26px;
  border: 1px solid rgba(255, 90, 31, .22);
  border-radius: 16px;
  background: linear-gradient(135deg, #fff8f4, #ffffff 60%);
}

.mk-cta strong {
  display: block;
  margin: 0 0 6px;
  color: #10233f;
  font-size: 1.12rem;
  line-height: 1.25;
}

.mk-cta p {
  margin: 0 0 14px;
  max-width: 60ch;
  color: #56687e;
  font-size: .9rem;
  line-height: 1.5;
}

.mk-cta-buton {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 11px;
  background: #ff5a1f;
  box-shadow: 0 10px 22px rgba(255, 90, 31, .22);
  color: #fff;
  font-size: .88rem;
  font-weight: 800;
  text-decoration: none;
}

.mk-cta-buton:hover,
.mk-cta-buton:focus-visible {
  background: #e94b15;
  color: #fff;
}

.mk-cta-kanit {
  display: block;
  margin-top: 10px;
  color: #7b8b9e;
  font-size: .76rem;
}

@media (max-width: 720px) {
  .mk-toc ol {
    columns: 1;
  }

  .mk-toc {
    padding: 16px;
  }

  .mk-tablo th,
  .mk-tablo td {
    padding: 9px 11px;
    font-size: .84rem;
  }
}

/* --- Mobil: tablo kaydırma ipucu + kompakt WhatsApp dugmesi --- */
@media (max-width: 768px) {
  .mk-tablo {
    position: relative;
  }

  .mk-tablo.mk-tablo-kaydir::after {
    content: "← yana kaydırın →";
    position: sticky;
    left: 0;
    display: block;
    padding: 6px 2px 8px;
    color: #8a99ab;
    font-size: .68rem;
    font-weight: 600;
    text-align: center;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0), #fff 40%);
  }

  /* Mobilde yüzen WhatsApp düğmesi metnin üstüne biniyordu. Yalnız sayfada
     yerine geçen bir WhatsApp bağlantısı VARSA kapatılır (js/makale-okuma.js →
     seritWhatsappEkle: alt şerit / bülten bandı / footer). Yedek yoksa düğme
     kanal kaybolmasın diye kalır. */
  body:has(.lead-serit-wa) #whatsapp-float.wa-float-pill {
    display: none !important;
  }

  .lead-serit-wa {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
    margin-left: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    background: #25d366;
    color: #fff !important;
    font-size: .78rem;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
  }
}

/* --- Blog kart gorseli: sabit 200px kutu + %92 contain = ust/altta siyah bant --- */
.blog-card-img {
  height: auto;
  aspect-ratio: 2 / 1;
}

.blog-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 768px) {
  .post-img {
    height: auto;
    aspect-ratio: 2 / 1;
  }

  .post-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
}

/* Mobilde hucre metni kesilmesin: baslikta nowrap kapali, kolonlara alt sinir */
@media (max-width: 768px) {
  .mk-tablo thead th {
    white-space: normal;
  }

  .mk-tablo th,
  .mk-tablo td {
    min-width: 88px;
    overflow-wrap: break-word;
  }
}

/* --- Gorsel emniyeti: width/height attribute'u tasiyan icerik gorseli mobilde
   intrinsic genislikte (1024px) cizilip kolondan tasiyordu; kirpilan gorsel
   sayfa kaydirilamadigi icin "sigmiyor" olarak gorunuyordu. --- */
main img,
article img,
.seo-page img {
  max-width: 100%;
}

main img:not(.panel-hero-image):not(.logo-image):not(.blog-card-img img),
article img:not(.panel-hero-image):not(.logo-image) {
  height: auto;
}

/* Blog indeksinde (alt serit yok) WhatsApp baglantisi bulten bandinda */
.lead-serit-wa.bulten-wa {
  align-self: flex-start;
  margin: 12px 0 0;
  padding: 10px 16px;
  font-size: .82rem;
}

/* Footer'a dusen WhatsApp baglantisi (serit ve bulten bandi olmayan sayfalar) */
.lead-serit-wa.footer-wa {
  display: inline-flex;
  margin: 14px auto 0;
}

/* Footer'i olmayan sayfalarda govde sonuna dusen WhatsApp baglantisi */
.lead-serit-wa.main-wa {
  display: flex;
  width: max-content;
  margin: 28px auto 40px;
}

/* Kod/şablon blokları: mobilde sağdan kırpılmasın */
pre {
  max-width: 100%;
  overflow-x: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* İkincil CTA: sınıf sayfalarda kullanılıyor ama hiçbir CSS'te tanımlı değildi
   (tarayıcı mavisi düz link, mobilde birincil düğmeye biniyordu). */
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 24px;
  border: 1.5px solid rgba(16, 35, 63, .18);
  border-radius: var(--radius-sm, 10px);
  background: #fff;
  color: #10233f;
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: border-color .2s, color .2s;
}
.btn-secondary:hover,
.btn-secondary:focus-visible {
  border-color: #ff5a1f;
  color: #ef4b23;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
