/* Mobile first — prefijo wsc- para evitar conflictos con el tema */
.wsc-carousel {
  --wsc-visible-mobile: 1.15;
  --wsc-visible-desktop: 4;
  --wsc-visible: var(--wsc-visible-mobile);
  --wsc-gap: 12px;
  --wsc-card-padding: 0;
  position: relative;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: #1a1a1a;
}

.wsc-carousel__stage {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
}

.wsc-carousel__viewport {
  overflow: hidden;
  min-width: 0;
}

.wsc-carousel__track {
  display: flex;
  gap: var(--wsc-gap);
  list-style: none;
  margin: 0;
  padding: 0;
  transition: transform 0.4s ease;
}

.wsc-card {
  flex: 0 0 calc((100% - (var(--wsc-visible) - 1) * var(--wsc-gap)) / var(--wsc-visible));
  padding: var(--wsc-card-padding);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

.wsc-card__link {
  display: flex;
  flex-direction: column;
  height: 100%;
  color: inherit;
  text-decoration: none;
}

.wsc-card__link:hover .wsc-card__title {
  text-decoration: underline;
}

.wsc-card__img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
}

.wsc-card__img--placeholder {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
}

.wsc-card__body {
  padding: 14px;
  flex: 1 1 auto;
}

.wsc-card__title {
  font-size: 1.05rem;
  margin: 0 0 6px;
  line-height: 1.3;
}

.wsc-card__desc {
  font-size: 0.875rem;
  line-height: 1.4;
  color: #555;
  margin: 0;
}

.wsc-carousel__btn {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.wsc-carousel__btn:hover {
  background: rgba(0, 0, 0, 0.8);
}

.wsc-carousel__btn:disabled {
  opacity: 0.35;
  cursor: default;
}

/* Ocultar flechas en mobile (< 768px) */
.wsc-carousel--hide-arrows-mobile .wsc-carousel__btn {
  display: none;
}

.wsc-carousel--hide-arrows-mobile .wsc-carousel__stage {
  grid-template-columns: 1fr;
}

.wsc-carousel__dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding-top: 14px;
}

.wsc-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
  background: #cbd2d9;
  cursor: pointer;
  padding: 0;
  transition: background 0.2s ease, transform 0.2s ease;
}

.wsc-dot.is-active {
  background: #2563eb;
  transform: scale(1.2);
}

@media (min-width: 768px) {
  .wsc-carousel {
    --wsc-visible: var(--wsc-visible-desktop);
    --wsc-gap: 16px;
  }

  .wsc-carousel__stage {
    gap: 12px;
  }

  /* Restaurar flechas en desktop si solo estan ocultas en mobile */
  .wsc-carousel--hide-arrows-mobile .wsc-carousel__btn {
    display: flex;
  }

  .wsc-carousel--hide-arrows-mobile:not(.wsc-carousel--hide-arrows-desktop) .wsc-carousel__stage {
    grid-template-columns: auto 1fr auto;
  }

  /* Ocultar flechas en desktop */
  .wsc-carousel--hide-arrows-desktop .wsc-carousel__btn {
    display: none;
  }

  .wsc-carousel--hide-arrows-desktop .wsc-carousel__stage {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 1000px) {
  .wsc-carousel {
    --wsc-gap: 20px;
  }
}
