/* ============================================================
   blog.css — Blog listing & article page styles
   ============================================================ */

/* ------------------------------------------------------------
   Blog Index — Hero
   ------------------------------------------------------------ */
.blog-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 3rem 2rem;
    text-align: center;
    color: #fff;
}

.blog-hero h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    letter-spacing: -0.5px;
}

.blog-hero p {
    font-size: 1.1rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

/* ------------------------------------------------------------
   Blog Index — Post Cards Grid
   ------------------------------------------------------------ */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 1.5rem;
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem;
}

.blog-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid #eee;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.blog-card-body {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.blog-card-category {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #667eea;
    margin-bottom: 0.5rem;
}

.blog-card-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-dark, #222);
    margin-bottom: 0.6rem;
    line-height: 1.4;
}

.blog-card-excerpt {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.6;
    flex: 1;
    margin-bottom: 1rem;
}

.blog-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #999;
}

.blog-card-date {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.blog-card-tags {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.blog-tag {
    font-size: 0.7rem;
    padding: 0.15rem 0.5rem;
    background: #f0f2ff;
    color: #667eea;
    border-radius: 12px;
    font-weight: 500;
}

/* ------------------------------------------------------------
   Blog Article — Header
   ------------------------------------------------------------ */
.article-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 3rem 2rem;
    color: #fff;
    text-align: center;
}

.article-header .article-category {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.85;
    margin-bottom: 0.8rem;
    display: inline-block;
    background: rgba(255,255,255,0.15);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
}

.article-header h1 {
    font-size: 2.2rem;
    font-weight: 800;
    max-width: 800px;
    margin: 0 auto 1rem;
    line-height: 1.3;
    letter-spacing: -0.5px;
}

.article-meta {
    font-size: 0.9rem;
    opacity: 0.8;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.article-meta span {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

/* ------------------------------------------------------------
   Blog Article — Content
   ------------------------------------------------------------ */
.article-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

.article-content h2 {
    font-size: 1.6rem;
    font-weight: 700;
    margin: 2.5rem 0 1rem;
    padding-left: 1rem;
    border-left: 4px solid #667eea;
    color: var(--text-dark, #222);
}

.article-content h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 2rem 0 0.8rem;
    color: var(--text-dark, #222);
}

.article-content p {
    font-size: 1.05rem;
    line-height: 1.9;
    color: #444;
    margin-bottom: 1.2rem;
}

.article-content ul,
.article-content ol {
    margin: 1rem 0 1.5rem;
    padding-left: 1.5rem;
}

.article-content li {
    font-size: 1rem;
    line-height: 1.8;
    color: #444;
    margin-bottom: 0.6rem;
}

.article-content strong {
    color: var(--text-dark, #222);
}

.article-content em {
    color: #555;
}

/* Article table */
.article-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.07);
}

.article-table th,
.article-table td {
    padding: 0.8rem 1.2rem;
    text-align: left;
    font-size: 0.95rem;
}

.article-table thead th {
    background: #333;
    color: #fff;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.article-table tbody tr {
    border-bottom: 1px solid #eee;
    transition: background 0.2s ease;
}

.article-table tbody tr:hover {
    background: #f8f9fa;
}

.article-table td:first-child {
    font-weight: 600;
    color: var(--text-dark, #222);
}

/* Article tags at bottom */
.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #eee;
}

.article-tags .blog-tag {
    font-size: 0.8rem;
    padding: 0.3rem 0.7rem;
}

/* Share / CTA at bottom */
.article-cta {
    text-align: center;
    padding: 2.5rem 2rem;
    background: #f8f9fa;
    margin-top: 2rem;
    border-radius: 12px;
}

.article-cta h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-dark, #222);
}

.article-cta p {
    color: #666;
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

.article-cta .cta-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(90deg, #ff6b6b 0%, #ffa500 100%);
    color: #fff;
    text-decoration: none;
    padding: 0.8rem 2rem;
    border-radius: 30px;
    font-weight: 700;
    font-size: 1rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.article-cta .cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 24px rgba(255, 107, 107, 0.45);
}

/* ------------------------------------------------------------
   Responsive — 768px
   ------------------------------------------------------------ */
@media (max-width: 768px) {
    .blog-hero {
        padding: 2rem 1rem;
    }

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

    .blog-grid {
        grid-template-columns: 1fr;
        padding: 1.5rem 1rem;
    }

    .article-header {
        padding: 2rem 1rem;
    }

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

    .article-content {
        padding: 2rem 1rem;
    }

    .article-content h2 {
        font-size: 1.3rem;
    }

    .article-content p,
    .article-content li {
        font-size: 0.95rem;
    }

    .article-table {
        display: block;
        overflow-x: auto;
    }
}

/* ------------------------------------------------------------
   Responsive — 480px
   ------------------------------------------------------------ */
@media (max-width: 480px) {
    .blog-hero h1 {
        font-size: 1.4rem;
    }

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

    .article-meta {
        flex-direction: column;
        gap: 0.5rem;
    }

    .blog-card-title {
        font-size: 1.05rem;
    }

    .article-content h2 {
        font-size: 1.15rem;
    }
}
