/*
Theme Name: Bulut Randevu Blog
Theme URI: https://bulutrandevu.com
Author: Bulut Randevu
Description: Ana site ile uyumlu WordPress blog teması. SEO ve performans odaklı.
Version: 1.0.1
Requires at least: 5.8
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: kasoft-blog
*/

:root {
    /* Bulut Randevu – app/css/theme.css ve frontend ile uyumlu */
    --primary: #2196F3;
    --primary-light: #E3F2FD;
    --primary-dark: #1565C0;
    --secondary: #1976D2;
    --secondary-dark: #1565C0;
    --accent: #42A5F5;

    /* Nötr vurgular (koyu metin / ikon) */
    --navy: #1F2937;
    --navy-dark: #111827;
    --navy-light: #374151;

    /* Açık yüzeyler & rozetler (primary-light tonları) */
    --cream: #E3F2FD;
    --cream-border: #BBDEFB;
    --cream-text: #1565C0;
    --amber: #1976D2;
    --amber-dark: #1565C0;
    --amber-light: #64B5F6;

    /* ── Metin renkleri ── */
    --text-primary: #1F2937;
    --text-primary-dark: #111827;
    --text-secondary: #4B5563;
    --text-secondary-dark: #374151;
    --text-light: #6B7280;

    /* ── Arka plan renkleri ── */
    --bg-primary: #FFFFFF;
    --bg-secondary: #F9FAFB;
    --bg-tertiary: #F3F4F6;
    --border: #E5E7EB;

    /* ── Sistem renkleri ── */
    --success: #10B981;
    --error: #EF4444;
    --warning: #F59E0B;

    /* ── Gölgeler ── */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08);
    --shadow-primary-sm: 0 0 0 2px rgba(25, 118, 210, 0.12);
    --shadow-primary-md: 0 2px 4px rgba(25, 118, 210, 0.18);
    --shadow-primary-lg: 0 0 0 3px rgba(25, 118, 210, 0.12);

    /* ── Köşe yuvarlaklıkları ── */
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;

    --font-family: 'Cabin', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;

    --container-max-width: 1200px;
    --container-padding: 2rem;
    --container-padding-mobile: 1rem;

    --breakpoint-mobile: 480px;
    --breakpoint-tablet: 768px;
    --breakpoint-desktop: 968px;
    --breakpoint-large: 1024px;

    --touch-target-min: 44px;
    --touch-target-small: 40px;

    --white: #FFFFFF;
    --black: #000000;
    --gray-50: #F9FAFB;
    --gray-100: #F3F4F6;
    --gray-200: #E5E7EB;
    --gray-300: #D1D5DB;
    --gray-400: #9CA3AF;
    --gray-500: #6B7280;
    --gray-600: #4B5563;
    --gray-700: #374151;
    --gray-800: #1F2937;
    --gray-900: #111827;

    --spacing-touch: 44px;
    --spacing-touch-small: 40px;

    --z-overlay: 9998;
    --z-mobile-menu: 10001; 
    --z-header: 10000;
    --z-header-elements: 10001;
    --z-footer: 1000;
}

/* CRITICAL CLS FIX: Mobilde font yükleme sırasında layout shift önlemek için */
/* Font preload header.php'de yapılıyor - fontlar erken yükleniyor (fetchpriority="high") */
/* CRITICAL: font-display: block kullanılıyor - font yüklenene kadar (max 3s) fallback göster, sonra swap yap */
/* Font metrikleri (size-adjust, ascent-override, descent-override) sayesinde swap sırasında CLS yok */
/* block: Font yüklenene kadar fallback göster, sonra swap yap (font metrikleri sayesinde CLS yok) */
/* Mobilde optional 100ms timeout yeterli değil, bu yüzden block kullanılıyor */
@font-face {
    font-family: 'Cabin';
    src: url('fonts/cabin/cabin-latin.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    /* CRITICAL MOBILE CLS FIX: optional kullanılıyor - font yüklenemezse fallback kullan (CLS yok) */
    /* optional: 100ms timeout, font yüklenemezse fallback kullan (hiç swap yok, CLS yok) */
    /* Font preload header.php'de yapılıyor - fontlar erken yükleniyor (fetchpriority="high") */
    /* Preload sayesinde fontlar genelde 100ms içinde yüklenir, optional CLS yaratmaz */
    font-display: optional;
    /* CRITICAL: Font metrikleri system font'a göre optimize edildi - perfect match için */
    /* Cabin font metrikleri (gerçek ölçümler): */
    /* - Ascent: ~95% of em-square (daha doğru değer) */
    /* - Descent: ~25% of em-square (daha doğru değer) */
    /* - Line gap: 0% */
    /* System font (San Francisco/Inter) ile perfect eşleştirme: */
    /* size-adjust: 100% - Cabin font'u system font ile aynı boyutta */
    /* ascent-override: 95% - Cabin'in ascent'i (daha doğru değer, CLS önler) */
    /* descent-override: 25% - Cabin'in descent'i (daha doğru değer, CLS önler) */
    /* line-gap-override: 0% - Cabin'in line-gap'i yok */
    size-adjust: 100%;
    ascent-override: 95%;
    descent-override: 25%;
    line-gap-override: 0%;
}

@font-face {
    font-family: 'Cabin';
    src: url('fonts/cabin/cabin-latin.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    /* CRITICAL MOBILE CLS FIX: optional kullanılıyor - font yüklenemezse fallback kullan (CLS yok) */
    font-display: optional;
    size-adjust: 100%;
    ascent-override: 95%;
    descent-override: 25%;
    line-gap-override: 0%;
}

@font-face {
    font-family: 'Cabin';
    src: url('fonts/cabin/cabin-latin.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    /* CRITICAL MOBILE CLS FIX: optional kullanılıyor - font yüklenemezse fallback kullan (CLS yok) */
    font-display: optional;
    size-adjust: 100%;
    ascent-override: 95%;
    descent-override: 25%;
    line-gap-override: 0%;
}

@font-face {
    font-family: 'Cabin';
    src: url('fonts/cabin/cabin-latin.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    /* CRITICAL MOBILE CLS FIX: optional kullanılıyor - font yüklenemezse fallback kullan (CLS yok) */
    font-display: optional;
    size-adjust: 100%;
    ascent-override: 95%;
    descent-override: 25%;
    line-gap-override: 0%;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    text-size-adjust: 100%; 

    -webkit-text-size-adjust: 100%; 
}

/* CLS Fix: Body font tanımı - font fallback chain'i optimize edildi */
/* Font metrikleri (size-adjust, ascent-override) sayesinde fallback'ten Cabin'e geçişte CLS yok */
body {
    font-family: 'Cabin', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 400;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    /* CLS Fix: contain korunuyor - layout containment sağlanıyor */
    contain: layout style;
    /* CLS Fix: Font yükleme sırasında layout shift'i önlemek için font-display: optional kullanılıyor */
    /* Font preload header.php'de yapılıyor - bu sayede font erken yükleniyor ve CLS minimize ediliyor */
}

/* WordPress admin bar: body.single / .wp-singular sonradan contain yazar — tam düzeltme kasoft_blog_admin_bar_layout_fix() (functions.php) */
body.admin-bar {
    contain: unset !important;
}

body.home {

    overflow-x: hidden; 
}

@media (max-width: 768px) {
    body.home {

        min-height: 1000px; 

    }

    body.home .archive-header {

        min-height: 6rem; 

        contain: layout style paint;
    }

    body.home .blog-posts-grid {

        min-height: 400px; 

        contain: layout style paint;
    }
}

@media (min-width: 769px) {
    body.home {

        min-height: 100vh;

        contain: layout style paint;
    }
}

/* CLS Fix: Body wp-singular - font yüklemesi sırasında layout shift önlemek için */
body.wp-singular,
body.single {
    /* CLS Fix: min-height ile içerik yüklenirken layout shift önlendi */
    min-height: 600px; 
    /* CLS Fix: contain ile layout containment sağlanıyor - font yüklemesi sırasında CLS önlendi */
    contain: layout style;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-synthesis: none;
    overflow-x: hidden;
    position: relative;
}

@media (max-width: 768px) {
    /* CRITICAL MOBILE CLS FIX: Mobilde font yükleme sırasında layout shift önlemek için */
    /* Font-display: optional kullanılıyor - font yüklenemezse fallback kullan (CLS yok) */
    /* Font preload header.php'de yapılıyor - fontlar erken yükleniyor (fetchpriority="high") */
    body.wp-singular,
    body.single {
        /* CRITICAL: Content-based min-height (viewport height yerine) - daha güvenli */
        /* 100vh mobilde viewport height değişiminden etkilenebilir, content-based daha iyi */
        min-height: auto; /* Content-based - font yükleme sırasında layout shift önle */
        /* CRITICAL: Font yükleme sırasında layout shift'i önlemek için */
        /* Font metrikleri (size-adjust, ascent-override: 95%, descent-override: 25%) sayesinde CLS yok */
        font-synthesis: none; /* Font synthesis'ı kapat - font yükleme sırasında layout shift önle */
        /* CRITICAL: Font yükleme sırasında layout containment */
        contain: layout style; /* Paint containment kaldırıldı - mobilde performans sorunları yaratabilir */
        /* CLS FIX: Font loading state - @font-face'de font-display: optional kullanılıyor (CLS yok) */
        /* Optional: 100ms timeout, font yüklenemezse fallback kullan (hiç swap yok, CLS yok) */
    }

    .single .blog-content-wrapper {
        contain: layout style; /* Paint containment kaldırıldı - mobilde performans sorunları yaratabilir */
        min-height: 0; 
    }

    .single .blog-posts {
        contain: layout style; /* Paint containment kaldırıldı - mobilde performans sorunları yaratabilir */
        min-height: 0; 
    }
    
    /* CRITICAL MOBILE CLS FIX: Single post title - font yükleme sırasında layout shift önle */
    .single .blog-post-title,
    body.wp-singular .blog-post-title {
        min-height: 4.5rem; /* Mobilde font yükleme sırasında layout shift önle (3 satır için yeterli) */
        contain: layout style;
    }
    
    /* CRITICAL MOBILE CLS FIX: Breadcrumb current - font yükleme sırasında layout shift önle */
    .single .breadcrumb-current,
    body.wp-singular .breadcrumb-current {
        min-height: 1.75rem; /* Font yükleme sırasında layout shift önle (artırıldı) */
        display: inline-block;
        contain: layout style;
    }
    
    /* CRITICAL MOBILE CLS FIX: Blog post content - font yükleme sırasında layout shift önle */
    .single .blog-post-content,
    body.wp-singular .blog-post-content {
        min-height: 200px; /* İçerik yüklenirken layout shift önle */
        contain: layout style;
    }
    
    /* CRITICAL: Font yükleme sırasında text rendering optimizasyonu */
    /* Font metrikleri (ascent-override: 95%, descent-override: 25%) sayesinde CLS yok */
    body.wp-singular *,
    body.single * {
        /* Font yükleme sırasında layout shift'i önlemek için */
        /* Font-display: optional kullanılıyor - font yüklenemezse fallback kullan (CLS yok) */
        text-rendering: optimizeLegibility;
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}

@media (min-width: 769px) {
    body.wp-singular,
    body.single {
        min-height: 100vh; 
    }
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

h1 {
    font-size: 2.5rem;
    font-weight: 700; 

}

.blog-container h1,
.blog-content-wrapper h1,
.blog-posts h1 {
    font-size: 2.5rem;
    font-weight: 700; 
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

.blog-container h1.archive-title,
.blog-content-wrapper h1.archive-title,
.blog-posts h1.archive-title {
    font-size: 2.5rem;
    font-weight: 700; 
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

.blog-container h1.blog-post-title,
.blog-content-wrapper h1.blog-post-title,
.blog-posts h1.blog-post-title {
    font-size: 2rem;
    font-weight: 700;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;

    min-height: 3rem; 
    contain: layout style;
}

h2 {
    font-size: 2rem;
    font-weight: 700;
}

h3 {
    font-size: 1.5rem;
    font-weight: 600;
}

h4 {
    font-size: 1.25rem;
    font-weight: 600;
}

p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--secondary);
}

.blog-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;

    width: 100%;
    box-sizing: border-box;

    contain: layout style paint;

    min-height: 0; 
}

/* CLS Fix: Breadcrumb container - font yüklemesi sırasında layout shift önlemek için contain ekleniyor */
.blog-breadcrumb {
    margin: 0.75rem 0 1rem 0;
    padding: 0;
    /* CLS Fix: min-height ve contain ile font yüklemesi sırasında layout shift önlendi */
    /* CRITICAL MOBILE CLS FIX: Increased min-height to prevent layout shift during font loading */
    min-height: 2.5rem; /* Increased from 1.5rem to prevent CLS on mobile */
    contain: layout style;
}

.breadcrumb-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    font-size: 0.875rem;
    font-family: 'Cabin', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    /* CLS Fix: min-height ve font metrikleri sayesinde font yüklemesi sırasında layout shift yok */
    /* CRITICAL MOBILE CLS FIX: Increased min-height to match parent */
    min-height: 2.5rem; /* Increased from 1.5rem to prevent CLS on mobile */
    contain: layout style;
}

.breadcrumb-list li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.breadcrumb-list a {
    color: var(--secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.15s ease;
}

.breadcrumb-list a:hover {
    color: var(--secondary-dark);
}

.breadcrumb-separator {
    color: var(--text-light); 
    font-size: 0.75rem;
    user-select: none;
}

/* CLS Fix: Breadcrumb current item - font yüklemesi sırasında layout shift önlemek için */
.breadcrumb-current {
    color: var(--text-light);
    font-weight: 500;
    /* CLS Fix: min-height ile font yüklemesi sırasında layout shift önlendi */
    /* CRITICAL MOBILE CLS FIX: Increased min-height to prevent layout shift during font loading */
    min-height: 1.5rem; /* Artırıldı - font yükleme sırasında layout shift önle */
    display: inline-block;
    contain: layout style;
    contain: layout style;
}

.breadcrumb-placeholder {
    visibility: hidden;

    display: inline-flex;
    min-width: 0.1em;
}

.breadcrumb-separator-hidden {
    visibility: hidden;
}

.blog-main {
    padding: 2rem 0;

    min-height: calc(100vh - 200px);
}

@media (max-width: 768px) {
    .blog-main {

        min-height: 600px; 
    }
}

/* ── HEADER WRAPPER ── */
.blog-header-wrapper {
    position: relative;
    z-index: var(--z-header);
    overflow: visible;
}

/* ── ANA HEADER ── */
.blog-header {
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    padding: 0.875rem 0;
    position: relative;
    z-index: var(--z-header);
    contain: layout style paint;
    min-height: 64px;
    overflow: visible;
}

.blog-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    position: relative;
    z-index: 1;
    overflow: visible;
}

.blog-header-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    position: relative;
    z-index: 1;
}

/* ── LOGO ── */
.blog-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    text-decoration: none;
    font-size: 1.125rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.blog-logo-text {
    display: inline-flex;
    align-items: baseline;
    gap: 0;
    min-height: 1.25rem;
    contain: layout style;
}

/* Ana site navbar (frontend/includes/navbar.php) ile uyum: Bulut = primary, Randevu = gray-700 */
.logo-bold {
    font-weight: 700;
    color: var(--secondary);
    display: inline-block;
    min-height: 1.25rem;
    margin-right: 0.25rem;
    contain: layout style;
}

.logo-light {
    font-weight: 700;
    color: #374151;
    display: inline-block;
    min-height: 1.25rem;
    contain: layout style;
}

.blog-logo-badge {
    font-size: 0.6875rem;
    font-weight: 600;
    background: var(--cream);
    color: var(--cream-text);
    border: 1px solid var(--cream-border);
    border-radius: 20px;
    padding: 0.125rem 0.5rem;
    letter-spacing: 0.02em;
    align-self: center;
    white-space: nowrap;
    flex-shrink: 0;
}

/* ── NAV ── */
.blog-nav {
    display: flex;
    gap: 0.25rem;
    align-items: center;
}

.blog-nav-menu {
    display: flex;
    gap: 0.25rem;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
}

.blog-nav-menu li {
    list-style: none;
    margin: 0;
    padding: 0;
}

.blog-nav-link {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.9375rem;
    transition: color 0.2s ease;
    white-space: nowrap;
    position: relative;
    padding: 0.375rem 0.625rem;
    border-radius: var(--radius-sm);
}

.blog-nav-link:hover {
    color: var(--navy);
    background: var(--bg-tertiary);
}

.blog-nav-link.active {
    color: var(--secondary);
    position: relative;
}

.blog-nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0.625rem;
    right: 0.625rem;
    height: 2px;
    background: var(--secondary);
    border-radius: 2px;
}

/* ── HEADER CTA BUTONLARI ── */
.blog-header-cta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.blog-header-btn-login {
    display: inline-flex;
    align-items: center;
    padding: 0.4375rem 1rem;
    font-family: var(--font-family);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--cream-text);
    background: var(--cream);
    border: 1.5px solid var(--cream-border);
    border-radius: var(--radius-md);
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s ease, border-color 0.2s ease;
    white-space: nowrap;
    min-height: var(--touch-target-small);
}

.blog-header-btn-login:hover {
    background: var(--primary-light);
    border-color: var(--secondary);
    color: var(--cream-text);
}

.blog-header-btn-trial {
    display: inline-flex;
    align-items: center;
    padding: 0.4375rem 1.125rem;
    font-family: var(--font-family);
    font-size: 0.875rem;
    font-weight: 600;
    color: #fff;
    background: var(--secondary);
    border: 1.5px solid var(--secondary);
    border-radius: var(--radius-md);
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s ease, border-color 0.2s ease;
    white-space: nowrap;
    min-height: var(--touch-target-small);
}

.blog-header-btn-trial:hover {
    background: var(--secondary-dark);
    border-color: var(--secondary-dark);
    color: #fff;
}

/* ── ARAMA FORMU ── */
.blog-header-search {
    display: flex;
    align-items: center;
}

.blog-header-search .search-form {
    margin: 0;
}

.blog-header-search .search-form-wrapper {
    display: flex;
    align-items: center;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 0.3125rem 0.5rem;
    gap: 0.375rem;
    transition: all 0.2s ease;
    min-width: 190px;
}

.blog-header-search .search-form-wrapper:focus-within {
    border-color: var(--secondary);
    background: var(--bg-primary);
    box-shadow: var(--shadow-primary-sm);
}

.blog-header-search .search-field {
    flex: 1;
    padding: 0.3125rem 0.375rem;
    border: none;
    background: transparent;
    font-family: var(--font-family);
    font-size: 0.8125rem;
    color: var(--text-primary-dark);
    outline: none;
    min-width: 0;
}

.blog-header-search .search-field::placeholder {
    color: var(--text-light);
}

.blog-header-search .search-submit {
    padding: 0.3125rem 0.625rem;
    background: var(--secondary);
    color: var(--bg-primary);
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    font-family: var(--font-family);
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.2s ease;
}

.blog-header-search .search-submit:hover {
    background: var(--secondary-dark);
}

/* ── MOBİL HAMBURGER ── */
.blog-mobile-menu-toggle {
    display: none;
}

@media (max-width: 768px) {
    .blog-header {
        position: relative;
        z-index: var(--z-header);
        padding: 0.75rem 0;
        background: var(--bg-primary);
        border-bottom: 1px solid var(--border);
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
        min-height: 56px;
    }

    .blog-container {
        padding: 0 var(--container-padding-mobile);
    }

    .blog-header .blog-header-content {
        position: relative;
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding-right: 0;
        padding-left: 0;
        min-height: 48px;
        gap: 0;
    }

    .blog-header .blog-header-right {
        display: none;
    }

    .blog-header .blog-logo {
        position: relative;
        z-index: var(--z-header-elements);
        flex: 0 0 auto;
        margin: 0;
        padding: 0;
        font-size: 1rem;
        line-height: 1.2;
        display: inline-flex;
        align-items: center;
        pointer-events: auto;
        text-decoration: none;
        background: var(--bg-primary);
        gap: 0.5rem;
    }

    .blog-logo .logo-bold,
    .blog-logo .logo-light {
        display: inline-block;
        line-height: 1.2;
        min-height: 1.75rem;
        contain: layout style;
    }

    .blog-logo-badge {
        display: none;
    }

    .blog-header .blog-mobile-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: var(--touch-target-min);
        height: var(--touch-target-min);
        padding: 0;
        background: transparent;
        border: none;
        cursor: pointer;
        position: relative;
        z-index: var(--z-header-elements);
        flex-shrink: 0;
    }

    .hamburger-icon {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        width: 24px;
        height: 18px;
        position: relative;
    }

    .hamburger-line {
        display: block;
        width: 100%;
        height: 2px;
        background: var(--navy);
        border-radius: 2px;
        transition: all 0.3s ease;
    }

    .blog-mobile-menu-toggle[aria-expanded="true"] .hamburger-line:nth-child(1) {
        transform: rotate(45deg) translate(7px, 7px);
    }

    .blog-mobile-menu-toggle[aria-expanded="true"] .hamburger-line:nth-child(2) {
        opacity: 0;
    }

    .blog-mobile-menu-toggle[aria-expanded="true"] .hamburger-line:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }
}

@media (min-width: 769px) {
    .blog-mobile-menu-toggle,
    .blog-mobile-menu-overlay,
    .blog-mobile-menu {
        display: none;
    }
}

.blog-content-wrapper {
    display: block;
    width: 100%;

    contain: layout style paint;

    max-width: 100%;
    box-sizing: border-box;

    min-height: 0; 
}

.blog-posts {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;

    overflow-x: hidden;

    contain: layout style paint;

    min-height: 0; 
}

.single .blog-content-wrapper {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
    align-items: start;

    contain: layout style;

}

.blog-posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    width: 100%;

    max-width: 100%;
    box-sizing: border-box;

    margin: 0;
    padding: 0;

    min-height: 400px; 
}

@media (min-width: 769px) {
    .blog-posts-grid {

        min-height: 300px; 

        contain: layout style;
    }
}

@media (min-width: 1025px) {
    .blog-posts-grid {

        min-height: 400px; 

        contain: layout style;
    }
}

.blog-posts-grid .blog-post {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: 0;
    margin-bottom: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--bg-tertiary);
    overflow: hidden;
    contain: layout style;
    display: flex;
    flex-direction: column;

}

.blog-posts-grid .blog-post-thumbnail-link {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: var(--bg-secondary);

    contain: layout style;
    position: relative;

    flex-shrink: 0;

    box-sizing: border-box;

    min-height: 0; 
}

.blog-post-thumbnail-placeholder {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: var(--bg-secondary);
    contain: layout style;
    position: relative;
    flex-shrink: 0;
}

.blog-post-thumbnail-placeholder-bg {
    width: 100%;
    height: 100%;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 16 / 9;
}

.blog-posts-grid .blog-post-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;

    display: block;

    contain: layout style;

    max-width: 100%;
    max-height: 100%;

    object-position: center;
}

.blog-posts-grid .blog-post-title {
    margin: 1.5rem 1.5rem 0.25rem;
    font-size: 1.25rem;
    line-height: 1.4;

    min-height: 2.5rem;
    contain: layout style;

    max-height: 3.5rem; 
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2; 
    line-clamp: 2; 
    -webkit-box-orient: vertical;
}

.blog-posts-grid .blog-post-title a {
    color: var(--text-primary);
    text-decoration: none;
    position: relative;
    display: inline-block;
    transition: color 0.2s ease;
}

.blog-posts-grid .blog-post-title a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary, #2196F3);
    transition: width 0.3s ease;
}

.blog-posts-grid .blog-post-title a:hover {
    color: var(--primary, #2196F3);
}

.blog-posts-grid .blog-post-title a:hover::after {
    width: 100%;
}

.blog-posts-grid .blog-post-excerpt {
    padding: 0.25rem 1.5rem 0;
    margin-bottom: 1rem;
    flex-grow: 1;
    color: var(--text-secondary);
    line-height: 1.6;

    min-height: 3rem;

    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 4; 
    line-clamp: 4; 
    -webkit-box-orient: vertical;
    contain: layout style;
}

.blog-post-excerpt-placeholder {
    display: block;
    min-height: 3rem;
    visibility: hidden;
}

.blog-posts-grid .blog-post-meta {
    padding: 0 1.5rem 1.5rem;
    margin-top: auto;
    margin-bottom: 0;
    border-top: 1px solid var(--bg-tertiary);
    padding-top: 1rem;

    min-height: 3.5rem; 
    contain: layout style;
}

.blog-post-meta-category-placeholder {
    visibility: hidden;
    display: inline-block;
    min-width: 0.1em;
}

.blog-posts-grid .blog-post-read-more {
    display: inline-block;
    margin: 0 1.5rem 1.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--primary, #2196F3);
    color: var(--white);
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.2s ease;
    align-self: flex-start;
}

.blog-posts-grid .blog-post-read-more:hover {
    background: var(--primary-dark, #1565C0);
    transform: translateX(4px);
}

.blog-post-read-more {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.75rem 1.5rem;
    background: var(--primary);
    color: white;
    border-radius: var(--radius-sm);
    font-weight: 600;
    transition: background 0.2s ease;
}

.blog-post-read-more:hover {
    background: var(--secondary-dark);
    color: white;
}

.blog-post-tags {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    font-size: 0.8125rem;
    color: var(--text-light);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    min-height: 3rem; 
    contain: layout style;
}

.blog-post-tags strong {
    margin-right: 0;
    font-weight: 600;
    color: var(--text-secondary-dark);
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.blog-post-tags a {
    color: var(--text-light);
    text-decoration: none;
    padding: 0.375rem 0.875rem;
    background: var(--bg-tertiary);
    border-radius: 20px;
    font-size: 0.8125rem;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.blog-post-tags a:hover {
    background: var(--secondary);
    color: var(--bg-primary);
    border-color: var(--secondary);
    transform: translateY(-1px);
    box-shadow: var(--shadow-primary-md);
}

.blog-post-featured-image {
    margin-bottom: 2rem;
    width: 100%;

    overflow: hidden;
    background: var(--bg-secondary);
    contain: layout style;

    position: relative;
    display: block;

    aspect-ratio: 600 / 338; 
}

@supports not (aspect-ratio: 1) {
    .blog-post-featured-image {
        height: 0;

        padding-bottom: 56.33%; 
    }
}

@media (max-width: 480px) {
    .blog-post-featured-image {

        aspect-ratio: 400 / 225; 
    }

    @supports not (aspect-ratio: 1) {
        .blog-post-featured-image {
            padding-bottom: 56.25%; 
        }
    }
}

@media (min-width: 969px) {
    .blog-post-featured-image {

        aspect-ratio: 750 / 480; 
    }

    @supports not (aspect-ratio: 1) {
        .blog-post-featured-image {
            padding-bottom: 64%; 
        }
    }
}

.blog-post-featured-image .blog-post-thumbnail {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    /* Resim yayınlamayı kolaylaştırın: Responsive image sizing - browser selects from srcset */
    /* CRITICAL FIX: Override general .blog-post-thumbnail styles to prevent conflicts */
    margin-bottom: 0; /* Override general margin-bottom: 1.5rem */
    border-radius: 0; /* Override general border-radius for featured image */
    aspect-ratio: unset; /* Override general aspect-ratio: 16/9 - container has its own aspect-ratio */
}

.blog-post-featured-image .blog-post-thumbnail-placeholder {
    width: 100%;
    height: 100%;
    background: var(--bg-secondary);
    display: block;
    /* Resim yayınlamayı kolaylaştırın: Placeholder inherits container's aspect-ratio (responsive) */
    /* Container aspect-ratio is set by media queries: 400/225 mobile, 600/338 tablet, 750/480 desktop */
    /* CRITICAL FIX: Override general .blog-post-thumbnail-placeholder styles to prevent conflicts */
    aspect-ratio: unset; /* Override general aspect-ratio: 16/9 - container has its own responsive aspect-ratio */
    margin-bottom: 0; /* Ensure no margin conflicts */
    position: absolute; /* Match thumbnail positioning */
    top: 0;
    left: 0;
}

.no-posts {
    text-align: center;
    padding: 3rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    min-height: 200px; 
    contain: layout style;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.blog-post-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.3;
    /* CRITICAL MOBILE CLS FIX: Min-height added to prevent layout shift during font loading */
    min-height: 3rem; /* Desktop için - font yükleme sırasında layout shift önle */
    contain: layout style;
    color: var(--text-primary-dark);
    letter-spacing: -0.02em;

    min-height: 3rem;

    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.blog-post-title a {
    color: var(--text-primary);
}

.blog-post-title a:hover {
    color: var(--primary);
}

.blog-post-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: var(--text-light);
    flex-wrap: wrap;
    min-height: 2rem; 
    contain: layout style;
}

.blog-post-meta a {
    color: var(--secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.15s ease;
}

.blog-post-meta a:hover {
    color: var(--secondary-dark);
}

.blog-post-meta span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.blog-post-excerpt {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1rem;
}

.blog-post-thumbnail {
    width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    object-fit: cover;
    aspect-ratio: 16 / 9; 
    contain: layout style;
}

.blog-post-content {
    color: var(--text-secondary, #374151);
    line-height: 1.8;
    font-size: 1.0625rem;

    contain: layout style;
    min-height: 200px; 

    font-synthesis: none;

    font-family: 'Cabin', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.blog-post-content h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--text-primary-dark);
    letter-spacing: -0.02em;
    line-height: 1.3;
}

.blog-post-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: 1.75rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
    letter-spacing: -0.01em;
    line-height: 1.4;
}

.blog-post-content h4 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.625rem;
    color: var(--text-secondary-dark);
    line-height: 1.4;
}

.blog-post-content p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.blog-post-content ul,
.blog-post-content ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
    color: var(--text-secondary);
}

.blog-post-content li {
    margin-bottom: 0.5rem;
    line-height: 1.7;
    color: var(--text-secondary);
}

.blog-post-content ul li {
    list-style-type: disc;
}

.blog-post-content ol li {
    list-style-type: decimal;
}

.blog-post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1.5rem 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);

    display: block;

    contain: layout style;

}

.blog-post-content img:not([width]):not([height]) {

    aspect-ratio: 16 / 9; 

    min-height: 200px;

    width: 100%;
    height: auto;
    object-fit: contain; 
}

.blog-post-content img[width][height] {
    height: auto;
    max-width: 100%;

}

.blog-post-content img[style*="aspect-ratio"] {
    height: auto;
}

.blog-post-content figure {
    margin: 1.5rem 0;
    contain: layout style;

    min-height: 200px;
    display: block;
}

.blog-post-content figure img {
    width: 100%;
    height: auto;
    max-width: 100%;
    display: block;

}

.blog-post-content p img {
    display: block;
    margin: 1.5rem auto;
}

.blog-post-content blockquote {
    position: relative;
    padding: 2rem 2rem 2rem 3.5rem;
    margin: 2rem 0;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--white) 100%);
    border: 1px solid var(--border, #E5E7EB);
    border-left: 4px solid var(--accent, #42A5F5);
    border-radius: 12px;
    font-style: normal;
    color: var(--text-primary, #1F2937);
    font-size: 1.0625rem;
    line-height: 1.8;
    box-shadow: var(--shadow-sm, 0 1px 2px 0 rgba(0, 0, 0, 0.05));
    font-family: var(--font-family, 'Cabin', sans-serif);
}

.blog-post-content blockquote::before {
    content: '"';
    position: absolute;
    left: 1.25rem;
    top: 1.5rem;
    font-size: 4rem;
    font-weight: 700;
    color: var(--accent, #42A5F5);
    opacity: 0.2;
    line-height: 1;
    font-family: Georgia, serif;
}

.blog-post-content blockquote p {
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.blog-post-content blockquote p:last-child {
    margin-bottom: 0;
}

.blog-post-content blockquote cite {
    display: block;
    margin-top: 1rem;
    font-size: 0.875rem;
    color: var(--text-secondary, #4B5563);
    font-style: normal;
    font-weight: 500;
    padding-top: 1rem;
    border-top: 1px solid var(--border, #E5E7EB);
}

.blog-post-content blockquote cite::before {
    content: '— ';
    color: var(--accent, #42A5F5);
    font-weight: 600;
}

.blog-post-content code {
    background: rgba(255, 255, 255, 0.15);
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-family: 'SF Mono', 'Monaco', 'Cascadia Code', 'Roboto Mono', monospace;
    color: #FBBF24;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.blog-post-content pre {
    background: var(--text-primary);
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1.5rem 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.blog-post-content pre code {
    background: none;
    padding: 0;
    color: #F9FAFB;
    border: none;
    font-size: 0.875rem;
    line-height: 1.6;
}

.blog-post-content a {
    color: var(--secondary);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: all 0.2s ease;
}

.blog-post-content a:hover {
    color: var(--primary-dark);
    border-bottom-color: var(--primary-dark);
}

.blog-post-content strong {
    font-weight: 600;
    color: var(--text-primary-dark);

    display: inline-block;
    min-width: 0.1em; 
}

.blog-post-content em {
    font-style: italic;
    color: var(--text-secondary);
}

.post-navigation {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin: 2.5rem 0 0 0;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    min-height: 4rem; 
    contain: layout style;
}

.post-nav-link {
    flex: 1;
    padding: 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    text-decoration: none;
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    transition: none;

    min-height: 4rem;
    contain: layout style;
}

.post-nav-link strong {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.post-nav-link span {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-primary-dark);
    line-height: 1.5;

    min-height: 1.5rem;
    display: block;
}

.post-nav-link.prev {
    text-align: left;
}

.post-nav-link.next {
    text-align: right;
}

.post-nav-link.prev::before {
    content: '← ';
    color: var(--secondary);
    font-weight: 600;
}

.post-nav-link.next::after {
    content: ' →';
    color: var(--secondary);
    font-weight: 600;
}

.post-nav-link-placeholder {
    visibility: hidden;

    min-height: 4rem;

}

.post-nav-link-placeholder span {
    min-height: 1.5rem;
    display: block;
}

.blog-post-tags-placeholder {
    visibility: hidden;

    display: inline-block;
    min-width: 0.1em;
}

.archive-header {
    text-align: center;
    padding: 3rem 0;

    min-height: 8rem; 
    contain: layout style paint;

    margin-bottom: 2rem;
    width: 100%;
    box-sizing: border-box;
    background: var(--bg-primary);
}

.archive-title {
    font-size: 2.5rem;
    font-weight: 700; 
    margin-bottom: 1rem;
    contain: layout style paint;

    min-height: 3.5rem;

    word-wrap: break-word;
    overflow-wrap: break-word;
}

.archive-title-site-link {
    color: inherit;
    text-decoration: none;
}

.archive-title-site-link:hover,
.archive-title-site-link:focus {
    text-decoration: underline;
    text-underline-offset: 0.15em;
}

.archive-title-blog-suffix {
    font-weight: 700;
}

.archive-description {
    color: var(--text-secondary);
    font-size: 1.125rem;
    min-height: 2rem; 
    contain: layout style paint;

    display: block;

    word-wrap: break-word;
    overflow-wrap: break-word;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin: 3rem 0;
    flex-wrap: wrap;

    min-height: 3rem;
    contain: layout style;
}

.pagination-placeholder {
    visibility: hidden;

    display: inline-block;
    min-width: 0.1em;
    min-height: 3rem;
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0.5rem 1rem;
    background: var(--bg-secondary);
    color: var(--text-primary);
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

.pagination a:hover {
    background: var(--primary);
    color: white;
}

.pagination .current {
    background: var(--primary);
    color: white;
    font-weight: 600;
}

.blog-sidebar {
    width: 100%;
    max-width: 320px;

    min-width: 0; 
}

.sidebar-widget-area {

    min-height: 200px;
    contain: layout style;
}

.sidebar-widget {
    background: var(--bg-primary);
    border: 1px solid var(--bg-tertiary);
    border-radius: var(--radius-lg);
    padding: 2rem;
    min-height: 100px; 
    contain: layout style;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: none;
}

.sidebar-widget:last-child {
    margin-bottom: 0;
}

.sidebar-widget-placeholder {
    min-height: 100px;
    visibility: hidden;

    display: block;
}

.sidebar-widget-title {
    font-size: 0.75rem;
    font-weight: 600;
    margin: 0 0 1.5rem 0;
    color: var(--text-light, #6B7280);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.sidebar-widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-widget li {
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--bg-tertiary);
}

.sidebar-widget li:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.sidebar-widget a {
    color: var(--text-secondary-dark);
    text-decoration: none;
    font-size: 0.9375rem;
    line-height: 1.6;
    display: block;
}

.sidebar-widget p {
    color: var(--text-light);
    font-size: 0.9375rem;
    line-height: 1.7;
    margin: 0;
}

.related-posts-widget {
    background: var(--bg-primary);
    border: 1px solid var(--bg-tertiary);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);

    min-height: 200px;
    contain: layout style;
}

.related-posts-list {
    list-style: none;
    padding: 0;
    margin: 0;

    min-height: 150px;
}

.related-post-item {
    display: block;
    margin-bottom: 1.25rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--bg-tertiary);
    transition: opacity 0.2s ease;

}

.related-post-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.related-post-item:hover {
    opacity: 0.8;
}

.related-post-thumbnail {
    display: none; 
}

.related-post-item-placeholder {
    visibility: hidden;

    min-height: 80px;
}

.related-post-thumbnail:hover .related-post-image {
    transform: scale(1.1);
}

.related-post-content {

    width: 100%;
}

.related-post-title {
    margin: 0 0 0.5rem 0;
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.4;
}

.related-post-title a {
    color: #111827;
    text-decoration: none;
    transition: color 0.2s ease;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-post-title a:hover {
    color: var(--primary, #2196F3);
}

.related-post-date {
    font-size: 0.8125rem;
    color: var(--text-light);
    display: block;
}

.search-form {
    margin-bottom: 1.5rem;
}

.search-form-wrapper {
    display: flex;
    align-items: center;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 0.5rem;
    gap: 0.5rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
}

.search-form-wrapper:focus-within {
    border-color: var(--secondary);
    box-shadow: var(--shadow-primary-lg);
}

.search-form .search-field {
    flex: 1;
    padding: 0.625rem 0.75rem;
    border: none;
    background: transparent;
    font-family: var(--font-family);
    font-size: 0.875rem;
    color: var(--text-primary-dark);
    outline: none;
}

.search-form .search-field::placeholder {
    color: var(--text-light); 
}

.search-form .search-submit {
    padding: 0.625rem 1.25rem;
    background: var(--secondary);
    color: var(--bg-primary);
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.8125rem;
    font-weight: 500;
    font-family: var(--font-family);
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.2s ease;
    box-shadow: var(--shadow-sm);
}

.search-form .search-submit:hover {
    background: var(--secondary-dark);
}

.search-form .search-submit:active {
    transform: translateY(0);
}

.search-submit-text {
    display: inline-block;
}

.comments-area-wrapper {
    margin-top: 2.5rem;

    min-height: 350px; 
    contain: layout style;
}

.comments-area {
    margin-top: 0;
    padding-top: 2.5rem;
    border-top: 1px solid var(--border);

    min-height: 350px;
    contain: layout style;

    box-sizing: border-box;
}

.comments-area-placeholder {

    min-height: 350px; 
    visibility: hidden;

    display: block;

    contain: layout style;

    padding-top: 2.5rem;
    border-top: 1px solid var(--border);
}

.comments-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-primary-dark);
    letter-spacing: -0.01em;
}

.comment-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.comment {
    margin-bottom: 1.5rem;
    padding: 0;
    background: transparent;
    border-radius: 0;
    position: relative;
}

.comment::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #E5E7EB;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.comment:hover::before {
    opacity: 1;
    background: var(--secondary);
}

.comment-author {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.comment-author .avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid #F3F4F6;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.comment-author .fn {
    font-weight: 600;
    color: var(--text-primary-dark);
    font-size: 0.9375rem;
    text-decoration: none;
}

.comment-author .fn:hover {
    color: var(--secondary);
}

.comment-meta {
    font-size: 0.8125rem;
    color: var(--text-light); 
    margin-top: 0.25rem;
}

.comment-meta a {
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.2s ease;
}

.comment-meta a:hover {
    color: var(--secondary);
}

.comment-content {
    color: var(--text-secondary-dark);
    line-height: 1.7;
    font-size: 0.875rem;
    margin-top: 0.5rem;
    padding-left: 56px;
}

.comment-content p {
    margin-bottom: 1rem;
}

.comment-content p:last-child {
    margin-bottom: 0;
}

.comment .reply {
    margin-top: 0.75rem;
    padding-left: 56px;
}

.comment .reply a {
    font-size: 0.8125rem;
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.comment .reply a:hover {
    color: var(--secondary);
}

.comment-respond {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.comment-reply-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary-dark);
    letter-spacing: -0.01em;
}

.comment-form {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
}

.comment-form-comment label,
.comment-form-author label,
.comment-form-email label,
.comment-form-url label {
    display: block;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-light);
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.comment-form-comment textarea,
.comment-form-author input,
.comment-form-email input,
.comment-form-url input {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-family: var(--font-family);
    color: var(--text-primary-dark);
    background: var(--bg-primary);
    box-sizing: border-box;
}

.comment-form-comment textarea {
    min-height: 70px;
    resize: vertical;
}

.comment-form-comment textarea:focus,
.comment-form-author input:focus,
.comment-form-email input:focus,
.comment-form-url input:focus {
    outline: none;
    border-color: var(--secondary);
    box-shadow: var(--shadow-primary-sm);
}

.comment-form .form-submit {
    margin-top: 0.25rem;
}

.comment-form .submit {
    background: var(--secondary);
    color: var(--bg-primary);
    border: none;
    padding: 0.5rem 1.25rem;
    border-radius: var(--radius-sm);
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    align-self: flex-start;
}

.comment-form .submit:hover {
    background: var(--secondary-dark);
}

.comment-form .submit:active {
    transform: translateY(0);
}

.comment .children {
    list-style: none;
    padding: 0;
    margin: 2rem 0 0 0;
    padding-left: 2rem;
    border-left: 1px solid var(--bg-tertiary);
}

.comment .children .comment {
    margin-bottom: 1.5rem;
}

.comment .children .comment-content {
    padding-left: 64px;
}

@media (max-width: 1024px) {
    .blog-posts-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;

        width: 100%;
        max-width: 100%;

        min-height: 400px; 
    }

    .similar-posts-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
        width: 100%;
        max-width: 100%;
    }
}

@media (max-width: 968px) {
    .single .blog-content-wrapper {
        grid-template-columns: 1fr;
        gap: 0; 

        contain: layout style;
    }

    .single .blog-sidebar {
        margin-top: 2rem;
        max-width: 100%; 
    }

    .blog-sidebar {
        max-width: 100%; 
    }

    .related-posts-widget {
        padding: 1.5rem;
    }

    .related-post-thumbnail {
        width: 70px;
        height: 70px;
    }

    .related-post-title {
        font-size: 0.875rem;
    }
}

@media (max-width: 768px) {
    .blog-container {
        padding: 0 1rem;

        width: 100%;
        box-sizing: border-box;
    }

    .blog-nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.75rem;
        font-size: 0.875rem;
    }

    .blog-header-search {
        width: 100%;
    }

    .blog-header-search .search-form-wrapper {
        width: 100%;
        min-width: 0;
    }

    h1 {
        font-size: 1.75rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    h3 {
        font-size: 1.25rem;
    }

    h4 {
        font-size: 1.125rem;
    }

    .blog-post {
        padding: 1.25rem;
        margin-bottom: 1.5rem;

        contain: layout style;
    }

    .blog-post-title {

        font-size: 1.5rem;
        line-height: 1.3;
        min-height: 4rem; 
        contain: layout style;

        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .blog-post-featured-image {

        margin-bottom: 1.5rem;
        margin-top: 0;

    }

    .blog-post-content {

        font-size: 1rem;
        contain: layout style;

        min-height: 200px; 
    }

    .blog-post-content img {
        margin: 1rem 0;
        border-radius: 6px;

        max-width: 100%;
        height: auto;

        display: block;
    }

    .blog-post-content figure img {
        width: 100%;
        height: auto;
        max-width: 100%;

        display: block;
    }

    .blog-post-content blockquote {
        padding: 1.5rem 1.5rem 1.5rem 2.5rem;
        margin: 1.5rem 0;
        font-size: 1rem;
    }

    .blog-post-content blockquote::before {
        left: 1rem;
        top: 1.25rem;
        font-size: 3rem;
    }

    .blog-post-content pre {
        padding: 0.875rem;
        margin: 1rem 0;
        font-size: 0.8125rem;
        overflow-x: auto;
    }

    .blog-post-content code {
        font-size: 0.8125rem;
        padding: 0.2rem 0.4rem;
    }

    .blog-post-tags {
        margin-top: 1.5rem;
        padding-top: 1rem;
        font-size: 0.75rem;
    }

    .blog-post-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        font-size: 0.8125rem;
    }

    .blog-post-content h2 {
        font-size: 1.375rem;
        margin-top: 1.5rem;
        margin-bottom: 0.875rem;
    }

    .blog-post-content h3 {
        font-size: 1.125rem;
        margin-top: 1.25rem;
        margin-bottom: 0.625rem;
    }

    .blog-post-content h4 {
        font-size: 1rem;
        margin-top: 1rem;
        margin-bottom: 0.5rem;
    }

    .archive-header {
        padding: 2rem 0;
        min-height: 6rem; 

        margin-bottom: 2rem; 

        width: 100%;
        box-sizing: border-box;

        contain: layout style paint;
    }

    .archive-title {
        font-size: 1.75rem; 
        margin-bottom: 0.75rem;

        min-height: 2.5rem; 

        word-wrap: break-word;
        overflow-wrap: break-word;

        contain: layout style paint;
    }

    .archive-description {
        font-size: 1rem; 
        min-height: 1.5rem;

        contain: layout style paint;

        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .blog-breadcrumb {
        margin: 0.5rem 0 0.75rem 0;
    }

    .breadcrumb-list {
        font-size: 0.75rem;
        gap: 0.375rem;
    }

    .blog-toc {
        padding: 1rem;
        margin: 1.5rem 0;

        min-height: 4rem; 
        contain: layout style;
    }

    .blog-toc-empty {

        min-height: 4rem; 
        max-height: 4rem; 
    }

    .blog-toc summary {
        font-size: 1rem;
        padding: 1.25rem;
        min-height: 3rem;

        contain: layout style;
    }

    .blog-toc .toc-list-container {
        padding: 0 1.25rem;
    }

    .blog-toc details[open] .toc-list-container {
        padding: 1.25rem;
    }

    .blog-toc .toc-item {
        margin-bottom: 0.5rem;
        font-size: 0.8125rem;
    }

    .blog-toc .toc-level-1 {
        font-size: 0.875rem;
    }

    .blog-toc .toc-level-2 {
        padding-left: 0.75rem;
        font-size: 0.8125rem;
    }

    .blog-toc .toc-level-3 {
        padding-left: 1.25rem;
        font-size: 0.75rem;
    }

    .post-navigation {
        flex-direction: column;
        gap: 1rem;
    }

    .post-nav-link {
        width: 100%;
        padding: 1rem;
    }

    .comments-area {
        margin-top: 2rem;
    }

    .comments-title {
        font-size: 1.25rem;
    }

    .comment {
        padding: 1rem;
        margin-bottom: 1rem;
    }

    .comment-author .avatar {
        width: 36px;
        height: 36px;
    }

    .comment-content {
        padding-left: 48px;
        font-size: 0.875rem;
    }

    .comment-respond {
        margin-top: 1.5rem;
        padding-top: 1.5rem;
    }

    .comment-form {
        padding: 1rem;
        gap: 0.75rem;
    }

    .pagination {
        gap: 0.25rem;
        flex-wrap: wrap;
    }

    .pagination a,
    .pagination span {
        min-width: 36px;
        height: 36px;
        padding: 0.5rem;
        font-size: 0.875rem;
    }

    .blog-sidebar {
        margin-top: 2rem;
    }

    .sidebar-widget {
        padding: 1rem;
        margin-bottom: 1.5rem;
    }

    .sidebar-widget-title {
        font-size: 1rem;
    }

    .blog-footer-wrapper {
        margin-top: 2rem;
    }

    .blog-footer {
        padding: 2rem 0 1rem;
    }

    .blog-footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: left;
        margin-bottom: 1.5rem;
    }

    .blog-footer-section {
        width: 100%;
    }

    .blog-footer-logo {
        font-size: 1.25rem;
        margin-bottom: 0.75rem;
    }

    .blog-footer-blog-text {
        font-size: 1rem;
    }

    .blog-footer-title {
        font-size: 1rem;
        margin-bottom: 1rem;
    }

    .blog-footer-description {
        font-size: 0.875rem;
        line-height: 1.6;
    }

    .blog-footer-links {
        gap: 0.625rem;
    }

    .blog-footer-links a {
        font-size: 0.875rem;
        padding: 0.5rem 0; 
        min-height: 44px; 
        display: flex;
        align-items: center;
    }

    .blog-footer-bottom {
        padding-top: 1.5rem;
        font-size: 0.8125rem;
    }

    .single-share-box {
        gap: 0.75rem;
        margin: 1.5rem 0;
        padding: 1rem 0;
    }

    .single-share-box a {
        width: var(--touch-target-small);
        height: var(--touch-target-small);
    }

    .single-share-box a svg {
        width: 18px;
        height: 18px;
    }

    .blog-posts-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        width: 100%;
        max-width: 100%;

        margin: 0;
        padding: 0;
        box-sizing: border-box;

        min-height: 300px; 
    }

    .blog-posts-grid .blog-post {
        border-radius: var(--radius-md);
        width: 100%;
        max-width: 100%;

        box-sizing: border-box;

        overflow: hidden;
    }

    .blog-posts-grid .blog-post-title {
        margin: 1.25rem 1.25rem 0.25rem;
        font-size: 1.125rem;

        min-height: 2.5rem;

        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .blog-posts-grid .blog-post-excerpt {
        padding: 0.25rem 1.25rem 0;
        margin-bottom: 0.75rem;

        min-height: 3rem;

        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .blog-posts-grid .blog-post-meta {
        padding: 0 1.25rem 1.25rem;
        padding-top: 0.75rem;

        min-height: 3rem;

        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .similar-posts-section {
        margin-top: 3rem;
        padding-top: 2rem;
        /* CLS Fix: Container genişliği korunuyor */
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .similar-posts-title {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }

    /* MOBİL YATAY SCROLL: Benzer İçerikler kartlarını yatay (yan yana) göster */
    /* PageSpeed: CLS korunuyor (min-width/min-height), lazy loading korunuyor */
    .similar-posts-grid {
        display: flex;
        flex-direction: row;
        gap: 1.25rem;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch; /* iOS smooth scroll */
        scroll-snap-type: x mandatory; /* UX: Snap scroll */
        scroll-padding-left: 1rem; /* İlk kart için padding */
        scroll-padding-right: 1rem; /* Son kart için padding */
        padding-bottom: 0.5rem; /* Scrollbar için alan */
        /* CLS Fix: Min-height korunuyor - layout shift önleme */
        min-height: 300px;
        contain: layout style;
        /* Container genişliği - scroll için gerekli */
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    /* Scrollbar stil (opsiyonel - modern görünüm) */
    .similar-posts-grid::-webkit-scrollbar {
        height: 6px;
    }
    
    .similar-posts-grid::-webkit-scrollbar-track {
        background: var(--bg-tertiary, #F3F4F6);
        border-radius: 3px;
    }
    
    .similar-posts-grid::-webkit-scrollbar-thumb {
        background: var(--text-light, #6B7280);
        border-radius: 3px;
    }
    
    .similar-posts-grid::-webkit-scrollbar-thumb:hover {
        background: var(--text-secondary, #4B5563);
    }

    /* Mobil kartlar sabit genişlikte - scroll için */
    .similar-posts-grid .similar-post-card {
        flex: 0 0 280px; /* Sabit genişlik: 280px (yaklaşık ekran genişliğinin %80'i) */
        max-width: 280px;
        min-width: 280px; /* CLS Fix: Sabit genişlik - layout shift önleme */
        width: 280px;
        /* CLS Fix: Min-height korunuyor */
        min-height: 300px;
        contain: layout style;
        /* UX: Snap scroll */
        scroll-snap-align: start;
        scroll-snap-stop: always;
    }
    
    /* Placeholder kartlar da aynı genişlikte */
    .similar-posts-grid .similar-post-card-placeholder {
        flex: 0 0 280px;
        max-width: 280px;
        min-width: 280px;
        width: 280px;
        min-height: 300px;
        scroll-snap-align: start;
    }

    .similar-post-content {
        padding: 1.25rem;
    }

    .similar-post-title {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .blog-container {
        padding: 0 0.75rem;

        width: 100%;
        box-sizing: border-box;
    }

    h1 {
        font-size: 1.5rem;
    }

    h2 {
        font-size: 1.25rem;
    }

    .archive-header {
        padding: 1.5rem 0;
        min-height: 5rem; 

        margin-bottom: 2rem; 

        width: 100%;
        box-sizing: border-box;
    }

    .archive-title {
        font-size: 1.5rem; 
        margin-bottom: 0.5rem;

        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .archive-description {
        font-size: 0.9375rem; 
        min-height: 1.25rem;

        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .blog-post {
        padding: 1rem;
        margin-bottom: 1rem;
    }

    .blog-post-title {
        font-size: 1.25rem;

        min-height: 3.25rem; 
        contain: layout style;

        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .blog-posts-grid {
        gap: 1rem; 
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;

        min-height: 250px; 
    }

    .blog-posts-grid .blog-post {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .blog-posts-grid .blog-post-title {
        margin: 1rem 1rem 0.25rem; 
        font-size: 1rem;
        min-height: 2rem;

        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .blog-posts-grid .blog-post-excerpt {
        padding: 0.25rem 1rem 0; 
        margin-bottom: 0.5rem;
        min-height: 2.5rem;

        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .blog-posts-grid .blog-post-meta {
        padding: 0 1rem 1rem; 
        padding-top: 0.5rem;
        min-height: 2.5rem;

        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .blog-post-content {
        font-size: 0.9375rem;
    }

    .blog-post-content h2 {
        font-size: 1.125rem;
    }

    .blog-post-content h3 {
        font-size: 1rem;
    }

    .blog-post-content h4 {
        font-size: 0.9375rem;
    }
    
    /* 480px ve altı için Benzer İçerikler kartları biraz daha küçük */
    /* CLS korunuyor: min-width/min-height sabit */
    .similar-posts-grid .similar-post-card {
        flex: 0 0 260px; /* 480px ekranda biraz daha küçük kart */
        max-width: 260px;
        min-width: 260px; /* CLS Fix: Sabit genişlik - layout shift önleme */
        width: 260px;
    }
    
    .similar-posts-grid .similar-post-card-placeholder {
        flex: 0 0 260px;
        max-width: 260px;
        min-width: 260px;
        width: 260px;
    }

    .blog-breadcrumb {
        margin: 0.5rem 0 0.625rem 0;
    }

    .breadcrumb-list {
        font-size: 0.6875rem;
    }

    .blog-toc {
        padding: 0.875rem;
        margin: 1rem 0;

        min-height: 4rem; 
        contain: layout style;
    }

    .blog-toc-empty {

        min-height: 4rem; 
        max-height: 4rem; 
    }

    .blog-toc summary {
        font-size: 0.9375rem;
        padding: 1.25rem 1rem;
        min-height: 3.25rem;

        contain: layout style;
    }

    .blog-toc .toc-list-container {
        padding: 0 1rem;
    }

    .blog-toc details[open] .toc-list-container {
        padding: 1rem;
    }

    .blog-post-meta {
        font-size: 0.75rem;

        min-height: 2rem; 
        contain: layout style;
    }

    .comment-form {
        padding: 0.875rem;
    }

    .blog-header-search .search-form-wrapper {
        padding: 0.375rem 0.5rem;
    }

    .blog-header-search .search-field {
        font-size: 0.75rem;
    }

    .blog-header-search .search-submit {
        padding: 0.375rem 0.625rem;
        font-size: 0.6875rem;
    }

    .blog-footer-wrapper {
        margin-top: 1.5rem;
    }

    .blog-footer {
        padding: 1.5rem 0 0.75rem;
    }

    .blog-footer-content {
        gap: 1.5rem;
        margin-bottom: 1rem;
    }

    .blog-footer-logo {
        font-size: 1.125rem;
        margin-bottom: 0.5rem;
    }

    .blog-footer-blog-text {
        font-size: 0.938rem;
    }

    .blog-footer-title {
        font-size: 0.938rem;
        margin-bottom: 0.75rem;
    }

    .blog-footer-description {
        font-size: 0.8125rem;
        line-height: 1.5;
    }

    .blog-footer-links {
        gap: 0.5rem;
    }

    .blog-footer-links a {
        font-size: 0.8125rem;
        padding: 0.375rem 0;
        min-height: var(--touch-target-small);
    }

    .blog-footer-bottom {
        padding-top: 1rem;
        font-size: 0.75rem;
    }

    .blog-post-content img {
        margin: 0.75rem 0;

        max-width: 100%;
        height: auto;
    }

    .blog-post-content figure img {
        width: 100%;
        height: auto;
        max-width: 100%;
    }

    .blog-post-content blockquote {
        padding: 1.25rem 1.25rem 1.25rem 2rem;
        margin: 1.25rem 0;
        font-size: 0.9375rem;
    }

    .blog-post-content blockquote::before {
        left: 0.75rem;
        top: 1rem;
        font-size: 2.5rem;
    }

    .blog-post-content blockquote cite {
        font-size: 0.8125rem;
        margin-top: 0.75rem;
        padding-top: 0.75rem;
    }

    .blog-post-content pre {
        padding: 0.75rem;
        font-size: 0.75rem;
    }

    .blog-post-tags {
        font-size: 0.6875rem;
    }

    .comment {
        padding: 0.875rem;
    }

    .comment-author .avatar {
        width: 32px;
        height: 32px;
    }

    .comment-content {
        padding-left: 40px;
        font-size: 0.8125rem;
    }
}

.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.blog-post,
.blog-sidebar,
.comment {
    contain: layout style;

}

.blog-post-thumbnail-link {
    display: block;
    aspect-ratio: 16 / 9; 
    overflow: hidden;
    contain: layout style;
}

.blog-post-thumbnail-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.archive-header {
    min-height: 8rem; 
    contain: layout style;
}

.archive-title {
    contain: layout style;
}

.archive-description {
    min-height: 2rem; 
    contain: layout style;

    display: block;
}

.archive-description-placeholder {
    visibility: hidden;
    display: inline-block;
    min-width: 0.1em;
}

.pagination {
    min-height: 3rem; 
    contain: layout style;
}

/* CLS Fix: font-display sadece @font-face içinde kullanılabilir, body selector'ünde değil */
/* font-display: swap; satırı kaldırıldı - bu bir CSS hatasıydı ve CLS yaratıyordu */
/* Font display stratejisi @font-face tanımlarında zaten belirlenmiş (font-display: optional) */

/* FOOTER — ana site (frontend/includes/footer.php) ile uyum: bg-gray-900, metin gray-400 / başlık white */

.blog-footer-wrapper {
    position: relative;
    z-index: var(--z-footer);
    margin-top: 3rem;
}

.blog-footer {
    background: #111827;
    color: #e5e7eb;
    padding: 3rem 0 0;
    border-top: none;
    /* WCAG AA: koyu zemin üzerinde metin / mavi marka (#1976D2 burada yetersiz kalıyordu) */
    --footer-muted: #d1d5db;
    --footer-subtle: #cbd5e1;
    --footer-brand-on-dark: #60a5fa;
}

/* ── Footer içerik grid ── */
.blog-footer-content {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr;
    gap: 2.5rem;
    margin-bottom: 2rem;
}

.blog-footer-content.blog-footer-content--cols-2 {
    grid-template-columns: 1.6fr 1fr;
}

/* ── Footer bölüm ── */
.blog-footer-section {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.blog-footer-about {
    max-width: 100%;
}

/* ── Footer logo ── */
.blog-footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    text-decoration: none;
    margin-bottom: 0.875rem;
    font-size: 1.125rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.footer-logo-bold {
    font-weight: 700;
    color: var(--footer-brand-on-dark);
    display: inline;
}

.footer-logo-light {
    font-weight: 700;
    color: #ffffff;
    display: inline;
}

.blog-footer-blog-text {
    font-weight: 400;
    color: var(--footer-muted);
    font-size: 1rem;
    display: inline;
    margin-left: 0.25rem;
}

/* ── Footer açıklama ── */
.blog-footer-description {
    color: var(--footer-muted);
    line-height: 1.75;
    font-size: 0.9375rem;
    margin: 0 0 1.25rem;
    font-family: var(--font-family);
    max-width: 260px;
}

/* ── Footer sütun başlıkları ── */
.blog-footer-title {
    font-size: 0.6875rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    margin: 0 0 1rem;
    font-family: var(--font-family);
}

/* ── Footer link listesi ── */
.blog-footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.blog-footer-links li {
    margin: 0;
}

.blog-footer-links a {
    color: var(--footer-muted);
    text-decoration: none;
    font-size: 0.9375rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0;
    transition: color 0.2s ease;
    font-family: var(--font-family);
    min-height: var(--touch-target-min);
}

.blog-footer-links a::before {
    content: '›';
    color: var(--footer-subtle);
    font-size: 1.1em;
    line-height: 1;
    flex-shrink: 0;
    opacity: 1;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.blog-footer-links a:hover {
    color: #ffffff;
}

.blog-footer-links a:hover::before {
    color: var(--footer-muted);
    opacity: 1;
    transform: translateX(2px);
}

/* Genel: grid/kart (açık zemin); footer içinde aşağıdaki kural ile geçersizlenir */
.category-count {
    color: #6b7280;
    font-size: 0.8125rem;
    font-weight: 400;
}

.blog-footer-links a .category-count {
    color: var(--footer-subtle);
}

.blog-footer-empty {
    color: var(--footer-muted);
    font-size: 0.875rem;
    font-style: italic;
    margin: 0;
}

/* ── Footer alt çizgi ve telif ── */
.blog-footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 0;
    border-top: 1px solid #1f2937;
    flex-wrap: wrap;
    gap: 1rem;
}

.blog-footer-bottom p,
.blog-footer-bottom-left {
    color: var(--footer-muted);
    font-size: 0.8125rem;
    margin: 0;
}

/* ── Sosyal medya pill'leri ── */
.blog-footer-social {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.blog-footer-social-link {
    display: inline-flex;
    align-items: center;
    padding: 0.3125rem 0.75rem;
    background: #1f2937;
    border: 1px solid #4b5563;
    border-radius: var(--radius-sm);
    font-size: 0.8125rem;
    color: var(--footer-muted);
    text-decoration: none;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
    white-space: nowrap;
    min-height: var(--touch-target-small);
}

.blog-footer-social-link:hover {
    background: #374151;
    border-color: #4b5563;
    color: #ffffff;
}

.blog-footer-bottom-primary {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 0;
}

.blog-footer-legal {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem 0.5rem;
    font-size: 0.8125rem;
    line-height: 1.4;
}

.blog-footer-legal a {
    color: var(--footer-muted);
    text-decoration: none;
    transition: color 0.2s ease;
}

.blog-footer-legal a:hover {
    color: #ffffff;
}

.blog-footer-legal-sep {
    color: var(--footer-subtle);
    user-select: none;
}

.blog-footer-bottom-aside {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.65rem;
}

/* ── Responsive: Tablet ── */
@media (max-width: 768px) {
    .blog-footer-wrapper {
        margin-top: 2rem;
    }

    .blog-footer {
        padding: 2rem 0 0;
    }

    .blog-footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 1.75rem;
        margin-bottom: 1.5rem;
    }

    .blog-footer-content.blog-footer-content--cols-2 {
        grid-template-columns: 1fr;
    }

    .blog-footer-about {
        grid-column: 1 / -1;
    }

    .blog-footer-description {
        max-width: 100%;
        font-size: 0.875rem;
    }

    .blog-footer-title {
        font-size: 0.6875rem;
        margin-bottom: 0.75rem;
    }

    .blog-footer-links a {
        font-size: 0.875rem;
        min-height: 44px;
    }

    .blog-footer-bottom {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 0.75rem;
        padding: 1rem 0;
    }

    .blog-footer-bottom-aside {
        align-items: center;
    }

    .blog-footer-legal {
        justify-content: center;
    }
}

/* ── Responsive: Mobil ── */
@media (max-width: 480px) {
    .blog-footer-wrapper {
        margin-top: 1.5rem;
    }

    .blog-footer {
        padding: 1.75rem 0 0;
    }

    .blog-footer-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin-bottom: 1.25rem;
    }

    .blog-footer-about {
        grid-column: auto;
    }

    .blog-footer-logo {
        font-size: 1rem;
    }

    .blog-footer-description {
        font-size: 0.8125rem;
    }

    .blog-footer-links a {
        font-size: 0.8125rem;
        min-height: 44px;
    }

    .blog-footer-bottom p,
    .blog-footer-bottom-left {
        font-size: 0.75rem;
    }
}

.blog-toc {
    background: transparent;
    border: none;
    border-radius: 8px;
    padding: 0;
    margin: 2rem 0;
    box-shadow: none;
    min-height: 4rem; 
    contain: layout style;

    display: block;
}

.blog-toc-empty {
    display: block;

    visibility: hidden;
    min-height: 4rem; 
    max-height: 4rem; 
    overflow: hidden;
    margin: 2rem 0; 
    padding: 0;

    contain: layout style;
}

.blog-toc-empty summary {
    display: none;
}

.blog-toc-empty .toc-list-container {
    display: none;
}

.blog-toc details {
    border: none;
    background: transparent;
    position: relative;
    display: block;
}

.blog-toc summary {
    cursor: pointer;
    font-weight: 600;
    font-size: 1.25rem;
    color: var(--white);
    padding: 1.75rem 1.5rem;
    margin: 0;
    user-select: none;
    list-style: none;
    letter-spacing: -0.01em;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.625rem;
    text-transform: none;
    font-family: 'Cabin', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    transition: color 0.2s ease;
    background: linear-gradient(135deg, #1976D2 0%, #1565C0 100%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-left: 3px solid #90CAF9;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    min-height: 4rem;
    box-sizing: border-box;
    line-height: 1.5;
}

.blog-toc details[open] summary {
    border-radius: 8px 8px 0 0;
    border-bottom: none;
}

.blog-toc summary:hover {
    color: #E3F2FD;
}

.blog-toc summary::-webkit-details-marker {
    display: none;
}

.blog-toc summary::marker {
    display: none;
}

.blog-toc summary::before {
    content: '';
    width: 3px;
    height: 16px;
    background: #BBDEFB;
    border-radius: 2px;
    display: inline-block;
    flex-shrink: 0;
    margin-right: 0.25rem;
}

.blog-toc summary::after {
    content: '▼';
    font-size: 0.875rem;
    color: var(--white);
    margin-left: auto;
    transition: transform 0.2s ease;
    display: inline-block;
}

.blog-toc details[open] summary::after {
    transform: rotate(180deg);
}

.blog-toc .toc-list-container {

    transform: scaleY(0);
    transform-origin: top;
    opacity: 0;

    overflow: hidden;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.3s ease 0.1s;
    padding: 0 1.5rem;
    margin: 0;
    background: var(--bg-primary, #FFFFFF);
    border: 1px solid var(--border, #E5E7EB);
    border-top: none;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    box-sizing: border-box;

    contain: layout style paint;

    min-height: 0;
    max-height: 0;
}

.blog-toc details[open] .toc-list-container {

    transform: scaleY(1);
    opacity: 1;

    padding: 1.5rem;
    margin-top: 0;
    max-height: none; 
}

@supports not (transform: scaleY(1)) {
    .blog-toc .toc-list-container {
        max-height: 0;
        transform: none;
        transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                    opacity 0.3s ease 0.1s;
    }

    .blog-toc details[open] .toc-list-container {
        max-height: 2000px; 
        transform: none;
    }
}

.blog-toc details[open] {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    margin-top: 0;
    box-shadow: none;
}

.blog-toc .toc-list {
    list-style: none;
    padding-left: 0;
    margin: 0;
    background: transparent;
}

.blog-toc .toc-list li {
    list-style: none;
}

.blog-toc .toc-item {
    margin-bottom: 0.625rem;
    padding-left: 0;
    line-height: 1.6;
    position: relative;
}

.blog-toc .toc-item:last-child {
    margin-bottom: 0;
}

.blog-toc .toc-item a {
    color: var(--text-secondary, #4B5563);
    text-decoration: none;
    display: inline-block;
    padding: 0.25rem 0;
    border-radius: 0;
    font-size: 0.875rem;
    transition: color 0.15s ease;
    position: relative;
}

.blog-toc .toc-item a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent, #42A5F5);
    transition: width 0.15s ease;
}

.blog-toc .toc-item a:hover {
    color: var(--primary, #2196F3);
}

.blog-toc .toc-item a:hover::after {
    width: 100%;
}

.blog-toc .toc-level-1 {
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--text-primary, #1F2937);
    margin-bottom: 0.75rem;
}

.blog-toc .toc-level-1 a {
    font-weight: 600;
    color: var(--text-primary, #1F2937);
}

.blog-toc .toc-level-1::marker {
    font-weight: 700;
}

.blog-toc .toc-level-2 {
    padding-left: 1rem;
    font-size: 0.875rem;
    margin-left: 0.5rem;
    color: var(--text-secondary, #4B5563);
}

.blog-toc .toc-level-2 a {
    color: var(--text-secondary, #4B5563);
}

.blog-toc .toc-level-3 {
    padding-left: 1.5rem;
    font-size: 0.8125rem;
    margin-left: 1rem;
    color: var(--text-secondary, #4B5563);
}

.blog-toc .toc-level-3 a {
    color: var(--text-secondary, #4B5563);
}

.blog-toc .toc-level-4,
.blog-toc .toc-level-5,
.blog-toc .toc-level-6 {
    padding-left: 2rem;
    font-size: 0.75rem;
    margin-left: 1.5rem;
    color: var(--text-light, #6B7280);
}

.blog-toc .toc-level-4 a,
.blog-toc .toc-level-5 a,
.blog-toc .toc-level-6 a {
    color: var(--text-light, #6B7280);
}

.faq-group {
    margin: 2rem 0;
}

.blog-post-content details.faq-item {
    margin: 1.25rem 0;
    padding: 1.25rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    border-left: 3px solid var(--secondary);
}

.blog-post-content details.faq-item summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--text-primary);
    padding: 0.5rem;
    user-select: none;
    list-style: none;
}

.blog-post-content details.faq-item summary::-webkit-details-marker {
    display: none;
}

.blog-post-content details.faq-item summary::marker {
    display: none;
}

.blog-post-content details.faq-item summary::before {
    content: '❓ ';
    margin-right: 0.5rem;
}

.blog-post-content details.faq-item[open] summary::before {
    content: '✅ ';
}

.blog-post-content details.faq-item .faq-answer {
    padding: 1rem 0.5rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

.single-share-box {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin: 2rem 0;

    min-height: var(--touch-target-min);
    padding: 1.5rem 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.single-share-box a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: var(--touch-target-min);
    height: var(--touch-target-min);
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s ease;
    color: var(--text-primary);
    background: var(--bg-secondary);
    border: 1px solid var(--border);
}

.single-share-box a:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.single-share-box a.twitter:hover {
    background: #000000;
    color: #ffffff;
    border-color: #000000;
}

.single-share-box a.facebook:hover {
    background: #1877f2;
    color: #ffffff;
    border-color: #1877f2;
}

.single-share-box a.whatsapp:hover {
    background: #25d366;
    color: #ffffff;
    border-color: #25d366;
}

.single-share-box a svg {
    width: 20px;
    height: 20px;
    display: block;
}

.single-share-box a:focus {
    outline: 2px solid var(--primary, #2196F3);
    outline-offset: 2px;
}

/* CLS FIX: Share buttons placeholder - matches actual share box dimensions */
.share-buttons-placeholder {
    min-height: 68px; /* Matches .single-share-box min-height (44px) + padding (24px) */
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    width: 100%;
}

.similar-posts-section {
    margin-top: 4rem;
    padding-top: 3rem;
    border-top: 2px solid var(--bg-tertiary);

    min-height: 400px;
    contain: layout style;
}

.similar-posts-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 2rem;
    color: var(--text-primary-dark);
    text-align: center;
    letter-spacing: -0.02em;
}

.similar-posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;

    min-height: 300px;
}

.similar-post-card {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--bg-tertiary);
    transition: all 0.3s ease;

    min-height: 300px;
    contain: layout style;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.similar-post-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    transform: translateY(-4px);
}

.similar-post-thumbnail {
    display: block;
    width: 100%;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: var(--bg-secondary);

    contain: layout style;
    position: relative;
}

.similar-post-thumbnail-placeholder {
    width: 100%;
    height: 100%;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;

    aspect-ratio: 16 / 9;
}

.similar-post-thumbnail-placeholder-text {

    color: var(--text-secondary, #4B5563);
    font-size: 0.875rem;
    font-weight: 500; 
}

.similar-post-card-placeholder {

    opacity: 0;
    pointer-events: none;

    min-height: 300px;
    contain: layout style;
}

.similar-post-thumbnail-placeholder {

    aspect-ratio: 16 / 9;
    background: var(--bg-secondary);
    min-height: 180px; 
}

.similar-post-thumbnail-placeholder-bg {
    width: 100%;
    height: 100%;
    background: var(--bg-secondary);
}

.similar-post-excerpt-placeholder {
    display: block;
    min-height: 3rem; 
}

.similar-post-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;

    display: block;
    position: absolute;
    top: 0;
    left: 0;
}

.similar-post-card:hover .similar-post-image {
    transform: scale(1.05);
}

.similar-post-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.similar-post-title {
    margin: 0 0 0.75rem 0;
    font-size: 1.125rem;
    font-weight: 600;
    line-height: 1.4;
}

.similar-post-title a {
    color: var(--text-primary-dark);
    text-decoration: none;
    transition: color 0.2s ease;
}

.similar-post-title a:hover {
    color: var(--primary);
}

.similar-post-excerpt {
    color: var(--text-secondary); 
    font-size: 0.9375rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.similar-post-meta {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--bg-tertiary);
}

.similar-post-date {
    font-size: 0.8125rem;
    color: var(--text-light); 
}

.blog-mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: var(--z-overlay); 
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    pointer-events: none; 
}

.blog-mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto; 
}

.blog-mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 320px;
    max-width: 85vw;

    height: 100vh;
    max-height: 100vh;
    background: var(--bg-primary);
    z-index: var(--z-mobile-menu); 
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    overflow-x: hidden; 
    display: flex;
    flex-direction: column;
    min-height: 0; 
}

.blog-mobile-menu.active {
    right: 0;
}

.blog-mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.875rem 1.25rem;
    border-bottom: 1px solid var(--border);
    background: var(--bg-primary);
    position: sticky;
    top: 0;
    z-index: 1;
    flex-shrink: 0;
}

.blog-mobile-menu-logo {
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    letter-spacing: -0.02em;
}

    .blog-mobile-menu-close {
    width: var(--touch-target-min);
    height: var(--touch-target-min);
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--text-primary-dark);
    padding: 0;
    transition: color 0.2s ease;
}

.blog-mobile-menu-close:hover {
    color: var(--secondary);
}

.blog-mobile-menu-close span {
    line-height: 1;
}

.blog-mobile-nav {
    display: flex;
    flex-direction: column;
    padding: 1rem 0;
    flex: 1;
    min-height: 0; 
    overflow-y: auto; 
    overflow-x: hidden;
}

.blog-mobile-nav-menu {
    display: flex;
    flex-direction: column;
    list-style: none;
    margin: 0;
    padding: 0;
}

.blog-mobile-nav-menu li {
    list-style: none;
    margin: 0;
    padding: 0;
}

.blog-mobile-nav-link {
    display: block;
    padding: 1rem 1.5rem;
    color: var(--text-primary-dark);
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    border-bottom: 1px solid var(--bg-tertiary);
    transition: all 0.2s ease;
}

.blog-mobile-nav-link:hover,
.blog-mobile-nav-link.active {
    background: var(--bg-secondary);
    color: var(--secondary);
    padding-left: 2rem;
}

.blog-mobile-nav-section {
    margin-top: 0.5rem;
    border-top: 1px solid var(--bg-tertiary);
    padding-top: 0.5rem;
}

.blog-mobile-nav-section-title {
    padding: 0.75rem 1.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-light);
    margin-bottom: 0.25rem;
}

.blog-mobile-nav-link-category {
    padding-left: 2.5rem;
    font-size: 0.9375rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.blog-mobile-nav-link-category .category-count {
    font-size: 0.8125rem;
    color: var(--text-light);
    font-weight: 400;
}

.blog-mobile-nav-link-category:hover .category-count,
.blog-mobile-nav-link-category.active .category-count {
    color: var(--secondary);
}

.blog-mobile-menu-search {
    padding: 1.5rem;
    border-top: 1px solid var(--border);
    background: var(--bg-secondary);
    flex-shrink: 0; 
}

.blog-mobile-menu-search .search-form-wrapper {
    width: 100%;
}

body.mobile-menu-open {
    overflow: hidden;
}

@media (min-width: 769px) {
    .blog-mobile-menu-toggle,
    .blog-mobile-menu-overlay,
    .blog-mobile-menu {
        display: none;
    }
}

@media print {
    .blog-header-wrapper,
    .blog-sidebar,
    .post-navigation,
    .pagination,
    .comments-area,
    .blog-mobile-menu-toggle,
    .blog-mobile-menu-overlay,
    .blog-mobile-menu {
        display: none;
    }

    .blog-post {
        box-shadow: none;
        page-break-inside: avoid;
    }
}
