/* =====================
   BLOG STYLES
   ===================== */

.blog-section {
    padding: 4rem 6%;
    background: var(--light);
}

.blog-section .title {
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
    color: var(--main);
    margin-bottom: 0.5rem;
}

.blog-hero {
    padding: 8rem 6% 2.5rem;
    text-align: center;
    background: var(--secondary-op);
}

.blog-hero .title {
    font-size: 3rem;
    font-weight: 800;
    color: var(--white);
}

.blog-hero .para {
    margin-top: 0.5rem;
    color: var(--white);
    font-size: 1rem;
}

.blog-list-section {
    padding: 2.5rem 6% 4rem;
    max-width: 1200px;
    margin: 0 auto;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 2rem;
    align-items: start;
    min-height: 45vh;
}

/* Post Card */
.post-card {
    display: flex;
    flex-direction: column;
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
    color: var(--main);
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    opacity: 1;
}

.post-card-thumb {
    width: 100%;
    position: relative;
    padding-top: 56.25%; /* 16:9 */
    overflow: hidden;
    background: #f0eaea;
    flex-shrink: 0;
}

.post-card-thumb img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.post-card:hover .post-card-thumb img {
    transform: scale(1.04);
}

.post-card-thumb-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f0e8ea, #e8d8dc);
}

.post-card-body {
    padding: 1.2rem 1.4rem 1.6rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
}

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

.post-tag {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    background: #f5eaec;
    color: var(--secondary);
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
}

.post-card-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--main);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-card-summary {
    font-size: 0.875rem;
    color: var(--gray);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Pagination */
.blog-pagination {
    margin-top: 3rem;
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.page-btn {
    padding: 0.5rem 1.4rem;
    border-radius: 8px;
    font-size: 0.875rem;
    border: 1px solid #e8d8dc;
    color: var(--main);
    transition:
        background 0.2s,
        color 0.2s;
    display: inline-block;
}

.page-btn:hover {
    background: var(--secondary);
    color: var(--white);
    border-color: var(--secondary);
    opacity: 1;
}

.page-btn.disabled {
    color: var(--gray);
    border-color: #f0eaea;
    cursor: default;
    pointer-events: none;
}

/* Post Detail */
.post-detail {
    max-width: 780px;
    margin: 0 auto 4rem;
    padding: 8rem 2rem 0;
}

.post-detail-thumb {
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 2rem;
}

.post-detail-thumb img {
    width: 100%;
    max-height: 420px;
    object-fit: cover;
    display: block;
}

.post-detail-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.back-link {
    font-size: 0.875rem;
    color: var(--secondary);
    font-weight: 600;
}

.post-detail-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--main);
    line-height: 1.3;
    margin-bottom: 0.5rem;
}

.post-detail-date {
    font-size: 0.85rem;
    color: var(--gray);
    margin-bottom: 1rem;
}

.post-detail-summary {
    font-size: 1.1rem;
    color: var(--gray);
    line-height: 1.7;
    margin-bottom: 2rem;
    border-left: 3px solid var(--secondary);
    padding-left: 1rem;
}

.post-detail-content {
    font-size: 1rem;
    line-height: 1.85;
    color: var(--main);
}

.post-detail-content h2,
.post-detail-content h3 {
    margin: 2rem 0 0.75rem;
    font-weight: 700;
}

.post-detail-content p {
    margin-bottom: 1.25rem;
}

.post-detail-content ul,
.post-detail-content ol {
    margin: 1rem 0 1.25rem 1.5rem;
}

.post-detail-content li {
    margin-bottom: 0.4rem;
}

.post-detail-content figure img {
    width: 100%;
    object-fit: contain;
    height: auto;
}
/* Related Posts */
.related-posts {
    padding: 3rem 6% 4rem;
    background: var(--light);
    text-align: center;
    max-width: 100%;
}

.related-posts .title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--main);
    margin-bottom: 0.5rem;
}

.related-posts .blog-grid {
    text-align: left;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.no-posts {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--gray);
    padding: 3rem 0;
}

@media screen and (max-width: 900px) {
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (max-width: 600px) {
    .blog-grid {
        grid-template-columns: 1fr;
    }

    .post-detail {
        padding-top: 6rem;
    }

    .post-detail-title {
        font-size: 1.5rem;
    }

    .blog-hero {
        padding: 7rem 6% 2rem;
    }
}
