/* Фильтры на странице проповедей (template-parts/sermon-filters.php) */

.sermon-filters {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 27px;
}

/* flex, а не grid: если часть фильтров скрыта, оставшиеся встают по центру */
.sermon-filters__list {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  justify-content: center;
  max-width: 844px;
}

.sermon-filters__card {
  width: 260px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 14px 16px 0;
  border-radius: 12px;
  background: linear-gradient(to bottom, #f1f2f3, rgba(241, 242, 243, 0));
}

.sermon-filters__head {
  display: flex;
  flex-direction: column;
  cursor: pointer;
}

.sermon-filters__title {
  font-size: 15px;
  line-height: 18px;
  font-weight: 600;
  color: rgba(0, 0, 0, 0.8);
}

.sermon-filters__count {
  font-size: 14px;
  line-height: 17px;
  font-weight: 500;
  color: rgba(0, 0, 0, 0.3);
}

.sermon-filters__select {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 41px;
  padding: 9px 41px 9px 18px;
  border: 0;
  border-radius: 100px;
  background: #f1f2f3 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='9' viewBox='0 0 11 9'%3E%3Cpath d='M6.37 8.2a1 1 0 0 1-1.74 0L.18 1.5A1 1 0 0 1 1.05 0h8.9a1 1 0 0 1 .87 1.5z' fill='%23151f25' fill-opacity='.3'/%3E%3C/svg%3E") no-repeat right 18px center / 11px 9px;
  font-family: "Inter", sans-serif;
  font-size: 15px;
  line-height: 23px;
  font-weight: 500;
  color: rgba(18, 23, 39, 0.5);
  text-overflow: ellipsis;
  cursor: pointer;
  transition: background-color 0.2s;
}

.sermon-filters__select:hover {
  background-color: #d9ecff;
}

.sermon-filters__select:focus-visible {
  outline: 2px solid #348dbf;
  outline-offset: 2px;
}

/* выбран конкретный вариант — текст ярче */
.sermon-filters__select.is-selected {
  color: #121727;
}

.sermon-filters__select option {
  color: #121727;
}

.sermon-filters__submit {
  margin-top: 16px;
  font-size: 15px;
  cursor: pointer;
}

/* Линия с мягкой тенью под фильтрами */
.sermon-filters__divider {
  position: relative;
  width: 100%;
  max-width: 940px;
  height: 20px;
  margin-top: 32px;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0));
  -webkit-mask-image: linear-gradient(to right, transparent, #000 15%, #000 85%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 15%, #000 85%, transparent);
}

.sermon-filters__divider::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(0, 0, 0, 0.08) 20%, rgba(0, 0, 0, 0.08) 80%, transparent);
}

.sermon-filters + .sermons-results > .page-content-grid {
  margin-top: 26px;
}

@media screen and (max-width: 648px) {
  .sermon-filters {
    padding: 0 16px;
  }

  .sermon-filters__list {
    flex-direction: column;
    width: 100%;
    gap: 16px;
  }

  .sermon-filters__card {
    width: 100%;
    gap: 16px;
  }
}
