/* ============================================================================
 * kisabilgi.com — İçerik Gövdesi Typography Standardı (single + page eşitleme)
 * ----------------------------------------------------------------------------
 * Hedef: Tek tip okunabilirlik. Mevcut tasarım/düzen korunur.
 *
 * KAPSAM (sadece içerik gövdesi):
 *   - Single post içerik: .bs-blog-post.single .small.single
 *   - Page içerik:        .page-class .bs-card-box
 *
 * DOKUNULMAYAN ALANLAR (hiçbir kural değildi/değil):
 *   - Header, .bs-header, .bs-nav-bar, nav, .menu*, .smartmenus
 *   - Sidebar, aside, .widget*, .bs-widget*
 *   - Footer, .kb-footer*, .bs-footer*
 *   - Button, .btn, .kb-share*, .kb-cookie*
 *   - .kb-author-card, .kb-team-*, .kb-trust-*, .kb-newsletter
 *   - .crp_related* (İlgili İçerikler grid)
 *   - .bs-card-box.page-entry-title h1.entry-title (sayfa hero başlığı)
 *   - .bs-blog-post header h1.entry-title (single hero başlığı)
 *
 * Specificity stratejisi:
 *   - :where() ile specificity 0 → tema kurallarıyla yarışmaz
 *   - !important YOK (zorunluluk olmadıkça)
 *   - Mu-plugin R1 kuralları (.entry-content > p) korunur, yan yana çalışır
 *
 * Modüler ölçek (base 16px):
 *   h1: clamp(1.9rem, 1.5rem + 2vw, 2.4rem) | h2: clamp(1.6, 1.3 + 1.5vw, 1.95)
 *   h3: clamp(1.35, 1.2 + 1vw, 1.55)         | h4: 1.25rem
 *   p:  1.0625rem · li: 1.0625rem · küçük: 0.85rem
 *   line-height: başlık 1.25-1.35 · gövde 1.65-1.7
 * ============================================================================ */

/* --- 1) Heading hiyerarşisi (içerik içi) --- */

:where(.bs-blog-post.single .small.single, .page-class .bs-card-box) h1:not(.entry-title):not(.title) {
    font-size: clamp(1.9rem, 1.5rem + 2vw, 2.4rem);
    line-height: 1.25;
    font-weight: 700;
    margin: 1.4em 0 .5em;
}

:where(.bs-blog-post.single .small.single, .page-class .bs-card-box) h2,
:where(.bs-blog-post.single .small.single, .page-class .bs-card-box) .wp-block-heading {
    font-size: clamp(1.6rem, 1.3rem + 1.5vw, 1.95rem);
    line-height: 1.3;
    font-weight: 700;
    margin: 1.6em 0 .5em;
    letter-spacing: -0.01em;
}

:where(.bs-blog-post.single .small.single, .page-class .bs-card-box) h3 {
    font-size: clamp(1.35rem, 1.2rem + 1vw, 1.55rem);
    line-height: 1.35;
    font-weight: 700;
    margin: 1.3em 0 .4em;
}

:where(.bs-blog-post.single .small.single, .page-class .bs-card-box) h4 {
    font-size: 1.25rem;
    line-height: 1.4;
    font-weight: 700;
    margin: 1.15em 0 .35em;
}

:where(.bs-blog-post.single .small.single, .page-class .bs-card-box) h5 {
    font-size: 1.125rem;
    line-height: 1.4;
    font-weight: 700;
    margin: 1em 0 .3em;
}

:where(.bs-blog-post.single .small.single, .page-class .bs-card-box) h6 {
    font-size: 1rem;
    line-height: 1.4;
    font-weight: 700;
    margin: 1em 0 .3em;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* İlk heading'in üst margini = 0 (sayfa hero ile çakışmasın) */
:where(.bs-blog-post.single .small.single, .page-class .bs-card-box) > :is(h1, h2, h3, h4, h5, h6):first-child {
    margin-top: 0;
}

/* --- 2) Gövde paragrafı + listeler --- */

:where(.bs-blog-post.single .small.single, .page-class .bs-card-box) p {
    font-size: 1.0625rem;
    line-height: 1.7;
    margin: 0 0 1.15em;
}

:where(.bs-blog-post.single .small.single, .page-class .bs-card-box) :is(ul, ol) {
    font-size: 1.0625rem;
    line-height: 1.65;
    margin: 0 0 1.2em;
    padding-left: 1.6em;
}

:where(.bs-blog-post.single .small.single, .page-class .bs-card-box) :is(ul, ol) li {
    margin-bottom: .35em;
}

:where(.bs-blog-post.single .small.single, .page-class .bs-card-box) :is(ul, ol) :is(ul, ol) {
    margin: .35em 0 .5em;
}

/* --- 3) Vurgu öğeleri --- */

:where(.bs-blog-post.single .small.single, .page-class .bs-card-box) :is(strong, b) {
    font-weight: 700;
}

:where(.bs-blog-post.single .small.single, .page-class .bs-card-box) :is(em, i) {
    font-style: italic;
}

:where(.bs-blog-post.single .small.single, .page-class .bs-card-box) small {
    font-size: 0.85rem;
    line-height: 1.5;
}

:where(.bs-blog-post.single .small.single, .page-class .bs-card-box) :is(sup, sub) {
    font-size: 0.7em;
    line-height: 0;
}

/* --- 4) Blockquote (içerik içi alıntı) --- */

:where(.bs-blog-post.single .small.single, .page-class .bs-card-box) blockquote {
    font-size: 1.0625rem;
    line-height: 1.6;
    margin: 1.5em 0;
    padding: .9em 1.15em;
    border-left: 4px solid var(--bxhover, #0369a1);
    background: rgba(3, 105, 161, 0.04);
    font-style: italic;
}

:where(.bs-blog-post.single .small.single, .page-class .bs-card-box) blockquote p:last-child {
    margin-bottom: 0;
}

/* --- 5) Figcaption (görsel açıklaması) --- */

:where(.bs-blog-post.single .small.single, .page-class .bs-card-box) figcaption {
    font-size: 0.875rem;
    line-height: 1.5;
    color: #64748b;
    text-align: center;
    margin-top: .5em;
    font-style: italic;
}

/* --- 6) Code (varsa) --- */

:where(.bs-blog-post.single .small.single, .page-class .bs-card-box) code {
    font-size: 0.92em;
    padding: 0.15em 0.4em;
    background: rgba(15, 23, 42, 0.06);
    border-radius: 4px;
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

:where(.bs-blog-post.single .small.single, .page-class .bs-card-box) pre {
    font-size: 0.92em;
    line-height: 1.55;
    padding: 1em 1.15em;
    background: rgba(15, 23, 42, 0.06);
    border-radius: 6px;
    overflow-x: auto;
    margin: 1.2em 0;
}

/* --- 7) Mobile sıkılaştırma --- */

@media (max-width: 640px) {
    :where(.bs-blog-post.single .small.single, .page-class .bs-card-box) p,
    :where(.bs-blog-post.single .small.single, .page-class .bs-card-box) :is(ul, ol),
    :where(.bs-blog-post.single .small.single, .page-class .bs-card-box) blockquote {
        font-size: 1rem;
        line-height: 1.65;
    }
    :where(.bs-blog-post.single .small.single, .page-class .bs-card-box) :is(h2, .wp-block-heading) {
        margin: 1.35em 0 .4em;
    }
    :where(.bs-blog-post.single .small.single, .page-class .bs-card-box) h3 {
        margin: 1.1em 0 .35em;
    }
}

/* ============================================================================
 * Son not — yan etki yönetimi:
 * 1. :where() specificity 0 → mu-plugin'in .entry-content kuralları
 *    (örn. blockquote, table, :visited) intact çalışır.
 * 2. h1:not(.entry-title):not(.title) → sayfa hero başlığına dokunmaz.
 * 3. Hiçbir global selektör (body, *, çıplak h1) yok.
 * 4. !important kullanılmadı.
 * ============================================================================ */
