body.stop-scrolling {
  overflow: hidden; /* Nasconde la scrollbar durante il preloader */
}

.preloader {
  position: fixed; /* Fondamentale per rimanere fisso nella viewport */
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: #191817;
  z-index: 10000000;
  display: flex;
  justify-content: center; /* Centra orizzontalmente */
  align-items: center;     /* Centra verticalmente */
  transition: opacity 0.5s ease-in-out, visibility 0.5s ease-out;
}
/* Se il tuo spinner è un elemento figlio, Flexbox lo centrerà automaticamente.
   Se non è un figlio, assicurati che abbia margini auto.
   Esempio: .spinner { margin: auto; } */

.preloader.hidden {
  opacity: 0;
  visibility: hidden;
}

.loader {
  position: relative;
  width: 80px;
  height: 80px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.loader-circle {
  position: absolute;
  width: 100%;
  height: 100%;
  border: 4px solid transparent;
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 1.5s linear infinite;
}

.loader-circle:nth-child(2) {
  border: 4px solid transparent;
  border-bottom-color: #fff;
  animation: spinReverse 1.5s linear infinite;
}

.loader-percent {
  position: absolute;
  color: white;
  font-size: 1rem;
  font-weight: 400;
  z-index: 9999996;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes spinReverse {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(-360deg); }
}

#splash-video {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 9999997;
}

#splash-video img {
	width: 100%;
	height: auto;
}

#splash-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9999998;
}

#splash-content {
  font-family: 'Montserrat', sans-serif;
  position: fixed;
  top: 0;
  left: 0;
  /* Usiamo vw/vh per assicurarci che prenda tutta la finestra visibile */
  width: 100vw; 
  height: 100vh;
  z-index: 9999999;
  
  /* Flexbox per la centratura */
  display: flex !important;
  flex-direction: column;
  justify-content: center; /* Centra verticalmente */
  align-items: center;     /* Centra orizzontalmente */
  
  /* Reset testo */
  text-align: center;
  margin: 0;
  padding: 0;
  box-sizing: border-box; /* Evita che il padding sballi la larghezza */

  /*transition: opacity 0.5s ease-out, visibility 0.5s;*/
}

.splash-reveal {
	opacity: 0;
  visibility: hidden;
}

.splash-reveal.visible {
  transition: opacity 1s ease-out, visibility 1s ease-out;
  opacity: 1;
  visibility: visible;
}

#splash-content h1 {
  font-size: 4rem;
  letter-spacing: 1.5rem;
  font-weight: 300;
  color: #ffffff;
  padding: 0;
  
  /* Correzione ottica per il letter-spacing (compensa lo spazio extra a destra) */
  margin-left: 1.5rem; 
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
  line-height: 1.2;
  direction: rtl; 
}

#splash-content p {
  font-size: 1.75rem;
  font-weight: 300;
  color: #ffffff;
  margin-top: 7rem;
  margin-bottom: 9rem;
  text-align: center;
  line-height: 1.5;
}

#splash-content p img {
	margin-top: 1rem;
}

#splash-close-btn {
	width: 208px;
  padding-bottom: 5px;
  font-family: 'Montserrat', sans-serif;
  font-size: 1.75rem;
  font-weight: 600; /* SemiBold */
  background-color: var(--src-accent);
  color: white;
  border: none;
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.3s ease;
}

/*.cta-button {
  margin-top: 2rem;
}*/

#splash-close-btn:hover {
  background-color: var(--src-dark);
  transform: scale(1.11);
}
