/*
Theme Name: KaRa Özel Yapım İslami Sohbet Teması
Version: 9.0
Description: Sohbet girişli, temiz kodlanmış ve görsel odaklı tema.
*/

/* Genel Yapı */
body { font-family: sans-serif; margin: 0; padding: 0; background: #f9f9f9; }

/* Header ve Üst Sohbet Girişi */
.site-header { background: #222; color: #fff; padding: 15px 20px; }
.header-container { max-width: 1200px; margin: auto; display: flex; justify-content: space-between; align-items: center; }
.site-header h1 { margin: 0; font-size: 24px; }
.chat-login { display: flex; gap: 10px; }
.chat-login input { padding: 8px; border-radius: 4px; border: 1px solid #444; }
.chat-login button { background: #ff4500; color: white; border: none; padding: 8px 15px; border-radius: 4px; cursor: pointer; }

/* Ana Sayfa İçerik Alanı (Grid Yapısı) */
.container { max-width: 1200px; margin: 20px auto; padding: 0 20px; }
#content-area { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }

/* Yazı Kartları */
.post-card { background: white; padding: 15px; border: 1px solid #ddd; border-radius: 8px; box-shadow: 0 2px 5px rgba(0,0,0,0.05); }
.post-card img { width: 100%; height: 180px; object-fit: cover; border-radius: 4px; display: block; margin-bottom: 10px; }
.post-card h2 { font-size: 18px; margin: 0 0 10px 0; }
.post-card a { text-decoration: none; color: #333; }

/* Yazı Detay Sayfası (Single) için genişletme */
article { background: white; padding: 30px; border-radius: 8px; border: 1px solid #ddd; line-height: 1.6; }
.single-post article { max-width: 900px; margin: 0 auto; }

/* Mobil Uyum */
@media (max-width: 600px) {
    .header-container { flex-direction: column; gap: 15px; }
}

/* Sadece yazı detay sayfaları için genişlik ayarı */
.single-container {
    max-width: 900px; /* Yazının yayılacağı maksimum genişlik */
    margin: 40px auto; /* Sayfayı ortalar */
    padding: 0 20px;
}

.single-container article {
    background: white;
    padding: 30px;
    border: 1px solid #ddd;
    border-radius: 8px;
    line-height: 1.8; /* Okumayı kolaylaştırır */
}

/* Eğer yine de solda kalıyorsa, bu satır zorla ortalar */
#content-area {
    display: block !important; 
}

/* Ana sayfa Grid yapısını bozmamak için sadece single-content sınıfını hedefliyoruz */
.single-content {
    display: block !important; /* Grid'i kapatıyoruz */
    max-width: 800px;         /* Yazının ekran boyunca uzamasını engeller */
    margin: 0 auto;           /* Yazıyı sayfada ortalar */
    width: 100%;
}

/* single-content içindeki makaleyi düzenliyoruz */
.single-content article {
    background: white;
    padding: 30px;
    border: 1px solid #ddd;
    border-radius: 8px;
    line-height: 1.6;
}

/* Görsellerin taşıp tasarımı bozmasını engeller */
.single-content img {
    max-width: 100%;      /* Görselin makale dışına taşmasını engeller */
    height: auto;         /* Orantıyı korur */
    display: block;       /* Görseli bir blok gibi davranmaya zorlar */
    margin: 20px auto;    /* Görseli ortalar ve çevresine boşluk bırakır */
    border-radius: 4px;   /* Kenarları yumuşatır */
}

/* Yazı içerisindeki paragrafların ve içeriğin genişliğini sınırlar */
.single-content {
    display: block !important;
    max-width: 800px;
    margin: 0 auto;
    width: 95%; /* Küçük ekranlarda kenarlardan boşluk bırakır */
}

.single-content article {
    background: white;
    padding: 30px;
    border: 1px solid #ddd;
    border-radius: 8px;
    line-height: 1.6;
    overflow: hidden; /* İçeriğin dışarı taşmasını engeller */
}

/* Ana sayfa Grid yapısı (sadece ID'ye duyarlı) */
#content-area { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); 
    gap: 20px; 
}

/* Yazı detay sayfası (sadece Class'a duyarlı) */
.single-content {
    display: block !important; /* Grid'i iptal eder */
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
}

.single-content article {
    background: white;
    padding: 30px;
    border: 1px solid #ddd;
    border-radius: 8px;
    line-height: 1.6;
}

.single-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 20px auto;
}

/* Ana sayfa ve Yazı sayfası için ortak kart yapısı */
#content-area { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); 
    gap: 20px; 
}

.post-card { 
    background: white; 
    padding: 20px; 
    border: 1px solid #ddd; 
    border-radius: 12px; 
    box-shadow: 0 4px 6px rgba(0,0,0,0.1); 
}

/* İçerik içindeki görselleri kutuya sığdırır */
.post-card img { 
    width: 100%; 
    height: 200px; 
    object-fit: cover; 
    border-radius: 8px; 
    margin-bottom: 15px; 
}

/* Yazı detay sayfası için özel genişlik ve kutu ayarı */
#single-content-area {
    display: block;
    max-width: 800px; /* Yazının ekranı yarmasını engeller */
    margin: 20px auto; /* Ortalar */
}

.single-post-card {
    background: white;
    padding: 30px;
    border: 1px solid #ddd;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

/* Görsellerin taşıp çirkinlik yaratmasını engeller */
.post-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 15px auto;
    border-radius: 8px;
}

/* Yazı detay sayfasındaki kutuyu zorla sınırlar */
#single-content-area, .single-post-card {
    display: block !important;
    width: 800px !important; /* Genişliği 800px'e sabitle */
    max-width: 95% !important; /* Mobil uyum için */
    margin: 20px auto !important; /* Sayfayı tam ortala */
    float: none !important;
}

/* İçerikteki görselleri kutu içine hapseder */
.post-content img {
    width: 100% !important; /* Kutu dışına taşmayı engelle */
    height: auto !important;
    display: block !important;
    margin: 15px auto !important;
}

/* Ana sayfa Grid yapısını korumak için */
#content-area {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)) !important;
    gap: 20px !important;
}

/* Mobil cihazlar için özel düzenleme */
@media (max-width: 600px) {
    #single-content-area, .single-post-card {
        width: 95% !important; /* Ekranın %95'ini kapla */
        padding: 15px !important; /* Mobil için daha az boşluk */
        margin: 10px auto !important;
    }

    /* Sohbet girişi (chat-login) mobilde alta geçsin ve büyüsün */
    .chat-login {
        flex-direction: column !important; /* Alt alta diz */
        width: 100% !important;
    }
    
    .chat-login input, .chat-login button {
        width: 100% !important; /* Tam genişlikte düğme ve kutu */
        box-sizing: border-box;
    }
    
    /* Başlık boyutunu mobilde biraz küçültüyoruz */
    .single-post-card h1 {
        font-size: 20px !important;
    }
}

/* Mobil için Sohbet Giriş Kutusu Tam Ekran Düzeltmesi */
@media (max-width: 600px) {
    .site-header .header-container {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        padding: 10px !important;
    }

    .chat-login {
        display: flex !important;
        flex-direction: row !important; /* Masaüstü gibi yan yana görünmesini istiyorsanız row, alt alta ise column */
        width: 100% !important;
        gap: 5px !important;
        padding: 0 10px !important;
        box-sizing: border-box !important;
    }

    .chat-login input {
        flex: 2 !important; /* Input kutusu biraz daha geniş olsun */
        min-width: 0 !important;
    }

    .chat-login button {
        flex: 1 !important; /* Buton daha kısa olabilir */
        padding: 8px 5px !important;
        font-size: 12px !important;
    }
}

@media (max-width: 600px) {
    .chat-login { width: 100vw !important; padding: 0 10px !important; }
}

/* Mobil İçin Kesin Çözüm */
@media (max-width: 600px) {
    /* Header container'ı dikey hizaya getir */
    .header-container {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 10px !important;
    }

    /* Formun genişliğini mobilde tam ekran yap */
    .chat-login {
        display: flex !important;
        flex-direction: column !important; /* Mobilde girişleri alt alta diz */
        width: 100% !important;
        gap: 8px !important;
    }

    /* İnput ve Butonları tam genişliğe zorla */
    .chat-login input, .chat-login button {
        width: 100% !important;
        height: 45px !important; /* Mobilde dokunması kolay olsun */
        display: block !important;
        box-sizing: border-box !important;
        margin: 0 !important;
    }
}

/* Header Barı genişletme */
.site-header {
    padding: 25px 20px !important; /* Üstten ve alttan boşluğu artırır */
}

/* Başlık linkini düzenleme */
.site-title a {
    color: #fff !important;
    text-decoration: none !important;
    font-size: 28px !important; /* Yazıyı biraz büyüttük */
    font-weight: bold;
    display: block;
}

/* Başlık üzerine gelince efekt (opsiyonel) */
.site-title a:hover {
    color: #ff4500 !important; /* Fare ile gelince turuncu olur */
}

/* Footer Stili */
.site-footer {
    background: #222 !important; /* Koyu bir ton vererek ayırıyoruz */
    color: #ccc !important;
    padding: 40px 20px !important;
    text-align: center !important;
    margin-top: 50px !important;
    border-top: 3px solid #ff4500 !important; /* Sohbet temanıza uygun turuncu bir şerit */
}

.footer-container {
    max-width: 1000px !important;
    margin: 0 auto !important;
}

.footer-links a {
    color: #fff !important;
    text-decoration: none !important;
    margin: 0 10px !important;
    font-size: 14px !important;
}

.footer-links a:hover {
    color: #ff4500 !important;
}

.footer-info p {
    margin-bottom: 15px !important;
    font-size: 15px !important;
}

/* Yazı içeriğini 5 satır civarına sabitlemek için taşan kısımları gizle */
.post-card div {
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 5; /* 5 satır sınırı */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Şık Devamını Oku Butonu */
.read-more-btn {
    display: inline-block;
    background: #ff4500;
    color: #fff !important;
    padding: 8px 15px;
    border-radius: 4px;
    text-decoration: none !important;
    font-size: 13px;
    font-weight: bold;
    transition: background 0.3s;
}

.read-more-btn:hover {
    background: #e03e00;
}

/* Tanıtım Alanı Tasarımı */
.tanitim-alani {
    background: #fff !important;
    padding: 30px !important;
    margin: 20px auto !important; /* Dış boşlukları otomatik yaparak ortalar */
    max-width: 1000px !important; /* Genişliği kısıtlayarak sağa-sola yaslanmayı engeller */
    width: 90% !important; /* Küçük ekranlarda ekranın %90'ını kaplar */
    border-radius: 12px !important;
    border-left: 5px solid #ff4500 !important;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05) !important;
    text-align: left !important; /* Metinlerin düzgün durması için sola yaslı kalsın */
    display: block !important;
}

/* Metin içindeki başlık ve paragrafı biraz daha ferahlatmak için */
.tanitim-alani h2 {
    margin-top: 0 !important;
    margin-bottom: 15px !important;
}

.tanitim-alani p {
    margin: 0 !important;
}

/* Menü Bar Tasarımı */
.main-navigation {
    background: #333;
    width: 100%;
    margin-top: 15px;
    text-align: center;
}

.main-navigation ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
}

.main-navigation ul li a {
    display: block;
    padding: 15px 25px;
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    transition: background 0.3s;
}

.main-navigation ul li a:hover {
    background: #ff4500;
}

/* Header ana düzeni */
.site-header { background: #222; padding: 20px; }
.header-container { max-width: 1200px; margin: 0 auto; }

/* Üst satır: Logo ve Form yanyana */
.header-top { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    flex-wrap: wrap; 
    gap: 15px; 
}

.site-title a { color: #fff; text-decoration: none; font-size: 24px; }

/* Menü tasarımı */
.main-navigation { margin-top: 20px; border-top: 1px solid #444; padding-top: 10px; }
.main-navigation ul { display: flex; justify-content: center; list-style: none; padding: 0; }
.main-navigation ul li a { color: #ddd; padding: 10px 20px; text-decoration: none; }
.main-navigation ul li a:hover { color: #ff4500; }

/* Mobil uyum */
@media (max-width: 768px) {
    .header-top { flex-direction: column; text-align: center; }
    .chat-login { width: 100%; display: flex; flex-direction: column; }
    .main-navigation ul { flex-direction: column; }
}

/* Menü Butonu (Masaüstünde gizli) */
.menu-toggle { display: none; background: #ff4500; color: #fff; border: none; padding: 10px 20px; cursor: pointer; width: 100%; }

@media (max-width: 768px) {
    /* Butonu göster */
    .menu-toggle { display: block; }
    
    /* Menüyü başlangıçta gizle */
    .main-navigation { display: none; width: 100%; background: #333; }
    
    /* Tıklandığında menüyü göster (JS ile aktif olacak) */
    .main-navigation.active { display: block; }
    
    .main-navigation ul { flex-direction: column; }
}

/* --- GÜNCEL HEADER VE MENÜ DÜZENİ --- */

/* 1. Header'ı tek parça yapıyoruz */
.site-header { background: #222 !important; padding: 20px !important; }

/* 2. Menü arka planını şeffaf yapıyoruz (Soluk siyah katman kalkacak) */
.main-navigation { 
    background: transparent !important; 
    border-top: 1px solid #444 !important; /* İsterseniz border-top'ı kaldırabilirsiniz */
    margin-top: 20px !important;
}

/* 3. Masaüstünde sağa yaslama ve düzgün hizalama */
@media (min-width: 769px) {
    .main-navigation ul { 
        display: flex !important; 
        justify-content: flex-end !important; /* Menü sağa yanaşır */
        list-style: none !important; 
        padding: 0 !important; 
        margin: 0 !important;
    }
    .main-navigation ul li a { 
        color: #ddd !important; 
        padding: 10px 20px !important; 
        text-decoration: none !important; 
    }
    .main-navigation ul li a:hover { color: #ff4500 !important; background: transparent !important; }
}

/* 4. Mobil Görünüm (Akordeon) */
@media (max-width: 768px) {
    .menu-toggle { display: block !important; }
    .main-navigation { display: none; background: #333 !important; } /* Sadece mobil açıldığında siyah olsun */
    .main-navigation.active { display: block !important; }
    .main-navigation ul { flex-direction: column !important; }
    .main-navigation ul li a { 
        color: #fff !important; 
        padding: 15px !important; 
        display: block !important; 
        border-bottom: 1px solid #444 !important;
    }
}

/* Çizgiyi tamamen kaldırmak için border-top'ı 'none' yapıyoruz */
.main-navigation { 
    border-top: none !important; 
}

/* --- Yorum Formu Hizalama ve Şekillendirme --- */

.comment-form {
    display: flex;
    flex-direction: column; /* Tüm öğeleri alt alta diz */
    gap: 15px; /* Aralarına boşluk bırak */
    max-width: 600px;
}

.comment-form-comment, 
.comment-form-author, 
.comment-form-email, 
.comment-form-url {
    display: flex;
    flex-direction: column; /* Label ve inputu dikey hizala */
    width: 100%;
}

.comment-form input[type="text"], 
.comment-form input[type="email"], 
.comment-form textarea {
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    width: 100%;
    box-sizing: border-box; /* Kutuların taşmasını engeller */
}

.comment-form textarea { min-height: 150px; }

/* "Yorum gönder" butonunu diğerleri gibi turuncu yapalım */
#submit {
    background: #ff4500;
    color: white;
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    align-self: flex-start; /* Butonu sola yasla */
}

#submit:hover { background: #d43a00; }

/* Checkbox hizalaması */
.comment-form-cookies-consent {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* İletişim sayfası yazı ve boşluk düzenlemesi */
.contact-info {
    text-align: center !important; /* Yazıyı tam ortaya çeker */
    margin-bottom: 15px !important; /* Form ile arasındaki mesafeyi kısaltır */
    max-width: 600px; /* Formla aynı genişliğe getirerek hizayı korur */
    margin-left: auto;
    margin-right: auto;
}

/* Formun üstten olan boşluğunu biraz daha daraltıyoruz */
#contact_me {
    margin-top: 10px !important; /* Yazı ile form birbirine yaklaşır */
}

.breadcrumb{padding: 7px 14px;margin-bottom: 20px;list-style: none;background-color: #f5f5f5;padding-left: 2rem;}