/* ========================================= */
/* 1. TEMEL DEĞİŞKENLER (TEK VE NET)         */
/* ========================================= */
:root {
    /* RENK PALETİ (Webtekno Kırmızısı & Koyu Tema) */
    --primary: #CC0000;       
    --primary-hover: #ff0000;
    --accent: #f59e0b;        /* Turuncu detaylar için */
    
    /* KOYU TEMA (Varsayılan) */
    --bg-body: #0e0e10;       /* Derin Siyah */
    --surface: #18181b;       /* Kart Rengi */
    --surface-hover: #27272a;
    --text-main: #f4f4f5;     /* Beyaz Metin */
    --text-muted: #a1a1aa;    /* Gri Metin */
    --border: #27272a;        /* Silik Çerçeve */
    --shadow: 0 10px 20px rgba(0,0,0,0.5); /* Derin Gölge */
    
    /* AYARLAR */
    --radius: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font-main: 'Inter', system-ui, -apple-system, sans-serif;
}

/* AÇIK TEMA (Light Mode) */
:root[data-theme="light"] {
    --bg-body: #f3f4f6;
    --surface: #ffffff;
    --surface-hover: #f9fafb;
    --text-main: #111827;
    --text-muted: #6b7280;
    --border: #e5e7eb;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* ========================================= */
/* 2. GENEL SIFIRLAMA                        */
/* ========================================= */
* { box-sizing: border-box; }

body {
    background-color: var(--bg-body);
    color: var(--text-main);
    font-family: var(--font-main);
    margin: 0;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; transition: var(--transition); }
a:hover { color: var(--primary); }
img { max-width: 100%; display: block; }

.container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Kart Genel Stili */
.card, .sidebar-ad, .widget, .author-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

/* ========================================= */
/* 3. LAYOUT (IZGARA SİSTEMİ)                */
/* ========================================= */
.main-grid {
    display: grid;
    grid-template-columns: 1fr 320px; /* Sol geniş, Sağ 320px sabit */
    gap: 40px;
    margin-top: 30px;
    align-items: start;
}

/* Mobil Uyumluluk */
@media (max-width: 900px) {
    .main-grid { grid-template-columns: 1fr; } /* Mobilde tek sütun */
    .article-title { font-size: 1.8rem !important; }
}

/* ========================================= */
/* 4. HABER DETAY SAYFASI (POST.PHP)         */
/* ========================================= */

/* Başlık Alanı */
.article-header {
    margin-bottom: 30px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 20px;
}

.article-category {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(204, 0, 0, 0.15);
    color: var(--primary);
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 15px;
}

.article-title {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin: 0 0 20px 0;
    color: var(--text-main);
    letter-spacing: -0.5px;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    font-size: 0.9rem;
    color: var(--text-muted);
    align-items: center;
}

.author-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--surface-hover);
    padding: 5px 15px 5px 5px; /* Resmi sarmala */
    border-radius: 50px;
    border: 1px solid var(--border);
    color: var(--text-main);
    font-weight: 600;
}

.author-pill img {
    width: 28px; height: 28px;
    border-radius: 50%;
    object-fit: cover;
}

/* Öne Çıkan Görsel */
.article-featured-image {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    border-radius: var(--radius);
    margin-bottom: 40px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

/* ========================================= */
/* 5. İÇERİK METNİ VE FOTOĞRAFLAR (KRİTİK)   */
/* ========================================= */
.article-content {
    font-size: 1.15rem;
    line-height: 1.8;
    color: var(--text-main);
}

/* Metin içindeki <img src=""> etiketleri için Webtekno stili */
.article-content img {
    width: 100% !important;     /* Tam genişlik */
    height: auto !important;
    border-radius: 12px;
    margin: 40px 0;             /* Üst/Alt boşluk */
    box-shadow: 0 10px 30px rgba(0,0,0,0.4); /* Sinematik gölge */
    border: 1px solid var(--border);
    display: block;
}

.article-content p { margin-bottom: 25px; }

.article-content h2 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-top: 40px;
    margin-bottom: 20px;
    color: var(--text-main);
    border-left: 4px solid var(--primary);
    padding-left: 15px;
}

.article-content a {
    color: var(--primary);
    font-weight: 600;
    border-bottom: 2px solid rgba(204, 0, 0, 0.2);
}

/* Listeler */
.article-content ul, .article-content ol {
    margin: 25px 0; padding-left: 20px;
}
.article-content li { margin-bottom: 10px; }
.article-content li::marker { color: var(--primary); font-weight: bold; }

/* ========================================= */
/* 6. ALT BİLEŞENLER (Yazar, Sidebar)        */
/* ========================================= */

/* Yazar Kartı */
.author-card {
    display: flex; align-items: center; gap: 20px;
    padding: 30px; margin-top: 60px;
}
.author-card img {
    width: 80px; height: 80px;
    border-radius: 50%; object-fit: cover;
    border: 3px solid var(--surface-hover);
}
.author-card h4 { margin: 0 0 5px 0; font-size: 1.2rem; color: var(--text-main); }
.author-card .role { 
    font-size: 0.75rem; color: var(--primary); 
    font-weight: 800; text-transform: uppercase; letter-spacing: 1px;
}

/* Sidebar */
.sidebar-ad {
    height: 300px;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 30px;
    color: var(--text-muted);
    font-size: 0.9rem;
    background: var(--bg-body); /* Karttan farklı olsun diye */
    border: 1px dashed var(--border);
}

.widget { padding: 0; overflow: hidden; }
.widget-header {
    padding: 15px;
    border-bottom: 1px solid var(--border);
    background: var(--surface-hover);
    font-weight: 700;
    color: var(--text-main);
}
/* ========================================= */
/* POST.PHP'DEN TAŞINAN MAKALE STİLLERİ (Post page consistency) */
/* ========================================= */

/* İçerik metni */
.article-content { font-size: 1.15rem; color: var(--text-main); line-height: 1.8; }
.article-content p { margin-bottom: 25px; }

/* İçerik Fotoğrafları */
.article-content img {
    display: block;
    width: 100% !important;
    height: auto !important;
    border-radius: 12px;
    margin: 40px 0;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    border: 1px solid var(--border); 
}

/* İçerik Başlıkları */
.article-content h2 {
    font-size: 1.8rem;
    font-weight: 800;
    margin-top: 40px;
    margin-bottom: 20px;
    color: var(--text-main);
    letter-spacing: -0.5px;
    border-left: 5px solid var(--primary); 
    padding-left: 15px;
}

.article-content h3 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-top: 30px;
    margin-bottom: 15px;
    color: var(--text-main);
}

/* İçerik Linkleri */
.article-content a {
    color: var(--primary);
    font-weight: 600;
    border-bottom: 2px solid rgba(204, 0, 0, 0.2);
    transition: all 0.2s;
}
.article-content a:hover {
    background: rgba(204, 0, 0, 0.1);
    border-bottom-color: var(--primary);
}

/* İçerik Listeleri */
.article-content ul, .article-content ol {
    margin: 25px 0;
    padding-left: 20px;
    color: var(--text-main);
    font-size: 1.1rem;
}
.article-content li { margin-bottom: 10px; }
.article-content ul li::marker { color: var(--primary); font-size: 1.2em; }

/* Yazar Rol Rozeti */
.author-role-badge {
    display: inline-block;
    font-size: 0.75rem;
    color: #fff; 
    background: var(--primary);
    padding: 3px 10px;
    border-radius: 4px;
    margin-top: 6px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Sayfa Düzeni (main-grid vb. de assets/style.css'te olmalıdır) */
.article-meta { display: flex; flex-wrap: wrap; gap: 20px; font-size: 0.9rem; color: var(--text-muted); align-items: center; }
.author-pill { display: flex; align-items: center; gap: 10px; background: var(--surface); padding: 5px 15px 5px 5px; border-radius: 50px; border: 1px solid var(--border); color: var(--text-main); font-weight: 600; }
.author-pill img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
.article-featured-image { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: var(--radius); margin-bottom: 30px; border: 1px solid var(--border); }
.author-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 25px; display: flex; align-items: center; gap: 20px; margin-top: 50px; }
.author-card img { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; border: 2px solid var(--border); }