/*
 * Featured Articles Grid — "Wirecutter-style" editorial section.
 * Used by: inc/widgets/featured-articles.php (Coupon Nest: Featured Articles Grid widget)
 * Loaded separately from style.css to avoid touching that large core stylesheet.
 */

.cn-featured-articles {
  padding: 30px 0 10px;
  font-family: "Poppins", Helvetica, Arial, sans-serif;
}

.cn-featured-articles__rule {
  width: 100%;
  height: 4px;
  background: #000000;
  margin-bottom: 24px;
}

.cn-featured-articles__rule--bottom {
  margin-top: 34px;
  margin-bottom: 0;
}

.cn-featured-articles__heading {
  font-size: 34px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.5px;
  color: #111111;
  margin: 0 0 10px;
}

.cn-featured-articles__subheading {
  font-size: 17px;
  color: #555555;
  margin: 0 0 26px;
  max-width: 720px;
}

.cn-featured-articles__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.cn-featured-articles--cols-3 .cn-featured-articles__grid {
  grid-template-columns: repeat(3, 1fr);
}

.cn-featured-articles--cols-2 .cn-featured-articles__grid {
  grid-template-columns: repeat(2, 1fr);
}

@media screen and (max-width: 991px) {
  .cn-featured-articles__grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

@media screen and (max-width: 500px) {
  .cn-featured-articles__grid {
    grid-template-columns: 1fr !important;
    gap: 20px;
  }
  .cn-featured-articles__heading {
    font-size: 26px;
  }
}

.cn-featured-articles__card {
  display: flex;
  flex-direction: column;
}

.cn-featured-articles__thumb {
  display: block;
  position: relative;
  width: 100%;
  padding-top: 62%;
  border-radius: 6px;
  overflow: hidden;
  background: #eeeeee;
  margin-bottom: 14px;
}

.cn-featured-articles__thumb img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.cn-featured-articles__thumb:hover img {
  transform: scale(1.04);
}

.cn-featured-articles__thumb-placeholder {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #e2e8f0, #f7fafc);
}

.cn-featured-articles__title {
  font-size: 19px;
  font-weight: 700;
  line-height: 1.35;
  margin: 0;
  color: #111111;
}

.cn-featured-articles__title a {
  color: #111111;
  text-decoration: none;
}

.cn-featured-articles__title a:hover {
  text-decoration: underline;
}
