/**
 * Text Carousel — layout aligned with Figma "Gallery / 23" (Geniova)
 * Desktop: node 2192:14592 | Mobile: node 2257:11482
 * Uses design tokens from geniova.css / Elementor (no hardcoded hex except documented fallbacks).
 */

/* -------------------------------------------------------------------------
   Section shell — padding matches Figma page/section tokens
   ------------------------------------------------------------------------- */
.wb-text-carousel {
  position: relative;
  width: 100%;
  box-sizing: border-box;
  background-color: var(--color-scheme-3--background, var(--_primitives---colors--white));
  /* Figma: padding-global 64 / section-large 112 (desktop) */
  padding: 7rem 4rem;
}

@media (max-width: 767px) {
  .wb-text-carousel {
    /* Figma mobile: 20px horizontal, 64px vertical */
    padding: 4rem 1.25rem;
  }
}

.wb-text-carousel__inner {
  width: 100%;
  max-width: 80rem;
  margin-left: auto;
  margin-right: auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  /* Desktop: 80px between title block and carousel; mobile: 48px */
  gap: 5rem;
}

@media (max-width: 767px) {
  .wb-text-carousel__inner {
    gap: 3rem;
  }
}

/* -------------------------------------------------------------------------
   Header — max-width 768px, gap 24px / 20px
   ------------------------------------------------------------------------- */
.wb-text-carousel .wb-text-carousel__header {
  width: 100%;
  max-width: 48rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

@media (max-width: 767px) {
  .wb-text-carousel .wb-text-carousel__header {
    gap: 1.25rem;
  }
}

.wb-text-carousel .wb-text-carousel__title {
  margin: 0;
  color: var(--color-scheme-3--text, var(--_primitives---colors--neutral-darkest));
}

.wb-text-carousel .wb-text-carousel__desc {
  margin: 0;
  color: var(--color-scheme-3--text, var(--_primitives---colors--neutral-darkest));
}

/* -------------------------------------------------------------------------
   Slider column: viewport then nav row (Figma gap 48 / 32)
   ------------------------------------------------------------------------- */
.wb-text-carousel__content {
  width: 100%;
}

.wb-text-carousel__slider {
  display: flex;
  flex-direction: column;
  gap: 3rem;
  width: 100%;
}

@media (max-width: 767px) {
  .wb-text-carousel__slider {
    gap: 2rem;
  }
}

/* Viewport: contained (no full-bleed) — matches Figma frame width */
.wb-text-carousel__viewport {
  position: relative;
  overflow: hidden;
  width: 100%;
}

.wb-text-carousel__track {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  will-change: transform;
  touch-action: pan-y;
  /* Figma: 32px gap desktop, 24px mobile */
  gap: 2rem;
}

@media (max-width: 767px) {
  .wb-text-carousel__track {
    gap: 1.5rem;
  }
}

.wb-text-carousel__slide {
  flex: 0 0 auto;
  user-select: none;
  box-sizing: border-box;
}

.wb-text-carousel__figure {
  position: relative;
  width: 100%;
  border-radius: var(--_ui-styles---radius--medium);
  overflow: hidden;
  aspect-ratio: 1 / 1;
}

.wb-text-carousel__link {
  display: block;
  width: 100%;
  height: 100%;
}

.wb-text-carousel__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--_ui-styles---radius--medium);
}

/* -------------------------------------------------------------------------
   Nav row — dots left, arrows right (Figma justify-between)
   ------------------------------------------------------------------------- */
.wb-text-carousel__nav {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 1rem;
}

.wb-text-carousel__dots {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  min-height: 0.5rem;
}

.wb-text-carousel__dots .w-slider-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background-color: var(--color-scheme-3--foreground, var(--_primitives---colors--neutral-lightest));
  cursor: pointer;
  transition: opacity 0.2s ease, background-color 0.2s ease;
  opacity: 0.6;
}

.wb-text-carousel__dots .w-slider-dot.w-active {
  opacity: 1;
  background-color: var(--color-scheme-3--text, var(--_primitives---colors--neutral-darkest));
}

.wb-text-carousel__arrows {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 1rem;
  flex-shrink: 0;
}

/* Figma: pill buttons, bg foreground, 1px border white, 12px padding, 24px icon */
.wb-text-carousel .wb-text-carousel__arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0.75rem;
  border: 1px solid var(--color-scheme-3--background, var(--_primitives---colors--white));
  border-radius: 100px;
  background-color: var(--color-scheme-3--foreground, var(--_primitives---colors--neutral-lightest));
  color: var(--color-scheme-3--text, var(--_primitives---colors--neutral-darkest));
  cursor: pointer;
  line-height: 0;
  transition: opacity 0.2s ease, background-color 0.2s ease;
}

.wb-text-carousel .wb-text-carousel__arrow:hover {
  opacity: 0.92;
}

.wb-text-carousel .wb-text-carousel__arrow:focus-visible {
  outline: 2px solid var(--color-scheme-3--accent, var(--_primitives---colors--razzmatazz));
  outline-offset: 2px;
}

.wb-text-carousel__arrow-icon {
  display: flex;
  width: 1.5rem;
  height: 1.5rem;
  align-items: center;
  justify-content: center;
}

.wb-text-carousel__arrow-icon svg {
  width: 100%;
  height: 100%;
}
