/* ─────────────────────────────────────────────
   _slider.css — Carousel (CSS scroll-snap)
   ─────────────────────────────────────────────
   API:
     <div class="carousel">
       <div class="carousel-item" id="slide1">...</div>
       <div class="carousel-item" id="slide2">...</div>
     </div>

     Navigation (pure CSS anchor links):
     <div class="carousel-nav">
       <a href="#slide1" class="carousel-btn">❮</a>
       <a href="#slide2" class="carousel-btn">❯</a>
     </div>

     Dots:
     <div class="carousel-dots">
       <a href="#slide1" class="carousel-dot"></a>
       <a href="#slide2" class="carousel-dot"></a>
     </div>

   Snap modes:  default (start)  .carousel-center  .carousel-end
   Direction:   default (x)      .carousel-vertical
   Multi-item:  .carousel-gap (shows partial next item)
   Fullwidth:   .carousel-full
───────────────────────────────────────────── */

/* ═══════════════════════════════
   WRAPPER
═══════════════════════════════ */
.carousel {
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  gap: 0;
  border-radius: var(--radius-lg, 12px);
}

.carousel::-webkit-scrollbar {
  display: none;
}

/* ═══════════════════════════════
   ITEM
═══════════════════════════════ */
.carousel-item {
  flex: 0 0 100%;
  scroll-snap-align: start;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.carousel-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
  user-select: none;
}

/* ═══════════════════════════════
   SNAP VARIANTS
═══════════════════════════════ */
.carousel-center .carousel-item {
  scroll-snap-align: center;
}

.carousel-end .carousel-item {
  scroll-snap-align: end;
}

/* ═══════════════════════════════
   VERTICAL
═══════════════════════════════ */
.carousel-vertical {
  flex-direction: column;
  overflow-x: hidden;
  overflow-y: auto;
  scroll-snap-type: y mandatory;
}

.carousel-vertical .carousel-item {
  flex: 0 0 100%;
}

/* ═══════════════════════════════
   MULTI-ITEM (gap carousel)
   Shows partial next slide
═══════════════════════════════ */
.carousel-gap {
  gap: 16px;
  padding: 0 16px;
}

.carousel-gap .carousel-item {
  flex: 0 0 calc(80% - 8px);
  border-radius: var(--radius-lg, 12px);
}

/* ═══════════════════════════════
   FULLWIDTH (edge-to-edge)
═══════════════════════════════ */
.carousel-full {
  border-radius: 0;
}

/* ═══════════════════════════════
   NAVIGATION WRAPPER
   (wraps carousel + nav overlay)
═══════════════════════════════ */
.carousel-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Prev/Next button overlay */
.carousel-nav {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  pointer-events: none;
}

/* Absolute overlay mode (buttons float over carousel) */
.carousel-wrap > .carousel-nav {
  position: absolute;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  padding: 0 12px;
  z-index: 10;
  pointer-events: none;
}

.carousel-wrap > .carousel-nav .carousel-btn {
  pointer-events: all;
}

/* ═══════════════════════════════
   PREV / NEXT BUTTONS
═══════════════════════════════ */
.carousel-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--color-dark-secondary) 90%, transparent);
  border: 1px solid color-mix(in srgb, var(--color-neutral-600) 22%, transparent);
  color: var(--color-light);
  font-size: 16px;
  text-decoration: none;
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: background 0.15s, transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 2px 8px color-mix(in srgb, #000 18%, transparent);
  user-select: none;
  flex-shrink: 0;
}

.carousel-btn:hover {
  background: var(--color-dark-secondary);
  transform: scale(1.08);
  box-shadow: 0 4px 16px color-mix(in srgb, #000 24%, transparent);
}

.carousel-btn:active {
  transform: scale(0.96);
}

/* ═══════════════════════════════
   DOTS
═══════════════════════════════ */
.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 4px 0;
}
  .carousel-dots button {
    font-size: 0;
    line-height: 0;
    padding: 0;
  }

.carousel-dot {
  display: block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--color-neutral-600) 35%, transparent);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.18s, width 0.18s, border-radius 0.18s;
  flex-shrink: 0;
}

.carousel-dot:hover {
  background: color-mix(in srgb, var(--color-primary) 60%, transparent);
}

/* Active dot — highlight via :target on slides */
.carousel-dot.is-active,
.carousel-dot[aria-current="true"] {
  background: var(--color-primary);
  width: 20px;
  border-radius: 4px;
}

/* ═══════════════════════════════
   SLIDE SIZES
═══════════════════════════════ */
.carousel-item-sm  { min-height: 160px; }
.carousel-item-md  { min-height: 260px; }
.carousel-item-lg  { min-height: 360px; }
.carousel-item-xl  { min-height: 480px; }

/* ═══════════════════════════════
   SLIDE CONTENT HELPERS
═══════════════════════════════ */
.carousel-slide {
  width: 100%;
  height: 100%;
  min-height: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 24px;
  text-align: center;
  gap: 12px;
  border-radius: inherit;
}

.carousel-slide-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--color-light);
  line-height: 1.2;
}

.carousel-slide-desc {
  font-size: 0.95rem;
  color: var(--color-muted);
  line-height: 1.55;
  max-width: 420px;
}

/* ═══════════════════════════════
   CARD CAROUSEL ITEM
   (multi-item, shows as cards)
═══════════════════════════════ */
.carousel-card {
  background: var(--color-dark-secondary);
  border: 1px solid color-mix(in srgb, var(--color-neutral-600) 20%, transparent);
  border-radius: var(--radius-lg, 12px);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 180px;
}

/* ═══════════════════════════════
   :target ACTIVE DOT (no JS)
   When a slide is targeted via anchor,
   the corresponding dot turns active.
   Requires dot IDs: dot-slide1, etc.
   and slide IDs: slide1, etc.
═══════════════════════════════ */
#slide1:target ~ .carousel-dots [href="#slide1"],
#slide2:target ~ .carousel-dots [href="#slide2"],
#slide3:target ~ .carousel-dots [href="#slide3"],
#slide4:target ~ .carousel-dots [href="#slide4"] {
  background: var(--color-primary);
  width: 20px;
  border-radius: 4px;
}


/* ═══════════════════════════════
   JS CAROUSEL (.js-carousel)
   Sequential prev/next via JS.
   Track slides horizontally.
═══════════════════════════════ */
.js-carousel {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
}
.js-carousel-track {
  display: flex;
  transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}
.js-carousel-track > * {
  flex: 0 0 100%;
  min-width: 0;
}
.js-carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  background: color-mix(in srgb, var(--color-dark-secondary) 90%, transparent);
  backdrop-filter: blur(6px);
  border: 1px solid color-mix(in srgb, var(--color-neutral-600) 35%, transparent);
  color: var(--color-light);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: background var(--ease), border-color var(--ease), box-shadow var(--ease);
}
.js-carousel-btn:hover {
  background: var(--color-primary);
  border-color: var(--color-primary);
  box-shadow: 0 2px 12px color-mix(in srgb, var(--color-primary) 40%, transparent);
}
/* CSS-only chevron icons — no SVG, no unicode */
.js-carousel-btn::before {
  content: '';
  display: block;
  width: 9px;
  height: 9px;
  border-top: 2.5px solid currentColor;
  border-radius: 1px;
}
.js-prev { left: 12px; }
.js-prev::before {
  border-left: 2.5px solid currentColor;
  transform: rotate(-45deg) translate(2px, 1px);
}
.js-next { right: 12px; }
.js-next::before {
  border-right: 2.5px solid currentColor;
  transform: rotate(45deg) translate(-2px, 1px);
}
.js-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding-top: 12px;
}
.js-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--color-neutral-600) 50%, transparent);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: all 0.2s;
}
.js-dot.is-active {
  background: var(--color-primary);
  width: 20px;
  border-radius: 4px;
}

/* ═══════════════════════════════
   FADE CAROUSEL (.js-carousel-fade)
═══════════════════════════════ */
.js-carousel-fade {
  position: relative;
}
.js-carousel-fade .js-fade-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  z-index: 0;
  transition: opacity 0.5s ease;
}
.js-carousel-fade .js-fade-slide:first-child {
  position: relative;
  opacity: 1;
  z-index: 1;
}

/* ═══════════════════════════════
   SCROLL-ONLY CAROUSEL (no JS, no nav arrows)
   Just scroll-snap + momentum
═══════════════════════════════ */
.scroll-carousel {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  gap: 16px;
  padding: 4px 4px 12px;
  -webkit-overflow-scrolling: touch;
}
.scroll-carousel::-webkit-scrollbar { display: none; }
.scroll-carousel > * {
  scroll-snap-align: start;
  flex-shrink: 0;
}

/* Faded edges hint (mask) */
.scroll-carousel-wrap {
  position: relative;
  overflow: hidden;
}
.scroll-carousel-wrap::before,
.scroll-carousel-wrap::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 40px;
  z-index: 2;
  pointer-events: none;
}
.scroll-carousel-wrap::before {
  left: 0;
  background: linear-gradient(to right, var(--сolor-dark), transparent);
}
.scroll-carousel-wrap::after {
  right: 0;
  background: linear-gradient(to left, var(--сolor-dark), transparent);
}

/* ═══════════════════════════════
   FULLSCREEN SNAP — 1 slide = 100% width, swipe
═══════════════════════════════ */
.snap-carousel {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  border-radius: var(--radius-lg);
  -webkit-overflow-scrolling: touch;
}
.snap-carousel::-webkit-scrollbar { display: none; }
.snap-carousel > * {
  flex: 0 0 100%;
  scroll-snap-align: center;
}

/* ═══════════════════════════════
   PEEK — shows edge of next card
═══════════════════════════════ */
.peek-carousel-wrap {
  overflow: hidden;
  padding: 0 32px;
}
.peek-carousel {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  gap: 12px;
  -webkit-overflow-scrolling: touch;
}
.peek-carousel::-webkit-scrollbar { display: none; }
.peek-carousel > * {
  flex: 0 0 calc(100% - 16px);
  scroll-snap-align: center;
}

/* ═══════════════════════════════
   VERTICAL SCROLL SNAP
═══════════════════════════════ */
.scroll-carousel-v {
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius-lg);
}
.scroll-carousel-v::-webkit-scrollbar { display: none; }
.scroll-carousel-v > * {
  flex: 0 0 100%;
  scroll-snap-align: start;
}

/* ═══════════════════════════════
   HERO SLIDER
═══════════════════════════════ */
.hero-slider {
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
}
.hero-slider-track {
  display: flex;
  transition: transform 0.55s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}
.hero-slider-slide {
  flex: 0 0 100%;
  min-height: 300px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 2rem;
  position: relative;
  overflow: hidden;
}
.hero-slider-slide::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.82) 0%, rgba(0,0,0,0.22) 50%, transparent 100%);
  z-index: 1;
}
.hero-slider-body {
  position: relative;
  z-index: 2;
  width: 100%;
}
.hero-slider-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
  margin-bottom: 6px;
}
.hero-slider-title {
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  font-weight: 900;
  color: #fff;
  line-height: 1.2;
  margin-bottom: 8px;
}
.hero-slider-desc {
  font-size: 13px;
  color: rgba(255,255,255,0.75);
  line-height: 1.5;
  margin-bottom: 14px;
  max-width: 420px;
}
.hero-slider-nav {
  position: absolute;
  top: 50%;
  left: 0; right: 0;
  transform: translateY(-50%);
  z-index: 3;
  display: flex;
  justify-content: space-between;
  padding: 0 12px;
  pointer-events: none;
}
.hero-slider-btn {
  pointer-events: all;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: rgba(0,0,0,0.42);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.18);
  color: #fff;
  font-size: 18px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}
.hero-slider-btn:hover {
  background: rgba(0,0,0,0.7);
  transform: scale(1.1);
}
.hero-slider-dots {
  position: absolute;
  bottom: 14px; right: 16px;
  z-index: 3;
  display: flex; gap: 6px;
}
.hero-slider-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.35);
  border: none; cursor: pointer; padding: 0;
  transition: all 0.2s;
}
.hero-slider-dot.is-active {
  background: #fff;
  width: 20px;
  border-radius: 4px;
}
.hero-slider-progress {
  position: absolute;
  bottom: 0; left: 0;
  height: 3px;
  background: var(--color-primary);
  z-index: 3;
  transition: width 0.1s linear;
  border-radius: 0 2px 0 0;
}

/* ═══════════════════════════════
   TESTIMONIALS SLIDER
═══════════════════════════════ */
.testi-slider {
  overflow: hidden;
  border-radius: var(--radius-lg);
  position: relative;
}
.testi-track {
  display: flex;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.testi-slide {
  flex: 0 0 100%;
  padding: 2rem 2.25rem;
  background: var(--color-dark-secondary);
  border: 1px solid color-mix(in srgb, var(--color-neutral-600) 22%, transparent);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.testi-stars { color: var(--color-warning); font-size: 14px; letter-spacing: 2px; }
.testi-quote {
  font-size: 15px;
  font-weight: 500;
  line-height: 1.7;
  color: var(--color-light);
  font-style: italic;
}
.testi-quote::before {
  content: '"';
  font-size: 2.5rem;
  color: var(--color-primary);
  line-height: 0;
  vertical-align: -0.55em;
  margin-right: 4px;
  font-style: normal;
}
.testi-user { display: flex; align-items: center; gap: 12px; margin-top: auto; }
.testi-avatar {
  width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; font-weight: 800; flex-shrink: 0;
}
.testi-name  { font-size: 14px; font-weight: 700; }
.testi-role  { font-size: 12px; color: var(--color-muted); }
.testi-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
}
.testi-nav { display: flex; gap: 8px; }
.testi-btn {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--color-dark-secondary);
  border: 1px solid color-mix(in srgb, var(--color-neutral-600) 30%, transparent);
  color: var(--color-light);
  font-size: 16px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.testi-btn:hover {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}
.testi-counter { font-size: 12px; color: var(--color-muted); font-weight: 600; }

/* ═══════════════════════════════
   AUTOPLAY LOGO STRIP
═══════════════════════════════ */
.autoplay-strip-wrap {
  overflow: hidden;
  position: relative;
}
.autoplay-strip-wrap::before,
.autoplay-strip-wrap::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  width: 64px;
  z-index: 2;
  pointer-events: none;
}
.autoplay-strip-wrap::before { left:  0; background: linear-gradient(to right, var(--сolor-dark), transparent); }
.autoplay-strip-wrap::after  { right: 0; background: linear-gradient(to left,  var(--сolor-dark), transparent); }
.autoplay-strip {
  display: flex;
  width: max-content;
  animation: njxAutoScroll 20s linear infinite;
}
.autoplay-strip:hover { animation-play-state: paused; }
@keyframes njxAutoScroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.autoplay-strip-item {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 24px;
  height: 52px;
  font-size: 13px;
  font-weight: 700;
  color: var(--color-muted);
  white-space: nowrap;
  transition: color 0.2s;
}
.autoplay-strip-item:hover { color: var(--color-light); }
