:root {
  --card-padding: 3px;
  --card-override-padding: calc(-2 * var(--card-padding));
}

/* All cards */

div.cards {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: space-around;
}

div.card {
  border: 1px solid var(--border-light);
  border-radius: 6px;
  margin: 12px;
  width: 250px;
  text-align: center;
  display: flex;
  box-shadow: none;
  transition: box-shadow 200ms;
}

.card > a {
  display: inline-flex;
  flex-direction: column;
  width: 100%;
  justify-self: stretch;
  align-self: stretch;
}

div.card:hover {
  box-shadow: var(--card-shadow);
  transition: box-shadow 200ms;
}

span.card-title {
  font-family: var(--heading-font);
  font-weight: 500;
  color: var(--heading-normal);
  font-size: 1.25rem;
  margin: auto;
  display: block;
}

div.card p {
  font-size: .9rem;
  line-height: 1.2rem;
  width: 85%;
  margin: auto;
  color: var(--text-normal);
}

div.card-icon {
  margin: 14px auto;
  padding: 0;
}

div.card-icon i {
  vertical-align: middle;
}

div.card-icon i::before {
  color: rgb(var(--app-yellow-primary));
  font-size: 40px;
  padding: 0;
  margin: 0;
}

/* Full cards */

.full-card > a {
  padding: 14px;
}

div.full-card div.card-text {
  display: block;
  padding: 0;
}

.full-card .card-text p {
  line-height: 1.25em;
  margin-top: .75em;
}

div.full-card span.card-title {
  margin-top: 14px;
}

/* Half cards */

div.half-card {
  height: 50px;
  display: flex;
  align-items: center;
}

/* Mini cards */

.mini-card > a {
  padding-left: var(--card-padding);
  padding-right: var(--card-padding);
  justify-content: space-around;
}

div.mini-card {
  width: 150px;
  height: 160px;
  display: flex;
  padding-left: 3px;
  padding-right: 3px;
}

div.mini-card.community-project-card {
  height: 180px;
  border: 1px solid rgb(var(--app-gray-60))
}

.mini-card .card-title {
  font-family: var(--body-font);
  line-height: 110%;
  font-size: 1.1rem;
}

.mini-card .card-icon {
  margin: 5px auto;
  height: 65px;
  background-repeat: no-repeat;
  background-position: center center;
  width: 95%;
}

.mini-card .card-icon.horizontal {
  background-size: 100% auto;
}

.mini-card .card-icon.vertical {
  background-size: auto 100%;
}

.mini-card.community-project-card {
  justify-content: flex-start;
}

.mini-card.community-project-card a {
  justify-content: space-between;
  display: flex;
  padding-bottom: 10px;
}

.mini-card.community-project-card > a::before {
  content: "Community project";

  background-color: rgb(var(--app-gray-60));
  color: white;
  font-size: .9rem;

  border-top-left-radius: 5px;
  border-top-right-radius: 5px;
  padding: 0;
  margin-left: var(--card-override-padding);
  margin-right: var(--card-override-padding);
}

/* ===== FILTERS ===== */

#card-filters > div {
  display: inline;
}

.filters-inline-header {
  margin-right: 15px;
  font-weight: 700;
}

#card-filters a {
  white-space: nowrap;
  display: inline-block;
}

#card-filters a:hover {
  cursor: pointer;
}

#card-filters a:not(:last-child) {
  margin-right: 15px;
}

#card-filters a.filter-active::after {
  content: '';
  display: block;
  width: 100%;
  height: 2px;
  margin-top: -2px;
  background: currentColor;
}