/* ============================================
   TEXT CAROUSEL — standalone module
   Trendwise Analytics
   ============================================
   HOW TO USE:
   1. Upload this file as: css/text-carousel.css
   2. Upload the matching JS file as: js/text-carousel.js
   3. Add both in your page:
        <link rel="stylesheet" href="css/text-carousel.css">   (in <head>, after style.css)
        <script src="js/text-carousel.js"></script>            (bottom, after main.js)
   4. Paste the HTML block (see text-carousel-snippet.html)
      wherever you want the carousel section to appear.
   ============================================ */

.carousel-section {
  padding: 3.5rem 0;
  background: var(--off-white);
  border-bottom: 1px solid var(--border);
}

/* Wrapper: arrows sit left/right, text block centered between them */
.carousel-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}

.text-carousel {
  position: relative;
  min-height: 170px;
  flex: 1;
}

.text-carousel__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.5s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.text-carousel__slide.active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  position: relative;
}

.text-carousel__dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 1.5rem;
}

.text-carousel__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--border-mid);
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
}

.text-carousel__dot.active {
  background: var(--gold);
  transform: scale(1.3);
}

.carousel-arrow {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(139, 92, 246, 0.08);
  border: 1px solid rgba(139, 92, 246, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--navy);
  transition: background var(--transition-md, 0.35s ease), transform var(--transition-md, 0.35s ease);
  cursor: pointer;
  flex-shrink: 0;
}

.carousel-arrow:hover {
  background: rgba(139, 92, 246, 0.16);
  transform: scale(1.08);
}

@media (max-width: 700px) {
  .carousel-row {
    gap: 0.75rem;
  }
  .carousel-arrow {
    width: 32px;
    height: 32px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .text-carousel__slide { transition: opacity 0.2s linear; transform: none !important; }
}
