/* Blog Post Styles */

.blog-post {
    background: var(--bg-light);
    padding: 4rem 0;
}

.post-container {
    max-width: 800px;
}

.post-header {
    background: var(--white);
    padding: 3rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
}

.post-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
    flex-wrap: wrap;
}

.post-category {
    background: #1e3a8a;
    color: var(--white);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-weight: 600;
}

.post-date,
.post-read-time {
    color: var(--text-light);
}

.post-header h1 {
    font-size: 2.5rem;
    line-height: 1.3;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.post-excerpt {
    font-size: 1.25rem;
    color: var(--text-light);
    line-height: 1.6;
}

.post-content {
    background: var(--white);
    padding: 3rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.post-content h2 {
    font-size: 1.75rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.post-content h2:first-child {
    margin-top: 0;
}

.post-content p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
}

.post-content strong {
    color: #1e3a8a;
    font-weight: 600;
}

.post-content ul,
.post-content ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.post-content li {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 0.5rem;
}

/* Code Blocks - Markdown Style */
.post-content code {
    background: #f1f5f9;
    color: #e11d48;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro', monospace;
    font-size: 0.9em;
    font-weight: 500;
}

.code-block-wrapper {
    position: relative;
    margin: 1.5rem 0;
}

.post-content pre {
    background: #1e293b;
    color: #e2e8f0;
    padding: 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border-left: 4px solid #3b82f6;
}

.copy-code-btn {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: #334155;
    color: #e2e8f0;
    border: 1px solid #475569;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
    z-index: 10;
}

.copy-code-btn:hover {
    background: #475569;
    border-color: #64748b;
    transform: translateY(-1px);
}

.copy-code-btn:active {
    transform: translateY(0);
}

.copy-code-btn svg {
    width: 16px;
    height: 16px;
}

.copy-code-btn.copied {
    background: #10b981;
    border-color: #059669;
    color: white;
}

.copy-code-btn.copied:hover {
    background: #059669;
}

.post-content pre code {
    background: transparent;
    color: #e2e8f0;
    padding: 0;
    border-radius: 0;
    font-size: 0.95rem;
    line-height: 1.6;
    font-weight: 400;
    display: block;
}

/* Syntax highlighting for comments */
.post-content pre code::before {
    color: #94a3b8;
}

/* Scrollbar styling for code blocks */
.post-content pre::-webkit-scrollbar {
    height: 8px;
}

.post-content pre::-webkit-scrollbar-track {
    background: #0f172a;
    border-radius: 4px;
}

.post-content pre::-webkit-scrollbar-thumb {
    background: #475569;
    border-radius: 4px;
}

.post-content pre::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

/* Headings inside lists */
.post-content h3 {
    font-size: 1.5rem;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--text-dark);
}

.post-content h4 {
    font-size: 1.25rem;
    margin-top: 1.25rem;
    margin-bottom: 0.75rem;
    color: var(--text-dark);
    font-weight: 600;
}

.post-cta {
    background: linear-gradient(135deg, #1e3a8a 0%, #4c1d95 100%);
    color: var(--white);
    padding: 3rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: var(--shadow-lg);
}

.post-cta h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.post-cta p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

/* Responsive */
@media (max-width: 768px) {
    .post-header,
    .post-content,
    .post-cta {
        padding: 2rem;
    }

    .post-header h1 {
        font-size: 1.75rem;
    }

    .post-excerpt {
        font-size: 1rem;
    }

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

    .post-content p,
    .post-content li {
        font-size: 1rem;
    }

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

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

    .code-block-wrapper {
        margin: 1rem 0;
    }

    .post-content pre {
        padding: 1rem;
        font-size: 0.875rem;
    }

    .post-content pre code {
        font-size: 0.875rem;
    }

    .copy-code-btn {
        top: 0.5rem;
        right: 0.5rem;
        padding: 0.4rem 0.6rem;
        font-size: 0.8125rem;
    }

    .copy-code-btn svg {
        width: 14px;
        height: 14px;
    }

    .post-cta h3 {
        font-size: 1.5rem;
    }
}

/* Article Feedback Widget */
.article-feedback {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 2rem;
    margin: 3rem 0;
    text-align: center;
}

.article-feedback h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 1.5rem 0;
}

.feedback-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    align-items: center;
}

.feedback-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    background: white;
    color: #64748b;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.feedback-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.feedback-btn svg {
    width: 20px;
    height: 20px;
}

.feedback-yes:hover {
    border-color: #10b981;
    color: #10b981;
    background: #f0fdf4;
}

.feedback-no:hover {
    border-color: #ef4444;
    color: #ef4444;
    background: #fef2f2;
}

.feedback-btn:active {
    transform: translateY(0);
}

.feedback-thanks {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    color: #10b981;
    font-size: 1.125rem;
    font-weight: 500;
}

.feedback-thanks svg {
    width: 24px;
    height: 24px;
}

.feedback-thanks p {
    margin: 0;
}

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

    .article-feedback h3 {
        font-size: 1.125rem;
    }

    .feedback-buttons {
        flex-direction: column;
        width: 100%;
    }

    .feedback-btn {
        width: 100%;
        justify-content: center;
    }
}
