/* ============================================================
   Blog modülü — modüle özel stil dosyası
   Yükleme: blog.twig içinde <link> ile (tema CSS'ine dokunulmaz)
   ============================================================ */

/* --- Swiper gezinme (sağ / sol) butonları ---
   Not: Tema bootstrap-icons setinde chevron-left/right glyph'i YOK,
   bu yüzden ok işareti ikon fontuna bağlı olmadan CSS ile çizilir. */
.blog-nav {
    display: flex;
    gap: .5rem;
}

/* Açık renkli, ince kenarlı, hafif yuvarlak köşeli oklar.
   .blog-nav ön eki, .btn-secondary'yi bilinçli olarak ezmek içindir. */
.blog-nav .blog-arrow {
    width: 36px;
    height: 36px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: .5rem;
    background-color: #fff;
    border: 1px solid var(--bs-border-color, #dee2e6);
    color: #6c757d;
    box-shadow: none;
    transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}

.blog-nav .blog-arrow:hover {
    background-color: var(--bs-light, #f8f9fa);
    border-color: var(--bs-border-color, #dee2e6);
    color: #212529;
}

/* Ok işareti: üst + sağ kenardan kare, döndürülerek chevron yapılır */
.blog-nav .blog-arrow::before {
    content: "";
    display: block;
    width: 8px;
    height: 8px;
    border-top: 1.5px solid currentColor;
    border-right: 1.5px solid currentColor;
}

.blog-nav .blog-prev::before {
    transform: rotate(-135deg);
    margin-left: 3px;
}

.blog-nav .blog-next::before {
    transform: rotate(45deg);
    margin-right: 3px;
}

/* Swiper uçlara gelince pasifleştirir */
.blog-nav .blog-arrow.swiper-button-disabled {
    opacity: .4;
    pointer-events: none;
}

/* --- Düz liste: son satırda TEK kalan (öksüz) yazıyı gizle ---
   Mobilde tek sütun olduğu için orada öksüz kavramı yoktur (kural yok).
   :not(:first-child) → toplam tek 1 yazı varsa gizlenmez. */

/* Tablet: 2 sütun */
@media (min-width: 768px) and (max-width: 991.98px) {
    .blog-grid > .col:nth-child(2n+1):last-child:not(:first-child) {
        display: none;
    }
}

/* Masaüstü: seçilen sütun sayısı (3 / 4 / 5) */
@media (min-width: 992px) {
    .blog-grid.per-3 > .col:nth-child(3n+1):last-child:not(:first-child) {
        display: none;
    }
    .blog-grid.per-4 > .col:nth-child(4n+1):last-child:not(:first-child) {
        display: none;
    }
    .blog-grid.per-5 > .col:nth-child(5n+1):last-child:not(:first-child) {
        display: none;
    }
}
