/* ==========================================================================
   Red Stripe & Team Slider Component
   ========================================================================== */

/* Red Navigation Stripe
   ========================================================================== */
.red-stripe {
  background-color: #e4002b;
  height: 5px;
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  z-index: 999;
  transition: top var(--transition-base);
}

.header.scrolled ~ .red-stripe {
  top: var(--header-height-scrolled);
}

/* Team Slider Container
   ========================================================================== */
.team-slider-wrapper {
  background-color: #1a1a2e;
  position: fixed;
  top: calc(var(--header-height) + 5px);
  left: 0;
  right: 0;
  z-index: 998;
  overflow: hidden;
  transition: top var(--transition-base);
}

.header.scrolled ~ .red-stripe ~ .team-slider-wrapper {
  top: calc(var(--header-height-scrolled) + 5px);
}

.team-slider {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-xs) 0;
  animation: scrollTeams 40s linear infinite;
  width: max-content;
}

.team-slider:hover {
  animation-play-state: paused;
}

@keyframes scrollTeams {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

/* Team Item
   ========================================================================== */
.team-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 80px;
  padding: var(--space-xs) var(--space-sm);
  text-decoration: none;
  transition: transform var(--transition-fast), opacity var(--transition-fast);
}

.team-item:hover {
  transform: scale(1.1);
}

.team-item:focus {
  outline: 2px solid var(--color-secondary);
  outline-offset: 2px;
}

.team-badge {
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: 4px;
  background-color: rgba(255, 255, 255, 0.05);
}

.team-name {
  font-family: var(--font-heading);
  font-size: 10px;
  font-weight: 600;
  color: white;
  text-align: center;
  max-width: 80px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

/* Responsive
   ========================================================================== */
@media (min-width: 768px) {
  .team-item {
    min-width: 90px;
    padding: var(--space-xs) var(--space-md);
  }

  .team-badge {
    width: 45px;
    height: 45px;
  }

  .team-name {
    font-size: 11px;
    max-width: 90px;
  }
}

@media (min-width: 992px) {
  .team-item {
    min-width: 100px;
  }

  .team-badge {
    width: 50px;
    height: 50px;
  }

  .team-name {
    font-size: 12px;
    max-width: 100px;
  }
}

/* Main content offset to account for fixed elements
   ========================================================================== */
body {
  padding-top: calc(var(--header-height) + 5px + 70px);
}

body.scrolled {
  padding-top: calc(var(--header-height-scrolled) + 5px + 70px);
}

/* Mobile Navigation Adjustment
   ========================================================================== */
.nav-mobile {
  top: calc(var(--header-height) + 5px + 70px);
}

.header.scrolled + .red-stripe + .team-slider-wrapper + .nav-mobile,
.header.scrolled ~ .nav-mobile {
  top: calc(var(--header-height-scrolled) + 5px + 70px);
}

/* Group Separator
   ========================================================================== */
.team-slider-separator {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 60px;
  height: 50px;
  margin: 0 var(--space-sm);
}

.team-slider-separator span {
  display: inline-block;
  padding: 4px 12px;
  background-color: var(--color-secondary);
  color: white;
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  border-radius: 4px;
  letter-spacing: 0.5px;
}
