/* ==========================================================================
   Blog — List, Detail, Sidebar
   ========================================================================== */

/* ---------- Blog breadcrumbs / page header ---------- */
.blog .breadcrumbs {
  background: var(--bg-surface);
  min-height: 40vh;
  position: relative;
  padding: 120px 0 60px;
}
.blog .breadcrumbs::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10, 10, 11, 0.7), rgba(10, 10, 11, 0.9));
}
.blog .breadcrumbs .container {
  position: relative;
  z-index: 1;
}
.blog .breadcrumbs h2 {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--text-primary);
}
.blog .breadcrumbs p {
  color: var(--text-secondary);
}
.blog .breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
  gap: 8px;
}
.blog .breadcrumbs ol li + li::before {
  content: '/';
  color: var(--text-tertiary);
  padding-right: 8px;
}
.blog .breadcrumbs ol li a {
  color: var(--brand-light);
}
.blog .breadcrumbs ol li.active {
  color: var(--text-tertiary);
}

/* ---------- Blog card ---------- */
.blog .post-entry,
.blog article.post-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-base);
  height: 100%;
  display: flex;
  flex-direction: column;
}
.blog .post-entry:hover,
.blog article.post-card:hover {
  border-color: var(--glass-border-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.blog .post-entry .post-img,
.blog article.post-card .post-img {
  overflow: hidden;
  aspect-ratio: 16/10;
}
.blog .post-entry .post-img img,
.blog article.post-card .post-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}
.blog .post-entry:hover .post-img img,
.blog article.post-card:hover .post-img img {
  transform: scale(1.05);
}
.blog .post-entry .post-content,
.blog article.post-card .post-content {
  padding: 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.blog .post-entry .post-title,
.blog article.post-card .post-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
  line-height: 1.4;
}
.blog .post-entry .post-title a,
.blog article.post-card .post-title a {
  color: var(--text-primary);
  transition: color var(--transition-fast);
}
.blog .post-entry .post-title a:hover,
.blog article.post-card .post-title a:hover {
  color: var(--brand-light);
}
.blog .post-category {
  display: inline-flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.blog .post-category a,
.blog .post-category span {
  display: inline-block;
  padding: 2px 10px;
  background: rgba(0, 168, 90, 0.1);
  border: 1px solid rgba(0, 168, 90, 0.2);
  border-radius: 100px;
  font-size: 0.75rem;
  color: var(--brand-light);
  font-weight: 500;
  transition: all var(--transition-fast);
}
.blog .post-category a:hover {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}
.blog .post-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.8rem;
  color: var(--text-tertiary);
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
}
.blog .post-meta .post-author-img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
}

/* ---------- Blog detail article ---------- */
.blog article {
  color: var(--text-secondary);
}
.blog article .post-img {
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 24px;
}
.blog article .post-img img {
  width: 100%;
  height: auto;
}
.blog article .title {
  font-size: 1.75rem;
  font-weight: 800;
  margin-bottom: 20px;
}
.blog article .title a {
  color: var(--text-primary);
  transition: color var(--transition-fast);
}
.blog article .title a:hover {
  color: var(--brand-light);
}
.blog article .post-content {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.8;
}
.blog article .post-content h1,
.blog article .post-content h2,
.blog article .post-content h3,
.blog article .post-content h4 {
  color: var(--text-primary);
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}
.blog article .post-content a {
  color: var(--brand-light);
  text-decoration: underline;
}
.blog article .post-content img {
  border-radius: var(--radius-md);
  margin: 1rem 0;
  max-width: 100%;
  height: auto;
}
.blog article .post-content blockquote {
  border-left: 3px solid var(--brand-light);
  padding: 16px 24px;
  margin: 1.5rem 0;
  background: var(--glass-bg);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  color: var(--text-secondary);
  font-style: italic;
}
.blog article .post-content pre {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-left: 3px solid var(--brand);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  overflow-x: auto;
  color: var(--text-primary);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.875rem;
  white-space: pre-wrap;
}
.blog article .post-content code {
  background: var(--bg-surface);
  padding: 0.15em 0.4em;
  border-radius: var(--radius-sm);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.875em;
  color: var(--accent-teal);
}
.blog article .post-content pre code {
  background: none;
  padding: 0;
  color: inherit;
}
.blog article .post-author-img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border-medium);
}

/* Tags in detail */
.blog .blog-details .meta-top {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  color: var(--text-tertiary);
  font-size: 0.85rem;
}
.blog .blog-details .meta-top i {
  color: var(--brand-light);
  margin-right: 4px;
}

/* ---------- Sidebar ---------- */
.blog .sidebar {
  position: sticky;
  top: 100px;
}
.blog .sidebar .sidebar-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--brand);
}
.blog .sidebar .sidebar-item {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  margin-bottom: 20px;
}
/* Recent posts */
.blog .sidebar .recent-posts .post-item {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-subtle);
}
.blog .sidebar .recent-posts .post-item:last-child {
  border-bottom: none;
}
.blog .sidebar .recent-posts .post-item img {
  width: 64px;
  height: 48px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}
.blog .sidebar .recent-posts .post-item h4 {
  font-size: 0.85rem;
  font-weight: 600;
  margin: 0 0 4px;
}
.blog .sidebar .recent-posts .post-item h4 a {
  color: var(--text-primary);
  transition: color var(--transition-fast);
}
.blog .sidebar .recent-posts .post-item h4 a:hover {
  color: var(--brand-light);
}
.blog .sidebar .recent-posts .post-item time {
  font-size: 0.75rem;
  color: var(--text-tertiary);
}
/* Categories */
.blog .sidebar .categories ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.blog .sidebar .categories ul li {
  padding: 8px 0;
  border-bottom: 1px solid var(--border-subtle);
}
.blog .sidebar .categories ul li:last-child {
  border-bottom: none;
}
.blog .sidebar .categories ul li a {
  color: var(--text-secondary);
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  transition: color var(--transition-fast);
}
.blog .sidebar .categories ul li a:hover {
  color: var(--brand-light);
}
.blog .sidebar .categories ul li a span {
  background: rgba(0, 168, 90, 0.1);
  color: var(--brand-light);
  padding: 1px 8px;
  border-radius: 100px;
  font-size: 0.75rem;
}
/* Tags */
.blog .sidebar .tags ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.blog .sidebar .tags ul li a {
  display: inline-block;
  padding: 4px 12px;
  background: var(--glass-bg);
  border: 1px solid var(--border-subtle);
  border-radius: 100px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}
.blog .sidebar .tags ul li a:hover {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

/* ---------- Pagination ---------- */
.blog .pagination {
  margin-top: 24px;
}
.blog .pagination .page-link {
  background: var(--glass-bg);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 8px 14px;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}
.blog .pagination .page-link:hover {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}
.blog .pagination .active .page-link {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

/* ---------- Comments ---------- */
.blog .comments {
  margin-top: 2rem;
}
.blog .comments .comment {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-bottom: 12px;
}
.blog .comments .comment .comment-img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  margin-right: 12px;
}
.blog .comments .comment h5 {
  font-size: 0.9rem;
  color: var(--text-primary);
  margin: 0 0 2px;
}
.blog .comments .comment time {
  font-size: 0.75rem;
  color: var(--text-tertiary);
}
.blog .comments .comment p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin: 8px 0 0;
}
