.container {
    display: flex;
    flex-wrap: nowrap;
}

/* Masaüstü için */
.main-content {
    margin-left: 250px;
    padding: 20px;
    flex-grow: 1;
}

/* Mobilde sidebar kalktığı için margin sıfırlanacak ve container flex yönü değişecek */
@media (max-width: 800px) {
    .container {
        flex-direction: column;
    }
    .main-content {
        margin-left: 0;
        padding: 10px 15px;
        width: 100%;
    }
}

/* Başlıklar */
.section-title {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: #4caf50;
}

/* Haber Grid */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill,minmax(280px,1fr));
    gap: 20px;
}

/* Haber Kartları */
.news-card {
    background-color: #222;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 0 8px rgba(0,0,0,0.8);
    transition: transform 0.3s ease;
}

.news-card:hover {
    transform: translateY(-5px);
}

/* Haber Resmi */
.news-image {
    position: relative;
    width: 100%;
    margin-bottom: 20px;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgb(0 0 0 / 0.1);
}

.news-image img {
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
}

/* Kategori Etiketi */
.category-label {
    position: absolute;
    top: 8px;
    left: 8px;
    background-color: rgba(0, 128, 0, 0.8);
    color: white;
    padding: 4px 12px;
    font-size: 14px;
    font-weight: 700;
    border-radius: 12px;
    pointer-events: none;
    user-select: none;
    z-index: 10;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    text-transform: uppercase;
    box-shadow: 0 0 5px rgba(0,0,0,0.3);
}

/* Haber İçeriği */
.news-content {
    padding: 15px;
}

.news-title {
    font-size: 1.2rem;
    margin-bottom: 8px;
}

.news-title a {
    color: #fff;
    text-decoration: none;
}

.news-title a:hover {
    text-decoration: underline;
}

.news-excerpt {
    font-size: 0.95rem;
    color: #ccc;
}

/* Sayfalama */
.pagination {
    margin-top: 30px;
    text-align: center;
}

.pagination a {
    color: #eee;
    padding: 8px 12px;
    margin: 0 4px;
    background-color: #333;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

.pagination a:hover {
    background-color: #4caf50;
}

.pagination a.active {
    background-color: #4caf50;
    pointer-events: none;
}

/* Haber Detay Sayfası */
.news-detail {
    max-width: 900px;
    margin: 20px auto 50px;
    background-color: #222;
    padding: 25px 30px;
    border-radius: 12px;
    box-shadow: 0 0 15px rgba(0,0,0,0.8);
    color: #eee;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.news-detail h1 {
    font-size: 2.4rem;
    margin-bottom: 10px;
    font-weight: 700;
}

.news-meta {
    display: flex;
    gap: 15px;
    font-size: 0.95rem;
    color: #bbb;
    margin-bottom: 20px;
}

.news-category {
    background-color: #4caf50;
    padding: 5px 12px;
    border-radius: 20px;
    font-weight: 600;
    text-transform: uppercase;
    box-shadow: 0 0 8px rgba(76,175,80,0.7);
}

/* Haber Detay Resmi */
.news-detail .news-image {
    width: 50%;
    max-width: 50%;
    margin-bottom: 25px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 6px 12px rgba(0,0,0,0.7);
}

.news-detail .news-image img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    border-radius: 10px;
}

.news-date {
    font-style: italic;
}

/* Küçük fontlu meta bilgiler */
.news-category,
.news-date {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 10px;
}

/* Tam içerik alanı */
.news-content-full {
    width: 100%;
    font-size: 1.15rem;
    line-height: 1.7;
    white-space: pre-line;
    color: #ddd;
}

/* Geri dön linki */
.back-link {
    display: inline-block;
    margin-top: 30px;
    font-weight: 600;
    color: #4caf50;
    text-decoration: none;
    transition: color 0.3s ease;
}

.back-link:hover {
    color: #81c784;
}

.news-detail a:hover {
    text-decoration: underline;
}

/* ------------------------ */
/* Mobil uyumluluk (max 800px) */
/* ------------------------ */

@media (max-width: 800px) {
    /* Container dikey yöne geçsin */
    .container {
        flex-direction: column;
    }
    /* Main content soldaki margin kalksın */
    .main-content {
        margin-left: 0;
        padding: 10px 15px;
        width: 100%;
    }

    /* Haber detay container tam genişlik */
    .news-detail {
        margin: 15px 10px 40px;
        padding: 20px 15px;
        max-width: 100%;
        border-radius: 8px;
        align-items: flex-start;
    }

    /* Haber detay resmi tam genişlik */
    .news-detail .news-image {
        width: 100%;
        max-width: 100%;
    }

    /* Haber başlığı küçült */
    .news-detail h1 {
        font-size: 1.8rem;
    }

    /* Haber içeriği font küçült */
    .news-content-full {
        font-size: 1rem;
    }

    /* Haber meta elemanlar dikey yöne geçsin */
    .news-meta {
        flex-direction: column;
        gap: 8px;
    }

    /* Haber başlık fontları ve grid ayarı */
    .section-title {
        font-size: 1.5rem;
    }

    /* Haber grid kolonu küçült (min 100%) */
    .news-grid {
        grid-template-columns: repeat(auto-fill,minmax(100%,1fr));
        gap: 15px;
    }

    /* Haber başlığı küçült */
    .news-title {
        font-size: 1.1rem;
    }

    /* Kategori etiketi biraz küçült */
    .category-label {
        font-size: 12px;
        padding: 3px 10px;
    }

    /* Sayfalama butonları biraz küçült */
    .pagination a {
        padding: 6px 10px;
        margin: 0 3px;
        font-size: 0.9rem;
    }
}
