
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    transition: 0.3s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: #f5f5f7;
    color: #1d1d1f;
    line-height: 1.6;
    overflow-x: hidden; /* Sağa kaymayı engeller */
}

/* =========================================
   2. ÜST MENÜ (NAVBAR)
   ========================================= */
.header {
    background: #000 !important;
    width: 100% !important;
    position: sticky;
    top: 0;
    z-index: 9999;
}

.logo {
    color: #ffffff !important;
    text-decoration: none !important;
    font-weight: 800 !important;
    white-space: nowrap !important;
    display: flex !important;
    align-items: center !important;
}

/* --- 1. MASAÜSTÜ (LAPTOP) DÜZENİ --- */
@media (min-width: 769px) {
    .header {
        height: 65px !important;
        display: flex !important;
        align-items: center !important;
    }

    .nav {
        display: flex !important;
        justify-content: space-between !important; /* Logo bir uçta, grup diğer uçta */
        align-items: center !important;
        width: 95% !important;
        max-width: 1400px;
        margin: 0 auto !important;
    }

    .logo {
        font-size: 24px !important;
    }

    /* Sağ tarafı (Kategoriler + İkonlar) birleştiren paket */
    .nav-right-group {
        display: flex !important;
        align-items: center !important;
        gap: 0px !important; /* Kategoriler ve İkonlar arasındaki boşluk */
    }

    .cats {
        display: flex !important;
        gap: 20px !important;
    }

    .cats a {
        color: #fff !important;
        text-decoration: none !important;
        font-size: 13px !important;
        font-weight: 700 !important;
        text-transform: uppercase !important;
    }

    .nav-icons {
        display: flex !important;
        align-items: center !important;
        gap: 20px !important;
    }

    .nav-icons svg, .nav-icons i {
        color: white !important;
        stroke: white !important;
    }
}

/* --- 2. MOBİL DÜZENİ --- */
@media (max-width: 768px) {
    .header { height: auto !important; }
    .nav { display: flex !important; flex-direction: column !important; width: 100% !important; }
    
    /* Üst Katman: Logo ve İkonlar */
   .nav-top {
        display: flex !important;
        flex-direction: column !important; /* Elemanları serbest bırak */
        justify-content: center !important;
        align-items: center !important;
        height: 75px !important; /* Yüksekliği 75px yaparak ikonlara yer açtık */
        background: #000 !important;
        position: relative !important;
    }
    .logo { 
        margin-top: 5px !important; 
        font-size: 20px !important;
    }
    
    /* Mobilde sağ grup içindeki ikonları bağımsız yapıyoruz */
   .nav-icons {
        position: absolute !important;
        right: 15px !important;
        top: 5px !important; /* Üstten 22px aşağıda sabitledik (Çizgi 75px'te başlıyor) */
        display: flex !important;
        gap: 15px !important;
        z-index: 999 !important;
    }
    
    /* Alt Katman: Siyah Bar ve Kategoriler */
    .nav-bottom {
        width: 100% !important;
        border-top: 1px solid #333 !important; /* Çizgiyi biraz daha belirgin (gri) yaptık */
        background: #000 !important;
        padding: 12px 0 !important;
        margin-top: 0 !important;
    }
    .cats {
        display: flex !important;
        overflow-x: auto !important;
        gap: 15px !important;
        padding: 0 15px !important;
    }
    .cats::-webkit-scrollbar { display: none; }
    .cats a { color: #fff !important; font-size: 11px !important; white-space: nowrap !important; text-decoration: none !important; }

    /* Mobilde sağ grubu devredışı bırakıyoruz (Çakışmayı önler) */
    .nav-right-group { display: contents !important; }
}
.search-mini {
    display: flex;
    align-items: center;
    background: transparent !important; /* Gri arka planı buradan sildik */
    border: none !important;
    position: relative; /* Butonun içine binmesi için */
}

/* 2. Yazı Yazılan Alan (Esas gri yer burası olabilir) */
#searchInput {
    background: transparent !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    color: white;
    width: 30px; /* Sadece ikon kadar yer kaplasın */
    padding: 0;
    cursor: pointer;
    transform: translateY(1px);
}

/* 3. Arama Butonu (SVG İkonun olduğu yer) */
.search-btn {
    background: none !important;
    border: none !important;
    outline: none !important;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    color: white;
    margin-left: -25px; /* İkonu inputun üzerine çeker */
}

/* 4. İkon Efektleri */
.search-btn svg {
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.search-btn:hover svg {
    transform: scale(1.1);
    opacity: 0.8;
}
/* =========================================
   3. MANŞETLER (HERO & SECONDARY)
   ========================================= */
/* Büyük manşeti tam genişlik yap */
/* Ana kapsayıcıyı dikey yapıyoruz */
.hero-section {
    display: flex;
    flex-direction: column; /* Her şeyi alt alta dizer */
    gap: 20px;
    width: 80%;
    max-width: 1100px;   /* Çok geniş ekranlarda devasa olmaması için bir sınır */
    margin: 40px auto;
    
    align-items: center;
}

/* Büyük kartı tam genişlik yapıyoruz */
.big-card-horizontal {
    display: flex; /* Yan yana diz */
    width: 100%;
    height: 300px;
    background: #ffffff;
    border-radius: 20px;
    overflow: hidden;
    text-decoration: none;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    margin-bottom: 30px;
}

/* Sol taraf: Resim alanı */
.big-card-image {
    width: 50%; /* Tam yarısı */
    height: 100%;
}

.big-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Sağ taraf: Metin alanı */
.big-card-content {
    width: 50%; /* Diğer yarısı */
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center; /* Yazıları dikeyde ortalar */
    background: #fff;
}

.big-card-content h2 {
    color: #1d1d1f;
    font-size: 28px;
    margin: 15px 0;
    line-height: 1.2;
}

.big-card-content p {
    color: #424245;
    font-size: 16px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3; /* Özet çok uzunsa 3 satırda keser */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.category-tag {
    color: #0071e3;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 12px;
}

/* Mobil Uyumluluk: Telefonlarda resim üste, yazı alta gelsin */
@media (max-width: 768px) {
    .big-card-horizontal {
        flex-direction: column;
        height: auto;
    }
    .big-card-image, .big-card-content {
        width: 100%;
    }
    .big-card-image {
        height: 250px;
    }
}


/* Alttaki 4'lü ızgara */
.hero-bottom-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px; /* Kutular arası boşluk */
    width: 100%;
    align-items: stretch;
    background: #ffffff; /* Kutunun arka planı beyaz */
    border-radius: 18px; /* Yumuşak köşeler */
    overflow: hidden;
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05); /* Hafif modern gölge */
    border: 1px solid #f0f0f2; /* Çok hafif bir çerçeve */
    height: 100%;
}

.news-card-wrapper:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

/* Resim alanı */
.card-image {
    width: 100%;
    height: 130px;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
@media (max-width: 900px) {
    .hero-bottom-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 500px) {
    .hero-bottom-grid {
        grid-template-columns: 1fr; /* Çok küçük ekranda tekli dizi */
    }
}


/* Tüm haber kartı başlıklarındaki alt çizgileri siler */
.card-body h2, 
.card-content-bottom h2, 
.big-card-content h2,
.related-news-section h4 {
    text-decoration: none !important;
}

/* Linklerin genelinde alt çizgiyi kaldırıp temiz bir görüntü sağlar */
.news-card-wrapper, 
.small-card-new-vertical, 
.big-card-horizontal {
    text-decoration: none !important;
}

/* Üzerine gelince (hover) çizgi çıkmasını da engellemek için */
.news-card-wrapper:hover h2, 
.small-card-new-vertical:hover h2 {
    text-decoration: none !important;
}
/* Yazı alanı */
.card-body {
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.card-date {
    font-size: 11px;
    color: #86868b;
    font-weight: 600;
    text-transform: uppercase;
}

.card-body h2 {
    color: #1d1d1f !important;
    font-size: 14px !important;
    font-weight: 600;
    line-height: 1.4;
    margin: 0;
    /* Uzun başlıkları sınırlama */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Küçük kartların yeni stili */
/* Küçük kartların ana yapısı (Dikey flex) */
.small-card-new-vertical {
    display: flex;
    flex-direction: column; /* Resim üste, yazı alta */
    gap: 10px; /* Aradaki boşluk */
    width: 100%;
    text-decoration: none;
    background: transparent; /* Arka plan yok */
}

/* Resim alanı */
.card-image-wrapper {
    width: 100%;
    height: 140px; /* Resim yüksekliği */
    border-radius: 12px;
    overflow: hidden;
}

.card-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Alt kısımdaki yazı alanı */
.card-content-bottom {
    padding: 0 5px; /* Yanlardan çok hafif boşluk */
}

.card-content-bottom h2 {
    color: #1d1d1f !important; /* Yazı rengi siyah */
    font-size: 14px !important; /* Okunaklı boyut */
    font-weight: 600;
    line-height: 1.4;
    margin: 0;
    /* Uzun başlıkları 3 satırda keser */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
/* =========================================
   4. ANA AKIŞ DÜZENİ (POST & INDEX)
   ========================================= */
/* Hem index hem post için ortak kapsayıcı */
.main-wrapper, .post-layout-wrapper {
    max-width: 1200px;
    margin: 40px auto;
    display: flex;
    gap: 40px;
    padding: 0 20px;
    align-items: flex-start;
}
/* Makale içindeki resimlerin stili */


.content-area {
    flex: 2.8;
    min-width: 0; /* İçerik taşmasını önler */
}

/* Haber Kartları (Index) */
.card {
    display: flex;
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    text-decoration: none;
    height: 200px;
    margin-bottom: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.card:hover { transform: translateY(-4px); box-shadow: 0 8px 25px rgba(0,0,0,0.1); }
.card-text { flex: 2; padding: 25px; display: flex; flex-direction: column; justify-content: center; }
.card-text h2 { color: #1d1d1f; font-size: 22px; font-weight: 700; margin-bottom: 10px; line-height: 1.3;}
.card-summary { color: #6e6e73; font-size: 15px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-image { flex: 1; }
.card-image img { width: 100%; height: 100%; object-fit: cover; }

/* Haber Detay Sayfası (Post) */
.post-container {
    width: 100% !important;
    max-width: 100% !important;
}

.post-image {
    width: 100%;
    max-height: 520px;
    object-fit: cover;
    border-radius: 16px;
    margin-bottom: 25px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.post-title { font-size: 38px; font-weight: 800; line-height: 1.2; margin-bottom: 15px; }
.post-meta { 
    color: #86868b; font-size: 14px; margin-bottom: 30px; 
    padding-bottom: 15px; border-bottom: 1px solid #e5e5e7; 
}
.post-content { font-size: 19px; line-height: 1.8; color: #1d1d1f; }
.post-content img { max-width: 100%; height: auto; border-radius: 12px; margin: 25px 0; display: block; }

/* =========================================
   5. SIDEBAR (MOST READ)
   ========================================= */
.sidebar {
    flex: 1;
    min-width: 320px;
    position: sticky;
    top: 100px;
    background: #fff;
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    height: fit-content;
    z-index: 10;
}

.sidebar h3 {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #86868b;
    margin-bottom: 20px;
    border-bottom: 1px solid #f5f5f7;
    padding-bottom: 10px;
}

.trending-item {
    display: flex;
    align-items: flex-start;
    text-decoration: none;
    padding: 15px 0;
    border-bottom: 1px solid #f5f5f7;
}

.trending-item:last-child { border-bottom: none; }
.trending-number { font-size: 24px; font-weight: 800; color: #d2d2d7; margin-right: 15px; line-height: 1; }
.trending-text { font-size: 14px; font-weight: 600; color: #1d1d1f; line-height: 1.4; flex: 1; }
.trending-views { font-size: 11px; color: #86868b; margin-top: 5px; }
.trending-item:hover .trending-text { color: #0071e3; }

/* =========================================
   6. FOOTER
   ========================================= */
/* =========================================
   GÜNCEL FOOTER TASARIMI
   ========================================= */
.footer {
    background: #000;
    color: #86868b;
    padding: 60px 0 30px;
    margin-top: 80px;
    border-top: 1px solid #333;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr 1.2fr; /* 3 Sütunlu yapı */
    gap: 40px;
    padding: 0 20px;
    align-items: flex-start;
}

.footer-logo-clean {
    color: #ffffff !important; 
    font-size: 24px;
    font-weight: 800;
    text-decoration: none;
    display: inline-block;
    letter-spacing: -0.8px;
    transition: opacity 0.3s ease;
}

.footer-logo-clean:hover {
    opacity: 0.7; /* Apple tarzı hafif solma efekti */
}

.footer-section h4 {
    color: #ffffff;
    font-size: 14px;
    text-transform: uppercase;
    margin-bottom: 25px;
    letter-spacing: 1.2px;
}

.footer-section p {
    font-size: 14px;
    line-height: 1.6;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: #86868b;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: #ffffff;
}

.footer-bottom {
    max-width: 1200px;
    margin: 40px auto 0;
    padding: 20px;
    border-top: 1px solid #222;
    text-align: center;
    font-size: 12px;
}

@media (max-width: 768px) {
    .footer-container { grid-template-columns: 1fr; text-align: center; }
}
/* =========================================
   7. MOBİL UYUMLULUK
   ========================================= */
@media (max-width: 1000px) {
    .main-wrapper, .post-layout-wrapper { flex-direction: column; }
    .hero-section { grid-template-columns: 1fr; }
    .secondary-grid { grid-template-columns: repeat(2, 1fr); }
    .sidebar { position: static; width: 100%; margin-top: 40px; }
    .card { height: auto; flex-direction: column-reverse; }
    .card-image { height: 200px; }
}

/* Modal Arka Planı */
.modal {
    display: none; 
    position: fixed; 
    z-index: 9999; 
    left: 0; top: 0;
    width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.4);
    backdrop-filter: blur(8px); /* Apple tarzı bulanıklık */
}

/* Modal Kutusu */
#loginModal {
    display: none; 
    position: fixed; 
    z-index: 99999; /* En üstte olduğundan emin olalım */
    left: 0; top: 0;
    width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.6); /* Arkayı hafif karart */
    backdrop-filter: blur(10px); /* Arkayı buzlu cam yap */
}

.modal-content {
    background: #ffffff;
    width: 90%;
    max-width: 400px;
    margin: 100px auto; /* Yukarıdan boşluk bırak ve ortala */
    padding: 40px;
    border-radius: 30px; /* Apple tarzı aşırı yumuşak köşeler */
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    text-align: center;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.modal-header h2 {
    color: #1d1d1f;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 10px;
}

.modal-header p {
    color: #86868b;
    font-size: 15px;
    margin-bottom: 25px;
}

/* Form Elemanlarını Alt Alta Dizer */
.modal-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.modal-form input {
    height: 50px;
    padding: 0 15px;
    border: 1px solid #d2d2d7;
    border-radius: 12px;
    font-size: 16px;
    background: #f5f5f7;
    outline: none;
}

.btn-login-submit {
    height: 50px;
    background: #0071e3;
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
}

.btn-login-submit:hover { background: #0077ed; }

.close-modal {
    position: absolute;
    right: 20px; top: 15px;
    font-size: 24px;
    color: #86868b;
    cursor: pointer;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.login-trigger {
    display: flex;
    align-items: center;
    transition: opacity 0.3s ease, transform 0.2s ease;
    cursor: pointer;
}

.login-trigger:hover {
    opacity: 0.7;
    transform: scale(1.1); /* Apple tarzı hafif büyüme */
}

/* Arama kutusunu biraz daha Apple stili yapalım */
.search-mini input {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 20px;
    padding: 5px 15px;
    color: white;
    font-size: 13px;
}

/* --- KARANLIK MOD ZORLAMASI --- */
body.dark-mode, 
body.dark-mode main, 
body.dark-mode .main-wrapper,
body.dark-mode .hero-section,
body.dark-mode header,
body.dark-mode footer,
body.dark-mode .nav {
    background-color: #000000 !important;
    background: #000000 !important;
    color: #ffffff !important;
}

/* Büyük Manşet Kartının İçerik Alanı */
body.dark-mode .big-card-content {
    background-color: #1c1c1e !important; /* Arka planı koyu gri yapar */
    color: #ffffff !important;           /* Yazıları beyaz yapar */
}

/* Büyük Manşet Başlığı */
body.dark-mode .big-card-content h2 {
    color: #ffffff !important;
}

/* Büyük Manşet Özet Yazısı */
body.dark-mode .big-card-content p {
    color: #a1a1a6 !important;
}

/* Featured News Etiketi (Mavi yazan yer) */
body.dark-mode .category-tag {
    color: #0a84ff !important; /* Apple tarzı daha parlak bir mavi */
}

/* --- KARANLIK MODDA METİN RENKLERİ --- */
body.dark-mode .big-card-content h2,
body.dark-mode .card-body h2,
body.dark-mode .card-text h2,
body.dark-mode .card-content-bottom h2,
body.dark-mode .post-title,
body.dark-mode .related-news-section h3,
body.dark-mode .related-news-section h4 {
    color: #ffffff !important; /* Başlıkları zorla beyaz yapar */
}

body.dark-mode .big-card-content p,
body.dark-mode .card-summary,
body.dark-mode .post-content {
    color: #a1a1a6 !important; /* Alt metinleri hafif gri/beyaz yapar */
}

/* Kartların arka planının da karanlık olduğundan emin olalım */
body.dark-mode .big-card-horizontal,
body.dark-mode .news-card-wrapper,
body.dark-mode .card,
body.dark-mode .related-news-section div {
    background-color: #1c1c1e !important;
}

/* Kartlar ve Sidebardaki Kutular */
body.dark-mode .card, 
body.dark-mode .sub-hero-card,
body.dark-mode .small-card,
body.dark-mode .big-card,
body.dark-mode .sidebar,
body.dark-mode .trending-item,
body.dark-mode .modal-content {
    background-color: #1c1c1e !important;
    border: 1px solid #333333 !important;
}

/* Tüm Yazıları Beyaz Yap */
body.dark-mode h1, 
body.dark-mode h2, 
body.dark-mode h3, 
body.dark-mode p, 
body.dark-mode a,
body.dark-mode span:not(.post-views) {
    color: #ffffff !important;
}

/* Sidebar Numaraları ve Meta Yazıları */
body.dark-mode .trending-number,
body.dark-mode .card-summary,
body.dark-mode .post-meta {
    color: #a1a1a6 !important;
}

/* --- İKON VE NAV AYARLARI --- */
.nav-icons {
    display: flex;
    align-items: center;
    gap: 25px;
    margin-left: 20px;
}

#theme-switch {
    cursor: pointer;
    transition: transform 0.2s ease;
}

#theme-switch:hover {
    transform: scale(1.1);
}

body.dark-mode .sidebar h3 {
    color: #ffffff !important;
}

/* Trending Haber Başlıklarını Beyaz Yap */
body.dark-mode .trending-text {
    color: #f5f5f7 !important; /* Saf beyazdan biraz daha yumuşak bir Apple beyazı */
}

/* Sidebar Numaralarını (1, 2, 3...) Belirginleştir */
body.dark-mode .trending-number {
    color: #a1a1a6 !important; /* Hafif gri */
}

/* İzlenme Sayılarını (views) Biraz Daha Belirgin Yap */
body.dark-mode .trending-text div {
    color: #86868b !important;
}

/* Sidebar Item Üzerine Gelince Hafif Parlama */
body.dark-mode .trending-item:hover .trending-text {
    color: #0071e3 !important; /* Hover olunca Apple Mavisi olsun */
}

/* Sayfa yüklendiğinde içeriği yumuşakça göster */
body {
    animation: fadeInAnimation ease 0.5s;
    animation-iteration-count: 1;
    animation-fill-mode: forwards;
}

@keyframes fadeInAnimation {
    0% { opacity: 0; }
    100% { opacity: 1; }
}
