
/* ───────────────────────────────────────────────────────────── */
/* HAL GRID STYLING — WERSJA FINALNA */
/* ───────────────────────────────────────────────────────────── */

.hal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 2rem;
  width: 100%;
  justify-items: center;
  align-items: start;
  grid-column: 1 / -1;
}

.hal-grid > .s-tag-tile {
  max-width: 180px;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  justify-self: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem;
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: 1rem;
  text-decoration: none;
  color: inherit;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hal-grid > .s-tag-tile:hover {
  transform: scale(1.05);
  box-shadow: 0 0 12px rgba(255,0,0,0.2);
}

.s-popular-tags-image {
  width: 100px;
  height: 100px;
  max-width: 100%;
  margin-bottom: 0.75rem;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 0 8px rgba(255, 0, 0, 0.4);
}

.s-popular-tags-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.s-tag-tile span {
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 0.25rem;
  color: var(--color-text-main);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.s-tag-tile small {
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

/* Tryb ciemny */
@media (prefers-color-scheme: dark) {
  .s-tag-tile {
    background-color: rgba(255, 255, 255, 0.06);
    color: #ddd;
  }

  .s-tag-tile:hover {
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.3);
  }

  .s-tag-tile small {
    color: #aaa;
  }
}
