/* ============================================================
   KingPipe Blog Styles
   ============================================================ */

/* ── Blog Section Wrapper ── */
.kp-blog-section { background: #f8f9fa; }

/* ── Blog card grid ── */
.kp-blog-grid { row-gap: 30px; }
.kp-blog-col  { margin-bottom: 0; }

/* ── Blog Card ── */
.kp-blog-card {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 18px rgba(0,0,0,.07);
  transition: box-shadow .25s, transform .25s;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.kp-blog-card:hover {
  box-shadow: 0 6px 30px rgba(0,0,0,.13);
  transform: translateY(-4px);
}

/* Card thumbnail */
.kp-blog-card__thumb {
  display: block;
  position: relative;
  overflow: hidden;
  height: 220px;
  background: #e9ecef;
}
.kp-blog-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s;
}
.kp-blog-card:hover .kp-blog-card__thumb img { transform: scale(1.05); }

.kp-blog-card__thumb--noimg {
  background: linear-gradient(135deg, #c0392b 0%, #8e44ad 100%);
}

/* Category badge overlay on thumb */
.kp-blog-card__cat {
  position: absolute;
  top: 14px;
  left: 14px;
  background: #c0392b;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .6px;
  padding: 4px 10px;
  border-radius: 3px;
}

/* Card body */
.kp-blog-card__body {
  padding: 22px 24px 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.kp-blog-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 12px;
  color: #888;
  margin-bottom: 12px;
}
.kp-blog-card__meta i { color: #c0392b; margin-right: 4px; }

.kp-blog-card__title {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.45;
  margin-bottom: 10px;
}
.kp-blog-card__title a { color: #1d2327; text-decoration: none; }
.kp-blog-card__title a:hover { color: #c0392b; }

.kp-blog-card__excerpt {
  font-size: 14px;
  color: #666;
  line-height: 1.65;
  flex: 1;
  margin-bottom: 16px;
}

.kp-blog-card__readmore {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #c0392b;
  text-decoration: none;
  transition: gap .2s;
}
.kp-blog-card__readmore:hover { gap: 10px; color: #a93226; }

/* ── Pagination ── */
.kp-blog-pagination {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 50px;
}
.kp-blog-pagination .page-numbers {
  display: inline-block;
  padding: 8px 16px;
  border: 1px solid #ddd;
  border-radius: 4px;
  color: #444;
  text-decoration: none;
  font-size: 14px;
  transition: background .2s, color .2s;
}
.kp-blog-pagination .page-numbers.current,
.kp-blog-pagination .page-numbers:hover {
  background: #c0392b;
  border-color: #c0392b;
  color: #fff;
}


/* ======================================================
   Single Post
   ====================================================== */
.kp-single-post { background: #f8f9fa; }

.kp-post {
  background: #fff;
  border-radius: 8px;
  padding: 36px 40px;
  box-shadow: 0 2px 18px rgba(0,0,0,.06);
  margin-bottom: 30px;
}
@media (max-width: 575px) { .kp-post { padding: 22px 18px; } }

/* Post header */
.kp-post__cat-badge a {
  display: inline-block;
  background: #c0392b;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .6px;
  padding: 4px 12px;
  border-radius: 3px;
  text-decoration: none;
  margin-bottom: 14px;
}

.kp-post__title {
  font-size: 28px;
  font-weight: 800;
  line-height: 1.35;
  color: #1d2327;
  margin-bottom: 14px;
}
@media (max-width: 575px) { .kp-post__title { font-size: 22px; } }

.kp-post__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 13px;
  color: #888;
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid #eee;
}
.kp-post__meta i { color: #c0392b; margin-right: 4px; }
.kp-post__meta a { color: #888; text-decoration: none; }
.kp-post__meta a:hover { color: #c0392b; }

/* Featured image */
.kp-post__featured-img {
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 28px;
}
.kp-post__featured-img img { width: 100%; height: auto; display: block; }

/* Post content typography */
.kp-post__content {
  font-size: 15px;
  line-height: 1.85;
  color: #444;
}
.kp-post__content h2,
.kp-post__content h3,
.kp-post__content h4 {
  color: #1d2327;
  font-weight: 700;
  margin-top: 30px;
  margin-bottom: 14px;
}
.kp-post__content h2 { font-size: 22px; }
.kp-post__content h3 { font-size: 19px; }
.kp-post__content h4 { font-size: 16px; }
.kp-post__content p  { margin-bottom: 18px; }
.kp-post__content ul,
.kp-post__content ol {
  padding-left: 22px;
  margin-bottom: 18px;
}
.kp-post__content li  { margin-bottom: 6px; }
.kp-post__content blockquote {
  border-left: 4px solid #c0392b;
  margin: 24px 0;
  padding: 14px 22px;
  background: #fdf6f6;
  font-style: italic;
  color: #555;
  border-radius: 0 4px 4px 0;
}
.kp-post__content a { color: #c0392b; }
.kp-post__content img { max-width: 100%; border-radius: 6px; margin: 12px 0; }
.kp-post__content table { width: 100%; border-collapse: collapse; margin: 20px 0; font-size: 14px; }
.kp-post__content table th,
.kp-post__content table td { border: 1px solid #ddd; padding: 10px 14px; }
.kp-post__content table th { background: #1d2327; color: #fff; font-weight: 600; }
.kp-post__content table tr:nth-child(even) { background: #f8f9fa; }

/* Tags */
.kp-post__tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 28px 0 0;
  padding-top: 22px;
  border-top: 1px solid #eee;
  font-size: 13px;
  color: #888;
}
.kp-post__tags i { color: #c0392b; }

.kp-tag-badge {
  display: inline-block;
  padding: 4px 12px;
  background: #f0f0f0;
  color: #555;
  font-size: 12px;
  border-radius: 3px;
  text-decoration: none;
  font-weight: 600;
  transition: background .2s, color .2s;
}
.kp-tag-badge:hover { background: #c0392b; color: #fff; }

/* Author box */
.kp-author-box {
  display: flex;
  align-items: center;
  gap: 20px;
  background: #f8f9fa;
  border-radius: 8px;
  padding: 22px 26px;
  margin-top: 34px;
  border: 1px solid #eee;
}
.kp-author-box__avatar img {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,.12);
}
.kp-author-box__info h4 { margin: 0 0 6px; font-size: 16px; font-weight: 700; color: #1d2327; }
.kp-author-box__info p  { margin: 0; font-size: 13px; color: #666; line-height: 1.5; }

/* Prev/next navigation */
.kp-post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 34px;
  padding-top: 24px;
  border-top: 1px solid #eee;
}
.kp-post-nav__prev { text-align: left; }
.kp-post-nav__next { text-align: right; }
.kp-post-nav__label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: #aaa;
  letter-spacing: .6px;
  margin-bottom: 4px;
}
.kp-post-nav a {
  font-size: 14px;
  font-weight: 600;
  color: #1d2327;
  text-decoration: none;
  line-height: 1.4;
  display: block;
}
.kp-post-nav a:hover { color: #c0392b; }

/* Comments */
.kp-comments {
  margin-top: 36px;
  padding-top: 30px;
  border-top: 1px solid #eee;
}

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

.kp-sidebar-widget {
  background: #fff;
  border-radius: 8px;
  padding: 24px 22px;
  margin-bottom: 24px;
  box-shadow: 0 2px 14px rgba(0,0,0,.06);
}
.kp-sidebar-widget__title {
  font-size: 16px;
  font-weight: 800;
  color: #1d2327;
  margin: 0 0 18px;
  padding-bottom: 12px;
  border-bottom: 2px solid #c0392b;
  text-transform: uppercase;
  letter-spacing: .4px;
}

.kp-sidebar-widget .search-form { display: flex; gap: 6px; }
.kp-sidebar-widget .search-field {
  flex: 1;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 8px 12px;
  font-size: 13px;
  outline: none;
}
.kp-sidebar-widget .search-submit {
  background: #c0392b;
  color: #fff;
  border: none;
  padding: 8px 14px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  transition: background .2s;
}
.kp-sidebar-widget .search-submit:hover { background: #a93226; }

/* Recent posts widget */
.kp-recent-posts { list-style: none; padding: 0; margin: 0; }
.kp-recent-posts li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 10px 0;
  border-bottom: 1px solid #f0f0f0;
}
.kp-recent-posts li:last-child { border-bottom: none; }
.kp-recent-posts__thumb img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
}
.kp-recent-posts__info a {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #333;
  text-decoration: none;
  line-height: 1.45;
  margin-bottom: 4px;
}
.kp-recent-posts__info a:hover { color: #c0392b; }
.kp-recent-posts__info span { font-size: 11px; color: #aaa; }

/* Category list */
.kp-cat-list { list-style: none; padding: 0; margin: 0; }
.kp-cat-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #f0f0f0;
  font-size: 13px;
}
.kp-cat-list li:last-child { border-bottom: none; }
.kp-cat-list a { color: #444; text-decoration: none; }
.kp-cat-list a:hover { color: #c0392b; }
.kp-cat-list .count { background: #f0f0f0; color: #888; font-size: 11px; padding: 2px 8px; border-radius: 10px; }

/* Tag cloud */
.kp-tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; }

/* Sidebar CTA */
.kp-sidebar-cta {
  background: linear-gradient(135deg, #c0392b, #8e44ad);
  text-align: center;
}
.kp-sidebar-cta h4 { color: #fff; font-size: 18px; font-weight: 800; margin: 0 0 10px; }
.kp-sidebar-cta p  { color: rgba(255,255,255,.85); font-size: 13px; margin: 0; }
.kp-sidebar-cta .ht-btn {
  background: #fff;
  color: #c0392b;
  border: none;
  padding: 10px 24px;
  font-weight: 700;
  border-radius: 4px;
  display: inline-block;
  text-decoration: none;
  font-size: 13px;
  transition: background .2s;
}
.kp-sidebar-cta .ht-btn:hover { background: #f5f5f5; }
