.programs-header {
  margin-top: 13rem;
  padding: 0 var(--wrap);
}

.programs-content {
  padding: 0 var(--wrap);
  margin-top: 0;
}

.programs-page__header {
  border-bottom: 1px solid var(--color-grey-200);
  padding-bottom: 1.5rem;
}

.programs-filter-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.programs-page-filter__results-count {
  font-size: 1.4rem;
  font-weight: 500;
  color: var(--color-blue-200);
  text-align: center;
  line-height: 2ch;
}

/* -----------------------------
   ПОШУК
------------------------------ */
.programs-page-search {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-bottom: 2px solid var(--color-blue-200);
  max-width: 500px;
}

.programs-page-search__input {
  flex: 1;
  border: none;
  outline: none;
  padding: 0.6rem 0rem;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.programs-page-search__input::placeholder {
  font-size: 1.2rem;
}

.programs-page-search__input:focus::placeholder {
  color: transparent;
}

.programs-page-search__input:focus {
  background-color: var(--color-white);
}

.programs-page-search__button {
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  transition: background 0.3s ease;
}

.programs-page-search__button:hover {
  stroke: var(--color-blue-100);
}

.programs-page-search__button svg {
  stroke: var(--color-white);
}

/* -----------------------------
   ФІЛЬТРИ
------------------------------ */
.programs-page-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.5rem;
}

/* Контейнери фільтрів */
.programs-page-filter__wrapper {
  flex: 1;
  min-width: 280px;
  background-color: var(--color-blue-200);
  color: var(--color-white);
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.programs-page-filter__wrapper-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.programs-page-filter__wrapper--faculty,
.programs-page-filter__wrapper--department {
  flex: 2;
  min-width: 500px;
}

.programs-page-categories__list {
  display: flex;
  gap: 0.5rem;
}

.programs-page-categories__item,
.programs-page-categories__reset {
  padding: 0.7rem 0.5rem;
  background-color: var(--color-white);
  font-weight: 600;
  transition: all 0.3s ease;
  cursor: pointer;
}

.programs-page-categories__reset {
  margin-left: 15px;
  color: var(--color-white);
  border: none;
  background-color: transparent;
  padding: 0.3rem 0.1rem;
}

.programs-page-categories__reset:hover {
  color: var(--color-red);
}

.programs-page-categories__item a {
  color: var(--color-blue-200);
  text-decoration: none;
}

.programs-page-categories__item:hover {
  background-color: var(--color-grey-020);
}

.programs-page-categories__item:hover a {
  color: var(--color-blue-100);
}

.programs-page-categories__item.active {
  background-color: var(--color-blue-100);
}

.programs-page-categories__item.active a {
  color: var(--color-white);
}

.programs-page-categories__item a:focus {
  outline: none;
}
.custom-dropdown {
  position: relative;
  user-select: none;
  width: 100%;
}

.custom-dropdown__selected {
  padding: 0.6rem 0.9rem;
  border: 1px solid var(--color-grey-200);
  color: var(--color-blue-200);
  background-color: var(--color-white);
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.3s ease;
}

.custom-dropdown__selected:hover {
  background-color: var(--color-grey-020);
}

.custom-dropdown__arrow {
  transition: transform 0.3s ease;
}

.custom-dropdown.open .custom-dropdown__arrow {
  transform: rotate(180deg);
}

.custom-dropdown__list {
  position: absolute;
  top: calc(100% + 0.2rem);
  left: 0;
  right: 0;
  max-height: 0;
  overflow: hidden;
  border: 1px solid var(--color-grey-200);
  background-color: var(--color-white);
  color: var(--color-blue-200);
  margin: 0;
  padding: 0;
  list-style: none;
  transition: max-height 0.3s ease, opacity 0.3s ease;
  opacity: 0;
  z-index: 20;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.custom-dropdown.open .custom-dropdown__list {
  max-height: 280px;
  overflow-y: auto;
  opacity: 1;
}

.custom-dropdown__item {
  padding: 0.6rem 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.custom-dropdown__item:hover {
  background-color: var(--color-grey-020);
  color: var(--color-blue-100);
}

.department-dropdown .custom-dropdown__selected,
.faculty-dropdown .custom-dropdown__selected {
  min-width: 250px;
  max-width: 100%;
}

.programs-page-filter__buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: flex-end;
}

.programs-page-filter__button {
  flex: 1;
  min-width: 280px;
  max-width: 280px;
  padding: 0.3rem 1.2rem;
  font-weight: 600;
  text-align: center;
  border: 1px solid var(--color-blue-100);
  background: var(--color-white);
  color: var(--color-blue-200);
  cursor: pointer;
  transition: all 0.3s ease;
}

.programs-page-filter__button:hover {
  background: var(--color-blue-100);
  color: var(--color-white);
}
@media (max-width: 992px) {
  .programs-page-filter {
    flex-direction: column;
  }

  .programs-page-search {
    max-width: 100%;
  }

  .programs-page-filter__button {
    width: 100%;
  }
}

.programs-content__list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.programs-content__item {
  position: relative;
  background: var(--color-blue-200);
  border: 1px solid var(--color-grey-200);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  text-align: center;
  transition: all 0.3s ease;
  cursor: pointer;
  height: 200px;
}

.programs-content__item:hover {
  background: var(--color-blue-100);
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2), 0 12px 24px rgba(0, 0, 0, 0.15);
}

.programs-content__item:hover .programs-content__item--label {
  background-color: var(--color-blue-200);
}

.programs-content__item--title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-white);
  position: relative;
  display: inline-block;
  line-height: 3ch;
}

.programs-content__item--title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -10px;
  width: 0;
  height: 2px;
  background-color: var(--color-white);
  transition: width 0.5s ease;
}

.programs-content__item:hover .programs-content__item--title::after {
  width: 100%;
}

.programs-content__item--labels {
  position: absolute;
  top: 10px;
  left: 10px;
}
.programs-content__item--label {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-white);
  background: var(--color-blue-100);
  padding: 0.3rem 0.6rem;
  transition: all 0.3s ease;
  margin-right: 5px;
}
.programs-pagination {
  margin: 2rem 0;
  display: flex;
  justify-content: center;
  gap: 0.8rem;
}
.programs-pagination a,
.programs-pagination span {
  font-size: 1.2rem;
  padding: 0.5rem 0.7rem;
  border: 1px solid var(--color-blue-200);
  color: var(--color-blue-200);
  text-decoration: none;
  transition: all 0.3s ease;
}
.programs-pagination a:hover {
  background-color: var(--color-blue-100);
  color: var(--color-white);
}

.programs-pagination span {
  background-color: var(--color-blue-200);
  color: var(--color-white);
  pointer-events: none;
}

.programs-pagination .next,
.programs-pagination .prev {
  border: none;
}
.programs-pagination .next:hover,
.programs-pagination .prev:hover {
  background-color: transparent;
  color: var(--color-blue-100);
}
@media (max-width: 1200px) {
  .programs-header {
    margin-top: 5rem;
    padding: 0 1rem;
  }

  .programs-page-filter__wrapper--faculty,
  .programs-page-filter__wrapper--department {
    min-width: 400px;
  }

  .programs-content__list {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 0.8rem;
  }

  .programs-content__item {
    height: 180px;
    padding: 0.8rem;
  }

  .programs-content__item--title {
    font-size: 1.3rem;
  }

  .programs-content__item--label {
    font-size: 0.9rem;
    padding: 0.2rem 0.5rem;
  }
}

@media (max-width: 992px) {
  .programs-page-filter {
    flex-direction: column;
  }

  .programs-content__item--title {
    line-height: 3ch;
  }

  .programs-page-filter__wrapper {
    min-width: 100%;
  }

  .programs-page-search {
    max-width: 100%;
  }

  .programs-page-filter__button {
    width: 100%;
  }

  .programs-content__list {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 0.6rem;
  }

  .programs-content__item {
    height: 160px;
  }

  .programs-content__item--title {
    font-size: 1.2rem;
    line-height: 2ch;
  }

  .programs-content__item--label {
    font-size: 0.85rem;
    padding: 0.2rem 0.4rem;
  }
}

@media (max-width: 768px) {
  .programs-header {
    margin-top: 8rem;
  }

  .programs-page-filter__wrapper {
    padding: 0.8rem 1rem;
  }

  .programs-page-search__input {
    font-size: 0.9rem;
  }

  .programs-content__list {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .programs-content__item {
    height: 140px;
  }

  .programs-content__item--title {
    line-height: 1.8ch;
  }

  .programs-content__item--label {
    font-size: 0.8rem;
    padding: 0.15rem 0.3rem;
  }

  .programs-page-filter__results-count {
    font-size: 1.2rem;
  }
}

@media (max-width: 576px) {
  .programs-page-filter__results-count {
    font-size: 1rem;
  }
  .programs-header {
    margin-top: 6rem;
  }
  .programs-content__item--title {
    font-size: 1rem;
    line-height: 2ch;
  }

  .programs-page-search {
    align-items: stretch;
    gap: 0.3rem;
  }

  .programs-page-search__input {
    padding: 0.5rem 0.5rem;
  }

  .programs-page-filter__buttons {
    flex-direction: column;
    gap: 0.5rem;
  }

  .programs-page-filter__button {
    min-width: 100%;
  }

  .programs-content__item {
    height: 120px;
    padding: 0.6rem;
  }

  .programs-content__item--title {
    font-size: 1rem;
  }

  .programs-content__item--label {
    font-size: 0.75rem;
    padding: 0.1rem 0.25rem;
  }
}
