/* PROFESSIONAL TAG SYSTEM */
.tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.8rem 0;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 500;
  color: white;
  background: var(--tag-color, #64748b);
  border: 1px solid rgba(100, 116, 139, 0.3);
  transition: all 0.2s ease;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.tag:hover {
  background: color-mix(in srgb, var(--tag-color, #64748b) 85%, black);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.tag-icon {
  font-size: 0.85em;
  line-height: 1;
  opacity: 0.9;
}

.tag-name {
  font-family: 'Rubik', sans-serif;
  letter-spacing: 0.01em;
  font-weight: 500;
}

.tag-count {
  background: rgba(255, 255, 255, 0.25);
  border-radius: 10px;
  padding: 0.1rem 0.4rem;
  font-size: 0.7em;
  font-weight: 600;
  margin-left: 0.2rem;
}

/* Tag Sizes */
.tag-small {
  padding: 0.2rem 0.5rem;
  font-size: 0.7rem;
  border-radius: 15px;
}

.tag-small .tag-icon {
  font-size: 0.8em;
}

.tag-medium {
  padding: 0.3rem 0.7rem;
  font-size: 0.8rem;
  border-radius: 20px;
}

.tag-large {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  border-radius: 25px;
}

.tag-large .tag-icon {
  font-size: 1.1em;
}

/* Clickable Tags */
.tag-clickable {
  cursor: pointer;
  user-select: none;
}

.tag-clickable:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
  filter: brightness(1.08);
}

.tag-clickable:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.tag-clickable:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

/* Tag Filter State */
.tag-active {
  background: var(--logo-colorgradient-full) !important;
  color: white !important;
}

.tag-active:hover {
  background: var(--logo-colorgradient-full) !important;
  filter: brightness(1.1);
}

.tag-inactive {
  opacity: 0.5;
  filter: grayscale(0.3);
}

/* Tag Search/Filter Components */
.tag-filter-container {
  margin-bottom: 1.5rem;
}

.search-container {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.tag-search {
  flex: 1;
  max-width: 400px;
  padding: 0.6rem 1rem;
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius);
  background: var(--surface);
  color: var(--text-primary);
  font-size: 1rem;
  transition: var(--transition);
}

.tag-search:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: var(--shadow-hover);
}

.tag-search::placeholder {
  color: var(--text-muted);
}

.tag-filter-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.tag-stats {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.clear-filters-btn {
  background: var(--text-muted);
  color: white;
  border: none;
  padding: 0.4rem 0.8rem;
  border-radius: 15px;
  font-size: 0.75rem;
  cursor: pointer;
  transition: var(--transition);
}

.clear-filters-btn:hover {
  background: var(--accent-color);
  transform: translateY(-1px);
}

/* Responsive Design */
@media (max-width: 768px) {
  .tags-container {
    gap: 0.4rem;
  }
  
  .tag {
    padding: 0.25rem 0.6rem;
    font-size: 0.75rem;
  }
  
  .tag-large {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
  }
  
  .tag-filter-grid {
    gap: 0.4rem;
  }
  
  .tag-search {
    font-size: 0.9rem;
    padding: 0.5rem 0.8rem;
  }
  
  .search-container {
    flex-direction: row;
    align-items: center;
    gap: 0.8rem;
  }
  
  .tag-search {
    flex: 1;
    max-width: none;
    min-width: 0;
  }
}

@media (max-width: 480px) {
  .tag {
    padding: 0.2rem 0.5rem;
    font-size: 0.7rem;
    border-radius: 15px;
  }
  
  .tag-icon {
    font-size: 0.8em;
  }
  
  .tag-search {
    width: 100%;
  }
  
  .tag-stats {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
}

/* Animation for tag filtering */
@keyframes tagFadeIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.tag-filter-animation {
  animation: tagFadeIn 0.3s ease-out;
}


/* Additional card styles for tag integration */
.project-meta,
.blog-meta {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 0.8rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.project-year,
.read-time {
  background: rgba(255, 255, 255, 0.1);
  padding: 0.2rem 0.5rem;
  border-radius: 10px;
  font-weight: 500;
}

.project-status {
  padding: 0.2rem 0.5rem;
  border-radius: 10px;
  font-weight: 500;
  text-transform: capitalize;
}

.status-completed {
  background: var(--success-color);
  color: white;
}

.status-in-progress {
  background: var(--accent-color);
  color: white;
}

.status-draft {
  background: var(--text-muted);
  color: white;
}

.tags-container-wrapper {
  margin: 0.5rem 0;
}

.card-actions {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.no-results {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem;
  background: var(--surface);
  border-radius: var(--border-radius);
  border: 2px dashed var(--border-color);
}

.no-results h3 {
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  font-size: 1.2rem;
}

.no-results p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.tag-filter-section {
  margin-bottom: 1rem;
}

.tag-filter-section h4 {
  color: var(--text-primary);
  font-size: 1rem;
  margin-bottom: 0.8rem;
  font-weight: 600;
}

/* Detail page styles */
.project-header,
.article-header {
  border-bottom: 1px solid var(--border-color);
}

.project-header h1,
.article-header h1 {
  color: var(--text-primary);
  font-size: 2.5rem;
  margin-bottom: 1rem;
  font-weight: 700;
  line-height: 1.2;
}

.project-meta,
.article-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.project-client,
.author {
  background: rgba(255, 255, 255, 0.1);
  padding: 0.2rem 0.6rem;
  border-radius: 12px;
  font-weight: 500;
}

/* Minimal meta items styling for blog articles */
.meta-item {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 500;
  position: relative;
}

.meta-item:not(:last-child)::after {
  content: "•";
  margin: 0 0.75rem;
  color: var(--text-muted);
  font-weight: normal;
}

.article-meta,
.blog-meta {
  align-items: center !important;
  flex-direction: row !important;
  gap: 0 !important;
}

.project-tags-container,
.article-tags-container {
  margin-top: 1rem;
}

/* Responsive detail pages */
@media (max-width: 768px) {
  .project-header h1,
  .article-header h1 {
    font-size: 2rem;
  }
  
  .project-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  
  .article-meta,
  .blog-meta {
    flex-direction: row !important;
    align-items: center !important;
    gap: 0 !important;
    flex-wrap: wrap;
  }
  
  .meta-item {
    font-size: 0.8rem;
  }
  
  .meta-item:not(:last-child)::after {
    margin: 0 0.5rem;
  }
}

@media (max-width: 480px) {
  .project-header h1,
  .article-header h1 {
    font-size: 1.8rem;
  }
}