/*
 * Стили для блога prixcut.
 * Используется в templates/blog_base.html и всех статьях /blog/*.
 */

/* =============================================
   Layout
   ============================================= */

.blog-main {
    max-width: 800px;
    margin: 0 auto;
    padding: 32px 20px 60px;
    min-height: 60vh;
}

/* =============================================
   Breadcrumbs
   ============================================= */

.blog-breadcrumbs {
    font-size: 14px;
    color: #64748b;
    margin-bottom: 28px;
    line-height: 1.5;
}

.blog-breadcrumbs a {
    color: #3b82f6;
    text-decoration: none;
    transition: color 0.2s ease;
}

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

.blog-breadcrumbs span {
    color: #334155;
}

/* =============================================
   Article
   ============================================= */

.blog-article {
    color: #1e293b;
    line-height: 1.7;
}

.blog-article h1 {
    font-size: 2rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 12px;
    line-height: 1.25;
}

.blog-article h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1e293b;
    margin: 2em 0 0.75em;
    padding-bottom: 8px;
    border-bottom: 2px solid #e2e8f0;
}

.blog-article h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #334155;
    margin: 1.5em 0 0.5em;
}

.blog-article p {
    margin: 0 0 1.25em;
    font-size: 1rem;
    color: #334155;
}

.blog-article ul,
.blog-article ol {
    margin: 0 0 1.25em;
    padding-left: 1.5em;
}

.blog-article li {
    margin-bottom: 0.4em;
    color: #334155;
}

.blog-article a {
    color: #3b82f6;
    text-decoration: underline;
    text-decoration-color: rgba(59, 130, 246, 0.3);
    text-underline-offset: 2px;
    transition: text-decoration-color 0.2s ease;
}

.blog-article a:hover {
    text-decoration-color: #3b82f6;
}

.blog-article strong {
    font-weight: 600;
    color: #0f172a;
}

/* =============================================
   Date
   ============================================= */

.blog-date {
    display: block;
    font-size: 14px;
    color: #94a3b8;
    margin-bottom: 2em;
}

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

.blog-article img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1.5em 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* =============================================
   Tables
   ============================================= */

.blog-article table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5em 0;
    font-size: 0.95rem;
    overflow-x: auto;
    display: block;
}

.blog-article thead {
    background: #f1f5f9;
}

.blog-article th {
    text-align: left;
    padding: 10px 14px;
    font-weight: 600;
    color: #1e293b;
    border-bottom: 2px solid #cbd5e1;
    white-space: nowrap;
}

.blog-article td {
    padding: 10px 14px;
    border-bottom: 1px solid #e2e8f0;
    color: #334155;
}

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

.blog-article tbody tr:hover {
    background: #f1f5f9;
}

/* =============================================
   Blockquote
   ============================================= */

.blog-article blockquote {
    margin: 1.5em 0;
    padding: 16px 20px;
    border-left: 4px solid #3b82f6;
    background: #f0f7ff;
    border-radius: 0 8px 8px 0;
    color: #1e40af;
    font-style: normal;
}

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

/* =============================================
   Code
   ============================================= */

.blog-article code {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.9em;
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 4px;
    color: #0f172a;
}

.blog-article pre {
    margin: 1.5em 0;
    padding: 16px 20px;
    background: #1e293b;
    border-radius: 8px;
    overflow-x: auto;
}

.blog-article pre code {
    background: none;
    padding: 0;
    color: #e2e8f0;
    font-size: 0.85rem;
    line-height: 1.6;
}

/* =============================================
   Table of Contents
   ============================================= */

.blog-toc {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px 24px;
    margin: 0 0 2em;
}

.blog-toc h2 {
    font-size: 1rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 12px;
    padding: 0;
    border: none;
}

.blog-toc ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.blog-toc li {
    margin-bottom: 6px;
}

.blog-toc a {
    color: #3b82f6;
    text-decoration: none;
    font-size: 0.95rem;
}

.blog-toc a:hover {
    text-decoration: underline;
}

/* =============================================
   Inline CTA (within article body)
   ============================================= */

.blog-cta-inline {
    margin: 1.5em 0;
    padding: 16px 20px;
    background: #f0f7ff;
    border-left: 4px solid #3b82f6;
    border-radius: 0 8px 8px 0;
}

.blog-cta-inline p {
    margin: 0;
    color: #1e3a5f;
    font-size: 0.95rem;
}

.blog-cta-inline a {
    font-weight: 600;
    color: #2563eb;
}

/* =============================================
   Table wrapper (mobile scroll)
   ============================================= */

.blog-table-wrapper {
    overflow-x: auto;
    margin: 1.5em 0;
    -webkit-overflow-scrolling: touch;
}

.blog-table-wrapper table {
    display: table;
    min-width: 540px;
    margin: 0;
}

/* =============================================
   CTA Block
   ============================================= */

.blog-cta {
    margin: 3em 0 0;
    padding: 32px;
    background: linear-gradient(135deg, #1e3a5f 0%, #1a1a2e 100%);
    border-radius: 12px;
    text-align: center;
    color: #fff;
}

.blog-cta h3 {
    font-size: 1.35rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 8px;
}

.blog-cta p {
    color: #94a3b8;
    margin: 0 0 20px;
    font-size: 1rem;
}

.blog-cta-button {
    display: inline-block;
    padding: 12px 28px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.blog-cta-button:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.35);
}

/* =============================================
   FAQ (details/summary)
   ============================================= */

.blog-faq {
    margin: 2em 0;
}

.blog-faq details {
    margin-bottom: 8px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
}

.blog-faq summary {
    padding: 14px 18px;
    font-weight: 600;
    color: #1e293b;
    cursor: pointer;
    background: #f8fafc;
    transition: background 0.2s ease;
    list-style: none;
}

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

.blog-faq summary::before {
    content: "▸ ";
    color: #3b82f6;
    transition: transform 0.2s ease;
    display: inline-block;
}

.blog-faq details[open] summary::before {
    content: "▾ ";
}

.blog-faq summary:hover {
    background: #f1f5f9;
}

.blog-faq .faq-answer {
    padding: 14px 18px;
    color: #334155;
    line-height: 1.7;
}

/* =============================================
   Responsive
   ============================================= */

@media (max-width: 768px) {
    .blog-main {
        padding: 20px 16px 40px;
    }

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

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

    .blog-article h3 {
        font-size: 1.1rem;
    }

    .blog-cta {
        padding: 24px 20px;
    }

    .blog-cta h3 {
        font-size: 1.15rem;
    }

    .blog-article table {
        font-size: 0.85rem;
    }

    .blog-article th,
    .blog-article td {
        padding: 8px 10px;
    }

    .blog-toc {
        padding: 16px 18px;
    }
}

@media print {
    .blog-breadcrumbs,
    .blog-cta {
        display: none !important;
    }
}
