/* assets/section-featured-posts.css */

.featured-posts-section {
  width: 100%;
  overflow: hidden;
  /* For Swiper */
}

/* Heading */
.featured-posts-section .blog__title {
  color: var(--Color-general-b1, #2d2d2d);
  text-align: center;
  font-family: 'Poppins', sans-serif;
  font-size: 2.8rem;
  font-style: normal;
  font-weight: 700;
  line-height: 120%;
}

@media screen and (min-width: 750px) {
  .featured-posts-section .blog__title {
    font-size: 4.8rem;
  }
}

.featured-posts__heading-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 6rem;
  margin-top: 0;
}

@media screen and (max-width: 749px) {
  .featured-posts__heading-wrapper {
    margin-bottom: 3rem;
  }
}

.featured-posts__slide {
  height: auto;
  width: auto !important;
  display: flex;
  flex-direction: column;
  padding-bottom: 6rem;
  /* Space for controls, same as banner-accessories-swiper */
}

.featured-posts__card {
  position: relative;
  width: 33.5rem;
  text-decoration: none;
  color: inherit;
  border-radius: 1.2rem;
  overflow: hidden;
  transition: transform 0.3s ease;
}

.featured-posts__image-wrapper {
  position: relative;
  width: 100%;
  background-color: #f0f0f0;
  overflow: hidden;
}

.featured-posts__image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.featured-posts__card:hover .featured-posts__image {
  transform: scale(1.05);
}

.featured-posts__content {
  padding: 1.6rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  background-color: #f7f8fa;
}

.featured-posts__tag {
  font-size: 1.2rem;
  letter-spacing: 0.05em;
  color: #666;
  opacity: 0.8;
}

.featured-posts__title {
  font-size: 1.8rem;
  font-weight: 700;
  line-height: 1.4;
  /* min-height: 2.8em; */
  /* 2 lines × 1.4 line-height, ensures bottom alignment */
  margin: 0;
  color: #000;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* --- Mobile Specific Styles --- */
@media screen and (max-width: 749px) {
  .featured-posts__title {
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1.3;
  }

  .featured-posts__slide {
    padding-bottom: 9rem;
    /* Smaller controls area on mobile */
  }
}

@media screen and (max-width: 749px) {
  .featured-posts__image-wrapper {
    height: 16.8rem;
  }
}

/* --- PC Specific Styles (Text Below) --- */
@media screen and (min-width: 750px) {
  .featured-posts__card {
    width: 36rem;
    border-radius: 1.2rem;
  }

  .featured-posts__image-wrapper {
    height: 20rem;
  }

  .featured-posts__content {
    position: relative;
    background-color: #f7f8fa;
    padding: 2.4rem 2rem;
  }
}

/* Swiper container */
.featured-posts__swiper {
  width: 100%;
  position: relative;
}

/* Full-width carousel layout with aligned start */
@media screen and (min-width: 750px) {
  .featured-posts-section--full-width .featured-posts__swiper {
    padding-left: calc((100vw - 122rem) / 2);
    padding-right: 0;
  }

  .featured-posts-section--full-width .swiper-pagination {
    display: none;
  }
}

@media screen and (max-width: 749px) {
  .featured-posts-section .featured-posts__swiper {
    padding-left: 2rem;
    padding-right: 2rem;
  }
}
