/*
 * A9 — Feature side-scroll styling
 * Matches "old version theme" pattern: horizontal snap-scroll
 * with arrow nav on desktop, native swipe on mobile.
 */

.features-scroll {
  position: relative;
  padding: 20px 0 40px;
}

.features-track {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding: 16px;
  padding: 8px 16px 24px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--twap-primary) transparent;
  cursor: grab;
}
.features-track.is-dragging { cursor: grabbing; scroll-snap-type: none; }

.features-track::-webkit-scrollbar {
  height: 6px;
}
.features-track::-webkit-scrollbar-thumb {
  background: var(--twap-primary);
  border-radius: 3px;
}

.features-track > .feature-card,
.features-track > .feature-item,
.features-track > .card {
  flex: 0 0 300px;
  max-width: 300px;
  scroll-snap-align: start;
  background: #fff;
  border-radius: 14px;
  padding: 24px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.features-track > .feature-card:hover,
.features-track > .feature-item:hover,
.features-track > .card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(34, 197, 94, 0.18);
}

.features-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 0;
  background: #fff;
  color: var(--twap-primary);
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  cursor: pointer;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: background 0.2s, color 0.2s;
}
.features-nav:hover {
  background: var(--twap-primary);
  color: #fff;
}
.features-nav.prev { left: 4px; }
.features-nav.next { right: 4px; }

@media (max-width: 768px) {
  .features-nav { display: none; }
  .features-track > .feature-card,
  .features-track > .feature-item,
  .features-track > .card {
    flex: 0 0 85%;
    max-width: 85%;
  }
}

/* IMAGE-FIX 2026-04-20: Feature showcase images sizing in side-scroll layout */
.feature-showcase .showcase-item {
    flex: 0 0 auto !important;
    width: min(420px, 85vw) !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 20px !important;
}
.feature-showcase .showcase-image {
    width: 100% !important;
    min-height: 240px !important;
    display: block !important;
}
.feature-showcase .showcase-image img {
    width: 100% !important;
    height: auto !important;
    max-height: 280px !important;
    object-fit: cover !important;
    display: block !important;
    border-radius: 12px !important;
    box-shadow: 0 8px 24px rgba(0,0,0,0.08) !important;
}
.feature-showcase .showcase-content {
    width: 100% !important;
}
