/*
 * Blog Single (Detay) Sayfası Stilleri
 * Theme: Cetintas Portfolyo
 * Style Guide: koray-cetintas-blog/style-guide-all-sections.html
 *
 * NOT: Hem theme class adları (.blog-*) hem de style-guide class adları desteklenir
 */

/* ================================
   Blog Single Layout - Full Width
   ================================ */
.blog-single-section {
    padding: 0;
    padding-top: 80px; /* navbar offset */
}

.blog-single-article {
    background: white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    padding: 3rem 4rem;
    margin: 0;
}

@media (min-width: 1200px) {
    .blog-single-article { padding: 4rem 8rem; }
}

@media (min-width: 1600px) {
    .blog-single-article { padding: 4rem 12rem; }
}

/* ================================
   1. Intent Badges
   ================================ */
.intent-badge {
    display: inline-block;
    padding: 0.375rem 1rem;
    border-radius: 9999px;
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
}

.intent-bilgilendirici { background: #dbeafe; color: #1e40af; }
.intent-rehber { background: #dcfce7; color: #166534; }
.intent-nasil-yapilir { background: #fef3c7; color: #92400e; }
.intent-kontrol-listesi { background: #f3e8ff; color: #7c3aed; }
.intent-karsilastirma { background: #ffe4e6; color: #be123c; }

/* ================================
   2. Article Meta
   ================================ */
.blog-single-meta,
.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    align-items: center;
    padding: 1.25rem 0;
    margin-bottom: 2rem;
    border-bottom: 1px solid #e2e8f0;
    font-size: 0.9375rem;
    color: #64748b;
}

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

.blog-single-meta .author-avatar,
.article-meta .author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 0.5rem;
}

/* ================================
   Typography
   ================================ */
.blog-single-article h1 {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.2;
    color: #0f172a;
    margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
    .blog-single-article h1 { font-size: 3.5rem; }
}

.blog-single-article h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #0f172a;
    margin-top: 3rem;
    margin-bottom: 1.25rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e2e8f0;
}

.blog-single-article h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1e293b;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.blog-single-article h4 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #334155;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.blog-single-article p {
    margin-bottom: 1.25rem;
    color: #475569;
    font-size: 1.0625rem;
    line-height: 1.75;
}

.blog-single-article strong {
    font-weight: 600;
    color: #1e293b;
}

.blog-single-article a {
    color: #2563eb;
    text-decoration: none;
}

.blog-single-article a:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

/* ================================
   3. Lead Paragraphs
   ================================ */
.blog-single-article .lead {
    font-size: 1.375rem;
    color: #475569;
    line-height: 1.8;
    margin-bottom: 2rem;
}

/* ================================
   Divider
   ================================ */
.blog-single-article .divider,
.blog-single-article hr {
    height: 1px;
    background: linear-gradient(to right, transparent, #e2e8f0, transparent);
    margin: 3rem 0;
    border: none;
}

/* ================================
   4. Table of Contents (TOC) - 2 Column
   ================================ */
.blog-toc,
.toc {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    border-left: 4px solid #2563eb;
    border-radius: 0.75rem;
    padding: 2rem;
    margin: 2rem 0;
}

.blog-toc h2,
.blog-toc .toc-title,
.toc h2 {
    font-size: 1.375rem;
    margin-top: 0;
    margin-bottom: 1.25rem;
    border: none;
    padding: 0;
}

.blog-toc ol,
.toc ol {
    list-style: none;
    counter-reset: toc-counter;
    padding-left: 0;
    columns: 2;
    column-gap: 3rem;
    margin: 0;
}

@media (max-width: 768px) {
    .blog-toc ol,
    .toc ol { columns: 1; }
}

.blog-toc ol li,
.toc ol li {
    counter-increment: toc-counter;
    margin-bottom: 0.625rem;
    padding-left: 2rem;
    position: relative;
    break-inside: avoid;
}

.blog-toc ol li::before,
.toc ol li::before {
    content: counter(toc-counter) ".";
    position: absolute;
    left: 0;
    font-weight: 600;
    color: #2563eb;
}

.blog-toc a,
.toc a {
    color: #334155;
    font-weight: 500;
}

.blog-toc a:hover,
.toc a:hover {
    color: #2563eb;
}

/* ================================
   5. Comparison Tables
   ================================ */
.blog-single-article .table-wrapper,
.table-wrapper {
    overflow-x: auto;
    margin: 2rem 0;
    border-radius: 0.75rem;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
}

.blog-single-article table,
.blog-single-content table {
    width: 100%;
    border-collapse: collapse;
    font-size: 1rem;
}

.blog-single-article thead,
.blog-single-content thead {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
}

.blog-single-article th,
.blog-single-content th {
    padding: 1.25rem 1.5rem;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid #1e40af;
}

.blog-single-article td,
.blog-single-content td {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.blog-single-article tbody tr:nth-child(even),
.blog-single-content tbody tr:nth-child(even) {
    background-color: #f8fafc;
}

.blog-single-article tbody tr:hover,
.blog-single-content tbody tr:hover {
    background-color: #f1f5f9;
}

.blog-single-article tbody tr:last-child td,
.blog-single-content tbody tr:last-child td {
    border-bottom: none;
}

/* 7. KPI / Metrics Table (Green Header) */
.blog-single-article .metrics-table thead,
.blog-single-article table.metrics thead,
.metrics-table thead {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

.blog-single-article .metrics-table th,
.blog-single-article table.metrics th,
.metrics-table th {
    border-bottom: 2px solid #065f46;
}

/* ================================
   6. Scenario Box
   ================================ */
.scenario-box {
    background: transparent;
    border: 2px solid #22c55e;
    border-radius: 1rem;
    padding: 2.5rem;
    margin: 2rem 0;
    position: relative;
}

.scenario-box h4 {
    color: #166534;
    margin-top: 0;
}

.scenario-box .scenario-label {
    background: #22c55e;
    color: white;
    padding: 0.375rem 1rem;
    border-radius: 9999px;
    font-size: 0.8125rem;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 1.25rem;
}

.scenario-box img,
.scenario-box .scenario-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 0.75rem;
    margin: 1.5rem 0;
}

/* ================================
   7. Error List (7 Hata) - 8/4 Grid Layout
   ================================ */
.error-section-grid {
    display: grid;
    grid-template-columns: 8fr 4fr;
    gap: 2.5rem;
    align-items: start;
}

.error-list {
    display: flex;
    flex-direction: column;
}

.error-item {
    background: white;
    border-left: 4px solid #ef4444;
    padding: 1.75rem 2rem;
    margin-bottom: 1.25rem;
    border-radius: 0 0.75rem 0.75rem 0;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
}

.error-item h4,
.error-item h3 {
    color: #dc2626;
    margin-top: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
}

.error-item h4::before,
.error-item h3::before {
    content: "⚠️";
    font-size: 1.25rem;
}

.error-item p {
    margin-bottom: 0;
}

.error-image {
    position: sticky;
    top: 2rem;
}

.error-image img {
    width: 100%;
    height: auto;
    min-height: 500px;
    object-fit: cover;
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
}

.error-image .image-caption {
    margin-top: 0.75rem;
    margin-bottom: 0;
}

@media (max-width: 1024px) {
    .error-section-grid {
        grid-template-columns: 1fr;
    }
    .error-image {
        position: relative;
        top: 0;
        order: -1;
        margin-bottom: 1.5rem;
    }
    .error-image img {
        min-height: 250px;
        max-height: 350px;
    }
}

/* ================================
   8. Checklist - Grid Layout
   ================================ */
.blog-checklist,
.checklist {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 1rem;
    padding: 2.5rem;
    margin: 2rem 0;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

.blog-checklist ul,
.checklist ul {
    list-style: none;
    padding-left: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 0.5rem;
    margin: 0;
    max-width: 100%;
    box-sizing: border-box;
}

.blog-checklist li,
.checklist li {
    display: flex;
    align-items: flex-start;
    padding: 1rem;
    margin-bottom: 0;
    border-radius: 0.5rem;
    transition: all 0.2s;
    background: #f8fafc;
    max-width: 100%;
    box-sizing: border-box;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.blog-checklist li:hover,
.checklist li:hover {
    background-color: #f1f5f9;
    transform: translateX(4px);
}

.blog-checklist li::before,
.checklist li::before {
    content: "☐";
    font-size: 1.5rem;
    color: #2563eb;
    margin-right: 1rem;
    flex-shrink: 0;
    line-height: 1.4;
}

.checklist-category {
    font-weight: 700;
    color: #0f172a;
    margin-top: 2rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #2563eb;
    font-size: 1.25rem;
    grid-column: 1 / -1;
}

.checklist-category:first-child {
    margin-top: 0;
}

/* ================================
   9. FAQ Accordion
   ================================ */
.blog-faq,
.faq {
    margin: 2rem 0;
}

.faq-item {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    margin-bottom: 1rem;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.faq-question {
    width: 100%;
    padding: 1.5rem 2rem;
    text-align: left;
    background: white;
    border: none;
    cursor: pointer;
    font-weight: 600;
    color: #1e293b;
    font-size: 1.125rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.2s;
    font-family: inherit;
}

.faq-question:hover {
    background-color: #f8fafc;
}

.faq-question::after {
    content: "+";
    font-size: 1.75rem;
    color: #2563eb;
    font-weight: 300;
    transition: transform 0.3s;
}

.faq-question.active::after {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.faq-answer-content {
    padding: 0 2rem 1.5rem;
    color: #475569;
    line-height: 1.75;
    font-size: 1.0625rem;
}

/* ================================
   10. CTA Section
   ================================ */
.blog-cta,
.cta-section {
    background: linear-gradient(135deg, #1e40af 0%, #2563eb 50%, #3b82f6 100%);
    color: white;
    border-radius: 1.5rem;
    padding: 4rem 3rem;
    margin: 3rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.blog-cta::before,
.cta-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 400px;
    height: 400px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
}

.blog-cta::after,
.cta-section::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 300px;
    height: 300px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
}

.blog-cta h2,
.cta-section h2 {
    color: white;
    border: none;
    margin-top: 0;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
    font-size: 2.25rem;
}

.blog-cta p,
.cta-section p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.25rem;
    margin-bottom: 2rem;
    position: relative;
    z-index: 1;
}

.blog-cta .cta-buttons,
.cta-section .cta-buttons,
.cta-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.blog-cta .btn,
.cta-section .btn,
.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    border-radius: 0.75rem;
    font-weight: 600;
    font-size: 1.0625rem;
    transition: all 0.2s;
    border: 2px solid transparent;
    cursor: pointer;
    text-decoration: none;
}

.blog-cta .btn-primary,
.cta-section .btn-primary {
    background: white;
    color: #2563eb;
}

.blog-cta .btn-primary:hover,
.cta-section .btn-primary:hover {
    background: #f8fafc;
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.25);
    text-decoration: none;
}

.blog-cta .btn-secondary,
.cta-section .btn-secondary {
    background: transparent;
    color: white;
    border-color: white;
}

.blog-cta .btn-secondary:hover,
.cta-section .btn-secondary:hover {
    background: rgba(255,255,255,0.15);
    transform: translateY(-3px);
    text-decoration: none;
}

/* ================================
   11. Author Box
   ================================ */
.blog-author-box,
.author-box {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 2px solid #e2e8f0;
    border-radius: 1rem;
    padding: 2.5rem;
    margin: 3rem 0;
    display: flex;
    align-items: center;
    gap: 2rem;
}

.blog-author-box .author-avatar,
.author-box .author-box-avatar,
.author-box-avatar {
    width: 100px;
    height: 100px;
    border-radius: 1rem;
    object-fit: cover;
    flex-shrink: 0;
}

.blog-author-box .author-content h3,
.author-box .author-box-content h3,
.author-box-content h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    color: #0f172a;
    font-size: 1.375rem;
}

.blog-author-box .author-content p,
.author-box .author-box-content p,
.author-box-content p {
    margin-bottom: 0;
    color: #475569;
}

@media (max-width: 600px) {
    .blog-author-box,
    .author-box {
        flex-direction: column;
        text-align: center;
    }
}

/* ================================
   12. Info & Warning Boxes
   ================================ */
.info-box {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border-left: 4px solid #2563eb;
    border-radius: 0 0.75rem 0.75rem 0;
    padding: 1.75rem 2rem;
    margin: 2rem 0;
}

.info-box h4 {
    color: #1e40af;
    margin-top: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.125rem;
}

.info-box h4::before {
    content: "💡";
    font-size: 1.25rem;
}

.warning-box {
    background: linear-gradient(135deg, #fefce8 0%, #fef3c7 100%);
    border-left: 4px solid #f59e0b;
    border-radius: 0 0.75rem 0.75rem 0;
    padding: 1.75rem 2rem;
    margin: 2rem 0;
}

.warning-box h4 {
    color: #b45309;
    margin-top: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.125rem;
}

.warning-box h4::before {
    content: "⚠️";
    font-size: 1.25rem;
}

/* ================================
   Hero Image
   ================================ */
.hero-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 1rem;
    margin: 2rem 0;
}

@media (min-width: 768px) {
    .hero-image { height: 500px; }
}

/* ================================
   Lists
   ================================ */
.blog-single-article ul,
.blog-single-article ol,
.blog-single-content ul,
.blog-single-content ol {
    margin-bottom: 1.25rem;
    padding-left: 1.5rem;
    color: #475569;
}

.blog-single-article li,
.blog-single-content li {
    margin-bottom: 0.5rem;
    line-height: 1.75;
}

/* ================================
   Inline Images
   ================================ */

/* WordPress wpautop - görsel içeren p'ler ortalansın */
.blog-single-article p:has(> img),
.blog-single-content p:has(> img),
article p:has(> img),
.entry-content p:has(> img) {
    text-align: center;
    width: 100%;
}

.blog-single-article img,
.blog-single-content img,
.inline-image {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: 0.75rem;
    margin: 1.5rem auto;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
}

.image-caption {
    text-align: center;
    font-size: 0.875rem;
    color: #64748b;
    margin-top: -0.75rem;
    margin-bottom: 1.5rem;
}

/* ================================
   Code Blocks
   ================================ */
.blog-single-article code,
.blog-single-content code {
    background: #f1f5f9;
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    font-size: 0.9em;
    color: #1e293b;
}

.blog-single-article pre,
.blog-single-content pre {
    background: #1e293b;
    color: #e2e8f0;
    padding: 1.5rem;
    border-radius: 0.75rem;
    overflow-x: auto;
    margin: 1.5rem 0;
}

.blog-single-article pre code,
.blog-single-content pre code {
    background: none;
    padding: 0;
    color: inherit;
}

/* ================================
   Responsive
   ================================ */
@media (max-width: 768px) {
    .blog-single-article {
        padding: 2rem 1.5rem;
    }

    .blog-single-article h1 {
        font-size: 2rem;
    }

    .blog-single-article h2 {
        font-size: 1.5rem;
    }

    .blog-cta,
    .cta-section {
        padding: 2.5rem 1.5rem;
    }

    .blog-checklist,
    .checklist {
        padding: 1.5rem;
    }

    .blog-checklist ul,
    .checklist ul {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .blog-checklist li,
    .checklist li {
        padding: 0.875rem;
    }

    .blog-checklist li::before,
    .checklist li::before {
        font-size: 1.25rem;
        margin-right: 0.75rem;
    }
}
