/* =========================================
   ConvertKr Theme – Blog Styles
   Post cards, article typography, pagination
   ========================================= */

/* ─── Blog Page Header ─── */
.blog-header {
    text-align: center;
    padding: 120px 24px 40px;
}

.blog-header h1 {
    font-size: 36px;
    font-weight: 800;
    color: var(--hero-text-heading);
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}

.blog-header p {
    font-size: 17px;
    color: var(--hero-text-secondary);
    max-width: 560px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ─── Post Card Grid ─── */
.blog-grid {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px 60px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.blog-card {
    background: var(--hero-bg);
    border: 1px solid var(--hero-border);
    border-radius: var(--hero-radius-lg);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: transform var(--hero-transition), box-shadow var(--hero-transition), border-color var(--hero-transition);
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
    border-color: var(--hero-primary);
}

.blog-card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: var(--hero-surface);
}

.blog-card-image-placeholder {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, var(--hero-primary-light), var(--hero-surface));
    display: flex;
    align-items: center;
    justify-content: center;
}

.blog-card-image-placeholder svg {
    color: var(--hero-primary);
    opacity: 0.4;
}

.blog-card-body {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.blog-card-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
    font-size: 13px;
    color: var(--hero-text-muted);
}

.blog-card-category {
    background: var(--hero-primary-light);
    color: var(--hero-primary);
    padding: 2px 10px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.blog-card-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--hero-text-heading);
    line-height: 1.4;
    margin-bottom: 8px;
}

.blog-card-excerpt {
    font-size: 14px;
    color: var(--hero-text-secondary);
    line-height: 1.6;
    margin-bottom: 16px;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card-cta {
    font-size: 14px;
    font-weight: 600;
    color: var(--hero-primary);
    margin-top: auto;
}

.blog-card:hover .blog-card-cta {
    color: var(--hero-primary-hover);
}

/* ─── Pagination ─── */
.blog-pagination {
    max-width: 1400px;
    margin: 0 auto 60px;
    padding: 0 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
}

.blog-pagination a,
.blog-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all var(--hero-transition);
}

.blog-pagination a {
    color: var(--hero-text-secondary);
    border: 1px solid var(--hero-border);
    background: var(--hero-bg);
}

.blog-pagination a:hover {
    color: var(--hero-primary);
    border-color: var(--hero-primary);
    background: var(--hero-primary-light);
}

.blog-pagination span.current {
    background: var(--hero-primary);
    color: #fff;
    border: 1px solid var(--hero-primary);
}

.blog-pagination .dots {
    color: var(--hero-text-muted);
    border: none;
    background: none;
}

/* ─── No Posts Message ─── */
.blog-empty {
    text-align: center;
    padding: 60px 24px 80px;
    max-width: 500px;
    margin: 0 auto;
}

.blog-empty svg {
    color: var(--hero-text-muted);
    margin-bottom: 16px;
    opacity: 0.5;
}

.blog-empty h2 {
    font-size: 22px;
    font-weight: 700;
    color: var(--hero-text-heading);
    margin-bottom: 8px;
}

.blog-empty p {
    font-size: 15px;
    color: var(--hero-text-secondary);
    line-height: 1.6;
}

/* =========================================
   SINGLE POST – Article Layout
   ========================================= */

.blog-article {
    max-width: 900px;
    margin: 0 auto;
    padding: 120px 40px 60px;
}

.blog-article-header {
    margin-bottom: 32px;
}

.blog-article-category {
    display: inline-block;
    background: var(--hero-primary-light);
    color: var(--hero-primary);
    padding: 4px 14px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    text-decoration: none;
    margin-bottom: 16px;
}

.blog-article-category:hover {
    background: var(--hero-primary);
    color: #fff;
}

.blog-article-title {
    font-size: 38px;
    font-weight: 800;
    color: var(--hero-text-heading);
    line-height: 1.2;
    letter-spacing: -0.5px;
    margin-bottom: 16px;
}

.blog-article-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 14px;
    color: var(--hero-text-muted);
    flex-wrap: wrap;
}

.blog-article-meta span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.blog-article-featured {
    width: 100%;
    height: auto;
    max-height: 400px;
    border-radius: var(--hero-radius-lg);
    margin-bottom: 36px;
    object-fit: cover;
}

/* Article Content Typography */
.blog-article-content {
    font-size: 17px;
    line-height: 1.8;
    color: var(--hero-text);
}

.blog-article-content h2 {
    font-size: 26px;
    font-weight: 700;
    color: var(--hero-text-heading);
    margin: 40px 0 16px;
    letter-spacing: -0.3px;
}

.blog-article-content h3 {
    font-size: 21px;
    font-weight: 700;
    color: var(--hero-text-heading);
    margin: 32px 0 12px;
}

.blog-article-content h4 {
    font-size: 18px;
    font-weight: 600;
    color: var(--hero-text-heading);
    margin: 28px 0 10px;
}

.blog-article-content p {
    margin-bottom: 20px;
}

.blog-article-content a {
    color: var(--hero-primary);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.blog-article-content a:hover {
    color: var(--hero-primary-hover);
}

.blog-article-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--hero-radius);
    margin: 24px 0;
}

.blog-article-content ul,
.blog-article-content ol {
    margin: 16px 0 20px 24px;
}

.blog-article-content li {
    margin-bottom: 8px;
}

.blog-article-content blockquote {
    border-left: 4px solid var(--hero-primary);
    padding: 16px 20px;
    margin: 24px 0;
    background: var(--hero-surface);
    border-radius: 0 var(--hero-radius) var(--hero-radius) 0;
    font-style: italic;
    color: var(--hero-text-secondary);
}

.blog-article-content pre {
    background: #1e293b;
    color: #e2e8f0;
    padding: 20px;
    border-radius: var(--hero-radius);
    overflow-x: auto;
    margin: 24px 0;
    font-size: 14px;
    line-height: 1.6;
}

.blog-article-content code {
    background: var(--hero-surface);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
    color: var(--hero-primary);
}

.blog-article-content pre code {
    background: none;
    padding: 0;
    color: inherit;
}

.blog-article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
}

.blog-article-content th,
.blog-article-content td {
    padding: 10px 14px;
    border: 1px solid var(--hero-border);
    text-align: left;
}

.blog-article-content th {
    background: var(--hero-surface);
    font-weight: 600;
}

/* ─── Post Navigation ─── */
.blog-post-nav {
    max-width: 900px;
    margin: 0 auto 60px;
    padding: 0 40px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.blog-post-nav a {
    display: block;
    padding: 20px;
    border: 1px solid var(--hero-border);
    border-radius: var(--hero-radius);
    text-decoration: none;
    transition: all var(--hero-transition);
}

.blog-post-nav a:hover {
    border-color: var(--hero-primary);
    background: var(--hero-primary-light);
}

.blog-post-nav-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--hero-text-muted);
    margin-bottom: 6px;
}

.blog-post-nav-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--hero-text-heading);
    line-height: 1.4;
}

.blog-post-nav a:last-child {
    text-align: right;
}

/* =========================================
   RESPONSIVE
   ========================================= */

@media (max-width: 1024px) {
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .blog-article-title {
        font-size: 32px;
    }
}

@media (max-width: 768px) {
    .blog-header {
        padding: 100px 20px 32px;
    }

    .blog-header h1 {
        font-size: 28px;
    }

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

    .blog-article {
        padding: 100px 20px 48px;
    }

    .blog-article-title {
        font-size: 28px;
    }

    .blog-article-content {
        font-size: 16px;
    }

    .blog-post-nav {
        grid-template-columns: 1fr;
        padding: 0 20px;
    }

    .blog-post-nav a:last-child {
        text-align: left;
    }
}

@media (max-width: 480px) {
    .blog-header h1 {
        font-size: 24px;
    }

    .blog-article-title {
        font-size: 24px;
    }

    .blog-article-content h2 {
        font-size: 22px;
    }

    .blog-article-content h3 {
        font-size: 18px;
    }

    .blog-card-title {
        font-size: 16px;
    }
}
