
/* ============================================================
   Blog Styles — append to style.css
   ============================================================ */

/* Blog Layout */
.blog-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 48px;
    align-items: start;
}

@media (max-width: 900px) {
    .blog-layout { grid-template-columns: 1fr; }
    .blog-sidebar { order: -1; }
}

/* Post Grid */
.post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 28px;
}

.post-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: box-shadow .2s, transform .2s;
}

.post-card:hover {
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.post-card-img {
    height: 200px;
    overflow: hidden;
}

.post-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s;
}

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

.post-card-body { padding: 20px; }

.post-meta {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 10px;
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.post-card-title {
    font-size: 18px;
    margin-bottom: 10px;
}

.post-card-title a {
    color: var(--text);
    text-decoration: none;
}

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

.post-card-excerpt {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.read-more {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
}

.read-more:hover { text-decoration: underline; }

/* Single Post */
.single-post { max-width: 780px; }

.post-featured-img {
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 32px;
    max-height: 460px;
}

.post-featured-img img { width: 100%; height: 100%; object-fit: cover; }

.post-header { margin-bottom: 32px; }

.post-title {
    font-size: clamp(26px, 4vw, 40px);
    line-height: 1.2;
    margin-bottom: 14px;
}

.post-cats { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }

.cat-badge {
    background: rgba(26,86,219,.08);
    color: var(--primary);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}

.cat-badge:hover { background: rgba(26,86,219,.15); }

.post-content {
    font-size: 17px;
    line-height: 1.85;
    color: var(--text);
    margin-bottom: 40px;
}

.post-content h2 { margin-top: 2em; }
.post-content h3 { margin-top: 1.5em; }
.post-content img { border-radius: var(--radius); margin: 1.5em 0; }
.post-content blockquote {
    border-left: 4px solid var(--primary);
    padding: 12px 20px;
    background: var(--bg-alt);
    border-radius: 0 var(--radius) var(--radius) 0;
    margin: 1.5em 0;
    font-style: italic;
    color: var(--text-muted);
}

.post-tags { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 24px; }

.tag-badge {
    background: var(--bg-alt);
    color: var(--text-muted);
    border: 1px solid var(--border);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 13px;
    text-decoration: none;
}

.tag-badge:hover { border-color: var(--primary); color: var(--primary); }

.post-share { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.share-btn {
    padding: 7px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    color: #fff;
}

.share-fb { background: #1877f2; }
.share-wa { background: #25d366; }
.share-tw { background: #1da1f2; }

/* Pagination */
.pagination {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 40px;
}

.page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 12px;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all .15s;
}

.page-btn:hover, .page-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

/* Sidebar */
.blog-sidebar { position: sticky; top: 90px; }

.sidebar-widget {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 20px;
}

.widget-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary);
    display: inline-block;
}

.cat-list { list-style: none; padding: 0; }
.cat-list li { border-bottom: 1px solid var(--border); }
.cat-list li:last-child { border-bottom: none; }
.cat-list a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 9px 0;
    color: var(--text);
    font-size: 14px;
    text-decoration: none;
    transition: color .15s;
}
.cat-list a:hover { color: var(--primary); }
.cat-count {
    background: var(--bg-alt);
    color: var(--text-muted);
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
}

.recent-list { list-style: none; padding: 0; }
.recent-list li {
    display: flex;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}
.recent-list li:last-child { border-bottom: none; }
.recent-list img { width: 60px; height: 50px; object-fit: cover; border-radius: 6px; flex-shrink: 0; }
.recent-list a { font-size: 13px; font-weight: 600; color: var(--text); text-decoration: none; line-height: 1.4; display: block; margin-bottom: 4px; }
.recent-list a:hover { color: var(--primary); }
.recent-list span { font-size: 11px; color: var(--text-muted); }

/* Contact / CMS Form */
.cms-form .form-field { margin-bottom: 16px; }
.cms-form label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 5px; color: var(--text); }
.cms-form input, .cms-form textarea, .cms-form select {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    outline: none;
    transition: border-color .2s;
    background: var(--bg);
    color: var(--text);
}
.cms-form input:focus, .cms-form textarea:focus { border-color: var(--primary); }
.cms-form textarea { min-height: 120px; resize: vertical; }
.btn-form-submit {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 12px 32px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s;
}
.btn-form-submit:hover { background: var(--primary-dark); }
