/* Animated World Widget - CSS with satellites support */

@keyframes counter-satellite-rotation {
  from {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  to {
    transform: translate(-50%, -50%) rotate(-360deg);
  }
}

.satellite-container {
  pointer-events: none;
  z-index: 15;
  animation: counter-satellite-rotation 60s linear infinite;
}

.satellite-container .satellite {
  pointer-events: auto;
}

.satellite-title {
  font-family: inherit;
  line-height: 1.2;
  letter-spacing: 0.5px;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0.9;
}

.satellite-container {
  will-change: transform;
}

.satellite-title {
  transition: all 0.3s ease;
}

/* Main section */
.hero-section {
  height: calc(100vh) !important; /* Mobile height */
  display: flex;
  align-items: center;
  overflow: hidden;
  position: relative;
}

/* Background glow */
.bg-glow {
  position: absolute;
  inset: 0; /* top: 0; right: 0; bottom: 0; left: 0; */
  background: radial-gradient(
    75% 75% at center center,
    rgba(140, 69, 255, 0.5) 15%,
    rgba(14, 0, 36, 0.5) 78%,
    transparent
  );
}

/* Central planet */
.planet {
  position: absolute;
  height: 12rem; /* h-64 */
  width: 12rem; /* w-64 */
  background-color: #a855f7; /* bg-purple-500 */
  border-radius: 9999px; /* rounded-full */
  border: 1px solid rgba(255, 255, 255, 0.2); /* border border-white/20 */
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(
    50% 50% at 16.8% 18.3%,
    white,
    rgb(184, 148, 255) 37.7%,
    rgb(24, 0, 66)
  );
  box-shadow: -20px -20px 50px rgba(255, 255, 255, 0.5),
    -20px -20px 80px rgba(255, 255, 255, 0.1), 0 0 50px rgb(140, 69, 255);
}

/* Orbits */
.orbit {
  position: absolute;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.orbit-1 {
  height: 244px;
  width: 244px;
  border: 1px solid white;
  animation: 40s linear 0s infinite normal none running orbitRotate !important;
}

.orbit-2 {
  height: 344px;
  width: 344px;
  border-style: dashed;
}

.orbit-3 {
  height: 444px;
  width: 444px;
  border: 1px solid white;
  position: relative;
  opacity: 1 !important;
  border-color: rgba(255, 255, 255, 0.24) !important;
}

/* Satellites container */
.satellites-container {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 15;
  transform-origin: center center;
}

/* Individual satellites - positioned on outermost orbit */
.satellite {
  z-index: 999 !important;
  opacity: 1 !important;
  position: absolute;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 25 !important;
  transition: all 0.3s ease;
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
  /* backdrop-filter: blur(5px); */
  border: 1px solid rgba(255, 255, 255, 0.2);
  pointer-events: auto;
  transform-origin: center center;
  margin: 0 auto !important;
}

.satellite[style*="opacity: 1"] {
  opacity: 1 !important;
  background-color: inherit !important;
}

.satellite:hover {
  box-shadow: 0 0 25px rgba(255, 255, 255, 0.6);
}

.satellite img {
  width: 80%;
  height: 80%;
  object-fit: contain;
  border-radius: 50%;
}

.satellite span {
  font-weight: bold;
  text-align: center;
  line-height: 1;
  white-space: nowrap;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

/* Dots on orbits */
.dot {
  position: absolute;
  height: 0.5rem; /* h-2 */
  width: 0.5rem; /* w-2 */
  background-color: white;
  border-radius: 9999px;
}

.dot-left {
  left: 0;
  top: 50%;
  transform: translate(-50%, -50%);
}

.dot-right {
  left: 100%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.dot-top {
  left: 50%;
  top: 0;
  transform: translate(-50%, -50%);
}

.dot-container {
  position: absolute;
  height: 1.25rem; /* h-5 */
  width: 1.25rem; /* w-5 */
  left: 100%;
  top: 50%;
  border: 1px solid white;
  border-radius: 9999px;
  transform: translate(-50%, -50%);
  display: inline-flex;
  justify-content: center;
  align-items: center;
}

.dot-inner {
  height: 0.5rem; /* h-2 */
  width: 0.5rem; /* w-2 */
  background-color: white;
  border-radius: 9999px;
}

/* Content container */
.content-container {
  position: relative;
  margin-top: 4rem; /* mt-16 */
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
  z-index: 5;
}

/* Title */
.title {
  font-size: 4rem; /* text-8xl */
  font-weight: 600; /* font-semibold */
  letter-spacing: -0.05em; /* tracking-tighter */
  background-color: white;
  background-image: radial-gradient(
    100% 100% at top left,
    white,
    white,
    rgba(74, 32, 138, 0.5)
  );
  color: transparent;
  background-clip: text;
  -webkit-background-clip: text;
  text-align: center;
}

/* Description */
.description {
  font-size: 1.125rem; /* text-lg */
  color: rgba(255, 255, 255, 0.7); /* text-white/70 */
  margin-top: 1.25rem; /* mt-5 */
  text-align: center;
  max-width: 36rem; /* max-w-xl */
  margin-left: auto;
  margin-right: auto;
}

/* Button container */
.button-container {
  display: flex;
  justify-content: center;
  margin-top: 1.25rem; /* mt-5 */
}

/* Button */
.button {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background-color: #8b5cf6; /* bg-purple-600 */
  color: white;
  border-radius: 9999px;
  font-weight: 500;
  transition: background-color 0.3s;
  text-decoration: none;
}

.button:hover {
  background-color: #7c3aed; /* bg-purple-700 */
}

/* Fallback styles for when JavaScript fails */
.animated-world-fallback {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  padding: 2rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 10px;
  color: white;
  text-align: center;
}

.animated-world-fallback h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  font-weight: bold;
}

.animated-world-fallback p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  max-width: 600px;
}

.animated-world-button {
  display: inline-block;
  padding: 0.75rem 2rem;
  background-color: rgba(255, 255, 255, 0.2);
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50px;
  text-decoration: none;
  font-weight: bold;
  transition: all 0.3s ease;
}

.animated-world-button:hover {
  background-color: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.5);
}

.satellite span {
  font-weight: bold;
  text-align: center;
  line-height: 1;
  white-space: nowrap;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
  /* Aggiungi anche qui se vuoi che il testo rimanga dritto */
  animation: satellite-rotation 60s infinite linear;
  display: block;
  transform-origin: center center;
}

.satellite-container:hover .satellite-title {
  opacity: 1;
  /* Rimuovi scale dal transform per evitare conflitti con l'animazione */
  animation-play-state: running;
}

/* Media queries for larger screens */
@media (min-width: 768px) {
  .hero-section {
    height: calc(100vh - 67px) !important; /* md:h-[800px] */
  }

  .planet {
    height: 24rem; /* md:h-96 */
    width: 24rem; /* md:w-96 */
  }

  .orbit-1 {
    height: 580px; /* md:h-[580px] */
    width: 580px; /* md:w-[580px] */
  }

  .orbit-2 {
    height: 780px; /* md:h-[780px] */
    width: 780px; /* md:w-[780px] */
  }

  .orbit-3 {
    height: 980px; /* md:h-[980px] */
    width: 980px; /* md:w-[980px] */
  }

  .title {
    font-size: 168px; /* md:text-[168px] */
    line-height: 1; /* md:leading-none */
  }

  .description {
    font-size: 1.25rem; /* md:text-xl */
  }

  .title {
    font-size: 6rem;
  }
}

@media (min-width: 768px) {
  .satellite-title {
    margin-top: 10px;
  }
}

/* Responsive satellites */
@media (max-width: 767px) {
  .satellite {
    font-size: 0.8rem;
  }

  .satellite span {
    font-size: 10px;
  }
}

@media (max-width: 767px) {
  .satellite-title {
    font-size: 10px !important;
    margin-top: 6px !important;
  }
}

/* Animation performance optimizations */
.orbit,
.satellite {
  will-change: transform;
}

/* Smooth satellite rotation */
.satellites-container .satellite {
  transform-origin: center;
}
