.mainSection {
  min-height: 100vh;
  padding: 60px 0 100px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
}

/* search section */

.searchSection {
  position: sticky;
  width: 80%;
  height: 45px;
  padding: 0 30px;
  border: 1px solid #eaeaea;
  border-radius: 23px;
  font-size: 16px;
  color: #4b4b4b;
  display: flex;
  align-items: center;
  gap: 10px;
}

.searchSection input {
  height: 100%;
  flex: 1;
  background: none;
  border: none;
  font-family: "Inter";
}

.searchSection input:focus {
  outline: none;
}

/* project section */

.projectSection {
  width: 80%;
  display: flex;
  gap: 60px;
}

/* projects filter */

.filterSection {
  /* position: sticky;
  top: 20px; */
  height: fit-content;
  max-width: 300px;
  flex: 1 1 200px;
  color: #222b3a;
  letter-spacing: 1px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.filterHeaders {
  padding: 5px 0 15px;
  border-bottom: 1px solid #eaeaea;
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.filterHeader {
  font-weight: 600;
  font-weight: 15px;
}

.filterClear {
  color: #f35163;
  cursor: pointer;
}

.filterContainer {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.filter {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.filter span {
  font-weight: 600;
  line-height: 1.5;
  padding: 5px 0;
}

.filterTitle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  padding: 2px 0;
}

.filterTitle .fa-caret-up {
  transition: transform 0.3s ease;
}

.filterTitle .fa-caret-up.active {
  transition: transform 0.3s ease;
  transform: rotate(180deg);
}

.filter select,
.filter input[type="date"] {
  width: 100%;
  padding: 10px;
  border: none;
  background-color: #f5f5f5;
  border-radius: 7px;
  font-family: "Inter";
}

.filter select {
  padding: 0 10px;
}

.filter select:focus,
.filter input[type="date"]:focus {
  outline: none;
}

/* Target the Select2 container */
.select2-container {
  padding: 0 !important;
}
.select2-container .select2-selection--single {
  height: auto;
  padding: 0 10px !important;
  border: none !important;
  background-color: #f5f5f5 !important;
  color: #000 !important;
  font-size: 13px !important;
  border-radius: 7px !important;
  font-family: "Inter", sans-serif !important;
  display: flex;
  align-items: center;
}

/* change color of placeholder */
.select2-container--default
  .select2-selection--single
  .select2-selection__placeholder {
  color: #000 !important;
}

.select2-container--default .select2-selection__arrow {
  top: 5px !important;
  right: 10px;
}

/* Ensure full width */
.select2-container {
  width: 100% !important;
}

.filter label {
  display: flex;
  align-items: center;
  line-height: normal;
  letter-spacing: 0.4px;
}

.filter label .labelText {
  font-weight: normal;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.filter input[type="checkbox"],
.filter input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  min-width: 18px;
  height: 18px;
  border: 2px solid #d1d5db;
  margin-right: 10px;
  border-radius: 4px;
  position: relative;
  background-color: white;
  transition: all 0.2s ease;
  cursor: pointer;
}

.filter input[type="radio"] {
  border-radius: 50%;
}

.filter input[type="checkbox"]:checked,
.filter input[type="radio"]:checked {
  border: 2px solid #6951f3;
}

.filter input[type="checkbox"]:checked::after,
.filter input[type="radio"]:checked::after {
  content: "✔";
  color: #6951f3;
  font-size: 12px;
  position: absolute;
  left: 3px;
  top: -1px;
}

.filter input[type="radio"]:checked::after {
  content: "•";
  top: -9px;
  left: 1.9px;
  font-size: 24px;
}

.closeFilter {
  display: none;
}

/* projects container */

.projectsContainer {
  max-width: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.projectsTop {
  display: flex;
  align-items: center;
  gap: 15px;
  overflow: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.projectsTop::-webkit-scrollbar {
  display: none;
}

.projectsTop:first-child {
  scroll-snap-align: start;
}

.topFilter {
  padding: 0 0 10px;
  cursor: pointer;
}

.topFilter.active {
  color: #6951f3;
  border-bottom: 2px solid #6951f3;
  font-weight: 600;
}

.topFilter:hover {
  color: #6951f3;
  transition: color 0.4s linear;
}

.projectsBottom {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.projectsSort {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap-reverse;
  gap: 30px;
}

.projectsCount {
  white-space: nowrap;
}

.projectsCount span {
  padding: 0 5px;
  font-weight: 600;
}

.projectsSortInputs {
  display: flex;
  gap: 15px;
}

.sort {
  min-width: 120px;
  height: 40px;
  padding: 0 10px;
  border: 1px solid #e5e7eb;
  border-radius: 5px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.sort span {
  white-space: nowrap;
}

.projectsSort select {
  width: 100%;
  border: none;
  background: none;
  font-family: "Inter";
}

.projectsSort select:focus {
  outline: none;
}

.downloadButton a {
  width: 120px;
  height: 40px;
  padding: 0 10px;
  border-radius: 5px;
  background-color: #000;
  color: white;
  display: flex;
  justify-content: space-around;
  align-items: center;
}

.filterButton {
  display: none;
}

/* projects */

.projects {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 50px;
}

.project {
  position: relative;
  min-width: 250px;
  flex: 1 1 350px !important;
  display: flex;
  flex-direction: column;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  cursor: pointer;
}

.projectTop {
  padding: 20px;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  flex-direction: column;
  gap: 7px;
  line-height: 1.5;
}

.projectName {
  font-size: 17px;
  font-weight: 600;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-height: 1.4em;
  height: calc(1.4em * 2);
  overflow: hidden;
  text-overflow: ellipsis;
}

.projectOrganization {
  font-size: 13px;
  color: #6951f3;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  line-height: 1.2em;
  height: calc(1.2em * 1);
  overflow: hidden;
  text-overflow: ellipsis;
}
.projectBottom {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.projectDes {
  font-size: 13px;
  font-weight: 400;
  color: #4b4b4b;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  min-height: calc(1.2em * 2); /* 1.2em line height times number of lines */
  overflow: hidden;
  text-overflow: ellipsis;
}

.projectExtra {
  padding-bottom: 20px;
  display: flex;
  flex-wrap: wrap-reverse;
  justify-content: space-between;
  align-items: center;
  gap: 15px 10px;
}

.projectButton a {
  width: 120px;
  height: 40px;
  border-radius: 23px;
  font-size: 13px;
  background: #000;
  color: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  text-transform: capitalize;
}

.projectButton a:hover {
  background-color: #f35163;
  transition: 0.4s all forwards;
}

.projectDate {
  color: #757474;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.projectFlag {
  min-width: 20px;
  height: 20px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0 5px;
}

.projectFlag.Green {
  color: #4caf50;
  background-color: #f3faf7;
}

.projectFlag.Red {
  color: #f44336;
  background-color: #fdf2f2;
}

.projectFlag.Orange {
  color: #f8794b;
  background-color: #fcf0e1;
}

.projectFlag.Yellow {
  color: #e7d210;
  background-color: #fdfdea;
}

/* empty state */

.noProjects {
  padding: 40px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 20px;
  text-align: center;
}

.noProjectsIcon {
  font-size: 50px;
  color: #d1d5db;
}

.noProjectsText {
  font-size: 18px;
  color: #4b4b4b;
}

.noProjectsClear {
  border: 1px solid #f3f4f6;
  background-color: #fff;
  font-size: 14px;
  font-weight: 600;
  font-family: "Inter", sans-serif;
  padding: 10px 20px;
  border-radius: 5px;
  color: #f35163;
  cursor: pointer;
}

.noProjectsClear:hover {
  background-color: #f3f4f6;
}

/* pagination */

.paginationSection {
  width: 85%;
  padding: 60px 0 0;
  display: flex;
  justify-content: center;
}

.pagination {
  display: flex;
  align-items: center;
  gap: 20px;
  color: #222b3a;
}

.paginationPrevious,
.paginationNext {
  cursor: pointer;
}

.paginationPrevious.inactive,
.paginationNext.inactive {
  opacity: 0.5;
  pointer-events: none;
}

.paginationNumbers {
  display: flex;
  align-items: center;
}

.paginationNumbers span {
  width: 35px;
  height: 35px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.paginationNumbers span.active {
  border: 2px solid #000;
  border-radius: 50%;
}

.paginationNumbers span:hover {
  cursor: pointer;
  font-weight: 600;
  transition: font-weight 0.4s ease-in-out;
}

/* responsive */

@media (max-width: 1600px) {
  .searchSection {
    width: 85%;
  }

  .projectSection {
    width: 85%;
  }

  .filterSection {
    max-width: 250px;
  }

  .projects {
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 30px;
  }
}

@media (max-width: 1200px) {
  .filterSection {
    max-width: 200px;
  }
}

@media (max-width: 1020px) {
  .filterSection {
    max-width: 250px;
  }

  .projects {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
  }
}

@media (max-width: 860px) {
  .mainSection {
    padding: 30px 0 60px;
  }

  .filterSection {
    max-width: 360px;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    padding: 60px 30px;
    border-right: 1px solid #d1d5db;
    background-color: white;
    display: flex;
    z-index: 100;
    overflow-y: auto !important;
    cursor: default;
  }

  .mobileFilterHide {
    display: none;
  }

  .filterContainer {
    max-height: 75vh;
    overflow: auto;
    scroll-snap-type: y mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .filterContainer::-webkit-scrollbar {
    display: none;
  }

  .closeFilter {
    position: absolute;
    top: 20px;
    right: 20px;
    height: 30px;
    width: 30px;
    font-size: 18px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
  }

  .filterButton {
    display: flex;
    cursor: pointer;
  }

  .filterButton span {
    width: fit-content;
    height: 40px;
    padding: 0 10px;
    border: 1px solid #e5e7eb;
    border-radius: 5px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
  }

  .projectsCount {
    font-size: 13px;
  }

  .projects {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
  }

  .projectName {
    font-size: 16px;
  }

  .projectOrganization {
    font-size: 12px;
  }

  .paginationSection {
    padding-top: 10px;
  }
}

@media (max-width: 500px) {
  .downloadButton a {
    width: 50px;
  }

  .downloadButton a span {
    display: none;
  }

  .projects {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 50px 30px;
  }
}

/* extra */

/* @extra  */

.skeleton {
  min-width: 250px;
  flex: 1 1 350px !important;
  padding: 20px;
  border: 1px solid #e5e7eb;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 20px;
  border-radius: 10px;
}

.skeletonTop {
  width: 80%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.skeletonName {
  width: 60%;
  height: 20px;
  animation: pulse 1.5s infinite;
  border-radius: 10px;
}

.skeletonOrg {
  width: 40%;
  height: 15px;
  animation: pulse 1.5s infinite;
  border-radius: 10px;
}

.skeletonBottom {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.skeletonDes {
  width: 90%;
  height: 50px;
  animation: pulse 1.5s infinite;
  border-radius: 10px;
}

.skeletonExtra {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 90%;
  border-radius: 10px;
}

.skeletonButton {
  width: 30%;
  height: 30px;
  animation: pulse 1.5s infinite;
  border-radius: 10px;
}

.skeletonDate {
  width: 40%;
  height: 15px;
  animation: pulse 1.5s infinite;
  border-radius: 10px;
}

@keyframes pulse {
  0% {
    background-color: #f3f4f6;
  }
  50% {
    background-color: #e5e7eb;
  }
  100% {
    background-color: #f3f4f6;
  }
}

.pageHidden {
  display: none;
}
