/* =========================================================
   BLOG.CSS — Blog cards, archive, single post
   ========================================================= */

/* --- Blog Grid (Homepage + Archive) --- */
.pn-blog-grid,
.pn-posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.pn-blog-card {
    background: #fff;
    border-radius: var(--pn-card-radius);
    overflow: hidden;
    box-shadow: var(--pn-card-shadow);
    border: 1px solid var(--pn-border);
    transition: transform var(--pn-transition), box-shadow var(--pn-transition);
}

.pn-blog-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 50px rgba(0,0,0,0.12);
}

.blog-card-image {
    overflow: hidden;
    height: 220px;
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.pn-blog-card:hover .blog-card-image img {
    transform: scale(1.06);
}

.blog-card-image a { display: block; height: 100%; }

.blog-card-body { padding: 24px; }

.blog-card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--pn-text);
    opacity: 0.6;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.blog-cat a { color: var(--pn-primary); font-weight: 600; text-decoration: none; }
.blog-sep { color: var(--pn-border); }

.blog-card-title {
    font-size: 1.1rem;
    margin-bottom: 10px;
    line-height: 1.4;
}

.blog-card-title a {
    color: var(--pn-heading);
    text-decoration: none;
    transition: color var(--pn-transition);
}

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

.blog-card-excerpt {
    font-size: 0.95rem;
    color: var(--pn-text);
    line-height: 1.7;
    margin-bottom: 18px;
    opacity: 0.85;
}

.blog-read-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--pn-primary);
    text-decoration: none;
    transition: gap var(--pn-transition);
}

.blog-read-more:hover {
    gap: 10px;
    color: var(--pn-btn-hover);
}

/* --- Single Post --- */
.single-post-grid,
.archive-main + .blog-sidebar {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 50px;
    align-items: start;
}

.single-post-body { min-width: 0; }

.single-post-image {
    border-radius: var(--pn-card-radius);
    overflow: hidden;
    margin-bottom: 36px;
}

.single-post-image img { width: 100%; height: auto; }

.single-post-content {
    font-size: 1.05rem;
    line-height: 1.85;
    color: var(--pn-text);
}

.single-post-content p { margin-bottom: 1.25rem; }
.single-post-content h2 { margin: 2rem 0 1rem; font-size: 1.6rem; }
.single-post-content h3 { margin: 1.75rem 0 0.75rem; font-size: 1.3rem; }
.single-post-content ul, .single-post-content ol { padding-left: 1.5rem; margin-bottom: 1.25rem; }
.single-post-content ul { list-style: disc; }
.single-post-content ol { list-style: decimal; }
.single-post-content li { margin-bottom: 0.4rem; }
.single-post-content blockquote {
    border-left: 4px solid var(--pn-primary);
    padding: 16px 24px;
    margin: 1.5rem 0;
    background: var(--pn-light-green);
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: var(--pn-heading);
}

.single-post-tags { margin: 36px 0 24px; }
.single-post-tags .tags-wrap { display: flex; gap: 8px; flex-wrap: wrap; }
.single-post-tags a {
    padding: 5px 14px;
    background: var(--pn-light-green);
    color: var(--pn-primary);
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    transition: all var(--pn-transition);
}
.single-post-tags a:hover { background: var(--pn-primary); color: #fff; }

/* Share buttons */
.single-post-share {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 20px 0;
    border-top: 1px solid var(--pn-border);
    border-bottom: 1px solid var(--pn-border);
    margin: 24px 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--pn-heading);
}

.share-btn {
    padding: 7px 18px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    transition: all var(--pn-transition);
}
.share-fb { background: #1877F2; color: #fff; }
.share-fb:hover { background: #1558b0; color: #fff; }
.share-tw { background: #000; color: #fff; }
.share-tw:hover { background: #333; color: #fff; }
.share-wa { background: #25D366; color: #fff; }
.share-wa:hover { background: #1ebe5d; color: #fff; }

/* Author box */
.author-box {
    display: flex;
    gap: 20px;
    padding: 28px;
    background: var(--pn-cream);
    border-radius: var(--pn-card-radius);
    margin: 30px 0;
    border: 1px solid var(--pn-border);
}

.author-box img { border-radius: 50%; width: 80px; height: 80px; object-fit: cover; flex-shrink: 0; }

.author-info h4 { margin-bottom: 8px; font-size: 1.05rem; }
.author-info p { font-size: 0.9rem; color: #666; margin: 0; }

/* Related posts */
.related-posts { margin-top: 40px; }
.related-posts h3 { font-size: 1.3rem; margin-bottom: 24px; padding-bottom: 12px; border-bottom: 2px solid var(--pn-light-green); }

.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }

.related-card { border-radius: var(--pn-card-radius); overflow: hidden; border: 1px solid var(--pn-border); }
.related-card img { width: 100%; height: 140px; object-fit: cover; }
.related-card-body { padding: 14px; }
.related-card-body h4 { font-size: 0.9rem; margin-bottom: 6px; line-height: 1.4; }
.related-card-body h4 a { color: var(--pn-heading); text-decoration: none; }
.related-card-body h4 a:hover { color: var(--pn-primary); }
.related-card-body time { font-size: 0.75rem; color: #888; }

/* --- Sidebar --- */
.blog-sidebar { min-width: 0; }

.widget { margin-bottom: 30px; }

.widget-title {
    font-size: 1.1rem;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--pn-light-green);
}

.widget input[type="search"] {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--pn-border);
    border-radius: 8px;
    font-family: var(--pn-body-font);
    font-size: 0.9rem;
}

.sidebar-post-list { list-style: none; }
.sidebar-post-list li { padding: 10px 0; border-bottom: 1px solid var(--pn-border); }
.sidebar-post-list li:last-child { border-bottom: none; }
.sidebar-post-list a { display: block; font-size: 0.88rem; font-weight: 500; color: var(--pn-heading); text-decoration: none; margin-bottom: 3px; }
.sidebar-post-list a:hover { color: var(--pn-primary); }
.sidebar-post-list span { font-size: 0.75rem; color: #999; }

.pn-widget-cta { background: var(--pn-light-green); border-radius: var(--pn-card-radius); padding: 24px; border: 1px solid rgba(193,96,122,0.10); }
.pn-widget-cta p { font-size: 0.9rem; color: #555; margin-bottom: 16px; }

/* Pagination */
.nav-links, .page-numbers {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    margin-top: 50px;
    flex-wrap: wrap;
}

.page-numbers a, .page-numbers span, .nav-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 14px;
    border-radius: 8px;
    border: 1px solid var(--pn-border);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--pn-text);
    text-decoration: none;
    transition: all var(--pn-transition);
}

.page-numbers a:hover, .nav-links a:hover {
    background: var(--pn-primary);
    border-color: var(--pn-primary);
    color: #fff;
}

.page-numbers.current {
    background: var(--pn-primary);
    border-color: var(--pn-primary);
    color: #fff;
}

/* Blog banner */
.pn-page-banner--blog .blog-banner-meta {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.7);
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
}

.pn-page-banner--blog .blog-banner-author {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
    color: rgba(255,255,255,0.8);
    font-size: 0.85rem;
    margin-top: 12px;
    position: relative;
    z-index: 1;
}

.pn-page-banner--blog .blog-banner-author img { border-radius: 50%; border: 2px solid rgba(255,255,255,0.5); }
