/* === Carousel wrapper & viewport === */
.ccs-carousel-wrapper {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  box-sizing: border-box;
}

/* viewport (hides overflow) */
.ccs-carousel {
  overflow: hidden;
  width: 100%;
  box-sizing: border-box;
}

/* slides row */
.ccs-slides {
  display: flex;
  flex-wrap: nowrap;
  transition: transform 0.55s cubic-bezier(.2,.8,.2,1);
  will-change: transform;
  gap: 20px; /* fallback; real value is injected by PHP inline styles */
}

/* individual card - JS will set precise pixel widths to avoid stacking */
.ccs-card {
  box-sizing: border-box;
  flex: 0 0 auto;
  border-radius: 30px;
  text-align: center;
  overflow: hidden;
  background: transparent; /* actual background injected by PHP inline rules */
}

/* icon / image */
.ccs-card .ccs-icon img {
  display: block;
  margin: 0 auto 12px;
  width: auto;
  height: auto;
  max-width: 120px; /* fallback - overridden by PHP inline style */
}

/* title + desc baseline (detailed styling is injected from PHP) */
.ccs-card .ccs-title { margin: 0 0 8px; line-height: 1.2; }
.ccs-card .ccs-desc  { margin: 0; line-height: 1.4; }

/* === Navigation (radio dots) ===
   Support both .ccs-navigation (PHP) and .ccs-nav (older)
*/
.ccs-navigation,
.ccs-nav {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 50px; /* default; mobile override below */
  align-items: center;
  box-sizing: border-box;
}

/* Hide the native input but keep it for accessibility & checked+label selectors */
.ccs-navigation input[type="radio"],
.ccs-nav input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

/* The visible dots */
.ccs-navigation label,
.ccs-nav label {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display:inline-block;
  cursor: pointer;
  transition: transform .12s, background .18s;
  background: #bbb; /* fallback - overridden by PHP inline rules */
}

/* Slight scale for the checked dot */
.ccs-navigation input[type="radio"]:checked + label,
.ccs-nav input[type="radio"]:checked + label {
  transform: scale(1.1);
}

/* === Mobile-specific tweaks === */
@media (max-width: 767px) {
  /* mobile: add 20px left/right padding to wrapper (JS reads wrapper padding for sizing) */
  .ccs-carousel-wrapper {
    padding-left: 20px;
    padding-right: 20px;
    box-sizing: border-box;
  }

  /* mobile baseline: one card per view (JS will compute widths in px) */
  .ccs-card {
    flex: 0 0 100%;
  }

  /* mobile: nav top spacing as requested */
  .ccs-navigation,
  .ccs-nav {
    margin-top: 30px;
  }
}

/* Tablet baseline */
@media (min-width: 768px) and (max-width: 1023px) {
  .ccs-card { flex: 0 0 50%; }
}

/* Desktop baseline */
@media (min-width: 1024px) {
  .ccs-card { flex: 0 0 33.3333%; }
}

/* fallback flex-basis using gap 20px (adjusts visually when JS is absent) */
@media (min-width: 768px) {
  /* 2 cards per view: subtract one gap (20px) from 100% */
  .ccs-card {
    flex: 0 0 calc((100% - 20px) / 2);
  }
}
@media (min-width: 1024px) {
  /* 3 cards per view: subtract two gaps (40px) from 100% */
  .ccs-card {
    flex: 0 0 calc((100% - 80px) / 3);
  }
}