/* ============================================
   Blog Styles — Flip POS
   ============================================ */

/* ── Hero ─────────────────────────────────── */
.blog-hero {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: white;
    padding: 160px 0 70px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.blog-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -20%;
    width: 60%;
    height: 200%;
    background: radial-gradient(ellipse, rgba(232, 76, 61, 0.12) 0%, transparent 70%);
    pointer-events: none;
}

.blog-hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    right: -10%;
    width: 50%;
    height: 150%;
    background: radial-gradient(ellipse, rgba(59, 130, 246, 0.10) 0%, transparent 70%);
    pointer-events: none;
}

.blog-hero .container {
    position: relative;
    z-index: 1;
}

.blog-hero h1 {
    font-size: 3rem;
    margin-bottom: 16px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.blog-hero p {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.75);
    max-width: 560px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ── Listing section ──────────────────────── */
.blog-listing {
    padding: 80px 0 100px;
    background: #f5f6fa;
}

/* ── Grid ─────────────────────────────────── */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    margin-top: 0;
}

/* First card spans full width — featured layout */
.blog-card:first-child {
    grid-column: 1 / -1;
    flex-direction: row;
}

.blog-card:first-child .blog-card-image {
    width: 340px;
    min-width: 340px;
    height: auto;
    min-height: 260px;
    border-radius: 16px 0 0 16px;
}

.blog-card:first-child .blog-card-content {
    padding: 36px 40px;
    justify-content: center;
}

.blog-card:first-child h3 {
    font-size: 1.75rem;
}

/* ── Card base ────────────────────────────── */
.blog-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06), 0 0 0 1px rgba(0,0,0,0.04);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0,0,0,0.04);
}

/* ── Card image / emoji panel ─────────────── */
.blog-card-image {
    width: 100%;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
    line-height: 1;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

/* Default gradient */
.blog-card-image {
    background: linear-gradient(135deg, #1a1a2e 0%, #2d2f6e 100%);
}

/* Category-specific panel colors */
.blog-card.category-tech .blog-card-image {
    background: linear-gradient(135deg, #0f4c81 0%, #1a7abf 100%);
}
.blog-card.category-pos .blog-card-image {
    background: linear-gradient(135deg, #1a1a2e 0%, #e84c3d 100%);
}
.blog-card.category-setup .blog-card-image {
    background: linear-gradient(135deg, #065f46 0%, #10b981 100%);
}
.blog-card.category-food-truck .blog-card-image {
    background: linear-gradient(135deg, #92400e 0%, #f59e0b 100%);
}
.blog-card.category-comparison .blog-card-image {
    background: linear-gradient(135deg, #3730a3 0%, #7c3aed 100%);
}
.blog-card.category-coffee .blog-card-image {
    background: linear-gradient(135deg, #451a03 0%, #92400e 100%);
}
.blog-card.category-tacos .blog-card-image {
    background: linear-gradient(135deg, #7f1d1d 0%, #ef4444 100%);
}

/* Decorative circle behind emoji */
.blog-card-image::before {
    content: '';
    position: absolute;
    width: 130px;
    height: 130px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
}

/* ── Card content ─────────────────────────── */
.blog-card-content {
    padding: 24px 28px 28px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.blog-card-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    font-size: 0.8rem;
    color: #9ca3af;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.blog-card-meta span:not(.blog-card-category)::before {
    content: '·';
    margin-right: 12px;
    color: #d1d5db;
}

.blog-card-category {
    color: #e84c3d;
    font-weight: 700;
}

.blog-card h3 {
    font-size: 1.2rem;
    margin-bottom: 12px;
    color: #111827;
    line-height: 1.35;
    font-weight: 700;
}

.blog-card-excerpt {
    color: #6b7280;
    margin-bottom: 20px;
    line-height: 1.65;
    font-size: 0.95rem;
    flex: 1;
}

.blog-card-link {
    color: #e84c3d;
    font-weight: 700;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    letter-spacing: 0.01em;
    transition: gap 0.2s ease;
}

.blog-card:hover .blog-card-link {
    gap: 10px;
}

/* ── Individual blog post ─────────────────── */
.blog-post {
    padding: 60px 0 80px;
}

.blog-post-header {
    max-width: 800px;
    margin: 0 auto 40px;
    text-align: center;
}

.blog-post-meta {
    display: flex;
    gap: 24px;
    justify-content: center;
    margin-bottom: 24px;
    font-size: 0.95rem;
    color: #6b7280;
}

.blog-post-category {
    color: #e84c3d;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 0.05em;
}

.blog-post h1 {
    font-size: 2.5rem;
    margin-bottom: 24px;
    color: #1a1a1a;
    line-height: 1.2;
}

.blog-post-subtitle {
    font-size: 1.25rem;
    color: #4b5563;
    line-height: 1.6;
}

.blog-post-content {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.125rem;
    line-height: 1.8;
    color: #1f2937;
}

.blog-post-content h2 {
    font-size: 2rem;
    margin-top: 48px;
    margin-bottom: 24px;
    color: #1a1a1a;
}

.blog-post-content h3 {
    font-size: 1.5rem;
    margin-top: 36px;
    margin-bottom: 16px;
    color: #1a1a1a;
}

.blog-post-content h4 {
    font-size: 1.25rem;
    margin-top: 24px;
    margin-bottom: 12px;
    color: #1a1a1a;
}

.blog-post-content p { margin-bottom: 24px; }

.blog-post-content ul,
.blog-post-content ol {
    margin-bottom: 24px;
    padding-left: 32px;
}

.blog-post-content li { margin-bottom: 12px; }

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

.blog-post-content a {
    color: #e84c3d;
    text-decoration: underline;
}

.blog-post-content a:hover { color: #c0392b; }

.blog-post-content blockquote {
    border-left: 4px solid #e84c3d;
    padding-left: 24px;
    margin: 32px 0;
    font-style: italic;
    color: #4b5563;
}

.blog-post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 32px 0;
}

.blog-post-content code {
    background: #f3f4f6;
    padding: 2px 8px;
    border-radius: 4px;
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 0.9em;
}

.blog-post-content pre {
    background: #1f2937;
    color: #f3f4f6;
    padding: 24px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 32px 0;
}

.blog-post-content pre code {
    background: transparent;
    padding: 0;
    color: inherit;
}

/* ── Table of Contents ────────────────────── */
.table-of-contents {
    background: #f8fafc;
    border-left: 4px solid #e84c3d;
    padding: 24px;
    margin: 32px 0;
    border-radius: 8px;
}

.table-of-contents h3 {
    margin-top: 0;
    margin-bottom: 16px;
    font-size: 1.25rem;
}

.table-of-contents ul {
    margin: 0;
    padding-left: 24px;
}

.table-of-contents li { margin-bottom: 8px; }

.table-of-contents a {
    text-decoration: none;
    color: #e84c3d;
}

.table-of-contents a:hover { text-decoration: underline; }

/* ── Info Box ─────────────────────────────── */
.info-box {
    background: #eff6ff;
    border-left: 4px solid #3b82f6;
    padding: 20px 24px;
    margin: 32px 0;
    border-radius: 8px;
}

.info-box.success {
    background: #f0fdf4;
    border-left-color: #10b981;
}

.info-box.warning {
    background: #fffbeb;
    border-left-color: #f59e0b;
}

.info-box h4 {
    margin-top: 0;
    margin-bottom: 8px;
}

/* ── CTA Box ──────────────────────────────── */
.blog-cta-box {
    background: linear-gradient(135deg, #e84c3d 0%, #c0392b 100%);
    color: white;
    padding: 40px;
    border-radius: 16px;
    margin: 48px 0;
    text-align: center;
}

.blog-cta-box h3 {
    color: white;
    margin-bottom: 16px;
}

.blog-cta-box p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 24px;
}

/* ── Related Posts ────────────────────────── */
.related-posts {
    margin-top: 80px;
    padding-top: 60px;
    border-top: 2px solid #e5e7eb;
}

.related-posts h3 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 40px;
}

/* ── Mobile ───────────────────────────────── */
@media (max-width: 968px) {
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .blog-card:first-child {
        grid-column: 1 / -1;
        flex-direction: column;
    }

    .blog-card:first-child .blog-card-image {
        width: 100%;
        min-width: unset;
        height: 220px;
        border-radius: 16px 16px 0 0;
    }

    .blog-card:first-child .blog-card-content {
        padding: 28px;
    }

    .blog-card:first-child h3 {
        font-size: 1.4rem;
    }
}

@media (max-width: 768px) {
    .blog-hero {
        padding: 110px 24px 56px;
    }

    .blog-hero h1 {
        font-size: 2.1rem;
    }

    .blog-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .blog-card:first-child {
        grid-column: auto;
    }

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

    .blog-post-content {
        font-size: 1rem;
    }

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

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

@media (max-width: 480px) {
    .blog-hero h1 {
        font-size: 1.75rem;
    }

    .blog-hero p {
        font-size: 1rem;
    }

    .blog-card-image {
        height: 160px;
        font-size: 4rem;
    }
}
