/**
 * KASK Blog Tek Yazı Sayfası — Typography
 * 
 * Hem masaüstü hem mobil uyumlu, clamp() ile akıcı ölçeklenir.
 * Theme override'ı: yüksek specificity ile Consultio'nun CSS'ini bastırır.
 * 
 * Hedef: single.php (tek yazı sayfası) ve içerik alanları
 * 
 * @package Consultio_Child
 * @version 1.0.0
 */

/* ============================================
   GOOGLE FONTS - Plus Jakarta Sans + Inter
   ============================================ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Plus+Jakarta+Sans:wght@600;700;800&display=swap');


/* ============================================
   TEK YAZI SAYFASI - Genel İçerik Alanı
   Consultio'nun single.php yapısını hedefler
   ============================================ */

body.single-post .entry-content,
body.single-post article .entry-content,
body.single-post .post-content,
body.single-post .single-content {
    /* Tipografi temelleri */
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
    font-size: clamp(16px, 1.05vw + 0.6rem, 18px) !important;
    line-height: 1.75 !important;
    color: #2d3748 !important;
    letter-spacing: -0.005em !important;
    
    /* Satır uzunluğu kontrolü - okuma konforu */
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
    
    /* Kelime kesimi - mobilde uzun kelimeler ekrandan taşmasın */
    word-wrap: break-word;
    overflow-wrap: break-word;
}


/* ============================================
   BAŞLIKLAR (H1 - H6)
   Plus Jakarta Sans, yumuşak negatif letter-spacing
   ============================================ */

body.single-post .entry-content h1,
body.single-post .entry-content h2,
body.single-post .entry-content h3,
body.single-post .entry-content h4,
body.single-post .entry-content h5,
body.single-post .entry-content h6,
body.single-post .post-content h1,
body.single-post .post-content h2,
body.single-post .post-content h3,
body.single-post .post-content h4,
body.single-post .post-content h5,
body.single-post .post-content h6 {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif !important;
    font-weight: 700 !important;
    color: #1a1a2e !important;
    line-height: 1.25 !important;
    letter-spacing: -0.02em !important;
    margin-top: 2em !important;
    margin-bottom: 0.6em !important;
}

/* H1 — Yazı başlığı (genelde post title değil, içerikteki en büyük başlık) */
body.single-post .entry-content h1,
body.single-post .post-content h1 {
    font-size: clamp(28px, 3vw + 0.5rem, 38px) !important;
    line-height: 1.2 !important;
    letter-spacing: -0.025em !important;
    font-weight: 800 !important;
    margin-top: 1.2em !important;
    margin-bottom: 0.7em !important;
}

/* H2 — Ana bölüm başlığı */
body.single-post .entry-content h2,
body.single-post .post-content h2 {
    font-size: clamp(24px, 2.2vw + 0.5rem, 30px) !important;
    line-height: 1.25 !important;
    letter-spacing: -0.02em !important;
    margin-top: 2.2em !important;
    margin-bottom: 0.6em !important;
    padding-bottom: 0.3em;
    border-bottom: 2px solid #eef1f6;
}

/* H3 — Alt bölüm başlığı */
body.single-post .entry-content h3,
body.single-post .post-content h3 {
    font-size: clamp(20px, 1.5vw + 0.5rem, 24px) !important;
    line-height: 1.3 !important;
    letter-spacing: -0.015em !important;
    color: #1B4B9B !important;
    margin-top: 1.8em !important;
    margin-bottom: 0.5em !important;
}

/* H4 — Alt alt başlık */
body.single-post .entry-content h4,
body.single-post .post-content h4 {
    font-size: clamp(18px, 1vw + 0.5rem, 20px) !important;
    line-height: 1.35 !important;
    font-weight: 700 !important;
    margin-top: 1.5em !important;
    margin-bottom: 0.4em !important;
}

/* H5 - H6 — Küçük başlıklar (nadiren kullanılır) */
body.single-post .entry-content h5,
body.single-post .post-content h5 {
    font-size: clamp(16px, 0.6vw + 0.6rem, 17px) !important;
    text-transform: uppercase;
    letter-spacing: 0.05em !important;
    color: #4a5568 !important;
    font-weight: 700 !important;
}

body.single-post .entry-content h6,
body.single-post .post-content h6 {
    font-size: clamp(14px, 0.4vw + 0.6rem, 15px) !important;
    text-transform: uppercase;
    letter-spacing: 0.08em !important;
    color: #718096 !important;
    font-weight: 600 !important;
}


/* ============================================
   PARAGRAF (p)
   ============================================ */

body.single-post .entry-content p,
body.single-post .post-content p {
    font-family: 'Inter', sans-serif !important;
    font-size: inherit !important;
    line-height: 1.75 !important;
    margin-bottom: 1.3em !important;
    color: #2d3748 !important;
}

/* İlk paragraf - editöriyal "lead" görünümü */
body.single-post .entry-content > p:first-of-type,
body.single-post .post-content > p:first-of-type {
    font-size: clamp(17px, 1.2vw + 0.6rem, 20px) !important;
    line-height: 1.65 !important;
    color: #1a1a2e !important;
    font-weight: 400 !important;
    margin-bottom: 1.5em !important;
}


/* ============================================
   LİNKLER (a)
   ============================================ */

body.single-post .entry-content a,
body.single-post .post-content a {
    color: #1B4B9B !important;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    transition: color 0.2s ease, text-decoration-thickness 0.2s ease;
}

body.single-post .entry-content a:hover,
body.single-post .post-content a:hover {
    color: #D32027 !important;
    text-decoration-thickness: 2px;
}


/* ============================================
   LİSTELER (ul, ol)
   ============================================ */

body.single-post .entry-content ul,
body.single-post .entry-content ol,
body.single-post .post-content ul,
body.single-post .post-content ol {
    margin: 1.2em 0 1.5em 0 !important;
    padding-left: 1.5em !important;
}

body.single-post .entry-content li,
body.single-post .post-content li {
    font-size: inherit !important;
    line-height: 1.75 !important;
    margin-bottom: 0.5em !important;
    padding-left: 0.3em;
}

body.single-post .entry-content ul li::marker,
body.single-post .post-content ul li::marker {
    color: #1B4B9B;
}


/* ============================================
   ALINTI (blockquote)
   ============================================ */

body.single-post .entry-content blockquote,
body.single-post .post-content blockquote {
    border-left: 4px solid #1B4B9B !important;
    background: #f7f8fb !important;
    padding: 1.2em 1.5em !important;
    margin: 1.8em 0 !important;
    border-radius: 0 8px 8px 0;
    font-size: clamp(17px, 1.1vw + 0.5rem, 19px) !important;
    line-height: 1.65 !important;
    color: #1a1a2e !important;
    font-style: italic;
}

body.single-post .entry-content blockquote p,
body.single-post .post-content blockquote p {
    margin-bottom: 0.5em !important;
}

body.single-post .entry-content blockquote p:last-child,
body.single-post .post-content blockquote p:last-child {
    margin-bottom: 0 !important;
}


/* ============================================
   KOD BLOKLARI (code, pre)
   ============================================ */

body.single-post .entry-content code,
body.single-post .post-content code {
    background: #f4f6fa !important;
    color: #D32027 !important;
    padding: 0.15em 0.45em !important;
    border-radius: 4px;
    font-family: 'SF Mono', Monaco, Consolas, monospace !important;
    font-size: 0.9em !important;
}

body.single-post .entry-content pre,
body.single-post .post-content pre {
    background: #1a1a2e !important;
    color: #f7f8fb !important;
    padding: 1.2em !important;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1.5em 0 !important;
    font-size: 14px !important;
    line-height: 1.6 !important;
}

body.single-post .entry-content pre code,
body.single-post .post-content pre code {
    background: transparent !important;
    color: inherit !important;
    padding: 0 !important;
}


/* ============================================
   GÖRSELLER (img)
   ============================================ */

body.single-post .entry-content img,
body.single-post .post-content img {
    max-width: 100% !important;
    height: auto !important;
    border-radius: 8px;
    margin: 1.5em 0 !important;
    display: block;
}


/* ============================================
   TABLOLAR (table)
   ============================================ */

body.single-post .entry-content table,
body.single-post .post-content table {
    width: 100% !important;
    border-collapse: collapse;
    margin: 1.5em 0 !important;
    font-size: clamp(14px, 0.8vw + 0.5rem, 16px) !important;
}

body.single-post .entry-content th,
body.single-post .post-content th {
    background: #1B4B9B !important;
    color: #fff !important;
    padding: 0.8em 1em !important;
    text-align: left;
    font-weight: 600;
}

body.single-post .entry-content td,
body.single-post .post-content td {
    padding: 0.7em 1em !important;
    border-bottom: 1px solid #eef1f6;
}

body.single-post .entry-content tr:nth-child(even),
body.single-post .post-content tr:nth-child(even) {
    background: #f7f8fb;
}


/* ============================================
   AYRAÇLAR (hr)
   ============================================ */

body.single-post .entry-content hr,
body.single-post .post-content hr {
    border: none !important;
    border-top: 1px solid #eef1f6 !important;
    margin: 2.5em 0 !important;
}


/* ============================================
   MOBİL — Ekstra İnce Ayarlar (max-width 600px)
   ============================================ */

@media (max-width: 600px) {
    body.single-post .entry-content,
    body.single-post .post-content {
        padding-left: 4px;
        padding-right: 4px;
    }
    
    /* Mobilde H2 alt çizgisini biraz daha hafif yap */
    body.single-post .entry-content h2,
    body.single-post .post-content h2 {
        padding-bottom: 0.25em;
    }
    
    /* Mobilde blockquote padding'i azalt */
    body.single-post .entry-content blockquote,
    body.single-post .post-content blockquote {
        padding: 1em 1.2em !important;
        margin: 1.3em 0 !important;
    }
}

/* ============================================
   WIDGET / SIDEBAR İSTİSNASI
   Consultio'nun "Son Haberler" gibi widget'larında
   da .entry-content class'ı var. Onları override
   etmemek için reset uyguluyoruz.
   ============================================ */

/* Sidebar / widget içindeki entry-content'leri sıfırla */
body.single-post .widget .entry-content,
body.single-post .posts-list .entry-content,
body.single-post aside .entry-content,
body.single-post #sidebar .entry-content,
body.single-post .sidebar .entry-content {
    /* Tema'nın orijinal font ve boyutuna geri dön */
    font-family: inherit !important;
    font-size: inherit !important;
    line-height: inherit !important;
    color: inherit !important;
    max-width: none !important;
    margin: 0 !important;
    letter-spacing: normal !important;
}

/* Widget içindeki h1-h6 başlıklarını sıfırla */
body.single-post .widget .entry-content h1,
body.single-post .widget .entry-content h2,
body.single-post .widget .entry-content h3,
body.single-post .widget .entry-content h4,
body.single-post .widget .entry-content h5,
body.single-post .widget .entry-content h6,
body.single-post .posts-list .entry-content h1,
body.single-post .posts-list .entry-content h2,
body.single-post .posts-list .entry-content h3,
body.single-post .posts-list .entry-content h4,
body.single-post .posts-list .entry-content h5,
body.single-post .posts-list .entry-content h6,
body.single-post .posts-list .entry-title,
body.single-post aside .entry-content h1,
body.single-post aside .entry-content h2,
body.single-post aside .entry-content h3,
body.single-post aside .entry-content h4,
body.single-post aside .entry-content h5,
body.single-post aside .entry-content h6,
body.single-post #sidebar .entry-content h1,
body.single-post #sidebar .entry-content h2,
body.single-post #sidebar .entry-content h3,
body.single-post #sidebar .entry-content h4,
body.single-post #sidebar .entry-content h5,
body.single-post #sidebar .entry-content h6 {
    /* Tema'nın orijinal başlık stillerine geri dön */
    font-family: inherit !important;
    font-size: inherit !important;
    line-height: inherit !important;
    color: inherit !important;
    font-weight: inherit !important;
    letter-spacing: normal !important;
    margin: inherit !important;
    padding: 0 !important;
    border-bottom: none !important;
    text-transform: none !important;
}

/* Widget içindeki linkleri de sıfırla */
body.single-post .widget .entry-content a,
body.single-post .posts-list .entry-content a,
body.single-post aside .entry-content a,
body.single-post #sidebar .entry-content a {
    color: inherit !important;
    text-decoration: none !important;
}

body.single-post .widget .entry-content a:hover,
body.single-post .posts-list .entry-content a:hover,
body.single-post aside .entry-content a:hover,
body.single-post #sidebar .entry-content a:hover {
    color: inherit !important;
    text-decoration: none !important;
}