/* ============================================
   PMF CAR ANIMATION - Kia Sportage
   ============================================ */

.pmf-car {
  position: fixed;
  bottom: 80px;
  left: 20px;
  z-index: 999;
  opacity: 0;
  transform: translateX(-100px);
  transition: opacity 0.6s ease, transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

.pmf-car.visible {
  opacity: 1;
  transform: translateX(0);
}

.car-container {
  position: relative;
  width: 120px;
  height: auto;
}

.car-image {
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(2px 4px 8px rgba(0, 0, 0, 0.15));
}

.car-shadow {
  position: absolute;
  bottom: -8px;
  left: 10%;
  width: 80%;
  height: 12px;
  background: radial-gradient(ellipse, rgba(0, 0, 0, 0.3), transparent);
  border-radius: 50%;
  animation: shadowPulse 2s ease-in-out infinite;
}

@keyframes shadowPulse {
  0%, 100% {
    transform: scale(1);
    opacity: 0.3;
  }
  50% {
    transform: scale(1.1);
    opacity: 0.2;
  }
}

.speed-lines {
  position: absolute;
  top: 50%;
  left: -30px;
  width: 40px;
  height: 3px;
  background: linear-gradient(90deg, transparent, rgba(167, 0, 7, 0.5), transparent);
  transform: translateY(-50%);
  opacity: 0;
  animation: speedLines 1.5s ease-in-out infinite;
}

@keyframes speedLines {
  0% {
    opacity: 0;
    left: -30px;
  }
  50% {
    opacity: 0.7;
  }
  100% {
    opacity: 0;
    left: -60px;
  }
}

.car-tooltip {
  position: absolute;
  top: -45px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(1, 151, 158, 1);
  color: white;
  padding: 8px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.pmf-car:hover .car-tooltip {
  opacity: 1;
}

.car-tooltip i {
  font-size: 16px;
}

.progress-badge {
  position: absolute;
  top: -30px;
  right: -10px;
  background: #a70007;
  color: white;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(167, 0, 7, 0.3);
}

/* ============================================
   TOUR PROGRESS BAR
   ============================================ */

.tour-progress-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: rgba(0, 0, 0, 0.05);
  z-index: 998;
}

.tour-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #a70007, #01979e);
  transition: width 0.1s ease;
  position: relative;
}

.progress-text {
  position: absolute;
  right: 10px;
  top: -25px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
  display: none;
}

/* ============================================
   BACK TO TOP BUTTON
   ============================================ */

.back-to-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  background: #01979e;
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  box-shadow: 0 4px 12px rgba(1, 151, 158, 0.3);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 997;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background: #a70007;
  transform: translateY(-5px);
  box-shadow: 0 6px 18px rgba(167, 0, 7, 0.4);
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
  .pmf-car {
    display: none;
  }

  .tour-progress-bar {
    display: none;
  }

  .back-to-top {
    width: 45px;
    height: 45px;
    bottom: 15px;
    right: 15px;
    z-index: 900;  /* Bajado para que no interfiera con WhatsApp */
  }
}

@media (max-width: 480px) {
  .car-container {
    width: 75px;
  }

  .pmf-car {
    bottom: 65px;
  }
}