.catalog {
  position: relative;
  padding: 40px 0 80px;
}

.catalog .wrap {
  display: flex;
  align-items: flex-start;
  gap: 20px;
}

.catalog__wrap {
  display: flex;
  flex-direction: column;
  position: relative;
  width: 100%;
}

#filterForm {
  min-width: 320px;
  max-width: 320px;
  float: left;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
}

.all-posts-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  width: 100%;
}

.all-posts-section.loading {
  opacity: 0.5;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

/* Card */
.post-item {
  /* box-shadow: 0px 0px 21px -12px #787878; */
  background: #f8f8f8;
  border-radius: 24px;
  overflow: hidden;
  transition: 0.4s;
}

.post-item > a {
  display: grid;
  grid-template-columns: 35% 65%;
  height: 100%;
  min-height: 200px;
}

.post-item__content {
  position: relative;
  padding: 16px;
}

.post-item h2 {
  display: block;
  font-size: 20px;
  font-weight: 700;
  line-height: 28px;
  transition: 0.3s ease;
  color: #000000;
  margin: auto;
  margin-bottom: 10px;
  text-transform: none;
  text-align: left !important;
}

.school-meta {
  display: grid;
  gap: 8px;
  /* grid-template-columns: 50% 46%;
  grid-column-gap: 4%; */
  /* color: #1b3054;
  padding-bottom: 23px; */
}

.school-meta p {
  display: flex;
  gap: 6px;
  font-weight: 400;
  margin: 0;
  font-size: 14px;
  color: #000;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.school-meta p span {
  color: #b2b2b2;
  margin-right: 4px;
  font-size: 14px;
  font-weight: 300;
  white-space: nowrap;
  -webkit-line-clamp: 1;
}

.school-meta strong {
  font-size: 16px;
  color: #fff;
  background: #d41022;
  font-weight: 500;
  border-radius: 6px;
  padding: 5px;
  font-size: 12px;
  margin-bottom: 6px;
  margin: -9px;
  margin-bottom: 5px;
  display: block;
}

.post-thumb {
  height: 100%;
  position: relative;
}

.post-thumb img {
  object-fit: cover;
  object-position: center;
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
}

.post-item:hover {
  box-shadow: rgba(149, 157, 165, 0.2) 0px 8px 24px;
}

/* Filter */
.filter-item {
  width: 100%;
  display: block;
  padding: 12px 16px 16px 16px;
  border-radius: 10px;
  background: rgba(242, 242, 242, 1);
}

.filter-item__title {
  display: block;
  margin-bottom: 12px;
}

.filterForm__list {
  max-height: 140px;
  overflow-y: auto;
  padding-right: 12px;
}

.filterForm__list::-webkit-scrollbar {
  width: 5px;
}

.filterForm__list::-webkit-scrollbar-track {
  background: rgba(236, 236, 236, 1);
}

.filterForm__list::-webkit-scrollbar-thumb {
  background-color: #d41022;
  border-radius: 6px;
}

.filterForm__list {
  margin-top: 0px;
  z-index: 10;
  overflow-y: auto;
  list-style: none;
  margin: 0;
  cursor: pointer;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.filterForm__list::-webkit-scrollbar {
  display: none;
}

.filter-item label {
  display: inline-flex;
  align-items: center;
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  line-height: 18px;
  background: #fff;
  width: fit-content;
  cursor: pointer;
}

/* .custom-dropdown .options li label {
  cursor: pointer;
} */

.filter-item label input {
  display: none;
}

.filter-item label:hover {
  background-color: #d41022;
  color: fff;
}

.filter-item label.active {
  background-color: #d41022;
  color: #fff;
  /* order: -1; */
}

.custom-dropdown .selected,
.pole input,
.pole textarea,
.pole select {
  border: none;
  font-family: "Montserrat";
  font-size: 18px;
  padding: 10px 10px;
  width: 100%;
  background: #f3f3f3;
  color: #1b3054;
  margin-top: 6px;
  margin-bottom: 30px;
  position: relative;
  z-index: 2;
  max-height: 150px;
  border-radius: 6px;
  /* display: none; */
}

/* Preloader */
.zaglyshka {
  display: none;
  text-align: center;
  font-size: 30px;
  padding: 20px;
  justify-content: center;
  flex-direction: column;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  position: fixed;
  background: rgb(255 255 255 / 77%);
  z-index: 4;
}

.zaglyshka.active {
  display: block;
}

.btn-filter {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #ccc;
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  margin: 0 0 12px auto;
  background-color: transparent;
  gap: 8px;
  color: #000;
}

.btn-filter svg {
  width: 16px;
  height: 16px;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 64px;
  list-style: none;
  padding: 0;
}

.pagination a,
.pagination span {
  font-size: 16px;
  line-height: 1;
  border-radius: 1px;
  text-decoration: none;
  transition: all 0.3s ease;
  background: transparent;
  /* border: 1px solid #282a2d; */
  /* color: #fff; */
  height: 40px;
  width: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8f8f8;
  color: #000;
  border-radius: 8px;
}

.pagination a:hover,
.pagination span:hover {
  background: #d41022;
}

.pagination .current {
  background: #d41022;
  color: #fff;
  pointer-events: none;
}

.pagination .prev,
.pagination .next {
  font-weight: bold;
}

@media (max-width: 1200px) {
  .catalog .wrap {
    flex-direction: column;
  }

  #filterForm {
    position: fixed;
    background: #fff;
    z-index: 100;
    height: 100vh;
    justify-content: flex-start;
    padding: 16px;
    top: 0;
    left: 0;
    transition: 0.5s ease;
    transform: translateX(-100%);
  }

  #filterForm.active {
    transform: translateX(0%);
  }

  .btn-filter {
    display: flex;
  }

  .post-thumb,
  .post-thumb img {
    min-height: auto;
    height: 100%;
  }
}

@media (max-width: 767px) {
  .pagination a,
  .pagination span {
    padding: 6px 10px;
    font-size: 14px;
  }

  .school-meta p {
    line-height: 1.2;
  }
}
