/* ========= USP Bar (Mobile-first, animated) ========= */
.usp-bar {
  --marquee-speed: 22s;           /* adjust speed: lower = faster */
  --gap: 1rem;
  background: var(--accent);
  border-top: 2px solid var(--highlight);
  border-bottom: 2px solid var(--highlight);
  padding: 0.75rem 0;
}

/* Viewport that hides overflow and adds a subtle edge fade */
.usp-viewport {
  position: relative;
  overflow: hidden;
  padding-inline: 1rem;
  /* fade edges (works in modern browsers) */
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 24px, #000 calc(100% - 24px), transparent 100%);
  mask-image: linear-gradient(to right, transparent 0, #000 24px, #000 calc(100% - 24px), transparent 100%);
  display: flex;                  /* holds two tracks side-by-side */
  gap: var(--gap);
}

/* Each track holds one full sequence of items */
.usp-track {
  display: inline-flex;
  align-items: center;
  gap: var(--gap);
  white-space: nowrap;
  flex: 0 0 auto;                 /* don't shrink */
  animation: usp-marquee var(--marquee-speed) linear infinite;
}

/* Mobile items */
.usp-item {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0 .25rem;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--dark);
  white-space: nowrap;
}

.usp-item i {
  background: rgba(255,255,255,0.15);
  padding: 0.4rem;
  border-radius: 50%;
  font-size: 1rem;
  color: var(--highlight);
}

/* Pause on hover/focus (desktop) or while pressing (mobile) */
.usp-viewport:hover .usp-track,
.usp-viewport:focus-within .usp-track,
.usp-viewport:active .usp-track {
  animation-play-state: paused;
}

/* Keyframes: shift left by 50% of the combined width (two tracks fill the loop) */
@keyframes usp-marquee {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .usp-track { animation: none; }
}

/* ========= Tablet & up (≥768px): disable marquee, show static row ========= */
@media (min-width: 768px) {
  .usp-viewport {
    -webkit-mask-image: none;
    mask-image: none;
    overflow: visible;
    padding-inline: 0;
    gap: 0;
  }

  .usp-bar { padding: 1rem 0; }

  /* Merge the two tracks visually into one row and stop animation */
  .usp-track {
    animation: none;
  }

  /* Use a single-row flex layout across both tracks */
  .usp-viewport {
    display: flex;
    flex-wrap: wrap;
    column-gap: 1.5rem;
    row-gap: .75rem;
    justify-content: space-between;
  }

  .usp-item {
    font-size: 0.95rem;
  }

  .usp-item i {
    font-size: 1.2rem;
    padding: 0.5rem;
  }
}

/* ========= Desktop (≥1024px): tighten into one clean row ========= */
@media (min-width: 1024px) {
  .usp-viewport {
    flex-wrap: nowrap;
    justify-content: space-between;
  }
}

/* ===== Desktop & larger tablets (≥768px): 5 texts, no duplicates ===== */
@media (min-width: 768px) {
  .usp-viewport {
    /* disable the marquee look */
    -webkit-mask-image: none;
    mask-image: none;
    overflow: visible;
    padding-inline: 0;
  }

  /* stop animation and hide the duplicate track */
  .usp-track {
    animation: none;
    display: flex;
    gap: 1rem;
    width: 100%;
    justify-content: space-between; /* evenly across the row */
  }
  .usp-viewport .usp-track:nth-of-type(2) {
    display: none; /* hide the duplicate track so no duplicates on desktop */
  }

  /* show only the first 5 items from the first track */
  .usp-track .usp-item:nth-child(n + 6) {
    display: none;
  }

  /* desktop sizing */
  .usp-item { font-size: 0.95rem; }
  .usp-item i { font-size: 1.2rem; padding: 0.5rem; }
}

/* Optional helpers to control which 5 show:
   Add data-hide-desktop to any item you want hidden on desktop, or
   data-show-desktop to force-show one you’ve otherwise hidden. */
@media (min-width: 768px) {
  .usp-item[data-hide-desktop] { display: none !important; }
  .usp-item[data-show-desktop] { display: inline-flex !important; }
}