.cts-widget {
  --cts-gap: 24px;
  --cts-radius: 15px;
  --cts-card-min-h: 640px;
  --cts-card-cut: 100px; /* kolik chceš ubrat */
  --cts-card-h: calc(var(--cts-card-min-h) - var(--cts-card-cut));
  position: relative;
  width: 100%;
}

.cts-track-wrap {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
}

.cts-viewport {
  overflow: hidden;
  width: 100%;
  touch-action: pan-y;
}

.cts-track {
  display: flex;
  gap: var(--cts-gap);
  transition: transform .42s ease;
  will-change: transform;
}

.cts-card {
  flex: 0 0 calc((100% - (var(--cts-gap) * 2)) / 3);
  min-width: 0;
  min-height: var(--cts-card-h);
  height: var(--cts-card-h);
  border-radius: var(--cts-radius);
  overflow: hidden;
  position: relative;
  box-shadow: 0 10px 35px rgba(0,0,0,.08);
  display: flex;
  flex-direction: column;
}

.cts-widget[data-columns="1"] .cts-card { flex-basis: 100%; }
.cts-widget[data-columns="2"] .cts-card { flex-basis: calc((100% - var(--cts-gap)) / 2); }
.cts-widget[data-columns="3"] .cts-card { flex-basis: calc((100% - (var(--cts-gap) * 2)) / 3); }
.cts-widget[data-columns="4"] .cts-card { flex-basis: calc((100% - (var(--cts-gap) * 3)) / 4); }

.cts-media {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: #f4f4f4;
}

.cts-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cts-content {
  padding: 18px 18px 20px;
}

.cts-name {
  margin: 0 0 6px;
  font-size: 1.1rem;
  line-height: 1.25;
}

.cts-role {
  opacity: .75;
  font-size: .95rem;
}

.cts-more,
.cts-overlay-link,
.cts-nav,
.cts-dot {
  appearance: none;
  border: 1px solid rgba(0,0,0,.16);
  background: #fff;
  color: #111;
  cursor: pointer;
  text-decoration: none;
}

.cts-more {
  margin-top: 14px;
  padding: 10px 14px;
  border-radius: 999px;
  font-size: .92rem;
}

.cts-nav {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  transition: opacity .2s ease, transform .2s ease;
}

.cts-nav:hover:not([disabled]) {
  transform: translateY(-1px);
}

.cts-nav[disabled] {
  opacity: .35;
  cursor: default;
}

.cts-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 18px;
}

.cts-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  padding: 0;
  background: rgba(17,17,17,.18);
  border-color: transparent;
  transition: transform .2s ease, background-color .2s ease, width .2s ease;
}

.cts-dot:hover,
.cts-dot:focus-visible {
  transform: scale(1.15);
  outline: none;
}

.cts-dot.is-active {
  width: 24px;
  background: #111;
}

.cts-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
}

.cts-overlay-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.22);
  opacity: 0;
  animation: ctsFadeIn .22s ease forwards;
}

.cts-overlay-panel {
  position: absolute;
  inset: 0;
  padding: 22px;
  overflow: auto;
  opacity: 0;
  transform: translateY(14px);
  animation: ctsPanelIn .28s ease forwards;
}

.cts-overlay-close {
  appearance: none;
  border: 0;
  background: transparent;
  color: currentColor;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  position: absolute;
  top: 12px;
  right: 14px;
}

.cts-overlay-title {
  margin: 0 38px 6px 0;
  font-size: 1.2rem;
}

.cts-overlay-role {
  opacity: .8;
  margin-bottom: 16px;
}

.cts-overlay-image {
  display: block;
  max-width: 140px;
  height: auto;
  margin: 0 0 16px;
  border-radius: 12px;
}

.cts-overlay-text > *:first-child { margin-top: 0; }
.cts-overlay-text > *:last-child { margin-bottom: 0; }

.cts-overlay-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 16px;
  padding: 10px 14px;
  border-radius: 999px;
}

@keyframes ctsFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes ctsPanelIn {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1024px) {
  .cts-widget[data-columns="4"] .cts-card,
  .cts-widget[data-columns="3"] .cts-card {
    flex-basis: calc((100% - var(--cts-gap)) / 2);
  }
}

@media (max-width: 767px) {
  .cts-track-wrap {
    gap: 8px;
  }

  .cts-card,
  .cts-widget[data-columns="4"] .cts-card,
  .cts-widget[data-columns="3"] .cts-card,
  .cts-widget[data-columns="2"] .cts-card,
  .cts-widget[data-columns="1"] .cts-card {
    flex-basis: 100%;
  }

  .cts-nav {
    width: 36px;
    height: 36px;
  }
}
