/* filter bar */
.apf-filter-bar {
  display: flex;
  gap: 20px;
  margin-bottom: 15px;
}

.apf-select-box {
  position: relative;
}
.apf-select-box select {
  min-width: 280px;
  padding: 5px 32px 5px 20px;
  border-radius: 100px;
  border: 1px solid #292929;
  background: #fff;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  max-width: 100%;
  appearance: none;
}

.apf-select-box::after {
  content: "";
  position: absolute;
  right: 15px;
  top: 50%;
  width: 8px;
  height: 8px;
  transform: translateY(-50%);
  background: url('./assets/arrow-down.png') no-repeat center / contain;
  pointer-events: none;
}

/* search */
.apf-search-box {
  position: relative;
  flex: 1;
  max-width: 320px;
}

.apf-search-box input#apf-search {
  display: inline-block;
  line-height: 24px;
  color: #292929;
  fill: #fff;
  text-align: left;
  transition: all .3s;
  background-color: #fff;
  border-style: solid;
  border-width: 1px;
  border-color: #292929;
  border-radius: 100px;
  padding: 11px 32px 11px 20px;
  font-family: inherit;
  text-transform: inherit;
  font-size: 16px;
  font-weight: 500;
}

#apf-search-btn {
  all: unset;
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.apf-search-box .apf-icon {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  opacity: 0.7;
}

.apf-search-box .apf-icon:hover, .apf-search-box .apf-icon:focus {
  background: none;
}
.apf-icon img{
    width: 25px;
    height: auto;
}

.apf-results-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 35px;
  padding: 30px 0;
}

/* card */
.apf-card {
  max-width: calc((100% / 4) - 27px);
  width: 100%;
  text-decoration: none;
  border-radius: 12px;
  overflow: hidden;
  background-color: #f2f5f7;
}

.apf-card-image {
  height: 270px;
  width: 100%;
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  position: relative;
  border: 1px solid #f2f5f7;
}

.apf-card-image::after {
  content: "";
  width: 22px;
  height: 22px;
  position: absolute;
  top: 8px;
  right: 8px;
  background-image: url('./assets/post-external-link.svg');
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

.apf-card-heading {
  padding: 15px 20px;
}

.apf-card-heading h3 {
  font-size: 18px;
  font-weight: 600;
  margin: 0;
}

/* spinner */
.spinner-wrapper {
  display: flex;
  width: 100%;
  min-height: 200px;
  justify-content: center;
  align-items: center;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #e5e7eb;
  border-top: 4px solid #9ca3af;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

#apf-load-more-wrapper {
  text-align: center;
  margin-top: 40px;
}

#apf-load-more {
  padding: 12px 24px;
  text-align: center;
  transition: all .3s;
  border: none;
  background: #14532D;
  border-radius: 3px;
  cursor: pointer;
  color: #fff;
  font-family: inherit;
}

/* media queries */

@media (max-width: 1024px) {
  .apf-card {
    max-width: calc((100% / 3) - 24px);
  }
}

@media (max-width: 768px) {
  .apf-filter-bar {
    flex-direction: column;
  }

  .apf-select-box,
  .apf-search-box {
    max-width: 100%;
  }
  .apf-card {
    max-width: calc((100% / 2) - 20px);
  }

  .apf-results-grid {
  justify-content: center;
}
}

@media (max-width: 540px) {
  .apf-card {
    max-width: 280px;
  }
}