/* Override card-box to display news cards at 100% width for row layout */
.newsList .card-box .card {
  flex: 0 0 100%;
}

.newsList .card-content img {
    width: 200px;
    aspect-ratio: 1/1;
    height: 100%;
    object-fit: cover;
  }

.newsList .card-content {
  max-height: 200px;
  flex-direction: row;
}

.tag-filter-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0 20px 20px 20px;
  box-sizing: border-box;
  width: 100%;
  align-items: center;
  justify-content: center;
}

.category-toggle {
  display: none;
}

#categoryBack {
  display: none;
}

.tag-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

@media (max-width: 768px) {
  .tag-filter-wrapper {
    flex-wrap: nowrap;
    gap: 0;
    position: relative;
  }

  .category-toggle {
    display: block;
  }

  #categoryBack {
    display: block;
  }

  .tag-filters {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    position: fixed;
    right: -100%;
    top: 0;
    bottom: 0;
    width: 20ch;
    height: auto;
    background: var(--element-bkg);
    box-shadow: var(--shadow-element);
    padding: 1rem;
    z-index: 1000;
    transition: right 0.3s ease;
    overflow-y: auto;
  }

  .tag-filters.open {
    right: 0;
  }

  .tag-filters a {
    width: 100%;
  }

  .tag-filters button {
    width: 100%;
    justify-content: flex-start;
  }
}
