/* =========================================================
   TECNOLASER SERVICE NAVIGATION
========================================================= */

.tecnolaser-service-nav {
  --line-start: 16%;
  --line-end: 84%;
  --line-width: calc(var(--line-end) - var(--line-start));
  --travel-progress: calc(var(--active-index) / (var(--item-count) - 1));
  --travel-duration: 1.65s;
  --travel-ease: cubic-bezier(0.22, 0.84, 0.24, 1);

  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 52px;

  width: min(760px, calc(100% - 64px));
  margin: 0 auto;
  padding: 22px 0 0;

  z-index: 5;
}

/* =========================================================
   LINEA
========================================================= */

.tecnolaser-service-nav::before,
.tecnolaser-service-nav::after {
  content: "";

  position: absolute;
  top: 48px;
  left: var(--line-start);

  height: 2px;
  transform: translateY(-50%);

  z-index: 1;
}

.tecnolaser-service-nav::before {
  right: calc(100% - var(--line-end));
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.05));
}

.tecnolaser-service-nav::after {
  width: calc(var(--line-width) * var(--travel-progress));
  background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.84), rgba(255, 255, 255, 0.18));
  opacity: 0;
  transform: translateY(-50%) scaleX(0.15);
  transform-origin: left center;
}

.tecnolaser-service-nav.is-animating::after {
  opacity: 1;
  animation: tecnolaserTravelLine var(--travel-duration) var(--travel-ease) forwards;
}

.tecnolaser-service-travel {
  position: absolute;
  top: 48px;
  left: var(--line-start);

  width: 24px;
  height: 24px;

  transform: translate(-50%, -50%);
  opacity: 0;

  z-index: 3;
  pointer-events: none;
}

.tecnolaser-service-nav.is-animating .tecnolaser-service-travel {
  opacity: 1;
  animation: tecnolaserTravelMove var(--travel-duration) var(--travel-ease) forwards;
}

.tecnolaser-service-travel-glow,
.tecnolaser-service-travel-core,
.tecnolaser-service-travel-trail {
  position: absolute;
  display: block;
}

.tecnolaser-service-travel-glow {
  inset: -12px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0));
  filter: blur(5px);
  opacity: 0.92;
}

.tecnolaser-service-travel-core {
  top: 50%;
  left: 50%;

  width: 11px;
  height: 11px;

  border-radius: 999px;
  background: radial-gradient(circle at 35% 35%, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0.58) 58%, rgba(255, 255, 255, 0.12) 100%);
  box-shadow:
    0 0 16px rgba(255, 255, 255, 0.34),
    0 0 34px rgba(255, 255, 255, 0.14);

  transform: translate(-50%, -50%);
}

.tecnolaser-service-travel-trail {
  top: 50%;
  right: 50%;

  width: 88px;
  height: 14px;

  background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.06) 28%, rgba(255, 255, 255, 0.32) 100%);
  filter: blur(6px);
  opacity: 0.84;

  transform: translateY(-50%);
}

/* =========================================================
   ITEM
========================================================= */

.tecnolaser-service-item {
  position: relative;
  z-index: 2;

  display: flex;
  flex-direction: column;
  align-items: center;

  min-width: 134px;

  text-decoration: none;
  text-align: center;

  transition:
    transform 0.32s ease,
    opacity 0.32s ease;
}

.tecnolaser-service-icon-wrapper {
  width: 82px;
  height: 82px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);

  background:
    radial-gradient(circle at 30% 30%, rgba(24, 41, 62, 0.72), rgba(12, 21, 32, 0.34) 68%, rgba(8, 14, 22, 0.08) 100%);

  backdrop-filter: blur(10px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 14px 24px rgba(0, 0, 0, 0.18);

  transition:
    transform 0.32s ease,
    border-color 0.32s ease,
    background 0.32s ease,
    box-shadow 0.32s ease,
    opacity 0.32s ease;
}

.tecnolaser-service-icon {
  width: 46px;
  height: 46px;

  object-fit: contain;

  opacity: 0.76;
  filter: drop-shadow(0 4px 12px rgba(255, 255, 255, 0.14));

  transition:
    transform 0.32s ease,
    opacity 0.32s ease,
    filter 0.32s ease;
}

.tecnolaser-service-label {
  margin-top: 16px;

  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;

  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 0 18px rgba(255, 255, 255, 0.1);
  white-space: nowrap;

  transition:
    opacity 0.32s ease,
    transform 0.32s ease;
}

/* =========================================================
   STATES
========================================================= */

.tecnolaser-service-item:not(.active) {
  opacity: 0.56;
  transform: scale(0.94);
}

.tecnolaser-service-item:not(.active) .tecnolaser-service-label {
  opacity: 0.58;
}

.tecnolaser-service-item:hover {
  opacity: 1;
  transform: translateY(-2px) scale(0.98);
}

.tecnolaser-service-item:hover .tecnolaser-service-icon-wrapper {
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 18px 30px rgba(0, 0, 0, 0.2),
    0 0 24px rgba(255, 255, 255, 0.08);
}

.tecnolaser-service-item:hover .tecnolaser-service-icon {
  opacity: 1;
  transform: scale(1.06);
}

.tecnolaser-service-item.active {
  opacity: 1;
  transform: translateY(-4px) scale(1.08);
}

.tecnolaser-service-item.active .tecnolaser-service-icon-wrapper {
  border-color: rgba(255, 255, 255, 0.32);
  background:
    radial-gradient(circle at 30% 30%, rgba(88, 108, 136, 0.76), rgba(26, 39, 56, 0.8) 72%, rgba(12, 19, 30, 0.38) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 18px 34px rgba(0, 0, 0, 0.2),
    0 0 0 10px rgba(255, 255, 255, 0.03),
    0 0 40px rgba(255, 255, 255, 0.08);
}

.tecnolaser-service-item.active .tecnolaser-service-icon {
  opacity: 1;
  transform: scale(1.14);
  filter: drop-shadow(0 8px 20px rgba(255, 255, 255, 0.2));
}

.tecnolaser-service-item.active .tecnolaser-service-label {
  opacity: 1;
}

.tecnolaser-service-item.active::before {
  content: "";

  position: absolute;
  top: 48px;
  left: 50%;

  width: 118px;
  height: 118px;

  border-radius: 999px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0));
  filter: blur(18px);
  opacity: 0.62;

  transform: translate(-50%, -50%);
  z-index: -1;
}

/* =========================================================
   ANIMATIONS
========================================================= */

@keyframes tecnolaserTravelMove {
  0% {
    left: var(--line-start);
    transform: translate(-50%, -50%) scale(0.86);
  }

  45% {
    transform: translate(-50%, -50%) scale(1);
  }

  100% {
    left: calc(var(--line-start) + (var(--line-width) * var(--travel-progress)));
    transform: translate(-50%, -50%) scale(1);
  }
}

@keyframes tecnolaserTravelLine {
  0% {
    opacity: 0;
    transform: translateY(-50%) scaleX(0.08);
  }

  18% {
    opacity: 1;
  }

  100% {
    opacity: 1;
    transform: translateY(-50%) scaleX(1);
  }
}

/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 768px) {
  .tecnolaser-service-nav {
    --line-start: 14%;
    --line-end: 86%;

    width: calc(100% - 20px);
    gap: 14px;
    padding: 12px 0 0;
  }

  .tecnolaser-service-nav::before,
  .tecnolaser-service-nav::after,
  .tecnolaser-service-travel,
  .tecnolaser-service-item.active::before {
    top: 34px;
  }

  .tecnolaser-service-travel {
    width: 20px;
    height: 20px;
  }

  .tecnolaser-service-travel-core {
    width: 9px;
    height: 9px;
  }

  .tecnolaser-service-travel-trail {
    width: 56px;
    height: 10px;
  }

  .tecnolaser-service-item {
    min-width: 82px;
  }

  .tecnolaser-service-icon-wrapper {
    width: 58px;
    height: 58px;
  }

  .tecnolaser-service-icon {
    width: 34px;
    height: 34px;
  }

  .tecnolaser-service-label {
    margin-top: 10px;
    font-size: 10px;
    letter-spacing: 0.08em;
  }

  .tecnolaser-service-item.active::before {
    width: 74px;
    height: 74px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tecnolaser-service-nav::after,
  .tecnolaser-service-travel,
  .tecnolaser-service-nav.is-animating .tecnolaser-service-travel,
  .tecnolaser-service-item,
  .tecnolaser-service-icon-wrapper,
  .tecnolaser-service-icon,
  .tecnolaser-service-label {
    animation: none !important;
    transition: none !important;
  }

  .tecnolaser-service-travel {
    opacity: 1;
    left: calc(var(--line-start) + (var(--line-width) * var(--travel-progress)));
    transform: translate(-50%, -50%);
  }

  .tecnolaser-service-nav::after {
    opacity: 1;
    transform: translateY(-50%) scaleX(1);
  }
}
