/* ── Single Blog Post ─────────────────────────────────────────────────────── */
/* All rules scoped to .cbs-wrap so nothing bleeds into the rest of the site.  */

.cbs-wrap {
  padding: 32px 0 72px;
}

/* ── Breadcrumb ──────────────────────────────────────────────────────────── */
.cbs-breadcrumb-row {
  margin-bottom: 28px;
}

/* ── Layout grid ─────────────────────────────────────────────────────────── */
/* No-sidebar: centre the article column, cap its width for readability       */
.cbs-layout {
  max-width: 800px;
  margin: 0 auto;
}

.cbs-layout--right-sidebar,
.cbs-layout--left-sidebar {
  max-width: none;
  display: grid;
  gap: 48px;
  align-items: start;
}

.cbs-layout--right-sidebar { grid-template-columns: 1fr 300px; }
.cbs-layout--left-sidebar  { grid-template-columns: 300px 1fr; }

.cbs-layout--left-sidebar .cbs-article { order: 2; }
.cbs-layout--left-sidebar .cbs-sidebar  { order: 1; }

.cbs-article { min-width: 0; }

/* ── Article header ──────────────────────────────────────────────────────── */
.cbs-header {
  margin-bottom: 28px;
}

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

.cbs-cat-badge {
  display: inline-block;
  padding: 3px 10px;
  border: 1px solid currentColor;
  border-radius: 3px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  line-height: 1.6;
  opacity: 1;
  transition: opacity 0.15s;
}
.cbs-cat-badge:hover { opacity: 0.7; text-decoration: none; }

.cbs-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0 0 20px;
  color: #111;
}

.cbs-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-size: 0.8125rem;
  color: #6b7280;
}

.cbs-meta-author {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: #111;
  text-decoration: none;
  transition: opacity 0.15s;
}
.cbs-meta-author:hover { opacity: 0.7; text-decoration: none; }

.cbs-meta-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid #e5e7eb;
}

.cbs-meta-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #d1d5db;
  flex-shrink: 0;
}

.cbs-meta-date,
.cbs-meta-read { color: #6b7280; }

.cbs-meta-comments {
  color: #6b7280;
  text-decoration: none;
}
.cbs-meta-comments:hover { text-decoration: underline; }

/* ── Featured image ──────────────────────────────────────────────────────── */
.cbs-featured-img {
  margin-bottom: 36px;
  border-radius: 4px;
  overflow: hidden;
  line-height: 0;
}

.cbs-feat-img-el {
  width: 100%;
  max-height: 520px;
  height: auto;
  object-fit: cover;
  display: block;
}

/* ── Post content typography ─────────────────────────────────────────────── */
.cbs-content {
  font-size: 1.0625rem;
  line-height: 1.8;
  color: #1a1a1a;
  margin-bottom: 40px;
}

.cbs-content h2,
.cbs-content h3,
.cbs-content h4 {
  margin-top: 2em;
  margin-bottom: 0.6em;
  line-height: 1.3;
  color: #111;
}
.cbs-content h2 { font-size: 1.5rem;    font-weight: 700; }
.cbs-content h3 { font-size: 1.25rem;   font-weight: 700; }
.cbs-content h4 { font-size: 1.0625rem; font-weight: 700; }

.cbs-content p  { margin-bottom: 1.4em; }

.cbs-content img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
}

.cbs-content blockquote {
  border-left: 3px solid #e5e7eb;
  margin: 1.8em 0;
  padding: 0.4em 0 0.4em 1.4em;
  color: #4b5563;
  font-style: italic;
}

.cbs-content ul,
.cbs-content ol {
  margin-bottom: 1.4em;
  padding-left: 1.5em;
}
.cbs-content li { margin-bottom: 0.4em; }

.cbs-content a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cbs-content code {
  background: #f3f4f6;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 0.875em;
}

.cbs-content pre {
  background: #f3f4f6;
  padding: 16px 20px;
  border-radius: 4px;
  overflow-x: auto;
  margin-bottom: 1.4em;
}
.cbs-content pre code {
  background: none;
  padding: 0;
  font-size: 0.875rem;
}

.cbs-content table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.4em;
  font-size: 0.9375rem;
}
.cbs-content th,
.cbs-content td {
  padding: 10px 14px;
  border: 1px solid #e5e7eb;
  text-align: left;
}
.cbs-content th {
  background: #f9fafb;
  font-weight: 600;
}

.cbs-page-links {
  margin: 16px 0;
  font-size: 0.875rem;
  color: #6b7280;
}
.cbs-page-links span {
  display: inline-block;
  padding: 4px 10px;
  border: 1px solid #e5e7eb;
  border-radius: 3px;
  margin: 0 3px;
}

/* ── Tags ────────────────────────────────────────────────────────────────── */
.cbs-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding-top: 28px;
  border-top: 1px solid #e5e7eb;
  margin-bottom: 40px;
}

.cbs-tags-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  flex-shrink: 0;
}

.cbs-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.cbs-tag {
  display: inline-block;
  padding: 4px 13px;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 20px;
  font-size: 0.8rem;
  color: #374151;
  text-decoration: none;
  transition: border-color 0.15s, color 0.15s;
}
.cbs-tag:hover {
  border-color: #9ca3af;
  color: #111;
  text-decoration: none;
}

/* ── Prev / Next navigation ──────────────────────────────────────────────── */
.cbs-prevnext {
  margin: 0 0 48px;
  padding: 24px 0;
  border-top: 1px solid #e5e7eb;
  border-bottom: 1px solid #e5e7eb;
}

.cbs-prevnext-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.cbs-prevnext-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
  text-decoration: none;
  transition: opacity 0.15s;
}
.cbs-prevnext-item:hover { opacity: 0.7; text-decoration: none; }

.cbs-prevnext-next {
  text-align: right;
  align-items: flex-end;
}

.cbs-prevnext-dir {
  font-size: 0.72rem;
  font-weight: 700;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.cbs-prevnext-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #111;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── Author box ──────────────────────────────────────────────────────────── */
.cbs-author-box {
  display: flex;
  gap: 20px;
  padding: 24px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  margin-bottom: 48px;
}

.cbs-author-avatar-link { flex-shrink: 0; }

.cbs-author-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #e5e7eb;
  display: block;
}

.cbs-author-info {
  flex: 1;
  min-width: 0;
}

.cbs-author-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.cbs-author-byline {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #9ca3af;
  margin-bottom: 2px;
}

.cbs-author-name {
  font-size: 1.0625rem;
  font-weight: 700;
  color: #111;
  text-decoration: none;
  transition: opacity 0.15s;
}
.cbs-author-name:hover { opacity: 0.7; text-decoration: none; }

.cbs-author-profile-btn {
  display: inline-block;
  padding: 6px 16px;
  border: 1.5px solid #d1d5db;
  border-radius: 3px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #374151;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  transition: border-color 0.15s, color 0.15s;
}
.cbs-author-profile-btn:hover {
  border-color: #9ca3af;
  color: #111;
  text-decoration: none;
}

.cbs-author-bio {
  font-size: 0.9rem;
  line-height: 1.65;
  color: #6b7280;
  margin: 0;
}
.cbs-author-bio p {
  margin: 0 0 0.6em;
}
.cbs-author-bio p:last-child { margin-bottom: 0; }

/* Sidebar variant — stacks avatar above info, full-width button */
.cbs-author-box--sidebar {
  flex-direction: column;
  gap: 14px;
  margin-bottom: 28px;
}
.cbs-author-box--sidebar .cbs-author-header {
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}
.cbs-author-box--sidebar .cbs-author-profile-btn {
  width: 100%;
  text-align: center;
}

/* ── Related articles ────────────────────────────────────────────────────── */
.cbs-related { margin-bottom: 48px; }

.cbs-related-heading {
  font-size: 1.125rem;
  font-weight: 700;
  color: #111;
  margin: 0 0 20px;
  padding-bottom: 14px;
  border-bottom: 2px solid #e5e7eb;
}

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

.cbs-related-card {
  display: block;
  text-decoration: none;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.2s;
}
.cbs-related-card:hover {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
  text-decoration: none;
}

.cbs-related-thumb {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #f3f4f6;
}
.cbs-related-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s;
}
.cbs-related-card:hover .cbs-related-img { transform: scale(1.04); }

.cbs-related-no-img {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #e5e7eb, #f3f4f6);
}

.cbs-related-body { padding: 14px; }

.cbs-related-cat {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #9ca3af;
  margin-bottom: 6px;
}

.cbs-related-card-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: #111;
  line-height: 1.4;
  margin: 0 0 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cbs-related-date {
  font-size: 0.775rem;
  color: #9ca3af;
}

/* ── Sidebar ─────────────────────────────────────────────────────────────── */
.cbs-sidebar {
  position: sticky;
  top: 24px;
  min-width: 0;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .cbs-layout--right-sidebar,
  .cbs-layout--left-sidebar {
    grid-template-columns: 1fr;
  }
  .cbs-layout--left-sidebar .cbs-article { order: 1; }
  .cbs-layout--left-sidebar .cbs-sidebar  { order: 2; }
  .cbs-related-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .cbs-wrap    { padding: 20px 0 48px; }
  .cbs-title   { font-size: 1.625rem; }
  .cbs-author-box    { flex-direction: column; gap: 14px; }
  .cbs-author-avatar { width: 56px; height: 56px; }
  .cbs-related-grid        { grid-template-columns: 1fr; }
  .cbs-prevnext-inner      { grid-template-columns: 1fr; }
  .cbs-prevnext-next       { text-align: left; align-items: flex-start; }
}
