/* Technologies Infinite Fade Scroller */

.technologies {
  padding: 80px 20px;
  background: #030D1A;
  position: relative;
  overflow: hidden;
}

.technologies h2 {
  text-align: center;
  font-size: 36px;
  font-weight: 800;
  color: white;
  margin-bottom: 60px;
}

.tech-slider {
  position: relative;
  width: 100%;
  overflow: hidden;
  padding: 20px 0;
}

/* Edge Fading - 15% gradient mask on both sides */
.tech-slider::before,
.tech-slider::after {
  content: '';
  position: absolute;
  top: 0;
  width: 15%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
}

.tech-slider::before {
  left: 0;
  background: linear-gradient(to right, #030D1A 0%, transparent 100%);
}

.tech-slider::after {
  right: 0;
  background: linear-gradient(to left, #030D1A 0%, transparent 100%);
}

/* Tech Track - Infinite Loop */
.tech-track {
  display: flex;
  gap: 80px;
  animation: infiniteScroll 40s linear infinite;
  width: fit-content;
}

/* Pause on hover */
.tech-slider:hover .tech-track {
  animation-play-state: paused;
}

/* Duplicate the track for seamless loop */
.tech-track::after {
  content: '';
  display: flex;
  gap: 80px;
}

/* Tech Logo Styling */
.tech-track img {
  height: 60px;
  width: auto;
  object-fit: contain;
  filter: grayscale(100%) brightness(3) invert(1);
  opacity: 0.9;
  transition: all 0.4s ease;
  cursor: pointer;
  flex-shrink: 0;
}

/* Hover State - Color Reveal */
.tech-track img:hover {
  filter: grayscale(0%) brightness(1) invert(0);
  opacity: 1;
  transform: scale(1.05);
}

/* Infinite Scroll Animation - No snap or jump */
@keyframes infiniteScroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

/* Light Theme Overrides */
body.light-theme .technologies {
  background: #ffffff;
}

body.light-theme .technologies h2 {
  color: #1a1f3a;
}

body.light-theme .tech-slider::before {
  background: linear-gradient(to right, #ffffff 0%, transparent 100%);
}

body.light-theme .tech-slider::after {
  background: linear-gradient(to left, #ffffff 0%, transparent 100%);
}

/* Responsive Design */
@media (max-width: 768px) {
  .technologies {
    padding: 60px 20px;
  }

  .technologies h2 {
    font-size: 28px;
    margin-bottom: 40px;
  }

  .tech-track {
    gap: 60px;
  }

  .tech-track img {
    height: 50px;
  }
}


/* Light Theme - Darker logos */
body.light-theme .tech-track img {
  filter: grayscale(100%) brightness(0.5) invert(0);
  opacity: 0.7;
}

body.light-theme .tech-track img:hover {
  filter: grayscale(0%) brightness(1) invert(0);
  opacity: 1;
}
