/* ==========================================================================
   KONTRAST DUZELTMELERI v72 (2026-09-21)
   Site geneli tarama: 36 sayfa x 2 tema. Bulunan okunamaz metinler:
   - Koyu temada ana menu baglantilari 1.59:1 (36 sayfada 240 oge)
   - Koyu temada .bg-white rozet/kart icindeki metinler 1.09 - 2.05:1
   - .bg-primary.bg-opacity-10 rozetleri her iki temada 1.00:1 (mor ustune mor)
   - Koyu temada .text-primary 4.17:1, .btn-link 3.93:1, rank chip 4.31:1
   - Koyu temada WhatsApp butonu 4.14:1
   - Acik temada rank kart meta 4.28:1, hero sayac 4.48:1
   Not: dosya ASCII'dir; Turkce karakter kullanilmadi (minify kodlama tuzagi).
   ========================================================================== */

/* 1) ANA MENU - koyu tema (kritik: 1.59:1 -> 14.2:1) */
html[data-bs-theme="dark"] #navbar .navbar-nav .nav-link,
html[data-bs-theme="dark"] #navbar .navbar-nav .dropdown-toggle,
html[data-bs-theme="dark"] .navbar-center > .nav-item > .nav-link,
html[data-bs-theme="dark"] #toolsDrop {
  color: #dbe4ee !important;
}
html[data-bs-theme="dark"] #navbar .navbar-nav .nav-link:hover,
html[data-bs-theme="dark"] #navbar .navbar-nav .nav-link:focus,
html[data-bs-theme="dark"] #navbar .navbar-nav .nav-link:focus-visible,
html[data-bs-theme="dark"] #navbar .navbar-nav .nav-link.active,
html[data-bs-theme="dark"] #navbar .navbar-nav .dropdown-toggle:hover,
html[data-bs-theme="dark"] #navbar .navbar-nav .dropdown-toggle.show {
  color: #a78bfa !important;
}

/* 2) DOLGU RENGI TASIYAN OGE (rozet, pill, buton): koyu temada okunur cift */
html[data-bs-theme="dark"] .bg-primary:not(.bg-opacity-10),
html[data-bs-theme="dark"] .badge.bg-primary:not(.bg-opacity-10) {
  background-color: #7c3aed !important;
  color: #ffffff !important;
}
html[data-bs-theme="dark"] .bg-info:not(.bg-opacity-10),
html[data-bs-theme="dark"] .badge.bg-info:not(.bg-opacity-10) {
  background-color: #0f6d89 !important;
  color: #ffffff !important;
}

/* 3) KOYU TEMADA ZEMINI GERCEKTEN BEYAZ KALAN OGELER
      Not: .bg-white sinifi bu sitede genel "kart yuzeyi" anlamiyla da kullaniliyor ve koyu temada
      zemini koyuya cevriliyor. Bu yuzden tum .bg-white torunlarina metin rengi dayatan genel bir
      kural YAZILMAMALI: denendi, blog yazi basligi + meta satiri + kenar cubugu basliklari
      okunamaz hale geldi (koyu metin koyu kart uzerinde). Sadece zemini beyaz kalan iki oge
      hedeflenir: kategori rozetleri ve tarot olumlama kutusu. */
html[data-bs-theme="dark"] .badge.bg-white,
html[data-bs-theme="dark"] a.badge.bg-white {
  background-color: #ffffff !important;
  color: #1f2933 !important;
}
html[data-bs-theme="dark"] .badge.bg-white .text-muted {
  color: #495057 !important;
}
html[data-bs-theme="dark"] div.p-2.rounded.bg-white,
html[data-bs-theme="dark"] div.p-2.rounded.bg-white span,
html[data-bs-theme="dark"] div.p-2.rounded.bg-white em,
html[data-bs-theme="dark"] div.p-2.rounded.bg-white p {
  color: #1f2933 !important;
}
html[data-bs-theme="dark"] div.p-2.rounded.bg-white .text-primary {
  color: #6d28d9 !important;
}

/* 4) .bg-primary.bg-opacity-10 rozetleri: her iki temada saydam zemin + okunur metin
      (once: metin ve zemin ayni renk -> 1.00:1) */
.bg-primary.bg-opacity-10 {
  background-color: rgba(124, 58, 237, 0.10) !important;
  color: #5b21b6 !important;
}
html[data-bs-theme="dark"] .bg-primary.bg-opacity-10,
html[data-bs-theme="dark"] .badge.bg-primary.bg-opacity-10 {
  background-color: rgba(167, 139, 250, 0.16) !important;
  color: #c4b5fd !important;
}

/* 5) KOYU TEMA vurgu rengi: #2596be koyu zeminde 4.17:1 -> marka moru 5.5:1 */
html[data-bs-theme="dark"] .text-primary,
html[data-bs-theme="dark"] body .text-primary,
html[data-bs-theme="dark"] .btn-link,
html[data-bs-theme="dark"] .card-footer .btn-link,
html[data-bs-theme="dark"] .rank-filters__chip.is-active {
  color: #a78bfa !important;
}

/* 6) KOYU TEMA paylasim butonlari: beyaz metin #128c7e uzerinde 4.14:1 */
html[data-bs-theme="dark"] .calc-util-btn--whatsapp {
  background-color: #0d6e61 !important;
  color: #ffffff !important;
}

/* 7) ACIK TEMA: sinirda kalan iki deger (yalniz acik tema - koyu temayi ezmesin) */
html:not([data-bs-theme="dark"]) p.rank-card__meta,
html:not([data-bs-theme="dark"]) p.rank-card__meta span {
  color: #5a6b7d !important;           /* #6b7c8f beyaz uzerinde 4.28:1 idi -> 5.5:1 */
}
html:not([data-bs-theme="dark"]) .home-hero__stat-value .counter_value {
  color: #086185 !important;           /* #0a7ba3 -> 4.48:1 idi -> 6.3:1 */
}

/* 9) Blog/kategori filtre rozeti (aktif pill): koyu temada beyaz metin #a78bfa uzerinde 2.72:1.
      Not: bu ogede .bg-primary sinifi yok (zemin --brand-primary degiskeninden geliyor), bu yuzden
      kural 2 onu kapsamiyor. Yalniz .rounded-pill ile sinirlandirildi: navbar baglantilarinda
      .rounded-pill yok, dolayisiyla menu etkilenmez. */
html[data-bs-theme="dark"] .nav-link.rounded-pill.active {
  background-color: #7c3aed !important;
  color: #ffffff !important;
}

/* 10) Uzun rozet metni tek satirda kalip kapsayicidan tasmasin.
      Bootstrap .badge { white-space: nowrap } yuzunden uzun tema/etiket metinleri kutudan tasip
      .overflow-hidden ile kesiliyordu (or. gunun-tarot-karti tema rozeti: 44px tasma, kesik gorunum).
      Kisa rozetlerde davranis degismez; genislik yine icerige gore kalir, yalnizca sigmayan metin sarar. */
.badge {
  white-space: normal !important;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.4;
}

/* ---------------------------------------------------------------------------
 * 11) KARANLIK TEMA: gövde metni %30 beyazdı → AA'nın altı (ölçüm 1,5-2,6:1).
 *     Kök neden: style.min.css içindeki
 *       body[data-bs-theme=dark] p, span, h6 { color: rgba(255,255,255,.3) !important }
 *     kuralı. Rozet, etiket, iletişim kartı ve SSS soruları gibi RENKLİ zeminlerin
 *     üstünde bu metin tamamen okunmaz hâle geliyordu. Eşit özgüllükte ve sonra
 *     yüklendiği için bu blok kazanır.
 *     Ölçüm (tarayıcı, WCAG 2.1): 40 sayfa × 2 tema taraması, ~800 bulgu → bu blok sonrası tekrar ölçüldü.
 * ------------------------------------------------------------------------- */
body[data-bs-theme="dark"] p,
body[data-bs-theme="dark"] span,
body[data-bs-theme="dark"] h6 {
  color: rgba(255, 255, 255, 0.88) !important;
}

/* Bilinçli olarak "sönük" kalması gereken yardımcı metinler: AA'yı geçecek kadar */
body[data-bs-theme="dark"] .text-muted,
body[data-bs-theme="dark"] .calc-card__required,
body[data-bs-theme="dark"] .site-footer__about,
body[data-bs-theme="dark"] .site-footer__copy,
body[data-bs-theme="dark"] .site-footer__credit {
  color: rgba(255, 255, 255, 0.75) !important;
}

/* Rozet/etiket metni: hangi zeminde olursa olsun beyaz kalsın... */
body[data-bs-theme="dark"] .badge,
body[data-bs-theme="dark"] .badge * {
  color: #ffffff !important;
}

/* ...ve doygun rozet zeminleri beyaz metinle AA'yı geçecek kadar koyulaştırılsın
   (ölçüm: bg-pink #d81f52 üzerinde beyaz = 4,4:1 → sınırın altında). */
body[data-bs-theme="dark"] .badge.bg-pink { background-color: #98143e !important; }
body[data-bs-theme="dark"] .badge.bg-primary { background-color: #5233bd !important; }
body[data-bs-theme="dark"] .badge.bg-info { background-color: #0b6277 !important; }
body[data-bs-theme="dark"] .badge.bg-success { background-color: #0b5c44 !important; }
body[data-bs-theme="dark"] .badge.bg-warning { background-color: #8a5a00 !important; }
body[data-bs-theme="dark"] .badge.bg-danger { background-color: #a01f30 !important; }

/* ---------------------------------------------------------------------------
 * 12) AYDINLIK TEMA: site footer'ı her iki temada da KOYU (linear-gradient
 *     #10121a → #0d0f15), ama metin renkleri aydınlık temanın değerlerini
 *     kullanıyordu: başlıklar #183b56 (1,6:1), bağlantılar #4a5d70 (2,75:1)
 *     → 40 sayfanın tamamında footer okunmuyordu. Koyu zemine açık metin.
 * ------------------------------------------------------------------------- */
body[data-bs-theme="light"] .site-footer,
body[data-bs-theme="light"] .site-footer p,
body[data-bs-theme="light"] .site-footer span,
body[data-bs-theme="light"] .site-footer li,
body[data-bs-theme="light"] .site-footer h2,
body[data-bs-theme="light"] .site-footer h3,
body[data-bs-theme="light"] .site-footer__heading,
body[data-bs-theme="light"] .site-footer__about {
  color: rgba(255, 255, 255, 0.88) !important;
}

body[data-bs-theme="light"] .site-footer a,
body[data-bs-theme="light"] .site-footer .footer-link a,
body[data-bs-theme="light"] .site-footer__links a,
body[data-bs-theme="light"] .site-footer__legal a {
  color: rgba(255, 255, 255, 0.84) !important;
}

body[data-bs-theme="light"] .site-footer a:hover,
body[data-bs-theme="light"] .site-footer a:focus-visible,
body[data-bs-theme="light"] .site-footer__links a:hover {
  color: #ffffff !important;
}

body[data-bs-theme="light"] .site-footer__copy,
body[data-bs-theme="light"] .site-footer__credit {
  color: rgba(255, 255, 255, 0.7) !important;
}
