/* Category Card Grid */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  padding: 1rem 0 2rem;
}

.category-card {
  --accent: #4A90D9;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  text-decoration: none;
  color: inherit;
}

.category-card-img {
  width: 100%;
  height: 180px;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.category-card-img img {
  max-height: 120px;
  max-width: 80%;
  filter: brightness(0) invert(1);
  opacity: 0.9;
}

.category-card-body {
  padding: 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.category-card-body h3 {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
  color: #333;
}

.category-card-body p {
  margin: 0 0 1rem;
  font-size: 0.9rem;
  color: #666;
  line-height: 1.5;
  flex: 1;
}

.category-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
}

.category-card-count {
  color: var(--accent);
  font-weight: 600;
}

.category-card-arrow {
  color: var(--accent);
  font-weight: 600;
  transition: transform 0.2s ease;
}

.category-card:hover .category-card-arrow {
  transform: translateX(4px);
}

/* Category page header */
.category-header {
  text-align: center;
  margin-bottom: 2rem;
}

.category-header .category-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.75rem;
}

.category-header .category-icon img {
  max-height: 48px;
  max-width: 48px;
  filter: brightness(0) invert(1);
  opacity: 0.9;
}

.category-header h1 {
  margin-bottom: 0.25rem;
}

.category-header p {
  color: #666;
  font-size: 1.05rem;
}

/* Responsive */
@media (max-width: 576px) {
  .category-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .category-card-img {
    height: 140px;
  }
}

@media (min-width: 577px) and (max-width: 768px) {
  .category-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
