/* ==========================================================
   Category Post Slider — styles
   Edit the two variables below to match your site's brand colors.
   ========================================================== */

:root {
  --npca-primary: #1d2b53;   /* TODO: replace with your site's primary/heading color */
  --npca-accent: #316622;    /* TODO: replace with your site's button/accent color */
  --npca-text: #2b2b2b;
  --npca-muted: #6b6b6b;
  --npca-card-bg: #ffffff;
  --npca-radius: 10px;
}

.npca-cps-wrap {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 44px;
}

.npca-cps-track {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.npca-cps-track::-webkit-scrollbar {
  display: none;
}

.npca-cps-card {
  flex: 0 0 calc(33.333% - 16px);
  scroll-snap-align: start;
  display: block;
  background: var(--npca-card-bg);
  border-radius: var(--npca-radius);
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  text-decoration: none;
  color: var(--npca-text);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.npca-cps-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14);
}

.npca-cps-img {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #eee;
}
.npca-cps-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.npca-cps-img-placeholder {
  width: 100%;
  height: 100%;
  background: var(--npca-primary);
  opacity: 0.1;
}

.npca-cps-body {
  padding: 20px;
}
.npca-cps-title {
  font-size: 1.15rem;
  line-height: 1.3;
  margin: 0 0 8px;
  color: var(--npca-primary);
}
.npca-cps-excerpt {
  font-size: 0.92rem;
  color: var(--npca-muted);
  margin: 0 0 14px;
  line-height: 1.5;
}
.npca-cps-readmore {
  font-weight: 600;
  color: var(--npca-accent);
}

.npca-cps-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: var(--npca-primary);
  color: #fff;
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: background 0.2s ease;
}
.npca-cps-arrow:hover {
  background: var(--npca-accent);
}
.npca-cps-arrow.is-hidden {
  display: none;
}
.npca-cps-prev {
  left: 0;
}
.npca-cps-next {
  right: 0;
}

/* Phone: one card at a time */
@media (max-width: 768px) {
  .npca-cps-card {
    flex: 0 0 100%;
  }
  .npca-cps-wrap {
    padding: 0 32px;
  }
  .npca-cps-arrow {
    width: 34px;
    height: 34px;
  }
}
