.fkrp-related-posts.more-from-category.single.widget {
  margin-top: 0;
  border: 1px solid #eee;
}

.fkrp-related-posts .widget-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px;
  padding-right: 10px;
  background: #f1f1f1;
  border-bottom: 1px solid #e1e1e1;
}

.fkrp-related-posts .widget-title {
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.5px;
  padding-left: 5px;
}

.fkrp-related-posts .carousel-btn-container {
  display: flex;
  gap: 6px;
  margin: 0;
}

.fkrp-related-posts .carousel-btn {
  border: 1px solid #d1d1d1;
  background: #fff;
  border-radius: 4px;
  width: 32px;
  height: 32px;
  font-size: 1.1rem;
  cursor: pointer;
  transition: background 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.fkrp-related-posts .carousel-btn:focus,
.fkrp-related-posts .carousel-btn:hover {
  outline: 2px solid #222;
  color: #c36;
}

.fkrp-related-posts .carousel-container {
  position: relative;
  width: 100%;
  overflow: hidden;
  padding: 0;
}

.fkrp-related-posts .carousel-viewport {
  width: 100%;
  max-width: 100% !important;
  margin: 0 auto;
  overflow: hidden;
  position: relative;
}

.fkrp-related-posts.more-from-category.single.widget .fkrp-list.carousel {
  height: 100% !important;
  max-height: 100% !important;
}

.fkrp-related-posts .fkrp-list.carousel {
  display: flex;
  flex-direction: row;
  gap: 24px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 20px 0;
  margin: 0;
  list-style: none;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.fkrp-related-posts .fkrp-list.carousel::-webkit-scrollbar {
  display: none;
}

/* Card design matches the homepage "recent posts" widget's first card. */
.fkrp-related-posts .fkrp-card {
  flex: 0 0 260px;
  display: block;
  border-radius: 8px;
  background: #fff;
  border: #e8e8e8 solid 1px;
  min-height: 390px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  scroll-snap-align: center;
  transition: transform 0.2s;
}

.fkrp-related-posts .fkrp-card figure {
  position: relative;
  width: 100%;
  height: 205px;
  overflow: hidden;
  background: #f1f1f1;
  margin: 0;
}

.fkrp-related-posts .fkrp-card figure img {
  width: 100%;
  min-height: 205px;
  max-height: initial;
  height: auto;
}

.fkrp-related-posts .fkrp-card .detailsBox {
  padding: 20px;
}

.fkrp-related-posts .fkrp-card .tag {
  padding: 0 15px;
  border-radius: 20px;
  background: #eee5ff;
  font-size: 12px;
  line-height: 24px;
  color: #7e4deb;
  display: inline-block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.fkrp-related-posts .fkrp-card .detailsBox strong {
  display: block;
  margin: 10px 0;
  font-size: 18px;
  color: #333;
  line-height: 26px;
  font-weight: 700;
}

.fkrp-related-posts .fkrp-card .detailsBox strong a {
  color: #333;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  min-height: 52px;
  text-decoration: none;
}

.fkrp-related-posts .fkrp-card .detailsBox p {
  margin: 0;
  font-size: 14px;
  color: #666;
  line-height: 20px;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

@media only screen and (max-width: 1365px) {
  .fkrp-related-posts .fkrp-card {
    flex-basis: 220px;
    max-width: 220px;
  }
  .fkrp-related-posts .carousel-viewport {
    max-width: 230px;
  }
}

@media only screen and (max-width: 767px) {
  .fkrp-related-posts .carousel-viewport {
    max-width: 350px;
  }
  .fkrp-related-posts .fkrp-card {
    flex-basis: 340px;
    min-width: 340px;
  }
}
