/* assets/css/style.css - TEMİZ VE ÇAKIŞMASIZ SÜRÜM */

:root {
    --primary-color: #b91c1c;
    --text-color: #333;
    --text-light: #666;
    --bg-color: #f9f9f9;
    --card-bg: #fff;
    --border-color: #e5e7eb;
    --heading-color: #000;
}

body.dark-theme {
    --primary-color: #ff5252;
    --text-color: #e0e0e0;
    --text-light: #a0a0a0;
    --bg-color: #121212;
    --card-bg: #1e1e1e;
    --border-color: #333;
    --heading-color: #fff;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Roboto', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    transition: background-color 0.3s, color 0.3s;
}

a { text-decoration: none; color: inherit; transition: 0.3s; }
ul { list-style: none; }
.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

/* --- HEADER --- */
.site-header {
    background: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

/* Header İç Yapısı - Mobilde kırılmayı sağlamak için wrap ekledik */
.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    flex-wrap: wrap; 
}

.logo {
    font-size: 24px;
    font-weight: 700;
    color: var(--heading-color);
    display: flex;
    flex-direction: column;
    line-height: 1;
}
.logo span { color: var(--primary-color); }
.logo small { font-size: 12px; color: var(--text-light); letter-spacing: 2px; }

.main-nav ul { display: flex; gap: 20px; }
.main-nav a { font-weight: 500; font-size: 15px; color: var(--text-color); }
.main-nav a:hover { color: var(--primary-color); }

.btn-contact {
    background: var(--heading-color);
    color: var(--bg-color) !important;
    padding: 8px 15px;
    border-radius: 4px;
}

.mobile-menu-icon { display: none; cursor: pointer; font-size: 24px; color: var(--text-color); }

/* Arama Kutusu */
.search-box form {
    display: flex; align-items: center; 
    border: 1px solid var(--border-color); 
    padding: 5px 10px; border-radius: 20px; 
    background: var(--card-bg);
}
.search-box input {
    border: none; outline: none; font-size: 14px; 
    width: 150px; background: transparent; color: var(--text-color);
}
.search-box button { background: none; border: none; cursor: pointer; color: var(--text-color); }

/* --- İÇERİK --- */
.main-content { padding: 40px 0; }
h1, h2, h3, h4 { color: var(--heading-color); }

.content-wrapper {
    display: flex; gap: 40px; margin-top: 40px; align-items: flex-start;
}
.main-area { flex: 3; }
.sidebar-area { flex: 1; position: sticky; top: 90px; }

/* Manşet */
.hero-section {
    position: relative; height: 450px; border-radius: 12px; 
    overflow: hidden; margin-bottom: 40px; background-color: #333;
}
.hero-bg { width: 100%; height: 100%; object-fit: cover; opacity: 0.7; transition: 0.5s; }
.hero-content {
    position: absolute; bottom: 0; left: 0; width: 100%; padding: 40px;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent); color: #fff;
}
.hero-title { font-size: 32px; font-weight: 700; color: #fff; text-shadow: 2px 2px 4px #000; }
.hero-cat { background: var(--primary-color); color: #fff; padding: 5px 10px; font-size: 12px; border-radius: 4px; }
.hero-meta { color: #fff; margin-top: 10px; opacity: 0.8; }

/* Haber Grid */
.news-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 30px;
}
.news-card {
    background: var(--card-bg); border-radius: 8px; 
    overflow: hidden; box-shadow: 0 2px 10px rgba(0,0,0,0.05); border: 1px solid var(--border-color);
}
.news-img { height: 200px; background-color: var(--border-color); }
.news-img img { width: 100%; height: 100%; object-fit: cover; }
.news-body { padding: 20px; }
.news-title { font-size: 18px; margin-bottom: 10px; font-weight: 700; color: var(--heading-color); }
.news-excerpt { font-size: 14px; color: var(--text-light); font-family: 'Merriweather', serif; }

/* Widget */
.widget {
    background: var(--card-bg); border: 1px solid var(--border-color);
    padding: 20px; border-radius: 8px; margin-bottom: 30px;
}
.widget h3 {
    font-size: 18px; border-bottom: 2px solid var(--primary-color);
    padding-bottom: 10px; margin-bottom: 20px; color: var(--heading-color);
}
.author-avatar { width: 100px; height: 100px; border-radius: 50%; object-fit: cover; border: 3px solid var(--primary-color); }

/* Footer */
.site-footer { background: #1a1a1a; color: #ccc; padding: 40px 0 20px; margin-top: 50px; }
.footer-content { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; }

/* Haber Detay Ekstralar */
#progress-container { position: fixed; top: 0; left: 0; width: 100%; height: 4px; z-index: 9999; }
#progress-bar { height: 4px; background: var(--primary-color); width: 0%; }
.article-content img { max-width: 100%; height: auto; }
.reading-tools { display: inline-flex; gap: 15px; padding: 10px; border: 1px solid var(--border-color); border-radius: 8px; }
.tool-btn { background: none; border: none; cursor: pointer; color: var(--text-color); }


/* =======================================================
   MOBİL VE TABLET UYUMLULUK KODLARI (EN ALTA EKLENMELİ)
   ======================================================= */

/* 1. TABLET (1024px ve altı) */
@media (max-width: 1024px) {
    .container { max-width: 100%; padding: 0 20px; }
}

/* 2. MOBİL (768px ve altı) */
@media (max-width: 768px) {
    
    /* --- HEADER DÜZENİ --- */
    /* Header elemanlarını serbest bırakıyoruz ki alt alta geçebilsinler */
    .header-inner {
        flex-wrap: wrap;
        gap: 15px;
    }

    /* Logo: Tam genişlik ve ortalı */
    .logo {
        flex: 0 0 100%;
        text-align: center;
        align-items: center;
        margin-bottom: 5px;
    }

    /* Menü İkonu: Sağ üst köşeye sabitle */
    .mobile-menu-icon {
        display: block;
        position: absolute;
        top: 0;
        right: 0;
        padding: 10px;
        background: var(--card-bg);
    }

    /* Menü Linkleri: Varsayılan olarak GİZLİ */
    .main-nav {
        flex: 0 0 100%;
        width: 100%;
    }
    .main-nav ul {
        display: none; /* JS ile block yapılacak */
        flex-direction: column;
        width: 100%;
        text-align: center;
        background: var(--bg-color);
        padding: 15px 0;
        border-top: 1px solid var(--border-color);
        border-bottom: 1px solid var(--border-color);
    }
    .main-nav ul li { margin-bottom: 10px; }
    .btn-contact { display: block; width: 100%; }

    /* Arama Kutusu: En altta ve tam genişlik */
    .search-box {
        flex: 0 0 100%;
        order: 5; /* En sona at */
        width: 100%;
    }
    .search-box form { width: 100%; }
    .search-box input { width: 100% !important; flex: 1; }


    /* --- İÇERİK DÜZENİ --- */
    .content-wrapper {
        flex-direction: column; /* Yan yana değil, alt alta */
    }
    .main-area, .sidebar-area {
        width: 100%;
        flex: auto;
    }

    /* Manşet */
    .hero-section { height: 280px; }
    .hero-title { font-size: 20px; }

    /* Haber Grid: Tek Kolon */
    .news-grid {
        grid-template-columns: 1fr; /* Sadece 1 sütun */
        gap: 25px;
    }
    .news-img { height: 220px; }
    
    /* Footer */
    .footer-content { grid-template-columns: 1fr; text-align: center; gap: 30px; }
}


/* POPULAR NEWS WIDGET */
.popular-item{
    display:flex;
    gap:10px;
    margin-bottom:12px;
    text-decoration:none;
    color:#111;
}

.popular-item img{
    width:80px;
    height:60px;
    object-fit:cover;
    border-radius:6px;
}

.popular-title{
    font-size:14px;
    font-weight:600;
    line-height:1.3;
}

.popular-views{
    font-size:12px;
    color:#888;
    margin-top:4px;
}



/* ===== PREMIUM TOUCH (CSS ONLY) ===== */
.container { max-width: 1180px; }

.site-header{
  background: rgba(255,255,255,.88);
  backdrop-filter: blur(10px);
}

.hero-section{
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,.08);
}
.hero-bg{ opacity:.82; }

.news-card{
  border-radius: 16px;
  box-shadow: 0 10px 22px rgba(0,0,0,.06);
  transition: transform .18s ease, box-shadow .18s ease;
}
.news-card:hover{
  transform: translateY(-3px);
  box-shadow: 0 16px 35px rgba(0,0,0,.10);
}
.news-body{ padding: 16px; }
.news-title{ letter-spacing: -.2px; }
.news-excerpt{ line-height: 1.7; }

.widget{
  border-radius: 16px;
  box-shadow: 0 10px 20px rgba(0,0,0,.05);
}

.sidebar-area{ top: 92px; }

/* Popular widget’ı daha premium */
.popular-item{
  padding: 10px;
  border: 1px solid var(--border-color);
  border-radius: 14px;
  background: var(--card-bg);
}
.popular-item:hover{
  background: rgba(0,0,0,.02);
}
.popular-item img{
  border-radius: 12px;
  width: 90px;
  height: 70px;
}

/* Mobile: daha rahat boşluk */
@media (max-width: 768px){
  .main-content{ padding: 24px 0; }
  .content-wrapper{ gap: 22px; margin-top: 22px; }
  .hero-content{ padding: 18px; }
}







