/* Inspiring Stories Carousel
   Fonts and text colors inherit from your theme.
   Override the variables below in your theme's CSS to restyle. */
.isc-carousel {
  --isc-gap: 24px;
  --isc-accent: currentColor;
  --isc-muted: #6b6b6b;
  --isc-arrow-bg: #ffffff;
  --isc-arrow-border: rgba(0, 0, 0, 0.15);
  --isc-image-ratio: 4 / 3;

  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 2em 0;
}

.isc-viewport {
  overflow: hidden;
  flex: 1 1 auto;
  min-width: 0;
  touch-action: pan-y;
}

.isc-track {
  display: flex;
  gap: var(--isc-gap);
  margin: 0;
  padding: 0;
  list-style: none;
  transition: transform 0.45s ease;
  will-change: transform;
}

.isc-slide {
  flex: 0 0
    calc((100% - (var(--isc-cols) - 1) * var(--isc-gap)) / var(--isc-cols));
  min-width: 0;
  margin: 0;
  padding: 0;
}

.isc-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.isc-image {
  display: block;
  aspect-ratio: var(--isc-image-ratio);
  overflow: hidden;
  background: #eee;
}

.isc-image img,
.isc-image-placeholder {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.isc-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 24px;
}

.isc-meta {
  margin: 0 0 10px;
  font-size: 0.85em;
  color: var(--isc-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.isc-meta a {
  color: inherit;
}

.isc-sep {
  margin: 0 6px;
  opacity: 0.6;
}

.isc-excerpt {
  margin: 0 0 12px;
  line-height: 1.55;
}

.isc-readmore {
  margin-top: auto;
  align-self: flex-start;
  font-weight: 600;
  color: var(--isc-accent);
}

/* Arrows */
.isc-arrow {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--isc-arrow-border);
  border-radius: 50%;
  background: var(--isc-arrow-bg);
  color: inherit;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.isc-arrow:hover:not(:disabled) {
  border-color: currentColor;
}

.isc-arrow:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

.isc-arrow:disabled {
  opacity: 0.3;
  cursor: default;
}

.isc-carousel.isc-no-scroll .isc-arrow {
  visibility: hidden;
}

.isc-carousel .screen-reader-text {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap;
}

/* Responsive: fewer columns on smaller screens */
@media (max-width: 1024px) {
  .isc-carousel {
    --isc-cols: 3 !important;
  }
}
@media (max-width: 768px) {
  .isc-carousel {
    --isc-cols: 2 !important;
    --isc-gap: 16px;
  }
}
@media (max-width: 520px) {
  .isc-carousel {
    --isc-cols: 1 !important;
  }
  .isc-arrow {
    width: 36px;
    height: 36px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .isc-track {
    transition: none;
  }
}
