/* solar-system.css - Estilos del sistema planetario responsivo con glow, lunas y fondo estelar */

/* 1. Fondo Espacial */
.space-bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, rgba(10, 10, 15, 0.4) 0%, rgba(3, 3, 5, 0.95) 100%),
    url('../assets/img/space-bg.webp') center/cover no-repeat;
  z-index: 1;
}

/* 2. Estrellas y Estrellas Fugaces */
.twinkle-star {
  position: absolute;
  border-radius: 50%;
  opacity: 0.3;
  pointer-events: none;
  animation: twinkle 3s infinite ease-in-out;
  z-index: 2;
}

.shooting-star {
  position: absolute;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, rgba(34, 211, 238, 0.3) 60%, #ffffff 100%);
  transform-origin: left center;
  transform: rotate(-45deg);
  pointer-events: none;
  z-index: 3;
  animation: shoot 1.2s linear forwards;
}

/* Keyframes de Fondo */
@keyframes twinkle {

  0%,
  100% {
    opacity: 0.25;
    transform: scale(0.9);
  }

  50% {
    opacity: 1;
    transform: scale(1.1);
  }
}

@keyframes shoot {
  0% {
    transform: translate3d(0, 0, 0) rotate(-45deg) scaleX(0);
    opacity: 0;
  }

  10% {
    opacity: 1;
    transform: translate3d(0, 0, 0) rotate(-45deg) scaleX(1);
  }

  90% {
    opacity: 1;
  }

  100% {
    transform: translate3d(800px, 800px, 0) rotate(-45deg) scaleX(1);
    opacity: 0;
  }
}

/* 3. Contenedor General del Sistema Solar */
.solar-system-container {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90vmin;
  height: 90vmin;
  max-width: 900px;
  max-height: 900px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  pointer-events: none;
}

/* 4. Estrella Madre (Sol) */
.star-mother-wrapper {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 15;
  pointer-events: auto;
}

.star-mother-wrapper .star {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: radial-gradient(circle at center, #ffffff 0%, var(--color-accent) 35%, var(--color-primary) 85%);
  cursor: pointer;
  box-shadow: 0 0 35px 12px rgba(139, 92, 246, 0.65), 0 0 70px 20px rgba(34, 211, 238, 0.45);
  animation: star-pulse 3.5s infinite ease-in-out;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.star-mother-wrapper .star:hover {
  transform: scale(1.05);
  box-shadow: 0 0 45px 18px rgba(139, 92, 246, 0.8), 0 0 90px 28px rgba(34, 211, 238, 0.6);
}

.star-title {
  font-family: var(--font-family-heading);
  font-size: clamp(1rem, 2.5vw, 1.4rem);
  letter-spacing: 2px;
  color: #ffffff;
  text-shadow: 0 0 10px rgba(139, 92, 246, 0.8), 0 0 20px rgba(34, 211, 238, 0.5);
  margin-top: 15px;
  text-align: center;
  white-space: nowrap;
  pointer-events: none;
}

.star-tooltip {
  font-family: var(--font-family-sans);
  font-size: 11px;
  font-weight: 600;
  color: var(--color-accent);
  opacity: 0.85;
  margin-top: 4px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.9);
  pointer-events: none;
  transition: opacity 0.3s ease;
}

/* Keyframes de la Estrella */
@keyframes star-pulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 35px 12px rgba(139, 92, 246, 0.65), 0 0 70px 20px rgba(34, 211, 238, 0.45);
  }

  50% {
    transform: scale(1.06);
    box-shadow: 0 0 48px 18px rgba(139, 92, 246, 0.85), 0 0 90px 28px rgba(34, 211, 238, 0.6);
  }

  100% {
    transform: scale(1);
    box-shadow: 0 0 35px 12px rgba(139, 92, 246, 0.65), 0 0 70px 20px rgba(34, 211, 238, 0.45);
  }
}

/* 5. Contenedor de Planetas y Órbitas */
.planet-container {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.planet-orbit {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(212, 175, 55, 0.25);
  /* dorado */
  border-radius: 50%;
  background: transparent;
  pointer-events: none;
  z-index: 5;
}

.planet-orbit[data-id="about"],
.planet-orbit[data-id="testimonials"],
.planet-orbit[data-id="contact"] {
  border-color: rgba(212, 175, 55, 0.18);
  /* dorado tenue alternado */
}

.planet-orbit[data-id="guarantee"] {
  border-color: rgba(209, 153, 0, 0.35);
  /* dorado para Garantía Profesional */
}

/* 6. Planetas (Envoltorio y Cuerpo) */
.planet-wrapper {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  pointer-events: none;
  z-index: 8;
}

.planet {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, var(--planet-color-light), var(--planet-color-dark));
  box-shadow: 0 0 18px 4px rgba(var(--planet-glow-color), 0.55),
    0 0 35px 8px rgba(var(--planet-glow-color), 0.25);
  transform: translate(-50%, -50%);
  cursor: pointer;
  pointer-events: auto;
  transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1),
    box-shadow 0.3s ease;
}

.planet:hover {
  transform: translate(-50%, -50%) scale(1.25);
  box-shadow: 0 0 25px 6px rgba(var(--planet-glow-color), 0.8),
    0 0 45px 12px rgba(var(--planet-glow-color), 0.4);
}

/* Etiquetas permanentes del planeta (independientes, anti-colisión) */
.planet-label {
  position: absolute;
  top: 50%;
  left: 50%;
  font-family: var(--font-family-sans);
  font-size: 12px;
  font-weight: 600;
  color: #f3f4f6;
  background: rgba(0, 0, 0, 0.55);
  padding: 2px 8px;
  border-radius: 6px;
  white-space: nowrap;
  pointer-events: none;
  z-index: 50;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

/* 7. Lunas y sus órbitas */
.moon-orbit {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border: 1px dashed rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  background: transparent;
  pointer-events: none;
  z-index: 6;
}

.moon {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, var(--moon-color-light), var(--moon-color-dark));
  box-shadow: 0 0 8px 1px rgba(var(--moon-glow-color), 0.4),
    0 0 15px 3px rgba(var(--moon-glow-color), 0.2);
  transform: translate(-50%, -50%);
  cursor: pointer;
  pointer-events: auto;
  z-index: 9;
}

.moon-tooltip {
  position: absolute;
  bottom: 130%;
  left: 50%;
  transform: translateX(-50%) translateY(5px);
  background: rgba(15, 15, 25, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 4px 8px;
  border-radius: 6px;
  font-family: var(--font-family-sans);
  font-size: 10px;
  font-weight: 600;
  color: #ffffff;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.moon:hover .moon-tooltip {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* 8. Responsividad para dispositivos móviles */
@media (max-width: 768px) {
  .star-mother-wrapper .star {
    width: 70px;
    height: 70px;
  }

  .planet {
    width: 32px;
    height: 32px;
  }

  .planet-label {
    font-size: 11px;
    padding: 1px 6px;
  }

  .moon {
    width: 14px;
    height: 14px;
  }

  .moon-tooltip {
    font-size: 9px;
  }
}

/* 9. Móvil muy pequeño: ocultar lunas para evitar solapamiento */
@media (max-width: 480px) {

  .moon,
  .moon-orbit {
    display: none;
  }

  .planet-label {
    font-size: 10px;
    padding: 1px 5px;
  }
}