.cases_list {
  padding: 11rem 0px 14rem;
  background-color: #fff;
}
/* filters: label + pill buttons, the active pill in solid orange with graphite text */
.cases_list .filters {
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
  margin-top: 5.6rem;
  padding: 2.8rem 0px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.cases_list .frow {
  display: flex;
  align-items: center;
  gap: 2.4rem;
}
.cases_list .flabel {
  flex-shrink: 0;
  width: 12rem;
  color: var(--text2);
  font-weight: 600;
  font-size: 1.5rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.cases_list .frow ul {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}
.cases_list .frow li[hidden] {
  display: none;
}
.cases_list .frow button {
  padding: 1.1rem 2.2rem;
  border: 1px solid var(--line);
  border-radius: var(--pill);
  color: var(--title);
  font-weight: 500;
  font-size: 1.7rem;
  line-height: 2rem;
  white-space: nowrap;
  background-color: #fff;
  transition: border-color 0.3s, background-color 0.3s, color 0.3s;
}
.cases_list .frow button:hover {
  border-color: var(--title);
}
.cases_list .frow button[aria-pressed='true'] {
  border-color: var(--primary);
  color: #fff;
  font-weight: 600;
  background-color: var(--primary);
}
/* grid */
.cases_list .grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3.2rem;
  margin-top: 5.6rem;
}
.cases_list .item[hidden] {
  display: none;
}
.cases_list .item.show {
  animation: cases_in 0.5s var(--ease) both;
}
@keyframes cases_in {
  from {
    opacity: 0;
    transform: translateY(2rem);
  }
}
.cases_list .card {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 1rem;
  border-radius: var(--radius);
  overflow: hidden;
  background-color: var(--light);
}
.cases_list .card .img {
  position: relative;
  aspect-ratio: 3 / 2;
  border-radius: 1.6rem;
}
.cases_list .card:hover .img img {
  transform: scale(1.04);
}
.cases_list .chip {
  position: absolute;
  left: 2rem;
  top: 2rem;
  padding: 0.7rem 1.4rem;
  border-radius: var(--pill);
  color: #fff;
  font-weight: 600;
  font-size: 1.5rem;
  line-height: 1.6rem;
  background: var(--grad_orange);
}
.cases_list .info {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 2.8rem 2.2rem 2.4rem;
}
/* region line, shown only when the client file gives it */
.cases_list .where {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1.2rem;
  color: var(--text);
  font-weight: 500;
  font-size: 1.5rem;
  line-height: 1.6rem;
}
.cases_list .where::before {
  content: '';
  width: 1.2rem;
  height: 1.5rem;
  background-color: var(--primary);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 15'%3E%3Cpath d='M6 0a6 6 0 0 0-6 6c0 4.2 6 9 6 9s6-4.8 6-9a6 6 0 0 0-6-6Zm0 8.2A2.2 2.2 0 1 1 6 3.8a2.2 2.2 0 0 1 0 4.4Z'/%3E%3C/svg%3E") no-repeat center / contain;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 15'%3E%3Cpath d='M6 0a6 6 0 0 0-6 6c0 4.2 6 9 6 9s6-4.8 6-9a6 6 0 0 0-6-6Zm0 8.2A2.2 2.2 0 1 1 6 3.8a2.2 2.2 0 0 1 0 4.4Z'/%3E%3C/svg%3E") no-repeat center / contain;
}
.cases_list .info h3 {
  font-weight: 500;
  font-size: 2.5rem;
  line-height: 1.25;
  letter-spacing: -0.01em;
}
.cases_list .info p {
  flex: 1;
  margin-top: 1.2rem;
  color: var(--text);
  font-size: 1.8rem;
  line-height: 1.55;
}

/* "View case": same look as .btn_text (the whole card is the link) */
.cases_list .more {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  margin-top: 2.6rem;
  padding-bottom: 0.4rem;
  color: var(--title);
  font-weight: 500;
  font-size: 1.7rem;
  line-height: 2rem;
  background: linear-gradient(var(--primary), var(--primary)) no-repeat 0 100% / 100% 1.5px;
}
.cases_list .more::after {
  content: '';
  width: 1.1rem;
  height: 1.1rem;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 11 11'%3E%3Cpath d='M1 10 10 1M3 1h7v7' fill='none' stroke='%23000' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat center / contain;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 11 11'%3E%3Cpath d='M1 10 10 1M3 1h7v7' fill='none' stroke='%23000' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat center / contain;
  transition: transform 0.35s var(--ease);
}
.cases_list .card:hover .more::after {
  transform: translate(0.2rem, -0.2rem);
}
/* no result */
.cases_list .empty {
  margin-top: 5.6rem;
  padding: 6.4rem 2rem;
  border-radius: var(--radius);
  text-align: center;
  background-color: var(--light);
}
.cases_list .empty[hidden] {
  display: none;
}
.cases_list .empty p {
  color: var(--text);
  font-size: 2rem;
}
.cases_list .empty .reset {
  margin-top: 2rem;
}

@media screen and (max-width: 1024px) {
  .cases_list .grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media screen and (max-width: 768px) {
  .cases_list {
    padding: 48px 0px 64px;
  }
  .cases_list .filters {
    gap: 14px;
    margin-top: 28px;
    padding: 18px 0px;
  }
  /* label above, pills scroll sideways */
  .cases_list .frow {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .cases_list .flabel {
    width: auto;
    font-size: 12px;
  }
  .cases_list .frow ul {
    flex-wrap: nowrap;
    gap: 8px;
    margin: 0px -20px;
    padding: 0px 20px;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .cases_list .frow ul::-webkit-scrollbar {
    display: none;
  }
  .cases_list .frow button {
    padding: 9px 16px;
    font-size: 14px;
    line-height: 18px;
  }
  .cases_list .grid {
    grid-template-columns: 1fr;
    gap: 16px;
    margin-top: 24px;
  }
  .cases_list .card {
    padding: 8px;
    border-radius: 18px;
  }
  .cases_list .card .img {
    border-radius: 12px;
  }
  .cases_list .chip {
    left: 14px;
    top: 14px;
    font-size: 13px;
  }
  .cases_list .info {
    padding: 18px 10px 12px;
  }
  .cases_list .where {
    margin-bottom: 8px;
    font-size: 13px;
  }
  .cases_list .info h3 {
    font-size: 19px;
  }
  .cases_list .info p {
    font-size: 15px;
  }

  .cases_list .more {
    margin-top: 18px;
    font-size: 15px;
  }
  .cases_list .empty {
    margin-top: 24px;
    padding: 40px 20px;
    border-radius: 18px;
  }
  .cases_list .empty p {
    font-size: 16px;
  }
}
