.kemove-featured-blogs {
  padding-block: 34px;
  font-family: var(--kemove-font-stack, Inter, Arial, sans-serif);
  background: #f5f7fa;
}

.kemove-featured-blogs__inner.page-width {
  max-width: min(var(--kemove-home-width, 1640px), calc(100vw - 96px));
  padding-inline: var(--page-padding);
}

.kemove-featured-blogs__head {
  display: flex;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
  margin-block-end: 24px;
}

.kemove-featured-blogs__title {
  margin: 0;
  color: #111827;
  font-size: clamp(28px, 2.7vw, 40px);
  font-weight: 900;
  line-height: 1.1;
}

.kemove-featured-blogs__button {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 28px;
  color: #111827 !important;
  font-weight: 850;
  text-decoration: none;
  background: #fff;
  border: 1px solid #d8dde6;
  border-radius: 999px;
}

.kemove-featured-blogs__button::after {
  content: ">";
  color: #0091ff;
  font-weight: 900;
}

.kemove-featured-blogs__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.kemove-featured-blogs__card {
  overflow: hidden;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  box-shadow: 0 10px 30px rgb(15 23 42 / 5%);
}

.kemove-featured-blogs__media {
  display: block;
  aspect-ratio: 4 / 2.55;
  overflow: hidden;
  background: #eef2f7;
}

.kemove-featured-blogs__image,
.kemove-featured-blogs__media img,
.kemove-featured-blogs__media svg,
.kemove-featured-blogs__placeholder {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 260ms ease;
}

.kemove-featured-blogs__content {
  padding: 22px 24px 26px;
}

.kemove-featured-blogs__meta {
  display: flex;
  gap: 12px;
  align-items: center;
  min-height: 24px;
  margin-block-end: 12px;
  color: #6b7280;
  font-size: 13px;
  font-weight: 700;
}

.kemove-featured-blogs__meta span {
  padding: 5px 9px;
  color: #fff;
  background: #0091ff;
  border-radius: 4px;
}

.kemove-featured-blogs__content h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 900;
  line-height: 1.25;
}

.kemove-featured-blogs__content h3 a {
  color: #111827 !important;
  text-decoration: none;
}

.kemove-featured-blogs__content p {
  margin: 12px 0 0;
  color: #6b7280;
  font-size: 14px;
  line-height: 1.55;
}

@media (hover: hover) and (pointer: fine) {
  .kemove-featured-blogs__card:hover .kemove-featured-blogs__image,
  .kemove-featured-blogs__card:hover .kemove-featured-blogs__media img {
    transform: scale(1.035);
  }
}

@media (max-width: 1180px) {
  .kemove-featured-blogs__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 749px) {
  .kemove-featured-blogs__inner.page-width {
    max-width: calc(100vw - 32px);
  }

  .kemove-featured-blogs__head {
    align-items: flex-start;
    flex-direction: column;
  }

  .kemove-featured-blogs__grid {
    grid-template-columns: 1fr;
  }
}

/* KEMOVE homepage visible blog cards: final override */
body[data-page-type="index"] .kemove-featured-blogs {
  padding-block: 42px !important;
  background: #f5f7fa !important;
}

body[data-page-type="index"] .kemove-featured-blogs__grid {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 18px !important;
  min-height: 1px !important;
}

body[data-page-type="index"] .kemove-featured-blogs__card {
  display: flex !important;
  min-height: 100% !important;
  flex-direction: column !important;
}

body[data-page-type="index"] .kemove-featured-blogs__media {
  flex: 0 0 auto !important;
}

body[data-page-type="index"] .kemove-featured-blogs__content {
  flex: 1 1 auto !important;
}

@media (max-width: 1180px) {
  body[data-page-type="index"] .kemove-featured-blogs__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 749px) {
  body[data-page-type="index"] .kemove-featured-blogs__grid {
    grid-template-columns: 1fr !important;
  }
}

/* 1360px editorial rail: three complete stories and a faded fourth preview. */
@media (min-width: 1200px) {
  body[data-page-type="index"] .kemove-featured-blogs__grid {
    display: grid !important;
    grid-template-columns: none !important;
    grid-auto-columns: calc((min(1280px, calc(100vw - 144px)) - 36px) / 3) !important;
    grid-auto-flow: column !important;
    width: calc(100% + min(180px, max(0px, (100vw - 1360px) / 2)));
    max-width: none;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -webkit-mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 138px), transparent 100%);
    mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 138px), transparent 100%);
  }

  body[data-page-type="index"] .kemove-featured-blogs__grid::-webkit-scrollbar {
    display: none;
  }

  body[data-page-type="index"] .kemove-featured-blogs__card {
    scroll-snap-align: start;
  }

  body[data-page-type="index"] .kemove-featured-blogs__content p {
    display: none;
  }
}

/* 0.2.0 homepage blog cards: exactly three clean stories, no edge mask. */
@media (min-width: 1200px) {
  body[data-page-type="index"] .kemove-featured-blogs__inner.page-width {
    width: min(1440px, calc(100vw - 64px)) !important;
    max-width: none !important;
    padding-inline: 40px !important;
  }

  body[data-page-type="index"] .kemove-featured-blogs__grid {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    grid-auto-flow: row !important;
    gap: 24px !important;
    width: auto !important;
    overflow: visible !important;
    -webkit-mask-image: none !important;
    mask-image: none !important;
  }

  body[data-page-type="index"] .kemove-featured-blogs__card:nth-child(n + 4) {
    display: none !important;
  }
}

@media (min-width: 1200px) {
  body[data-page-type="index"] .kemove-featured-blogs {
    overflow: hidden !important;
  }

  body[data-page-type="index"] .kemove-featured-blogs__inner.page-width {
    width: min(1440px, calc(100vw - 64px)) !important;
    max-width: none !important;
    padding-inline: 40px !important;
    margin-inline: auto !important;
    box-sizing: border-box !important;
  }

  body[data-page-type="index"] .kemove-featured-blogs__grid {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    grid-auto-flow: row !important;
    gap: 24px !important;
    width: calc(133.333% + 8px) !important;
    max-width: none !important;
    overflow: visible !important;
    -webkit-mask-image: none !important;
    mask-image: none !important;
  }

  body[data-page-type="index"] .kemove-featured-blogs__card:nth-child(n + 4) {
    display: flex !important;
  }
}
