/* RESET & BASE FONT */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  font-family: 'Poppins', sans-serif;
  background-color: #000;
  color: #fff;
}

/* NAVBAR */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: rgba(0, 0, 0, 0.6);  /* nero semi-trasparente */
  backdrop-filter: blur(10px);     
  -webkit-backdrop-filter: blur(10px);
  padding: 16px 0;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 1000;  /* deve stare sopra tutto */
}

.logo img {
  height: 60px; /* o l'altezza che preferisci */
  width: auto;
  vertical-align: middle;
}

/* FAQ CONTAINER */
.faq-container {
  max-width: 800px;
  padding: 140px 20px 40px; /* aumentato padding-top da 100px a 140px */
  margin: 0 auto;
  box-sizing: border-box;
}

.faq-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 24px;
  text-align: center;
  margin-top: 0;
}

/* HINT BLOCK */
.hint-block {
  background: #1a1a1a;
  color: #ccc;
  padding: 12px 16px;
  border-left: 4px solid #aa00ff;
  margin-bottom: 20px;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 10px;
}
.hint-icon {
  font-size: 1.2rem;
}

/* SEARCH BAR */
.search-container {
  margin-bottom: 24px;
  text-align: center;
}
#searchInput {
  padding: 10px 14px;
  width: 80%;
  max-width: 400px;
  font-size: 1rem;
  border-radius: 8px;
  border: none;
  outline: none;
}

/* FAQ ITEMS */
.faq-item + .faq-item {
  margin-top: 16px;
}

/* FAQ ITEM WRAPPER */
.faq-item {
  border-bottom: 1px solid #333;
}

/* FAQ QUESTION */
.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: transparent;
  border: none;
  cursor: pointer;
  font-weight: 700;
  font-size: 1.1rem;
  color: #fff;
  padding: 12px 20px;
  min-height: 40px;
  text-align: left;
  transition: background 0.3s ease;
}

.faq-question:hover {
  color: #aa00ff;
}

/* ICONA FRECCIA */

.caret {
  width: 20px;
  height: 20px;
  fill: #fff;
  transform: rotate(0deg);
  transition: transform 0.3s ease;
}

.faq-item.open .caret {
  transform: rotate(180deg);
}

/* FAQ ANSWER */

.faq-answer {
  display: block;              /* display sempre block */
  max-height: 0;               /* altezza chiusa */
  overflow: hidden;            /* nasconde contenuto in eccesso */
  opacity: 0;                  /* invisibile */
  padding: 0 4px 0 20px;       /* padding chiuso */
  color: #ccc;
  font-size: 1rem;
  line-height: 1.6;
  white-space: normal;
  transition: max-height 0.35s ease, opacity 0.35s ease, padding 0.35s ease;
  scrollbar-width: thin;
  scrollbar-color: #555 transparent;
}

.faq-answer::-webkit-scrollbar {
  width: 6px;
}

.faq-answer::-webkit-scrollbar-thumb {
  background-color: #555;
  border-radius: 3px;
}

.faq-answer br + br {
  margin-bottom: 1em;
}

.faq-answer strong {
  font-weight: 700;
  color: #fff;
}

.faq-answer a {
  color: #00bfff;
  text-decoration: underline;
  word-break: break-word;
}

.faq-question {
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  font-weight: 700;
  font-size: 1.1rem;
  padding: 12px 20px;
  background: transparent;
  border: none;
  color: white;
  transition: background 0.3s ease;
}

/* Correzione freccia (caret) e testo per evitare ridimensionamenti */
.caret {
  flex-shrink: 0;       /* impedisce ridimensionamento */
  width: 20px;
  height: 20px;
}

.question-text {
  flex-grow: 1;
  margin-right: 12px;
  word-break: break-word;
  overflow-wrap: break-word;
}

/* BACKGROUND LIGHTS */
.background-lights {
  position: fixed; /* fixed per restare visibile durante scroll */
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: -1;
  background: black;
  overflow: hidden;
}

.background-lights::before,
.background-lights::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  opacity: 0.3;
  filter: blur(100px);
  will-change: transform, opacity;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
  animation-fill-mode: forwards;
}

/* Primo cerchio */
.background-lights::before {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(170, 0, 255, 0.7), transparent 70%);
  top: var(--y1, 20%);
  left: var(--x1, 15%);
  animation-name: moveLight1, pulseOpacity;
  animation-duration: 30s, 6s;
  animation-timing-function: ease-in-out, ease-in-out;
  animation-iteration-count: infinite, infinite;
}

/* Secondo cerchio */
.background-lights::after {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(0, 191, 255, 0.6), transparent 70%);
  top: var(--y2, 60%);
  left: var(--x2, 75%);
  animation-name: moveLight2, pulseOpacity;
  animation-duration: 45s, 6s;
  animation-timing-function: ease-in-out, ease-in-out;
  animation-iteration-count: infinite, infinite;
}

/* Movimento luci */
@keyframes moveLight1 {
  0% {
    transform: translate(0, 0) scale(1);
    opacity: 0.3;
  }
  25% {
    transform: translate(10px, 40px) scale(1.05);
    opacity: 0.5;
  }
  50% {
    transform: translate(0, 60px) scale(0.95);
    opacity: 0.4;
  }
  75% {
    transform: translate(-10px, 40px) scale(1.03);
    opacity: 0.55;
  }
  100% {
    transform: translate(0, 0) scale(1);
    opacity: 0.3;
  }
}

@keyframes moveLight2 {
  0% {
    transform: translate(0, 0) scale(1);
    opacity: 0.3;
  }
  25% {
    transform: translate(-10px, -40px) scale(1.03);
    opacity: 0.5;
  }
  50% {
    transform: translate(0, -60px) scale(0.9);
    opacity: 0.4;
  }
  75% {
    transform: translate(10px, -40px) scale(1.07);
    opacity: 0.55;
  }
  100% {
    transform: translate(0, 0) scale(1);
    opacity: 0.3;
  }
}

/* Pulsazione opacità lenta */
@keyframes pulseOpacity {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.55; }
}

/* Blocca lo scroll orizzontale */
html, body {
  overflow-x: hidden;
}

mark {
  background-color: #fffa72;
  color: #000;
  padding: 0 2px;
  border-radius: 3px;
}

.return-link-wrapper {
  margin-top: 48px;
  text-align: center;
}

.return-link {
  font-size: 1rem;
  font-weight: 600;
  color: #aa00ff;
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.3s ease;
}

.return-link:hover {
  color: #fff;
  text-decoration: underline;
}