﻿.container-with-sidebar {
    display: flex;
    gap: 30px;
    max-width: 1200px;
    margin: 40px auto 0 auto;
    padding: 20px;
}

.sidebar {
    flex: 0 0 250px;
    position: sticky;
    top: 20px;
    height: fit-content;
    background-color: #c8102e; /* Buton renginle aynı */
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 0 10px rgb(0 0 0 / 0.1);
    font-size: 0.95rem;
    line-height: 1.5;
    color: #000; /* Yazılar siyah */
}


    .sidebar h3 {
        margin-bottom: 15px;
    }

    .sidebar ul {
        list-style: none;
        padding-left: 0;
    }

        .sidebar ul li {
            margin-bottom: 8px;
        }

            .sidebar ul li a {
                text-decoration: none;
                color: #111; /* normal siyah */
                transition: color 0.3s;
            }

                .sidebar ul li a:hover {
                    color: #000; /* daha koyu siyah */
                }

.sidebar-close-btn {
    display: none;
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: #777;
}

.blog-page-wrapper {
    max-width: 1200px;
    margin: 40px auto;
    padding: 20px;
}

.blog-card {
    background-color: #ffffff;
    border-radius: 16px;
    box-shadow: 0 6px 24px rgba(0,0,0,0.08);
    padding: 40px;
    transition: box-shadow 0.3s ease;
    flex: 1;
}

    .blog-card:hover {
        box-shadow: 0 8px 32px rgba(0,0,0,0.12);
    }

    .blog-card h1 {
        font-size: 2.5rem;
        color: #2d2d2d;
        margin-bottom: 15px;
        max-width: 100%;
        box-sizing: border-box; /* padding’i de hesaba kat */
        overflow-wrap: break-word; /* kelimelerin taşmasını önle */
    }

.blog-meta {
    font-size: 0.95rem;
    color: #777;
    margin-bottom: 25px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 10px;
}

.blog-image {
    width: 100%;
    max-height: 480px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 25px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.blog-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #333;
    word-wrap: break-word;
    overflow-wrap: break-word;
    overflow-x: hidden; /* mobil taşmayı önler */
}

    .blog-content img {
        max-width: 100%;
        height: auto;
        display: block;
        margin: 20px auto;
        border-radius: 8px;
    }
    .blog-content a {
        word-break: break-word;
        display: inline-block;
        max-width: 100%;
        overflow-wrap: anywhere;
        text-overflow: ellipsis;
        white-space: normal;
    }
.comment-section {
    margin-top: 60px;
    background-color: #f4f4f4;
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 4px 18px rgba(0,0,0,0.05);
}

/* Mobilde sidebar toggle butonu */
.sidebar-toggle-btn {
    display: none;
    position: fixed;
    left: 20px;
    bottom: 20%;
    z-index: 1100;
    background-color: #b3423a;
    border: none;
    color: white;
    padding: 10px 18px;
    font-size: 1rem;
    border-radius: 6px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* Responsive Düzenlemeler */
@media (max-width: 768px) {
    .container-with-sidebar {
        flex-direction: column; /* yan yana tutuyoruz */
        padding: 0 20px;
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        width: 260px;
        padding: 30px 20px 20px 20px;
        background-color: #f9f9f9;
        box-shadow: 2px 0 12px rgba(0,0,0,0.1);
        border-radius: 0 12px 12px 0;
        transform: translateX(-100%);
        z-index: 1050;
    }

        .sidebar.sidebar-open {
            transform: translateX(0);
        }

    .sidebar-close-btn {
        display: block;
    }

    .blog-card {
        padding: 20px;
        flex: 1;
        margin-left: 0;
    }
    /* Sidebar açıkken sayfayı kaydırmayı engelle */
    body.sidebar-open {
        overflow: hidden;
    }

    .sidebar-toggle-btn {
        display: block;
    }
}
