/* =====================================================
   BALKAy.net - Blog (liste, arşiv, yazı)
   crm.css + services.css bileşenleri üzerine; koyu ve aydınlık temada çalışır.
   ===================================================== */

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

/* ---------- Hero ---------- */
.bl-hero { padding: 130px 0 48px; }
.bl-hero h1 { font-size: clamp(2rem, 4.4vw, 3.1rem); font-weight: 900; line-height: 1.15; letter-spacing: -0.02em; margin: 12px 0 14px; }
.bl-hero .cx-lead { max-width: 760px; margin-bottom: 24px; }
.bl-post-hero { padding-bottom: 28px; }
.bl-post-hero h1 { font-size: clamp(1.9rem, 4vw, 2.8rem); margin-top: 0; }

.bl-search { display: flex; gap: 10px; max-width: 560px; margin-bottom: 22px; }
.bl-search .form-control { flex: 1; }

.bl-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.bl-chip {
    padding: 6px 14px; border-radius: var(--radius-full); border: 1px solid var(--border-color);
    font-size: 0.85rem; color: var(--text-secondary); background: var(--bg-card); transition: var(--transition);
}
.bl-chip small { color: var(--text-muted); margin-left: 2px; }
.bl-chip:hover, .bl-chip.active { color: var(--text-primary); border-color: var(--border-glow); background: rgba(99, 102, 241, 0.1); }

/* ---------- Liste ---------- */
.bl-list-section { padding-top: 40px; }
.bl-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 40px; align-items: start; }
.bl-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.bl-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 28px; }

.bl-card {
    display: flex; flex-direction: column; border-radius: var(--radius); overflow: hidden;
    background: var(--bg-card); border: 1px solid var(--border-color); transition: var(--transition);
}
.bl-card:hover { border-color: var(--border-glow); transform: translateY(-4px); box-shadow: var(--shadow-glow); }
.bl-card-img { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--bg-secondary); }
.bl-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.bl-card:hover .bl-card-img img { transform: scale(1.04); }
.bl-card-noimg { display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, rgba(99, 102, 241, 0.18), rgba(6, 182, 212, 0.12)); }
.bl-card-noimg span { font-size: 3rem; font-weight: 900; background: var(--gradient-main); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.bl-card-body { padding: 20px 22px 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.bl-card h2, .bl-card h3 { font-size: 1.12rem; line-height: 1.35; font-weight: 700; }
.bl-card h2 a, .bl-card h3 a { color: var(--text-primary); }
.bl-card h2 a:hover, .bl-card h3 a:hover { color: var(--accent-cyan); }
.bl-card p { color: var(--text-secondary); font-size: 0.9rem; line-height: 1.6; }

.bl-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; font-size: 0.8rem; color: var(--text-muted); }
.bl-meta-lg { font-size: 0.88rem; }
.bl-cat {
    padding: 2px 10px; border-radius: var(--radius-full); font-size: 0.75rem; font-weight: 600;
    background: rgba(16, 185, 129, 0.12); color: var(--accent-emerald); border: 1px solid rgba(16, 185, 129, 0.25);
}
.bl-cat:hover { background: rgba(16, 185, 129, 0.2); }

.bl-empty { padding: 48px; text-align: center; border: 1px dashed var(--border-color); border-radius: var(--radius); color: var(--text-secondary); }
.bl-empty p { margin-bottom: 16px; }

.bl-pager { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 40px; }
.bl-pager a, .bl-pager span {
    min-width: 42px; padding: 9px 14px; text-align: center; border-radius: 10px; font-size: 0.9rem;
    border: 1px solid var(--border-color); color: var(--text-secondary); background: var(--bg-card);
}
.bl-pager span { border-color: transparent; background: none; }
.bl-pager a:hover { border-color: var(--border-glow); color: var(--text-primary); }
.bl-pager a.active { background: var(--gradient-main); color: #fff; border-color: transparent; }

/* ---------- Kenar çubuğu ---------- */
.bl-side { display: flex; flex-direction: column; gap: 20px; position: sticky; top: 96px; }
.bl-box { padding: 22px; border-radius: var(--radius); background: var(--bg-card); border: 1px solid var(--border-color); }
.bl-box h2 { font-size: 1rem; margin-bottom: 12px; }
.bl-box p { font-size: 0.88rem; color: var(--text-secondary); line-height: 1.6; margin-bottom: 14px; }
.bl-box p:last-child { margin-bottom: 0; }
.bl-box-cta { border-color: rgba(16, 185, 129, 0.35); background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), var(--bg-card)); }
.bl-popular { counter-reset: pop; list-style: none; display: flex; flex-direction: column; gap: 12px; }
.bl-popular li { counter-increment: pop; display: flex; gap: 10px; font-size: 0.88rem; line-height: 1.45; }
.bl-popular li::before { content: counter(pop); flex-shrink: 0; width: 22px; height: 22px; border-radius: 6px; font-size: 0.72rem; font-weight: 800; display: flex; align-items: center; justify-content: center; background: rgba(99, 102, 241, 0.15); color: var(--accent-indigo); }
.bl-popular a { color: var(--text-secondary); }
.bl-popular a:hover { color: var(--text-primary); }

/* ---------- Yazı ---------- */
.bl-narrow { max-width: 820px; }
.bl-featured { margin: 8px 0 32px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border-color); }
.bl-featured img { width: 100%; max-height: 480px; object-fit: cover; }

.bl-content { font-size: 1.08rem; line-height: 1.85; color: var(--text-secondary); overflow-wrap: break-word; }
.bl-content > * + * { margin-top: 1.1em; }
.bl-content h2, .bl-content h3, .bl-content h4 { color: var(--text-primary); line-height: 1.3; margin-top: 1.8em; }
.bl-content h2 { font-size: 1.55rem; }
.bl-content h3 { font-size: 1.28rem; }
.bl-content h4 { font-size: 1.1rem; }
.bl-content strong, .bl-content b { color: var(--text-primary); }
.bl-content a { color: var(--accent-cyan); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.bl-content a:has(> img) { text-decoration: none; }
.bl-content ul, .bl-content ol { padding-left: 1.4em; }
.bl-content li + li { margin-top: 0.4em; }
.bl-content blockquote {
    padding: 16px 22px; border-left: 4px solid var(--accent-indigo); border-radius: 0 12px 12px 0;
    background: rgba(99, 102, 241, 0.07); color: var(--text-primary); font-style: italic;
}
.bl-content img { max-width: 100%; height: auto; border-radius: 10px; }
.bl-content .alignleft { float: left; margin: 6px 22px 14px 0; max-width: 45%; }
.bl-content .alignright { float: right; margin: 6px 0 14px 22px; max-width: 45%; }
.bl-content .aligncenter { display: block; margin-left: auto; margin-right: auto; }
.bl-content::after { content: ''; display: block; clear: both; }
.bl-content figure { margin: 1.6em 0; }
.bl-content figcaption { margin-top: 8px; font-size: 0.85rem; color: var(--text-muted); text-align: center; }
.bl-content .wp-caption { max-width: 100%; }
.bl-content pre, .bl-content code { font-family: var(--font-mono); font-size: 0.88em; }
.bl-content code { padding: 2px 6px; border-radius: 6px; background: var(--bg-glass); border: 1px solid var(--border-color); }
.bl-content pre { padding: 16px; border-radius: 12px; overflow-x: auto; background: var(--bg-secondary); border: 1px solid var(--border-color); }
.bl-content pre code { padding: 0; border: 0; background: none; }
.bl-content table { width: 100%; border-collapse: collapse; font-size: 0.95rem; display: block; overflow-x: auto; }
.bl-content th, .bl-content td { padding: 10px 12px; border: 1px solid var(--border-color); text-align: left; }
.bl-content hr { border: 0; border-top: 1px solid var(--border-color); margin: 2em 0; }
.bl-content iframe, .bl-content video { display: block; width: 100%; border: 0; border-radius: 12px; background: #000; }
.bl-embed-video iframe, .bl-content .blog-embed-video iframe { aspect-ratio: 16 / 9; height: auto; }
.bl-content video { max-height: 80vh; }

.blog-gallery { display: grid; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); gap: 10px; margin: 1.6em 0; }
.blog-gallery a { display: block; aspect-ratio: 1; overflow: hidden; border-radius: 10px; }
.blog-gallery img { width: 100%; height: 100%; object-fit: cover; border-radius: 0; transition: transform .4s ease; }
.blog-gallery a:hover img { transform: scale(1.05); }

.blog-note { padding: 16px 20px; border-radius: 12px; border: 1px solid rgba(6, 182, 212, 0.3); background: rgba(6, 182, 212, 0.08); }
.blog-note-attention, .blog-note-warning { border-color: rgba(245, 158, 11, 0.35); background: rgba(245, 158, 11, 0.08); }
.blog-note-success { border-color: rgba(16, 185, 129, 0.35); background: rgba(16, 185, 129, 0.08); }
.blog-note h2 { margin-top: 0; font-size: 1.15rem; }

.bl-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 36px; }
.bl-tags a { font-size: 0.82rem; padding: 4px 12px; border-radius: var(--radius-full); border: 1px solid var(--border-color); color: var(--text-secondary); }
.bl-tags a:hover { border-color: var(--border-glow); color: var(--text-primary); }

.bl-share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 24px; font-size: 0.85rem; color: var(--text-muted); }
.bl-share a { padding: 5px 12px; border-radius: 8px; background: var(--bg-card); border: 1px solid var(--border-color); color: var(--text-secondary); }
.bl-share a:hover { color: var(--text-primary); border-color: var(--border-glow); }

.bl-author { display: flex; gap: 16px; align-items: flex-start; margin-top: 36px; padding: 22px; border-radius: var(--radius); background: var(--bg-card); border: 1px solid var(--border-color); }
.bl-author .logo-icon { flex-shrink: 0; width: 48px; height: 48px; border-radius: 14px; background: var(--gradient-main); color: #fff; font-weight: 900; display: flex; align-items: center; justify-content: center; }
.bl-author b { display: block; margin-bottom: 4px; }
.bl-author p { font-size: 0.9rem; color: var(--text-secondary); line-height: 1.6; }
.bl-author a { color: var(--accent-cyan); }

.bl-prevnext { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 28px; }
.bl-prevnext a { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; border-radius: 12px; border: 1px solid var(--border-color); color: var(--text-primary); font-weight: 600; font-size: 0.92rem; line-height: 1.4; transition: var(--transition); }
.bl-prevnext a:hover { border-color: var(--border-glow); }
.bl-prevnext small { color: var(--text-muted); font-weight: 500; font-size: 0.78rem; }
.bl-prevnext .bl-next { text-align: right; grid-column: 2; }

.bl-comments-wrap { margin: 48px 0 24px; }
.bl-comments-wrap > h2 { font-size: 1.3rem; margin-bottom: 18px; }
.bl-comments, .bl-replies { list-style: none; display: flex; flex-direction: column; gap: 14px; }
.bl-replies { margin: 14px 0 0 28px; padding-left: 16px; border-left: 2px solid var(--border-color); }
.bl-comment { padding: 16px 18px; border-radius: 12px; background: var(--bg-card); border: 1px solid var(--border-color); }
.bl-comment-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; font-size: 0.9rem; }
.bl-comment-head a { color: var(--text-primary); }
.bl-comment-head time { margin-left: auto; font-size: 0.78rem; color: var(--text-muted); }
.bl-avatar { width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.8rem; font-weight: 800; color: #fff; background: var(--gradient-cool); }
.bl-comment-text { font-size: 0.94rem; line-height: 1.65; color: var(--text-secondary); overflow-wrap: break-word; }
.bl-comments-note { margin-top: 16px; font-size: 0.82rem; color: var(--text-muted); }
.bl-comments-note a { color: var(--accent-cyan); }

.bl-related .cx-h2 { text-align: center; }

.bl-preview-bar { position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%); z-index: 1000; padding: 10px 18px; border-radius: var(--radius-full); background: var(--accent-amber); color: #111; font-weight: 600; font-size: 0.88rem; box-shadow: var(--shadow-lg); }
.bl-preview-bar a { color: #111; text-decoration: underline; margin-left: 6px; }

/* ---------- Duyarlı ---------- */
@media (max-width: 1024px) {
    .bl-layout { grid-template-columns: 1fr; }
    .bl-side { position: static; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
    .bl-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
    .bl-hero { padding-top: 110px; }
    .bl-grid, .bl-grid-3 { grid-template-columns: 1fr; }
    .bl-search { flex-direction: column; }
    .bl-content { font-size: 1.02rem; }
    .bl-content .alignleft, .bl-content .alignright { float: none; display: block; margin: 0 auto 14px; max-width: 100%; }
    .blog-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .bl-prevnext { grid-template-columns: 1fr; }
    .bl-prevnext .bl-next { grid-column: auto; }
    .bl-replies { margin-left: 8px; }
}
