#timeliness {
  display: flex;
  flex-direction: column;
  scroll-margin-top: 50px;
}

#timeliness > .section-body {
  min-height: 350px;
  display: flex !important;
  flex-direction: row !important;
  justify-content: center !important;
}

.category-selector-wrapper {
  overflow: hidden;
  width: 290px;
  min-width: fit-content;
  position: relative;
  margin-right: 80px;
  max-height: 450px;
  overflow-y: auto;
  overflow-x: hidden;
}

.category-selector {
  list-style: none;
  padding: 0;
  margin: 0;
}

.category-btn {
  width: 100%;
  border: none;
  background: none;
  color: #3a5c73;
  font-weight: 500;
  border-bottom: 3px solid #3a5c73;
  padding-bottom: 0;
  padding-left: 0.5rem;
  transition: all 1s ease-in-out;
  font-size: 18px;
  height: 50px;
  text-align: start;
}

.category-btn:hover {
  background: #d4ebf7;
  color: #3a5c73;
  justify-content: space-between;
}
.category-btn::after {
  content: "\f054";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  margin-left: 8px;

  opacity: 0;
  transform: translateX(-5px);
  transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
}

.category-btn.active::after,
.category-btn:hover::after {
  opacity: 1;
  transform: translateX(0);
}
.category-btn.active {
  background-color: #d4ebf7;
  color: #3a5c73;
  transform: rotate(0deg);
  transition: all 1s ease-in-out;
}

.category-btn.active:hover {
  background-color: #d4ebf7;
  transition: all 1s ease-in-out;
}
.category-btn.active::after,
.category-btn:hover::after {
  content: "\f054";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  margin-left: 8px;
  transition: all 1s ease-in-out;
}

.category-btn > i {
  opacity: 1;
  color: #3a5c73;
  transition: transform 0.3s ease;
}

.category-btn.active > i {
  transform: rotate(90deg);
}

.category-btn:hover:not(.active) > i {
  animation: slide-in 0.4s ease-in 0.1s 1 normal forwards;
}

/* === Animation === */

@keyframes slide-in {
  0% {
    transform: translateX(-40px);
    opacity: 0;
  }
  10% {
    transform: translateX(-35px);
    opacity: 0.1;
  }
  20% {
    transform: translateX(-30px);
    opacity: 0.3;
  }
  30% {
    transform: translateX(-20px);
    opacity: 0.5;
  }
  50% {
    transform: translateX(-15px);
    opacity: 0.6;
  }
  60% {
    transform: translateX(-10px);
    opacity: 0.7;
  }
  80% {
    transform: translateX(-8px);
    opacity: 0.8;
  }
  90% {
    transform: translateX(-5px);
    opacity: 0.9;
  }
  100% {
    transform: translateX(0px);
    opacity: 1;
  }
}

/* === Post Cards === */

.posts-wrapper {
  width: 75%;
}

.category-post {
  display: flex !important;
  align-items: center;
  justify-content: center;
}

.post-wrapper {
  width: 280px;
  height: 408px !important;
  background: white;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 2px 2px 4px #00000029;
  transition: all 0.3s ease;
}

.post-wrapper:hover {
  opacity: 0.75;
}

.post-wrapper-inner {
  border: 1px solid #3a5c73;
  border-radius: 20px;
  overflow: hidden;
}

.post-wrapper p {
  font-weight: 400;
  width: 100%;
}

.category-post-title {
  max-width: 100%;
  overflow: hidden;
  color: #3b3b3a;
}

.category-post-content-wrapper {
  max-width: 100%;
  width: 100%;
  min-height: 200px;
  max-height: 228px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.post-thumbnail img {
  height: 200px;
  object-fit: cover;
  max-width: 325px;
  width: 100%;
  background-color: #f1f1f1;
}

.post-not-found-text {
  width: 280px !important;
}

/* === Slick Carousel === */

.slick-list {
  position: relative;
  display: block;
  overflow: hidden;
  margin: 0;
  padding-bottom: 10px;
}

#timeliness .slick-track {
  display: flex !important;
  /* gap: 10px !important; */
  justify-content: center !important;
  min-height: 421px;
}

.custom-slider-btn,
.custom-slider-btn1 {
  color: #3a5c73;
  background: none;
  font-size: 30px;
  width: 50px;
  height: 50px;
  border: none;
  border-radius: 100%;
  transition: all 0.2s ease-in;
  position: relative;
}

.custom-slider-btn:hover:not(.slick-disabled) {
  background: #3a5c73;
  color: #fff;
}

.custom-slider-btn.slick-disabled {
  opacity: 0.25;
  background-color: #f8f1e3 !important;
  color: #3a5c73 !important;
  cursor: default;
}

.slick-dots li button:before {
  color: white !important;
}

#timeliness-slider-prev,
#timeliness-slider-next {
  top: 30%;
  z-index: 1;
  background-color: #d4ebf7;
}

#timeliness-slider-prev:hover,
#timeliness-slider-next:hover {
  background-color: #3a5c73;
  color: white;
}

/* === others === */

.timeliness-btn .all-btn:hover {
  background-color: #1b5c99;
  border: 0px solid #1b5c99;
  color: #fff;
}

.all-btn-timeliness {
  text-transform: uppercase !important;
  font-weight: 600;
}

.chevron-icon {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
}

.chevron-icon i {
  font-size: 14px;
  color: #333;
}

.error-message {
  font-size: 20px;
}

.child-categories li {
  display: flex;
  align-items: center;
}

.child-categories.d-none + .category-btn > i {
  transform: rotate(0deg);
}

.marker {
  margin-right: 8px;
}

.child-categories.hidden {
  display: none;
}

#loading {
  width: 100px;
}

/* === Mobile Dropdown === */

.dropdown-btn {
  display: none;
}
.category-post-title h2 {
  font-weight: 600 !important;
}
@media (max-width: 767px) {
  .all-btn-wrapper {
    padding: 30px;
  }
}

@media (max-width: 991px) {
  .slick-slide {
    margin: 0px 6px;
  }
  .category-post-title h2 {
    font-size: 16px !important;
    font-weight: 600 !important;
  }
  .category-post-content-wrapper {
    gap: 5px;
  }
  .timeliness-btn {
    display: flex !important;
    justify-content: center !important;
  }

  .dropdown-btn {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    background-color: #fff;
    border: none;
    border-bottom: 2px solid #3a5c73 !important;
    color: #3a5c73;
    font-weight: 500;
    font-size: 19px;
    padding: 10px;
    cursor: pointer;
    min-width: 300px;
    width: 100%;
  }

  .category-selector {
    display: none;
    flex-direction: column;
  }

  i.fa-solid.fa-chevron-down {
    color: #3a5c73 !important;
  }

  .category-selector-wrapper {
    width: 100%;
    margin-right: 0px !important;
  }

  .timeliness-body {
    align-items: center;
  }

  .category-selector-wrapper button {
    width: 100%;
  }

  #timeliness > .section-body {
    /* transform: scale(0.8); */
    flex-direction: column !important;
  }
}

/* === Media Queries === */

@media screen and (max-width: 1254px) {
  .timeliness-btn {
    display: flex;
    justify-content: center !important;
  }
}

@media (max-width: 1280px) {
  .timeliness-body {
    flex-direction: column !important;
    gap: 20px;
  }

  .category-selector-wrapper {
    width: 80%;
    padding: 0 !important;
  }

  .all-btn-wrapper {
    justify-content: center !important;
  }
}

@media (max-width: 1095px) and (min-width: 991px) {
  #timeliness-slider-prev {
    left: -35px !important;
  }

  #timeliness-slider-next {
    right: -35px !important;
  }
}

@media (max-width: 991px) {
  .category-selector-wrapper {
    margin-right: 0 !important;
  }
}

@media screen and (max-width: 788px) {
  .tim-mob {
    margin-bottom: 0 !important;
  }
}

@media screen and (min-width: 991px) and (max-width: 1600px) {
  #timeliness > .section-body {
    transform: scale(0.8);
  }

  .timeliness-btn .all-btn {
    margin-top: -50px;
  }
}

@media screen and (max-width: 1700px) {
  .category-selector-wrapper {
    margin-right: 60px;
  }
}

@media (min-width: 1300px) and (max-width: 1400px) {
  .post-wrapper {
    margin-right: 10px;
  }

  .slick-track {
    gap: 0px !important;
  }
}

@media (min-width: 1200px) and (max-width: 1300px) {
  .post-wrapper {
    width: 315px;
  }
}

@media (max-width: 1399px) and (min-width: 1255px) {
  .category-selector-wrapper {
    margin-left: -50px;
  }
}

@media (max-width: 450px) {
  .category-btn {
    text-align: start;
  }
}

/* default desktop mode */
.title-mobile,
.content-mobile {
  display: none;
}
@media screen and (max-width: 787px) {
  .title-desktop,
  .content-desktop {
    display: none;
  }

  .title-mobile,
  .content-mobile {
    display: inline;
  }
  .category-post-title h2 {
    font-size: 15px !important;
    font-weight: 600 !important;
  }
}
