/* ── Demo layout (remove in production) ─────────────────── */
.demo-layout {
  display: flex;
  gap: 24px;
  max-width: 1240px;
  margin: 40px auto;
  padding: 0 24px;
  align-items: flex-start;
}

.demo-main {
  flex: 1;
  min-height: 600px;
  background: #ffffff;
  border: 2px dashed #d1d5db;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.demo-placeholder {
  font-size: 0.875rem;
  color: #9ca3af;
  font-style: italic;
}


/* =========================================================
   BLOG SIDEBAR
   ========================================================= */
.blog-sidebar {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* ── Header row ─────────────────────────────────────────── */
.bs-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding: 0 2px;
}

.bs-header-left {
  display: flex;
  align-items: center;
  gap: 7px;
}

.bs-header-icon {
  width: 16px;
  height: 16px;
  color: #1a56db;
  flex-shrink: 0;
}

.bs-header-title {
  font-size: 0.8125rem;
  font-weight: 700;
  color: #111827;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.bs-view-all {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.71875rem;
  font-weight: 500;
  color: #1a56db;
  border: 1px solid #bfdbfe;
  border-radius: 20px;
  padding: 3px 10px;
  background: #eff6ff;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.bs-view-all svg {
  width: 11px;
  height: 11px;
}

.bs-view-all:hover {
  background: #dbeafe;
  border-color: #93c5fd;
}


/* ── Card ───────────────────────────────────────────────── */
.bs-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 25px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05), 0 2px 8px rgba(0, 0, 0, 0.03);
  transition: box-shadow 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.bs-card:last-child {
  margin-bottom: 0;
}

.bs-card:hover {
  border-color: #d1d5db;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.09);
  transform: translateY(-1px);
}


/* ── Thumbnail ──────────────────────────────────────────── */
.bs-thumb {
  display: block;
  position: relative;
  width: 100%;
  overflow: hidden;
}

.bs-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.bs-card:hover .bs-thumb img {
  transform: scale(1.03);
}

/* CSS placeholder when no image */
.bs-thumb-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s ease;
}

.bs-thumb-placeholder svg {
  width: 48px;
  height: 48px;
  opacity: 0.3;
}

.bs-thumb-placeholder--blue {
  background: #dbeafe;
  color: #1a56db;
}

.bs-thumb-placeholder--amber {
  background: #fef3c7;
  color: #d97706;
}

.bs-card:hover .bs-thumb-placeholder {
  opacity: 0.85;
}

/* Category badge on thumbnail */
.bs-cat {
  position: absolute;
  bottom: 10px;
  left: 10px;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  border-radius: 20px;
  padding: 3px 9px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.bs-cat--blue {
  color: #1e40af;
  background: rgba(219, 234, 254, 0.92);
  border: 1px solid #bfdbfe;
}

.bs-cat--amber {
  color: #92400e;
  background: rgba(254, 243, 199, 0.92);
  border: 1px solid #fde68a;
}


/* ── Card body ──────────────────────────────────────────── */
.bs-card-body {
  padding: 14px 16px 13px;
}

/* Title */
.bs-card-title {
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.45;
  color: #111827;
  margin-bottom: 7px;
  /* Clamp to 2 lines */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.bs-card-title a {
  color: inherit;
  transition: color 0.15s ease;
}

.bs-card-title a:hover {
  color: #1a56db;
}

/* Excerpt */
.bs-card-excerpt {
  font-size: 0.75rem;
  font-weight: 400;
  color: #6b7280;
  line-height: 1.6;
  margin-bottom: 12px;
  /* Clamp to 2 lines */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Meta row */
.bs-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid #f3f4f6;
}

.bs-meta-left {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.bs-meta-left span {
  font-size: 0.6875rem;
  color: #9ca3af;
  font-weight: 400;
  white-space: nowrap;
}

.bs-meta-icon {
  width: 11px;
  height: 11px;
  color: #9ca3af;
  flex-shrink: 0;
}

.bs-meta-dot {
  color: #d1d5db !important;
  margin: 0 1px;
}

/* Read link */
.bs-read-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.6875rem;
  font-weight: 600;
  color: #1a56db;
  white-space: nowrap;
  padding: 3px 8px;
  border: 1px solid #bfdbfe;
  border-radius: 20px;
  background: #eff6ff;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  flex-shrink: 0;
}

.bs-read-link svg {
  width: 10px;
  height: 10px;
  transition: transform 0.15s ease;
}

.bs-read-link:hover {
  background: #dbeafe;
  border-color: #93c5fd;
  color: #1e40af;
}

.bs-read-link:hover svg {
  transform: translateX(2px);
}


/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 960px) {
  .demo-layout {
    flex-direction: column;
  }

  .blog-sidebar {
    width: 100%;
    flex-direction: row;
    gap: 16px;
  }

  .bs-header {
    display: none; /* hide header in horizontal layout */
  }

  .bs-card {
    flex: 1;
    margin-bottom: 0;
  }
}

@media (max-width: 600px) {
  .blog-sidebar {
    flex-direction: column;
  }

  .bs-header {
    display: flex;
  }

  .bs-card {
    margin-bottom: 12px;
  }

  .bs-thumb {
    height: 130px;
  }
}
