/* ========================================
   HOME — KEY PRODUCTS SECTION
   2x4 flush grid of fully clickable product tiles (image + title +
   Explore CTA), styled to match the Industries We Serve grid.
   Enqueued after main style.
======================================== */

.home-key-products {
  padding: 4rem 0;
  background: #f5f7fc;
}

/* ---- Section head ---- */
.home-key-products .hkp-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 2.25rem;
}

.home-key-products .hkp-eyebrow {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  font-weight: 700;
  color: #c8861d;
  margin-bottom: 0.6rem;
}

.home-key-products .hkp-eyebrow::before {
  content: "";
  display: inline-block;
  width: 26px;
  height: 2px;
  background: #c8861d;
  vertical-align: middle;
  margin-right: 0.6rem;
}

.home-key-products .hkp-heading {
  color: var(--blue);
  font-weight: 700;
  font-size: 2.1rem;
  line-height: 1.15;
  margin: 0 0 0.75rem;
  text-transform: uppercase;
}

.home-key-products .hkp-desc {
  color: var(--text-gray);
  font-size: 0.95rem;
  line-height: 1.55;
  max-width: 540px;
  margin: 0;
}

.home-key-products .hkp-view-all {
  flex: none;
  color: var(--blue);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  border-bottom: 2px solid var(--blue);
  padding-bottom: 2px;
  white-space: nowrap;
  transition: opacity 0.18s ease;
}

.home-key-products .hkp-view-all:hover {
  opacity: 0.7;
}

/* ---- Grid (flush cells, shared borders — matches Industries) ---- */
.home-key-products .hkp-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border: 1px solid #e3e6ee;
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
  margin: 0;
}

.home-key-products .hkp-card {
  margin: 0;
  border-top: 1px solid #e3e6ee;
  border-left: 1px solid #e3e6ee;
}

/* Remove outer-edge borders (grid wrapper supplies them) */
.home-key-products .hkp-card:nth-child(-n + 4) {
  border-top: 0;
}
.home-key-products .hkp-card:nth-child(4n + 1) {
  border-left: 0;
}

/* ---- Whole tile is one link ---- */
.home-key-products .hkp-card-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  text-decoration: none;
  transition: background 0.18s ease;
}

.home-key-products .hkp-card-link:hover {
  background: #f8fafd;
}

.home-key-products .hkp-card-link:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: -2px;
}

/* ---- Tile media ---- */
.home-key-products .hkp-card-media {
  position: relative;
  aspect-ratio: 4 / 3;
  background: #eef1f7;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.home-key-products .hkp-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.25s ease;
}

.home-key-products .hkp-card-link:hover .hkp-card-media img {
  transform: scale(1.04);
}

.home-key-products .hkp-noimg {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  color: #b6bdcf;
}

.home-key-products .hkp-noimg i {
  font-size: 2.4rem;
  line-height: 1;
}

.home-key-products .hkp-noimg span {
  font-size: 0.85rem;
  letter-spacing: 0.04em;
}

/* ---- Tile body ---- */
.home-key-products .hkp-card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 0.9rem;
  padding: 1.35rem 1.5rem 1.6rem;
}

.home-key-products .hkp-title {
  color: var(--blue);
  font-size: 1.05rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin: 0;
}

/* ---- Explore CTA (pinned to bottom) ---- */
.home-key-products .hkp-explore {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--blue);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.home-key-products .hkp-explore i {
  font-size: 0.95rem;
  line-height: 1;
  transition: color 0.18s ease, transform 0.18s ease;
}

.home-key-products .hkp-card-link:hover .hkp-explore i {
  color: #c8861d;
  transform: translate(2px, -2px);
}

/* ---- Responsive ---- */
@media (prefers-reduced-motion: reduce) {
  .home-key-products .hkp-card-media img,
  .home-key-products .hkp-explore i {
    transition: none;
  }
  .home-key-products .hkp-card-link:hover .hkp-card-media img {
    transform: none;
  }
}

@media screen and (max-width: 1100px) {
  .home-key-products .hkp-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .home-key-products .hkp-card:nth-child(-n + 4) {
    border-top: 1px solid #e3e6ee;
  }
  .home-key-products .hkp-card:nth-child(4n + 1) {
    border-left: 1px solid #e3e6ee;
  }
  .home-key-products .hkp-card:nth-child(-n + 3) {
    border-top: 0;
  }
  .home-key-products .hkp-card:nth-child(3n + 1) {
    border-left: 0;
  }
}

@media screen and (max-width: 820px) {
  .home-key-products .hkp-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  .home-key-products .hkp-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .home-key-products .hkp-card:nth-child(-n + 3) {
    border-top: 1px solid #e3e6ee;
  }
  .home-key-products .hkp-card:nth-child(3n + 1) {
    border-left: 1px solid #e3e6ee;
  }
  .home-key-products .hkp-card:nth-child(-n + 2) {
    border-top: 0;
  }
  .home-key-products .hkp-card:nth-child(2n + 1) {
    border-left: 0;
  }
}

@media screen and (max-width: 520px) {
  .home-key-products {
    padding: 2.75rem 0;
  }
  .home-key-products .hkp-heading {
    font-size: 1.6rem;
  }
  .home-key-products .hkp-grid {
    grid-template-columns: 1fr;
  }
  .home-key-products .hkp-card {
    border-left: 0 !important;
  }
  .home-key-products .hkp-card:nth-child(-n + 2) {
    border-top: 1px solid #e3e6ee;
  }
  .home-key-products .hkp-card:first-child {
    border-top: 0;
  }
}
