/* Blog Styles - PyPrestaScan */

/* Variables */
:root {
    --blog-primary: #2563eb;
    --blog-primary-dark: #1e40af;
    --blog-accent: #10b981;
    --blog-danger: #ef4444;
    --blog-warning: #f59e0b;
    --blog-text: #1f2937;
    --blog-text-light: #6b7280;
    --blog-bg: #ffffff;
    --blog-bg-gray: #f9fafb;
    --blog-border: #e5e7eb;
    --blog-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    --blog-shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.1);
    --blog-radius: 12px;
}

/* Blog Hero Section */
.blog-hero {
    background: linear-gradient(135deg, var(--blog-primary) 0%, var(--blog-primary-dark) 100%);
    color: white;
    padding: 80px 0 60px;
    position: relative;
    overflow: hidden;
}

.blog-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.blog-hero h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.blog-hero p {
    font-size: 1.25rem;
    opacity: 0.95;
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* Articles Grid */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    padding: 3rem 0;
}

/* Blog Card Styles */
.blog-card {
    background: var(--blog-bg);
    border-radius: var(--blog-radius);
    box-shadow: var(--blog-shadow);
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    box-shadow: var(--blog-shadow-lg);
    transform: translateY(-4px);
}

.blog-card.featured {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2.5rem;
}

.blog-card.featured h2 a {
    color: white;
}

.blog-card.featured .article-meta,
.blog-card.featured .article-stats,
.blog-card.featured p {
    color: rgba(255, 255, 255, 0.9);
}

.blog-card.featured .category {
    background: rgba(255, 255, 255, 0.2);
}

.blog-card.featured .read-more {
    color: white;
    border-color: white;
}

.blog-card.featured .read-more:hover {
    background: white;
    color: #667eea;
}

/* Article Meta */
.article-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 1.5rem 1.5rem 0;
}

.category {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--blog-accent);
    color: white;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.date {
    color: var(--blog-text-light);
    font-size: 0.875rem;
    display: flex;
    align-items: center;
}

/* Article Content */
.blog-card h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.3;
    padding: 0 1.5rem;
}

.blog-card h2 a {
    color: var(--blog-text);
    text-decoration: none;
    transition: color 0.2s;
}

.blog-card h2 a:hover {
    color: var(--blog-primary);
}

.blog-card p {
    color: var(--blog-text-light);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    padding: 0 1.5rem;
    flex-grow: 1;
}

/* Article Stats */
.article-stats {
    display: flex;
    gap: 1.5rem;
    padding: 0 1.5rem;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
    color: var(--blog-text-light);
}

.article-stats span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Read More Button */
.read-more {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--blog-primary);
    font-weight: 600;
    text-decoration: none;
    padding: 0.75rem 1.5rem;
    border-top: 1px solid var(--blog-border);
    transition: all 0.2s;
    margin-top: auto;
}

.read-more:hover {
    background: var(--blog-bg-gray);
    padding-left: 2rem;
}

/* Newsletter Box */
.newsletter-box {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 3rem;
    border-radius: var(--blog-radius);
    text-align: center;
    margin-top: 4rem;
    box-shadow: var(--blog-shadow-lg);
}

.newsletter-box h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.newsletter-box p {
    font-size: 1.125rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.newsletter-form {
    display: flex;
    gap: 1rem;
    max-width: 500px;
    margin: 0 auto;
}

.newsletter-form input {
    flex: 1;
    padding: 1rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 1rem;
}

.newsletter-form input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.newsletter-form input:focus {
    outline: none;
    border-color: white;
    background: rgba(255, 255, 255, 0.2);
}

.newsletter-form button {
    padding: 1rem 2rem;
    background: white;
    color: #667eea;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.newsletter-form button:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.newsletter-box small {
    display: block;
    margin-top: 1rem;
    opacity: 0.9;
}

/* Article Page Styles */
.article-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* Breadcrumbs */
.breadcrumbs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    font-size: 0.875rem;
    color: var(--blog-text-light);
}

.breadcrumbs a {
    color: var(--blog-primary);
    text-decoration: none;
}

.breadcrumbs a:hover {
    text-decoration: underline;
}

/* Article Header */
.article-header {
    margin-bottom: 3rem;
    text-align: center;
}

.article-header h1 {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: var(--blog-text);
}

.article-header .article-meta {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
}

.author-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.author {
    margin: 0;
    color: var(--blog-text);
}

.author strong {
    color: var(--blog-primary);
}

/* Table of Contents */
.toc {
    background: var(--blog-bg-gray);
    border-left: 4px solid var(--blog-primary);
    padding: 1.5rem;
    border-radius: var(--blog-radius);
    margin-bottom: 3rem;
}

.toc h2 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--blog-text);
}

.toc ol {
    margin: 0;
    padding-left: 1.5rem;
}

.toc li {
    margin-bottom: 0.75rem;
}

.toc a {
    color: var(--blog-text);
    text-decoration: none;
    transition: color 0.2s;
}

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

/* Article Body */
.article-body {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--blog-text);
}

.article-body h2 {
    font-size: 2rem;
    font-weight: 700;
    margin: 3rem 0 1.5rem;
    color: var(--blog-text);
    position: relative;
    padding-left: 1rem;
}

.article-body h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 100%;
    background: var(--blog-primary);
}

.article-body h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 2rem 0 1rem;
    color: var(--blog-text);
}

.article-body h4 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 1.5rem 0 1rem;
    color: var(--blog-text);
}

.article-body p {
    margin-bottom: 1.5rem;
}

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

.article-body li {
    margin-bottom: 0.5rem;
}

/* Highlight Box */
.highlight-box {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-left: 4px solid var(--blog-primary);
    padding: 1.5rem;
    border-radius: var(--blog-radius);
    margin: 2rem 0;
}

.highlight-box h3 {
    color: var(--blog-primary);
    margin-top: 0;
    margin-bottom: 1rem;
}

/* Code Blocks */
.code-block {
    background: #1e293b;
    color: #e2e8f0;
    padding: 1.5rem;
    border-radius: var(--blog-radius);
    margin: 1.5rem 0;
    overflow-x: auto;
    position: relative;
}

.code-block pre {
    margin: 0;
    font-family: 'Fira Code', 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
}

.code-block code {
    color: #e2e8f0;
    background: none;
    padding: 0;
}

/* Formula Box */
.formula-box {
    background: var(--blog-bg-gray);
    border: 2px solid var(--blog-border);
    padding: 1.5rem;
    border-radius: var(--blog-radius);
    margin: 1.5rem 0;
    text-align: center;
    font-family: 'Fira Code', monospace;
}

/* Example Box */
.example-box {
    background: #f0fdf4;
    border-left: 4px solid var(--blog-accent);
    padding: 1.5rem;
    border-radius: var(--blog-radius);
    margin: 1.5rem 0;
}

/* Data Tables */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    box-shadow: var(--blog-shadow);
    border-radius: var(--blog-radius);
    overflow: hidden;
}

.data-table thead {
    background: var(--blog-primary);
    color: white;
}

.data-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
}

.data-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--blog-border);
}

.data-table tbody tr:hover {
    background: var(--blog-bg-gray);
}

/* Comparison Box */
.comparison-box {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin: 2rem 0;
}

.before,
.after {
    padding: 1.5rem;
    border-radius: var(--blog-radius);
}

.before {
    background: #fef2f2;
    border: 2px solid #fecaca;
}

.after {
    background: #f0fdf4;
    border: 2px solid #bbf7d0;
}

/* Feature Comparison */
.feature-comparison {
    background: var(--blog-bg-gray);
    padding: 2rem;
    border-radius: var(--blog-radius);
    margin: 2rem 0;
}

.comparison-table {
    width: 100%;
    margin-top: 1.5rem;
}

.comparison-table th,
.comparison-table td {
    padding: 1rem;
    text-align: left;
}

.comparison-table .total {
    background: var(--blog-primary);
    color: white;
    font-weight: bold;
}

/* CTA Box */
.cta-box {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 3rem;
    border-radius: var(--blog-radius);
    text-align: center;
    margin: 3rem 0;
    box-shadow: var(--blog-shadow-lg);
}

.cta-box h3 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
}

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

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.btn {
    padding: 0.75rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
    display: inline-block;
}

.btn-primary {
    background: white;
    color: #667eea;
    border: 2px solid white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btn-secondary:hover {
    background: white;
    color: #667eea;
}

/* Download Box */
.download-box {
    background: var(--blog-bg-gray);
    border: 2px dashed var(--blog-primary);
    padding: 2rem;
    border-radius: var(--blog-radius);
    text-align: center;
    margin: 2rem 0;
}

.btn-download {
    background: var(--blog-primary);
    color: white;
    padding: 1rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    display: inline-block;
    margin-top: 1rem;
    transition: all 0.2s;
}

.btn-download:hover {
    background: var(--blog-primary-dark);
    transform: translateY(-2px);
}

/* Next Steps */
.next-steps {
    background: var(--blog-bg-gray);
    padding: 2rem;
    border-radius: var(--blog-radius);
    margin: 2rem 0;
}

.next-steps li {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--blog-border);
}

.next-steps li:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

/* Author Box */
.author-box {
    display: flex;
    gap: 1.5rem;
    background: var(--blog-bg-gray);
    padding: 2rem;
    border-radius: var(--blog-radius);
    margin: 3rem 0;
}

.author-image {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
}

.author-info h4 {
    margin-bottom: 0.5rem;
    color: var(--blog-text);
}

.author-info p {
    color: var(--blog-text-light);
    margin-bottom: 0.5rem;
}

.author-info a {
    color: var(--blog-primary);
    text-decoration: none;
}

/* Related Articles */
.related-articles {
    margin-top: 4rem;
    padding-top: 3rem;
    border-top: 2px solid var(--blog-border);
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.related-card {
    background: var(--blog-bg);
    padding: 1.5rem;
    border-radius: var(--blog-radius);
    box-shadow: var(--blog-shadow);
    text-decoration: none;
    transition: all 0.2s;
}

.related-card:hover {
    box-shadow: var(--blog-shadow-lg);
    transform: translateY(-2px);
}

.related-card h4 {
    color: var(--blog-text);
    margin-bottom: 0.5rem;
}

.related-card p {
    color: var(--blog-text-light);
    font-size: 0.875rem;
}

/* Newsletter Section */
.newsletter-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 4rem 0;
    text-align: center;
    color: white;
}

.newsletter-section h3 {
    font-size: 2rem;
    margin-bottom: 2rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .blog-hero h1 {
        font-size: 2rem;
    }

    .articles-grid {
        grid-template-columns: 1fr;
    }

    .newsletter-form {
        flex-direction: column;
    }

    .cta-buttons {
        flex-direction: column;
    }

    .comparison-box {
        grid-template-columns: 1fr;
    }

    .author-box {
        flex-direction: column;
        text-align: center;
    }

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

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.blog-card {
    animation: fadeInUp 0.6s ease-out;
}

.blog-card:nth-child(2) {
    animation-delay: 0.1s;
}

.blog-card:nth-child(3) {
    animation-delay: 0.2s;
}

.blog-card:nth-child(4) {
    animation-delay: 0.3s;
}

.blog-card:nth-child(5) {
    animation-delay: 0.4s;
}