/* ── Community Gallery Slider Widget ──────────────────────────────────────── */

.cgs-wrap {
  background: #f0f4ff;
  padding: 40px;
  position: relative;
  user-select: none;
}

/* Viewport */
.cgs-viewport {
  overflow: hidden;
  width: 100%;
}

/* Track */
.cgs-track {
  width: 100%;
}

/* Slide — flex row of images */
.cgs-slide {
  display: none;
  gap: 16px;
  align-items: stretch;
}
.cgs-slide.cgs-slide--active {
  display: flex;
}

/* Image wrapper — uses aspect-ratio instead of padding-bottom trick */
.cgs-img-wrap {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  border-radius: 12px;
  background: #e5e7eb;
  aspect-ratio: 3 / 2;   /* default 3:2, overridden inline per setting */
  position: relative;
}
.cgs-img-wrap--empty {
  background: transparent;
  pointer-events: none;
  visibility: hidden;
}
.cgs-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.45s ease;
}
.cgs-img-wrap:hover .cgs-img {
  transform: scale(1.04);
}

/* ── Controls row ─────────────────────────────────────────────────────────── */
.cgs-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 20px;
  gap: 12px;
}

/* Arrow buttons */
.cgs-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1.5px solid #e5e7eb;
  background: #fff;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, transform 0.15s, opacity 0.2s;
  padding: 0;
  line-height: 1;
}
.cgs-arrow svg {
  width: 20px !important;
  height: 20px !important;
  min-width: 20px !important;
  max-width: 20px !important;
  stroke: #6c5ce7;
  display: block;
  flex-shrink: 0;
}
.cgs-arrow svg::before,
.cgs-arrow svg::after {
  content: none !important;
  display: none !important;
}
.cgs-arrow--active {
  background: #6c5ce7;
  border-color: #6c5ce7;
}
.cgs-arrow--active svg {
  stroke: #fff;
}
.cgs-arrow:hover:not([disabled]) {
  transform: scale(1.08);
}
.cgs-arrow[disabled] {
  opacity: 0.3;
  cursor: default;
  pointer-events: none;
}

/* Dots */
.cgs-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: 1;
}
.cgs-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
  background: #d1d5db;
  cursor: pointer;
  padding: 0;
  transition: background 0.2s, width 0.25s, border-radius 0.25s;
}
.cgs-dot--active {
  background: #6c5ce7;
  width: 26px;
  border-radius: 5px;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .cgs-wrap { padding: 24px 16px; }
  .cgs-slide { gap: 10px; }
  .cgs-img-wrap:not(:first-child) { display: none; }
}
