/* stiller.css
 *
 * Tema için özel stiller. Bootstrap üzerine eklemeler yapılır.
 */

body {
    background-color: #f8f9fa;
    color: #212529;
    line-height: 1.6;
    min-height: 100vh;
}
/* ====== Link renk ayarları ====== */
a {
    color: #336cbd;
    text-decoration: none;
}

a:hover,
a:focus {
    text-decoration: underline;
}
/* ====== Tablo ayarları ====== */
table {
    margin-bottom: 20px; 
}

/* ====== Resim ayarları ====== */
img {
    margin-bottom: 20px; 
}

/* ====== Figcaption ayarları ====== */
figcaption  {
    margin-bottom: 20px; 
}

/* ====== H etiket ayarları ====== */
h2 {
    margin-bottom: 15px; 
}

h3 {
    margin-bottom: 15px; 
}

/* Sadece light mode için (dark-mode aktif değilken) */
body:not(.dark-mode) .btn-outline-primary {
    border-color: #336cbd;
    color: #336cbd;
}

/* İkon rengi */
body:not(.dark-mode) .btn-outline-primary i {
    color: #336cbd;
}

/* Hover, focus ve active durumları */
body:not(.dark-mode) .btn-outline-primary:hover,
body:not(.dark-mode) .btn-outline-primary:focus,
body:not(.dark-mode) .btn-outline-primary:active {
    background-color: #336cbd;
    border-color: #336cbd;
    color: #ffffff; /* ikon beyaz olsun */
}

/* Hover durumunda ikonun da beyaz olması için */
body:not(.dark-mode) .btn-outline-primary:hover i,
body:not(.dark-mode) .btn-outline-primary:focus i,
body:not(.dark-mode) .btn-outline-primary:active i {
    color: #ffffff;
}

/* ==== Pagination - Light Mode ==== */
body:not(.dark-mode) .pagination .page-link {
    color: #336cbd;
    border: 1px solid #336cbd;
    background-color: #ffffff;
}

/* Hover DEĞİŞMEYECEK → Normal halin aynısı */
body:not(.dark-mode) .pagination .page-link:hover,
body:not(.dark-mode) .pagination .page-link:focus {
    color: #336cbd;
    border-color: #336cbd;
    background-color: #ffffff;
}

/* Aktif sayfa */
body:not(.dark-mode) .pagination .page-item.active .page-link {
    background-color: #336cbd;
    border-color: #336cbd;
    color: #ffffff;
}

/* ==== Navbar Logo - Gradient Yazı ==== */
.site-logo {
    display: inline-block;
    font-weight: 800;
    font-size: 1.25rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-decoration: none;
    color: transparent;

    /* Gradient yazı */
    background: linear-gradient(120deg, #336cbd, #54a0ff, #9b59b6);
    -webkit-background-clip: text;
    background-clip: text;

    transition: opacity 0.3s ease;
    opacity: 0.95;
}

/* Hover – sadece hafif titreşim (shake) */
.site-logo:hover {
    opacity: 1;
    text-decoration: none !important;
    animation: logoShake 0.25s ease-in-out;
}

/* Shake Animasyonu */
@keyframes logoShake {
    0% { transform: translateX(0); }
    25% { transform: translateX(-1.5px); }
    50% { transform: translateX(1.5px); }
    75% { transform: translateX(-1px); }
    100% { transform: translateX(0); }
}

/* ==== Dark Mode – Renk yine değişmeyecek ==== */
.dark-mode .site-logo {
    background: linear-gradient(120deg, #8ab4ff, #c792ea, #f5c26b);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent !important;
}

    

/* Genel kart stili */
.card {
    border: none;
    border-radius: 0.5rem;
    overflow: hidden;
    transition: box-shadow .2s ease, transform .2s ease;
}
.card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.card-img-top {
    object-fit: cover;
    height: 200px;
}

.post-meta {
    font-size: .875rem;
    color: #6c757d;
}

/* Slider görsellerinin yüksekliği */
.carousel-item img {
    height: 420px;
    object-fit: cover;
    width: 100%;
}

/* Footer */
.footer {
    background-color: #f8f9fa;
    color: #6c757d;
}

/* Koyu mod stili */
.dark-mode {
    background-color: #121212;
    color: #e0e0e0;
}

.dark-mode .bg-light,
.dark-mode .navbar-light,
.dark-mode .footer {
    background-color: #1e1e1e !important;
    color: #cfcfcf !important;
}

.dark-mode .navbar-brand,
.dark-mode .nav-link {
    color: #e0e0e0 !important;
}
.dark-mode .nav-link.active {
    color: #afcbf3 !important;
}

.dark-mode .card {
    background-color: #1f1f1f;
    color: #e0e0e0;
}

.dark-mode .card:hover {
    box-shadow: 0 0.5rem 1rem rgba(255, 255, 255, 0.08);
}

.dark-mode a {
    color: #afcbf3;
}
.dark-mode a:hover {
    color: #86b7fe;
}

/* Arama sonuçlarında vurgulama */
.search-term {
    font-weight: 600;
    color: #0d6efd;
}

/* Trend yazılar için yatay kaydırma */
.trend-wrapper {
    overflow-x: auto;
    white-space: nowrap;
    padding-bottom: 1rem;
}
.trend-card {
    display: inline-block;
    width: 18rem;
    margin-right: 1rem;
    vertical-align: top;
}

/* === İlginizi çekebilir (öneriler) bölümü === */
/* Kartların üst görsel yüksekliğini sınırlayarak estetik bir görünüm sağlar. */
.suggestions-row .card-img-top {
    height: 180px;
    object-fit: cover;
}

/* Koyu modda text-muted sınıfındaki metinler daha açık bir renkte gösterilsin */
.dark-mode .text-muted {
    color: #adb5bd !important;
}


/* Önceki/sonraki yazı kutuları */
.prev-next-container .card {
    height: 100%;
}

/* Koyu modda arama kutusu ve butonlar */
.dark-mode .form-control {
    background-color: #343a40;
    color: #f8f9fa;
    border-color: #495057;
}
.dark-mode .form-control::placeholder {
    color: #868e96;
}

.dark-mode .btn-outline-primary {
    color: #f8f9fa;
    border-color: #6c757d;
}
.dark-mode .btn-outline-primary:hover,
.dark-mode .btn-outline-primary:active,
.dark-mode .btn-outline-primary:focus {
    background-color: #7590b7;
    border-color: #0d6efd;
    color: #fff;
}

/*
 * Koyu modda navbar toggler'ın ve ikonu görünürlüğünü artırmak için
 * sınır rengini ve SVG hamburger ikonunu ters çeviriyoruz. Bootstrap
 * hamburger ikonu varsayılan olarak koyu renklidir; koyu arka plan
 * üzerinde gözükmeyebilir. filter invert ile ters çevirerek açık
 * tonda görünmesini sağlıyoruz.
 */
.dark-mode .navbar-toggler {
    border-color: rgba(255, 255, 255, 0.6);
}
.dark-mode .navbar-toggler-icon {
    filter: invert(1) grayscale(100%) brightness(2);
}

/* ==== İçindekiler kutusu (otomatik TOC) ==== */
.toc-wrapper {
    border: 1px solid #e9ecef;
    background-color: #ffffff;
    border-radius: .5rem;
    padding: 1rem 1.25rem;
    margin-bottom: 1.75rem;
    font-size: 0.95rem;
}

.toc-wrapper .toc-title {
    font-weight: 600;
    margin-bottom: .5rem;
}

.toc-wrapper .toc-list {
    list-style: none;
    margin: 0;
    padding-left: 0;
    counter-reset: toc-counter;
}

.toc-wrapper .toc-item {
    position: relative;
    padding-left: 1.5rem;
}

.toc-wrapper .toc-item::before {
    counter-increment: toc-counter;
    content: counter(toc-counter) ".";
    position: absolute;
    left: 0;
    top: 0;
    color: #6c757d;
    font-weight: 600;
}

.toc-wrapper .toc-item + .toc-item {
    margin-top: .25rem;
}

.toc-wrapper .toc-item a {
    text-decoration: none;
}

.toc-wrapper .toc-item a:hover {
    text-decoration: underline;
}

.toc-wrapper .toc-level-h3 {
    margin-left: 1rem;
    font-size: 0.92em;
}

.dark-mode .toc-wrapper {
    background-color: #212529;
    border-color: #343a40;
}

.dark-mode .toc-wrapper .toc-item::before {
    color: #adb5bd;
}

.dark-mode .toc-wrapper .toc-item a {
    color: #86b7fe;
}

/* Carousel kontrol butonlarına arka plan karartısı */
.carousel-control-prev-icon,
.carousel-control-next-icon {
    background-color: rgba(0, 0, 0, 0.5); /* yarı saydam siyah */
    border-radius: 50%;                   /* yuvarlak */
    padding: 0.75rem;                     /* biraz iç boşluk */
    background-size: 50% 50%;             /* okun çok büyümemesi için */
}

/* Dark mode'da sayfalama butonları */
.dark-mode .pagination .page-link {
    background-color: #212529;    /* koyu arka plan */
    color: #f8f9fa;               /* açık yazı rengi */
    border-color: #343a40;
}

.dark-mode .pagination .page-link:hover {
    background-color: #343a40;
    color: #ffffff;
}

/* Aktif sayfa için */
.dark-mode .pagination .page-item.active .page-link {
    background-color: #7590b7;    /* mavi */
    border-color: #0d6efd;
    color: #ffffff;
}

/* ====== TABLO - DARK MODE UYUMLU ======
   Bootstrap .table yapısını bozmadan koyu modda okunabilirlik sağlar.
*/
.dark-mode .table-responsive {
    background-color: transparent; /* responsive wrapper varsa arka plan taşmasın */
}

/* Temel tablo yüzeyi */
.dark-mode table.table,
.dark-mode .table {
    color: #e9ecef;
    background-color: #1f1f1f;
    border-color: #343a40;
}

/* Hücreler */
.dark-mode .table > :not(caption) > * > * {
    background-color: transparent;          /* Bootstrap 5 hücre bg reset */
    color: inherit;
    border-color: #343a40;
}

/* Başlık satırı (thead) */
.dark-mode .table thead th,
.dark-mode .table thead td {
    background-color: #212529;
    color: #f8f9fa;
    border-color: #343a40;
}

/* Gövde satırları */
.dark-mode .table tbody tr {
    background-color: #1f1f1f;
}

/* Satırlar arası ayırıcı */
.dark-mode .table tbody tr + tr {
    border-top: 1px solid #343a40;
}

/* Hover efekti (table-hover kullanıyorsan) */
.dark-mode .table-hover tbody tr:hover {
    background-color: #2b3035;
    color: #ffffff;
}

/* Zebra (table-striped kullanıyorsan) */
.dark-mode .table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(255, 255, 255, 0.04);
}

/* Border'lı tablo (table-bordered kullanıyorsan) */
.dark-mode .table-bordered > :not(caption) > * {
    border-width: 1px;
}
.dark-mode .table-bordered > :not(caption) > * > * {
    border-color: #343a40;
}

/* Caption varsa */
.dark-mode .table caption {
    color: #adb5bd;
}

/* Small varyasyonu (table-sm) */
.dark-mode .table-sm > :not(caption) > * > * {
    padding: .25rem .5rem;
}

/* ====== Resim ayarları ====== */
/* (Yukarıda var ama dokunmadan bırakıyorum) */

/* Renkli scroll bar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  box-shadow: inset 0 0 0px grey; 
  border-radius: 0px;
}

::-webkit-scrollbar-thumb {
  background: #336cbd; 
  border-radius: 0px;
}

html {
  scroll-behavior: smooth;
}
