.tags-page {
  margin: 0 auto;
  padding: 1.5rem 1rem;
}

/* Skeleton Loader */
.tags-skeleton {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.tag-skeleton-block {
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
}

.skeleton-heading {
  height: 28px;
  width: 150px;
  margin-bottom: 1rem;
}

.skeleton-item {
  height: 48px;
  margin-bottom: 0.75rem;
  border-radius: 8px;
}

.tags-header {
  margin-top: 42px;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.tags-header h2 {
  margin: 6px 0;
}

.tags-header h2::before {
  display: none;
}

/* Description */
.tags-description {
  color: var(--text-secondary);
  margin-top: 0.5rem;
}

/* Tags list */
.tags-container {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.tag-block {
  border-top: 1px solid var(--border);
}

.tag-posts {
  list-style: none;
  padding-left: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.tag-posts li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.875rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: all 0.2s ease;
}

.tag-posts li:hover {
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transform: translateY(-1px);
}

.tag-posts a {
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 500;
  flex: 1;
  transition: color 0.2s ease;
}

.tag-posts a:hover {
  color: var(--primary);
}

/* Post date */
.post-date {
  font-size: 0.85rem;
  color: var(--muted);
  white-space: nowrap;
}

/* Active tag block */
.tag-block.active > h2::before {
  display: none !important;
}

.tag-heading {
  scroll-margin-top: 80px;
  transition: background-color 0.3s ease;
  border-radius: 6px;
}

.tag-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: #fff;
  background: var(--primary);
  min-width: 1.35rem;
  height: 1.35rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  margin-left: 0.35rem;
  vertical-align: middle;
  line-height: 1;
}

/* Active state styling */
.tag-block.active > .tag-heading {
  background-color: var(--tag-bg);
  color: var(--tag-text);
  border-left: 4px solid var(--primary);
  padding-left: 20px;
  margin-left: -14px;
}

@media (max-width: 767px) {
  .tags-container {
    gap: 1.5rem;
  }

  .tag-posts li {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
  }

  .tag-posts .post-date {
    align-self: flex-end;
  }
  h2 {
    margin-top: 32px;
  }
}


