﻿/* =========================
   BLOG PAGE (REVIZED)
   ========================= */

/* Eğer sitede global container / bootstrap varsa çakışmasın diye
   blog sayfasında wrapper sınıfı kullanacağız.
   View'de container yerine "blog-container" kullanmanı öneririm.
   Ama illa .container kalacaksa da bu CSS çalışır. */

:root {
    /* opsiyonel: yoksa var(--accent) zaten var */
    --blog-hero-bg: #708090;
    --blog-card-radius: 18px;
    --blog-shadow: 0 14px 40px rgba(0,0,0,.08);
    --blog-shadow-hover: 0 18px 55px rgba(0,0,0,.12);
    --blog-muted: #6b7280;
    --blog-text: #111827;
    --blog-subtext: #4b5563;
    --blog-border: #e5e7eb;
    --blog-soft: #f8fafc;
}

/* HERO */
.blog-hero {
    background: var(--blog-hero-bg);
    padding: 90px 20px 70px;
    text-align: center;
    color: #fff;
}

.blog-hero-inner {
    max-width: 980px;
    margin: 0 auto;
}

.blog-hero h1 {
    margin: 0;
    font-size: 42px;
    letter-spacing: -0.3px;
}

.blog-hero p {
    max-width: 720px;
    margin: 12px auto 0;
    opacity: .9;
    line-height: 1.6;
}

/* LAYOUT WRAPPER */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 60px 20px;
}

/* Grid */
.blog-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    align-items: start;
}

/* MAIN POSTS */
.post-card {
    background: #fff;
    border-radius: var(--blog-card-radius);
    overflow: hidden;
    box-shadow: var(--blog-shadow);
    margin-bottom: 32px;
    transition: transform .25s ease, box-shadow .25s ease;
    will-change: transform;
    border: 1px solid rgba(17,24,39,0.05);
}

    .post-card:hover {
        transform: translateY(-6px);
        box-shadow: var(--blog-shadow-hover);
    }

    .post-card img {
        width: 100%;
        height: 280px;
        object-fit: cover;
        display: block;
        /* görsel yüklenmeden zıplamasın */
        aspect-ratio: 16 / 9;
    }

/* Content */
.post-content {
    padding: 28px;
}

.post-meta {
    font-size: 13px;
    color: var(--blog-muted);
    margin-bottom: 8px;
}

.post-content h2 {
    margin: 0 0 10px;
    font-size: 26px;
    color: var(--blog-text);
    letter-spacing: -0.2px;
    line-height: 1.25;
}

.post-content p {
    color: var(--blog-subtext);
    line-height: 1.65;
    margin: 0;
}

/* Read more */
.read-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
    color: var(--accent);
    font-weight: 700;
    text-decoration: none;
    transition: transform .18s ease, opacity .18s ease;
}

    .read-more:hover {
        transform: translateX(3px);
        opacity: .92;
    }

/* ASIDE */
aside {
    position: sticky;
    top: 40px;
}

.side-box {
    background: var(--blog-soft);
    padding: 26px;
    border-radius: var(--blog-card-radius);
    margin-bottom: 28px;
    box-shadow: 0 10px 26px rgba(0,0,0,.06);
    border: 1px solid rgba(17,24,39,0.06);
}

    .side-box h3 {
        margin: 0 0 14px;
        color: var(--blog-text);
        font-size: 18px;
        padding-bottom: 12px;
        border-bottom: 1px solid var(--blog-border);
    }

.latest-posts a {
    display: block;
    padding: 10px 0;
    text-decoration: none;
    color: #1f2933;
    border-bottom: 1px solid var(--blog-border);
    transition: color .18s ease, transform .18s ease;
}

    .latest-posts a:hover {
        color: var(--accent);
        transform: translateX(3px);
    }

    .latest-posts a:last-child {
        border-bottom: 0;
        padding-bottom: 0;
    }

/* CTA (eğer ileride kullanırsan) */
.cta {
    background: linear-gradient(135deg,#36454F,#2b3a42);
    color: #fff;
    padding: 50px 30px;
    border-radius: 20px;
    text-align: center;
}

    .cta a {
        display: inline-block;
        margin-top: 14px;
        padding: 12px 28px;
        background: var(--accent);
        color: #fff;
        border-radius: 40px;
        text-decoration: none;
        font-weight: 700;
    }

/* PAGINATION (benim verdiğim view ile uyumlu) */
.pagination {
    margin: 10px 0 40px;
    display: flex;
    gap: 14px;
    align-items: center;
    justify-content: center;
}

.page-btn {
    padding: 10px 14px;
    border-radius: 12px;
    background: #f1f5f9;
    text-decoration: none;
    color: #111827;
    font-weight: 700;
    border: 1px solid rgba(17,24,39,0.08);
    transition: transform .18s ease, background .18s ease;
}

    .page-btn:hover {
        transform: translateY(-1px);
        background: #eef2f7;
    }

.page-info {
    color: var(--blog-muted);
    font-weight: 700;
}

/* RESPONSIVE */
@media (max-width: 1100px) {
    .container {
        padding: 50px 18px;
    }

    .blog-grid {
        gap: 28px;
    }
}

@media (max-width: 900px) {
    .blog-grid {
        grid-template-columns: 1fr;
    }

    aside {
        position: static; /* mobilde sticky kapat */
        top: auto;
    }

    .blog-hero h1 {
        font-size: 34px;
    }

    .post-card img {
        height: 240px;
    }
}

@media (max-width: 560px) {
    .container {
        padding: 40px 16px;
    }

    .post-content {
        padding: 20px;
    }

        .post-content h2 {
            font-size: 22px;
        }

    .post-card img {
        height: 210px;
    }

    .pagination {
        gap: 10px;
        flex-wrap: wrap;
    }
}

/* Empty state / side-box text fix */
.side-box h3,
.side-box p {
    color: #111827; /* koyu gri / neredeyse siyah */
    opacity: 1;
}

.post-content .read-more {
    margin-top: 14px;
    padding: 10px 14px;
    border-radius: 12px;
    background: rgba(0,0,0,.04);
    color: #111827 !important;
    font-weight: 700;
}

    .post-content .read-more:hover {
        background: rgba(0,0,0,.07);
    }

