/*
Theme Name: Minimal Haber
Author: Gemini
Description: Hızlı, SEO uyumlu, Karanlık Mod destekli ve gelişmiş özelliklere sahip tema.
Version: 2.3
*/

/* =========================================
   1. TEMEL DEĞİŞKENLER & DARK MODE AYARLARI
   ========================================= */

/* Varsayılan (Aydınlık) Tema Renkleri */
:root {
    --main-width: 1200px; /* Admin panelden güncellenir */
    --primary-color: #cc0000;
    
    /* Light Mode */
    --bg-body: #ffffff;
    --bg-card: #ffffff;
    --bg-header: #ffffff;
    --bg-input: #ffffff;
    --text-main: #333333;
    --text-meta: #888888;
    --border-color: #eeeeee;
    --shadow-color: rgba(0,0,0,0.05);
}

/* Karanlık (Dark) Tema Renkleri */
body.dark-mode {
    --bg-body: #121212; /* Göz yormayan koyu gri */
    --bg-card: #1e1e1e; /* Kartlar ve Header için */
    --bg-header: #1e1e1e;
    --bg-input: #2c2c2c;
    --text-main: #e0e0e0; /* Tam beyaz değil, kırık beyaz */
    --text-meta: #a0a0a0;
    --border-color: #333333;
    --shadow-color: rgba(0,0,0,0.3);
}

/* =========================================
   2. GENEL SIFIRLAMA VE YAPI
   ========================================= */
* { box-sizing: border-box; margin: 0; padding: 0; }

body { 
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; 
    background-color: var(--bg-body); 
    color: var(--text-main); 
    line-height: 1.5; 
    transition: background-color 0.3s ease, color 0.3s ease; /* Renk geçiş animasyonu */
}

a { text-decoration: none; color: inherit; transition: 0.2s; }
a:hover { color: var(--primary-color); }

img { 
    max-width: 100%; 
    height: auto; 
    display: block; 
    opacity: 1 !important; 
}

ul { list-style: none; }

.container { 
    max-width: var(--main-width); 
    margin: 0 auto; 
    padding: 0 15px; 
}

/* --- KRİTİK AYAR: TÜM HABER BAŞLIKLARI BÜYÜK HARF --- */
h1, h2, h3, h4, h5, h6,
.news-title, .post-title, .widget-title, .page-title, .archive-title, .manset-caption h3, .breaking-item {
    text-transform: uppercase !important;
}

/* =========================================
   3. HEADER ALANI
   ========================================= */
.site-header { 
    padding: 20px 0; 
    border-bottom: 1px solid var(--border-color); 
    background-color: var(--bg-card) !important; 
    position: relative;
    z-index: 500;
    transition: background-color 0.3s ease;
}

.header-inner { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
}

.site-branding h1 { 
    font-size: 28px; 
    font-weight: 900; 
    letter-spacing: -1px; 
    line-height: 1;
}

.site-branding h1 a, 
.site-description, 
.menu-toggle { 
    color: var(--text-main); 
}

.site-description { 
    font-size: 13px; 
    color: var(--text-meta); 
    margin-top: 4px; 
}

.menu-toggle { 
    font-size: 26px; 
    cursor: pointer; 
    background: none; 
    border: none; 
    padding: 5px;
    color: var(--text-main);
}

/* Açılır Menü */
.main-navigation { 
    display: none; 
    position: absolute; 
    top: 100%; 
    right: 15px; 
    background: var(--bg-card); 
    border: 1px solid var(--border-color); 
    width: 220px; 
    z-index: 999; 
    box-shadow: 0 10px 20px var(--shadow-color); 
    border-radius: 4px;
}

.main-navigation.toggled { display: block; }

.main-navigation ul li a { 
    display: block; 
    padding: 12px 20px; 
    border-bottom: 1px solid var(--border-color); 
    font-weight: 600;
    color: var(--text-main);
    text-transform: uppercase; /* Menüler de büyük olsun */
}

.main-navigation ul li a:hover {
    background: var(--border-color); 
    color: var(--primary-color);
}

/* =========================================
   4. ŞIK DARK MODE ANAHTARI (TOGGLE)
   ========================================= */
.theme-switch-wrapper {
    display: flex;
    align-items: center;
    margin-right: 15px;
}
.theme-switch {
    display: inline-block;
    height: 26px;
    position: relative;
    width: 50px;
}
.theme-switch input { display: none; }

.slider {
    background-color: #ccc;
    bottom: 0;
    cursor: pointer;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    background-color: #fff;
    bottom: 4px;
    content: "";
    height: 18px;
    left: 4px;
    position: absolute;
    transition: .4s;
    width: 18px;
    border-radius: 50%;
    /* Güneş İkonu */
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="orange" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="5"></circle><line x1="12" y1="1" x2="12" y2="3"></line><line x1="12" y1="21" x2="12" y2="23"></line><line x1="4.22" y1="4.22" x2="5.64" y2="5.64"></line><line x1="18.36" y1="18.36" x2="19.78" y2="19.78"></line><line x1="1" y1="12" x2="3" y2="12"></line><line x1="21" y1="12" x2="23" y2="12"></line><line x1="4.22" y1="19.78" x2="5.64" y2="18.36"></line><line x1="18.36" y1="5.64" x2="19.78" y2="4.22"></line></svg>');
    background-repeat: no-repeat;
    background-position: center;
}

input:checked + .slider { background-color: #66bb6a; }

input:checked + .slider:before {
    transform: translateX(24px);
    /* Ay İkonu */
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"></path></svg>');
}

/* =========================================
   5. ÜST BAR (TOP BAR) & SON DAKİKA
   ========================================= */
.top-bar {
    background-color: #f8f8f8;
    border-bottom: 1px solid var(--border-color);
    font-size: 12px;
    padding: 8px 0;
    line-height: 1;
}

body.dark-mode .top-bar { background-color: #1a1a1a; border-bottom: 1px solid #333; }
.top-bar-inner { display: flex; justify-content: space-between; align-items: center; }
.top-left { color: var(--text-meta); font-weight: 600; }
.top-sep { margin: 0 10px; color: #ccc; }
.top-right ul { margin: 0; padding: 0; display: flex; gap: 15px; }
.top-right ul li { display: inline-block; }
.top-right ul li a { color: var(--text-meta); font-weight: 500; transition: 0.2s; }
.top-right ul li a:hover { color: var(--primary-color); }

/* =========================================
   SON DAKİKA BARI (CHROME & EDGE UYUMLU)
   ========================================= */
.breaking-news-bar {
    width: 100%;
    height: 44px;
    background-color: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    overflow: hidden;
    position: relative;
    z-index: 10;
    /* Chrome render düzeltmesi */
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

.breaking-inner {
    display: flex !important; /* Flex yapısını zorla */
    display: -webkit-flex !important; /* Chrome eski sürüm desteği */
    align-items: center;
    -webkit-align-items: center;
    height: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Kırmızı Etiket */
.breaking-label {
    background-color: var(--primary-color);
    color: #fff;
    font-weight: 800;
    font-size: 13px;
    padding: 0 15px;
    height: 100%;
    display: flex;
    display: -webkit-flex;
    align-items: center;
    -webkit-align-items: center;
    text-transform: uppercase;
    flex-shrink: 0;
    position: relative;
    z-index: 20;
}

.breaking-label:after {
    content: "";
    position: absolute;
    top: 0;
    right: -10px;
    width: 0;
    height: 0;
    border-top: 44px solid var(--primary-color);
    border-right: 12px solid transparent;
}

/* Kayan Yazı Alanı */
.breaking-content {
    flex: 1;
    -webkit-flex: 1;
    overflow: hidden;
    position: relative;
    height: 100%;
    display: flex;
    display: -webkit-flex;
    align-items: center;
    -webkit-align-items: center;
    mask-image: linear-gradient(to right, transparent, black 20px, black 95%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 20px, black 95%, transparent);
}

/* Animasyon */
.breaking-scroll {
    display: flex;
    display: -webkit-flex;
    flex-wrap: nowrap;
    white-space: nowrap;
    padding-left: 100%;
    /* Donanım hızlandırma ve akıcılık için */
    will-change: transform;
    animation: breaking-scroll 30s linear infinite;
    -webkit-animation: breaking-scroll 30s linear infinite;
}

.breaking-scroll:hover {
    animation-play-state: paused;
    -webkit-animation-play-state: paused;
}

/* Haber Öğeleri */
.breaking-item {
    display: inline-flex;
    display: -webkit-inline-flex;
    align-items: center;
    margin-right: 40px;
    font-size: 14px;
    color: var(--text-main);
    text-decoration: none;
    font-weight: 600;
    text-transform: uppercase;
}

.breaking-item:hover { color: var(--primary-color); }

.bk-time {
    background: #f0f0f0;
    color: #666;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 11px;
    margin-right: 8px;
}

/* Dark Mode */
body.dark-mode .bk-time { background: #333; color: #aaa; }

/* Animasyon Keyframes */
@keyframes breaking-scroll {
    0% { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(-100%, 0, 0); }
}

@-webkit-keyframes breaking-scroll {
    0% { -webkit-transform: translate3d(0, 0, 0); }
    100% { -webkit-transform: translate3d(-100%, 0, 0); }
}
/* =========================================
   6. MANŞET SİSTEMİ
   ========================================= */
.manset-wrapper {
    position: relative;
    width: 100%;
    height: 460px;
    background: #000;
    margin-bottom: 30px;
    overflow: hidden;
    border-radius: 4px;
}

.manset-stage { position: relative; width: 100%; height: 100%; }

.manset-slide {
    position: absolute; top: 0; left: 0;
    width: 100%; height: 100%;
    opacity: 0; visibility: hidden;
    transition: opacity 0.3s ease-in-out;
    z-index: 1; display: block;
}

.manset-slide.active { opacity: 1; visibility: visible; z-index: 10; }
.manset-slide img { width: 100%; height: 100%; object-fit: cover; }

.manset-ad-wrap {
    width: 100%; height: 100%;
    background: var(--border-color);
    display: flex; align-items: center; justify-content: center;
    padding-bottom: 40px;
    color: var(--text-main); font-weight: bold;
}

.manset-caption {
    position: absolute; bottom: 40px; left: 0;
    width: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.95) 10%, rgba(0,0,0,0.6) 50%, transparent 100%);
    padding: 40px 20px 15px 20px;
    z-index: 20; pointer-events: none;
}

.manset-caption h3 {
    color: #fff; font-size: 24px; font-weight: 800; margin: 0;
    text-shadow: 0 2px 4px rgba(0,0,0,0.8);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

.manset-nav {
    position: absolute; bottom: 0; left: 0;
    width: 100%; height: 40px;
    background: var(--bg-card) !important;
    display: flex; z-index: 100;
    border-top: 1px solid var(--border-color);
}

.manset-nav span {
    flex: 1; display: flex; align-items: center; justify-content: center;
    color: var(--text-meta); font-size: 14px; font-weight: 700;
    cursor: pointer;
    border-right: 1px solid var(--border-color);
    background: var(--bg-card);
    transition: all 0.2s ease;
}

.manset-nav span:hover, .manset-nav span.active { background: var(--primary-color); color: #fff; }

/* =========================================
   7. İÇERİK YAPISI VE KARTLAR
   ========================================= */
.latest-news h2 {
    font-size: 22px; font-weight: 800; margin-bottom: 20px;
    padding-bottom: 10px; border-bottom: 2px solid var(--text-main);
    display: inline-block; color: var(--text-main);
}

.news-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); 
    gap: 25px; margin-bottom: 40px; 
}

.news-item { 
    border: 1px solid var(--border-color); 
    border-radius: 6px; overflow: hidden; 
    transition: 0.3s; 
    background: var(--bg-card);
    box-shadow: 0 2px 5px var(--shadow-color);
}

.news-item:hover { transform: translateY(-3px); box-shadow: 0 10px 20px var(--shadow-color); }
.news-item img { height: 200px; width: 100%; object-fit: cover; }
.news-content { padding: 15px; }
.news-title { font-size: 17px; font-weight: 700; margin-bottom: 8px; line-height: 1.4; color: var(--text-main); }
.news-meta { font-size: 12px; color: var(--text-meta); font-weight: 500; }

.content-wrapper { display: flex; gap: 40px; margin-top: 30px; margin-bottom: 50px; align-items: flex-start; }
.main-content { flex: 2; min-width: 0; }
.sidebar { flex: 1; max-width: 350px; position: -webkit-sticky; position: sticky; top: 20px; }

/* =========================================
   8. YAZI DETAY & DİĞERLERİ
   ========================================= */
.post-header { background: transparent !important; border: none !important; margin-bottom: 20px; padding-bottom: 15px; }
.post-title { font-size: 32px; line-height: 1.3; margin-bottom: 10px; color: var(--text-main); }
.post-meta { color: var(--text-meta); font-size: 14px; margin-bottom: 20px; border-bottom: 1px solid var(--border-color); padding-bottom: 15px; }
.post-thumbnail img { width: 100%; border-radius: 4px; margin-bottom: 25px; }
.post-content { font-size: 18px; line-height: 1.7; color: var(--text-main); }
.post-content p { margin-bottom: 20px; }
.post-content h2, .post-content h3 { margin-top: 30px; margin-bottom: 15px; font-weight: 700; color: var(--text-main); }

.widget { margin-bottom: 30px; padding: 20px; border-radius: 4px; border: 1px solid var(--border-color); background: var(--bg-card); }
.widget-title { font-size: 18px; border-bottom: 2px solid var(--primary-color); padding-bottom: 10px; margin-bottom: 15px; display: inline-block; color: var(--text-main); }
.widget ul li { border-bottom: 1px solid var(--border-color); padding: 8px 0; }
.widget ul li a { color: var(--text-main); font-weight: 500; }
.widget ul li a:hover { color: var(--primary-color); }

.ad-space { width: 100%; margin: 25px 0; text-align: center; display: flex; justify-content: center; align-items: center; }
.ad-placeholder { background: var(--bg-card); color: var(--text-meta); padding: 20px; width: 100%; text-align: center; font-size: 12px; font-weight: bold; border: 1px dashed var(--border-color); }

input, textarea, select { width: 100%; padding: 12px; border: 1px solid var(--border-color); border-radius: 4px; background-color: var(--bg-input); color: var(--text-main); }
.search-form { display: flex; gap: 10px; }
.search-submit, .submit-btn { background: var(--primary-color); color: #fff; border: none; padding: 10px 20px; border-radius: 4px; cursor: pointer; font-weight: bold; font-size: 14px; width: auto; }
.search-submit:hover, .submit-btn:hover { background: #333; }

.breadcrumbs { font-size: 13px; color: var(--text-meta); margin-bottom: 20px; }
.breadcrumbs a { color: var(--text-main); font-weight: 600; }

.share-buttons { margin: 30px 0; padding: 20px 0; border-top: 1px solid var(--border-color); border-bottom: 1px solid var(--border-color); display: flex; align-items: center; gap: 10px; }
.share-btn { padding: 8px 15px; border-radius: 4px; color: #fff; font-size: 13px; font-weight: bold; }
.whatsapp { background: #25D366; } .twitter { background: #000; } .facebook { background: #1877F2; }

/* =========================================
   9. FOOTER & MOBİL
   ========================================= */
footer { background: #0d0d0d; color: #ccc; padding: 50px 0; margin-top: 50px; font-size: 14px; border-top: 1px solid var(--border-color); }
.footer-inner { display: flex; justify-content: space-between; flex-wrap: wrap; align-items: center; }
.footer-col { width: 48%; }
.footer-menu ul li { display: inline-block; margin-left: 20px; }
.footer-menu ul li a { color: #ccc; } 
.footer-menu ul li a:hover { color: #fff; }

@media (max-width: 768px) {
    .header-inner { flex-direction: row; }
    .manset-wrapper { height: 320px; }
    .manset-nav { justify-content: flex-start; overflow-x: auto; }
    .manset-nav span { min-width: 45px; flex: none; }
    .footer-col { width: 100%; text-align: center; margin-bottom: 20px; }
    .footer-menu { text-align: center !important; }
    .content-wrapper { flex-direction: column; }
    .sidebar { max-width: 100%; position: static; }
    .top-bar-inner { flex-direction: column; gap: 5px; text-align: center; }
    .breaking-label { padding: 0 10px; font-size: 11px; }
    .breaking-label:after { display: none; }
}
/* =========================================
   MOBİL İÇİN ÖZEL DÜZENLEMELER
   ========================================= */

@media (max-width: 768px) {
    
    /* 1. Üst Barı (Tarih/Hava Durumu) Gizle */
    .top-bar {
        display: none !important;
    }

    /* 2. Single (Detay) Sayfası Düzenlemeleri */
    .single-post {
        display: flex;
        flex-direction: column;
    }

    /* Breadcrumb (Link yolu) mobilde gizle */
    .breadcrumbs {
        display: none !important;
    }

    /* Resmi başlığın üstüne taşı (Flex Order ile) */
    .post-thumbnail {
        order: -1;
        margin-bottom: 15px !important;
        margin-top: 0 !important;
    }
    
    .post-thumbnail img {
        border-radius: 0 !important; /* Mobilde tam genişlik daha şık durur */
    }

    .post-header {
        margin-bottom: 10px;
        padding: 0 5px; /* Başlık kenarlara çok yapışmasın */
    }

    .post-title {
        font-size: 24px; /* Mobilde başlık biraz daha küçülsün */
    }

    /* Mevcut Menü Butonunu Header'da Gizleyelim (Aşağıya alacağız) 
       İsteğe bağlı: Header temiz kalsın derseniz bu satırı kullanın: 
       .menu-toggle { display: none; } 
    */

    /* 3. Mobil Alt Navigasyon Barı Stili */
    .mobile-bottom-nav {
        display: flex !important; /* Masaüstünde gizli, burada aç */
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        background-color: var(--bg-card);
        border-top: 1px solid var(--border-color);
        height: 60px;
        z-index: 9999;
        justify-content: space-around;
        align-items: center;
        box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
        padding-bottom: env(safe-area-inset-bottom); /* iPhone X ve üstü için güvenli alan */
    }

    .mb-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        font-size: 10px;
        color: var(--text-meta);
        text-decoration: none;
        flex: 1;
        height: 100%;
    }

    .mb-item svg {
        width: 24px;
        height: 24px;
        margin-bottom: 4px;
        stroke: var(--text-main);
        fill: none;
    }

    .mb-item.active, .mb-item:active {
        color: var(--primary-color);
    }
    
    .mb-item.active svg {
        stroke: var(--primary-color);
    }

    /* Footer'ın navigasyonun altında kalmaması için boşluk bırak */
    body {
        padding-bottom: 70px;
    }
}

/* Masaüstünde Alt Barı Gizle */
.mobile-bottom-nav {
    display: none;
}