
.resource-listing{
  position: relative;
}

/* Top Section */
.resource-listing__top{
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 3rem;
}

.resource-listing__top h5{
  margin-bottom: 0.5rem;
}

.resource-listing__search{
  position: relative;
}

.resource-listing__search-results{
  position: absolute;
  margin-top: 1rem;
  width: 100%;
  background-color: #fff;
  padding: 1rem;
  z-index: 10;
}

.resource-listing__search-results:has(.resource-listing__search-results-wrapper:empty){
  display: none;
}

.resource-listing__search-results-header{
  margin-bottom: 0.5rem;
}

#search-results-query{
  font-weight: 500;
  font-style: italic;
  color: var(--primary-color);
}

.resource-listing__search-results-wrapper{
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}


.resource-listing__search input{
  width: 100%;
  padding: 1rem;
  background-color: var(--light-color);
  border: none;
  border-radius: 0;
}

.resource-listing__search-icon{
  position: absolute;
  right: 1rem;
  top: 3rem;
}

.resource-listing__content-filters > div{
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.resource-listing__content-filters .content-filter{
  position: relative;
  border: 1px solid var(--primary-color);
  color: var(--primary-color);
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  padding: 6px 12px;
}

.resource-listing__content-filters .content-filter input{
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.resource-listing__content-filters .content-filter:has(input:checked),
.resource-listing__content-filters .content-filter:hover{
  background-color: var(--secondary-color);
  border: 1px solid var(--secondary-color);
  color: var(--light-color);
  transition: all 0.3s ease;
}

@media screen and (max-width: 767px){
  .resource-listing__top{
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

/* Filters */
.resource-listing__filters{
  display: flex;
  flex-direction: row;
  gap: 3rem;
  margin-top: 1.5rem;
}

.filter{
  position: relative;
}

.filter__header{
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
}

.filter__header > h5{
  margin: 0;
}

.filter__header > input{
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.filter__options{
  position: absolute;
  top: 100%;
  left: 0;
  width: 250px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  background-color: var(--light-color);
  z-index: -1;
  transition: all 0.3s ease;
}

.filter__header:has(input:checked) > span{
  transform: rotate(90deg);
}

.filter__header:has(input:checked) + .filter__options{
  z-index: 10;
  opacity: 1;
  max-height: 1000px;
  transition: all 0.3s ease;
}

.resource-listing__filters-clear{
  display: inline-block;
  width: fit-content;
  padding: 0.5rem 1rem;
  line-height: 1;
  font-size: 12px;
  font-weight: 500;
  color: var(--dark-color);
  background-color: rgba(6, 114, 203, 0.10);
}

@media screen and (max-width: 767px){
  .resource-listing__filters{
    flex-direction: column;
    gap: 1rem;
  }

  .filter__header{
    width: 100%;
    justify-content: space-between;
  }
}


/* Resources Listing */
.resource-listing__resources{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3rem 1.5rem;
  margin-top: 3rem;
}

.pager__wrapper{
  margin-top: 8rem;
}

.isotope-pager a{
  display: flex;
  justify-content: center;
  align-items: center;
  line-height: 1;
  width: 2rem;
  height: 2rem;
  font-size: 14px;
  font-weight: 600;
  color: var(--dark-color);
}

.isotope-pager a.active{
  border-radius: 0;
}

/* Resource Cards */
.resource-card{
  position: relative !important;
  top: 0 !important;
  left: 0 !important;
  height: fit-content !important;
}

.resource-card__image{
  position: relative;
}

.resource-card__image--media-type{
  position: absolute;
  top: 1rem;
  left: 1rem;
  background-color: var(--dark-color);
  color: var(--light-color);
  padding: 0.5rem 1rem;
  letter-spacing: 0.48px;
  font-size: 0.75rem;
  font-weight: 500;
}

.resource-card img{
  width: 100%;
  aspect-ratio: 1.84;
  object-fit: cover;
  object-position: center;
}

.resource-card__content{
  margin-top: 1.25rem;
}

.resource-card__category{
  font-weight: 500;
  letter-spacing: 0.32px;
  color: var(--secondary-color);
  margin-bottom: 0.5rem;
}

.resource-card__content h4{
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--dark-color);
  margin-bottom: 1rem;
}

.resource-card__link{
  display: inline-block;
  text-decoration: underline;
}

@media screen and (max-width: 767px){
  .resource-listing__resources{
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}
