/* === Variabili globali === */
:root {
  /* Colori */
  --primary: #37ca37;
  --white: #ffffff;
  --black: #000000;
  --overlay: rgba(0, 0, 0, 0.7);
  --color-m9whg8mn: rgb(255, 255, 255);
  /* bianco per pulsanti */
  --color-m9whhwnp: rgb(255, 255, 255);
  /* bianco per accenti */
  --color-halloween-orange: #ff6f00;
  /* Colore arancione per Halloween */
  --color-newyear-gold: #D4AF37;
  /* Colore oro per Capodanno */
  /* Toni scuri per il form (mockup) */
  --form-bg: #0d0d0d;
  --form-panel-border: #1b1b1b;
  --input-bg: #0a0a0a;
  --input-border: #2a2a2a;
  --input-border-focus: #8a8a8a;
  --input-text: #e6e6e6;
  --input-placeholder: #8a8a8a;

  /* Font */
  --headlinefont: 'Archivo Black', sans-serif;
  --contentfont: 'Adamina', serif;
  --text-font: 'Montserrat', sans-serif;
}

/* === Reset e base === */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
  background-color: var(--black);
  color: var(--white);
  font-family: var(--contentfont);
  -webkit-font-smoothing: antialiased;
}

body {
  display: flex;
  flex-direction: column;
  line-height: 1.5;
}

/* === Container principale === */
#main-container {
  position: relative;
  z-index: 1;
  max-width: 1170px;
  margin: 0 auto;
  padding: 0 15px;
  width: 100%;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* === Header e logo === */
#header {
  padding: 40px 0 20px;
  text-align: center;
}

.logo-container {
  margin: 0 auto;
  max-width: 180px;
}

.logo {
  width: 100%;
  height: auto;
  max-width: 150px;
}

/* === Sezione principale evento === */
#event-section {
  text-align: center;
  padding: 60px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
}

.event-title {
  font-family: var(--contentfont);
  font-size: 70px;
  letter-spacing: 0px;
  margin-bottom: 10px;
  color: var(--color-newyear-gold);
}

.event-date {
  font-family: var(--contentfont);
  font-size: 50px;
  letter-spacing: 0px;
  margin-bottom: 40px;
  color: var(--color-newyear-gold);
}

.event-description {
  margin-bottom: 60px;
}

.event-subtitle {
  font-family: var(--contentfont);
  font-size: 28px;
  font-weight: bold;
  margin-bottom: 10px;
}

.event-time {
  font-family: var(--contentfont);
  font-size: 22px;
  font-style: italic;
  color: var(--white);
}

.cta-container {
  margin-top: 42px;
}

.cta-question {
  font-family: var(--contentfont);
  font-size: 22px;
  margin-bottom: 20px;
}

.cta-button {
  background-color: var(--color-newyear-gold);
  color: #000000 !important;
  /* Forza il colore nero */
  border: 2px solid var(--color-newyear-gold);
  padding: 15px 40px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-family: 'Montserrat', sans-serif;
  -webkit-appearance: none;
  /* Rimuove gli stili predefiniti iOS */
  -moz-appearance: none;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
  /* Rimuove l'highlight blu su tap in iOS */
  text-decoration: none;
  /* Rimuove sottolineatura se interpretato come link */
}

.cta-button:hover {
  background-color: var(--color-newyear-gold);
  color: #000000 !important;
  /* Forza il colore bianco sull'hover */
  transform: scale(1.05);
}

/* === Sezione Slider Immagini === */
.img-slider {
  width: 100%;
  max-width: 250px;
  margin: 40px auto 60px;
  text-align: center;
  border-radius: 8px;
  ;
}

.slider-container {
  position: relative;
  width: 100%;
  padding-top: 150%;
  /* Proporzioni verticali */
  background-color: #000000;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgb(0, 0, 0);
}

#slider-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 1;
  /* Rimosso lo stato iniziale opacity: 0 */
  /* Rimossa la transizione: transition: opacity 5s ease-in-out; */
}

/* Rimossa la classe .visible che gestiva la transizione */
/* #slider-image.visible {
  opacity: 1;
} */


/* === Footer === */
#footer {
  padding: 30px 0;
  background-color: var(--black);
  text-align: center;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.footer-logo {
  width: 100px;
  height: auto;
  margin-bottom: 15px;
}

.footer-content p {
  font-size: 13px;
  margin: 5px 0;
  color: var(--white);
}

/* === Popup === */
#overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--overlay);
  z-index: 1000;
  display: none;
}

#overlay.show {
  display: block;
}

/* Popup come nel mockup: pannello scuro con bordo sottile */
.popup-body {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: var(--form-bg);
  border: 1px solid var(--form-panel-border);
  border-radius: 10px;
  padding: 28px 24px;
  max-width: 500px;
  /* abbastanza largo per layout a due colonne se necessario */
  width: min(92%, 960px);
  max-height: 85vh;
  /* Limita l'altezza massima all'85% dello schermo */
  overflow-y: auto;
  /* Permette lo scroll interno se il contenuto è troppo alto */
  z-index: 1001;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.03),
    0 30px 80px rgba(0, 0, 0, 0.7);
  display: none;
}

.popup-body.show {
  display: block;
}

.closeLPModal {
  position: absolute;
  right: 10px;
  top: 10px;
  cursor: pointer;
  z-index: 1002;
}

.closeLPModal svg path {
  fill: #ffffff;
}

.popup-content {
  margin-top: 10px;
}

.popup-content h2 {
  font-family: var(--headlinefont);
  font-size: clamp(15px, 3.4vw, 46px);
  line-height: 1.1;
  text-align: center;
  margin: 0 0 20px;
  color: var(--white);
}

/* === Form (STILE IDENTICO ALLO SCREENSHOT) === */
#waitlistForm {
  display: flex;
  flex-direction: column;
  gap: 14px;
  font-family: var(--text-font, 'Montserrat'), sans-serif;
  color: var(--white);
}

/* Etichette bianche a sinistra di ogni campo */
#waitlistForm .form-group label {
  color: var(--white);
  font-size: 14px;
  margin-bottom: 6px;
}

/* Campi scuri con bordo sottile e testo chiaro */
#waitlistForm input[type="text"],
#waitlistForm input[type="email"],
#waitlistForm input[type="tel"],
#waitlistForm input:not([type="checkbox"]),
#waitlistForm select,
#waitlistForm textarea {
  width: 100%;
  height: 35px;
  padding: 8px 12px;
  border: 1px solid var(--input-border);
  border-radius: 2px;
  background-color: var(--input-bg);
  color: var(--input-text);
  font-family: var(--text-font, 'Montserrat'), sans-serif;
  font-size: 15px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 1px 2px rgba(0, 0, 0, 0.6);
  transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}

/* Placeholder grigio come nel mockup */
#waitlistForm ::placeholder {
  color: var(--input-placeholder);
  opacity: 1;
}

/* Select con leggero effetto lucido (simile al nativo scuro della screenshot) */
#waitlistForm select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image:
    linear-gradient(to bottom, #2f2f2f, #0f0f0f);
  background-blend-mode: overlay;
  color: var(--input-text);
  padding-right: 34px;
  /* spazio per la freccia */
  position: relative;
}

/* Freccia del select */
#waitlistForm select::-ms-expand {
  display: none;
}

#waitlistForm .form-group select {
  background-position: right 10px center;
  background-repeat: no-repeat;
}

/* Stato focus: bordo più chiaro, senza bagliori colorati */
#waitlistForm input:focus,
#waitlistForm select:focus,
#waitlistForm textarea:focus {
  outline: none;
  border-color: var(--input-border-focus);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 0 0 2px rgba(255, 255, 255, 0.05);
}

/* Checkbox allineata come nello screenshot (lasciare stile nativo) */
#waitlistForm .form-group.checkbox {
  flex-direction: row;
  align-items: center;
  gap: 10px;
}

#waitlistForm .form-group.checkbox input {
  margin-top: 0;
}

#waitlistForm .form-group.checkbox span {
  color: var(--white);
  font-size: 16px;
}

#waitlistForm .form-group.checkbox a {
  color: #6a40ff;
  /* link violaceo come si nota nello screenshot */
  text-decoration: underline;
}

/* Errori */
#phoneError {
  color: #e93d3d;
  font-size: 12px;
  margin-top: 4px;
}

.error-message {
  color: #e93d3d;
  font-weight: 500;
  padding: 8px;
  text-align: center;
  font-size: 14px;
  background: rgba(233, 61, 61, 0.06);
  border: 1px solid rgba(233, 61, 61, 0.35);
}

/* Bottone bianco ovale*/
.form-submit {
  margin-top: 12px;
  text-align: center;
}

#waitlistForm .form-submit button,
.form-submit button {
  background-color: #ffffff;
  color: #000000;
  border: 0;
  border-radius: 28px;
  padding: 12px 28px;
  position: relative;
  font-family: var(--headlinefont, 'Archivo Black');
  font-size: 20px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
}

.form-submit button:hover {
  transform: translateY(-2px);
}

#waitlistForm .form-submit button:active {
  transform: translateY(0);
}

/* Stato invio/messaggi */
.form-status {
  text-align: center;
  margin-top: 14px;
  font-family: var(--text-font);
  font-size: 13px;
  min-height: 20px;
  color: #bfbfbf;
}

.form-status.success {
  color: #9ae6b4;
}

.form-status.warning {
  color: #faf089;
}

.form-status.error {
  color: #e93d3d;
}

/* Nota reCAPTCHA */
.recaptcha-notice {
  margin-top: 14px;
  font-size: 12px;
  color: #bfbfbf;
  text-align: center;
}

.recaptcha-notice a {
  color: #6a40ff;
  text-decoration: underline;
}

/* === Animazioni === */
.reveal-element {
  opacity: 0;
  transform: translateY(20);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal-element.revealed {
  opacity: 1;
  transform: translateY(20);
}

/* === Media Query === */
@media (max-width: 900px) {
  .popup-body {
    max-width: 520px;
    max-height: 80vh;
    /* Riduce ulteriormente l'altezza su tablet */
  }

  .form-submit {
    text-align: center;
  }
}

@media (max-width: 768px) {
  .event-title {
    font-size: 42px;
  }

  .event-date {
    font-size: 36px;
    margin-bottom: 30px;
  }

  .event-subtitle {
    font-size: 24px;
  }

  .event-time {
    font-size: 18px;
  }

  .cta-question {
    font-size: 25px;
  }

  .cta-button {
    font-size: 16px;
    padding: 12px 24px;
  }

  .popup-content h2 {
    text-align: center;
  }

  .form-status,
  .recaptcha-notice {
    text-align: center;
  }

  /* Popup più piccolo su mobile */
  .popup-body {
    max-width: 420px;
    max-height: 75vh;
    /* 75% dell'altezza dello schermo */
    padding: 20px 18px;
  }

  /* Overlay meno scuro per vedere meglio sotto */
  #overlay {
    background-color: rgba(0, 0, 0, 0.5);
    /* Ridotto da 0.7 a 0.5 */
  }
}

@media (max-width: 480px) {
  #header {
    padding: 20px 0;
  }

  .logo {
    max-width: 120px;
  }

  #event-section {
    padding: 30px 0;
  }

  .event-title {
    font-size: 45px;
  }

  .event-date {
    font-size: 42px;
    margin-bottom: 25px;
  }

  .event-description {
    margin-bottom: 40px;
  }

  .event-subtitle {
    font-size: 20px;
  }

  .event-time {
    font-size: 16px;
  }

  .last-event-section {
    margin-top: 40px;
  }

  .last-event-title {
    font-size: 24px;
  }

  /* Popup ancora più compatto su schermi piccoli */
  .popup-body {
    width: 90%;
    max-width: 380px;
    max-height: 70vh;
    /* 70% dell'altezza per vedere meglio sotto */
    padding: 18px 14px;
  }

  .popup-content h2 {
    font-size: 22px;
    margin-bottom: 16px;
  }

  /* Form più compatto */
  #waitlistForm {
    gap: 10px;
  }

  #waitlistForm .form-group label {
    font-size: 13px;
    margin-bottom: 4px;
  }

  #waitlistForm input[type="text"],
  #waitlistForm input[type="email"],
  #waitlistForm input[type="tel"],
  #waitlistForm input:not([type="checkbox"]),
  #waitlistForm select {
    height: 32px;
    font-size: 14px;
    padding: 6px 10px;
  }

  .form-submit button {
    font-size: 18px;
    padding: 10px 24px;
  }

  /* Overlay ancora meno scuro per piccoli schermi */
  #overlay {
    background-color: rgba(0, 0, 0, 0.4);
  }
}

/* ==================================================================
   Ulteriori utilità e compatibilità con il progetto originale
   ================================================================== */

/* Variabili/utility aggiuntive dal progetto fastlife (ridotte) */
:root {
  --gray: #cbd5e0;
  --red: #e93d3d;
  --yellow: #faf089;
  --transparent: transparent;
  --text-color: var(--white);
  --link-color: #6a40ff;
  /* per i link viola nel popup */
}

.flex {
  display: flex
}

.flex-col {
  flex-direction: column
}

.gap-1 {
  gap: .3rem
}

.gap-2 {
  gap: .625rem
}

.items-end {
  align-items: flex-end
}

.relative {
  position: relative
}

.w-100 {
  width: 100%
}

.noBorder {
  border: none !important
}

.pointer {
  cursor: pointer
}

/* Accessibilità focus */
button:focus,
a:focus,
input:focus,
select:focus,
textarea:focus {
  outline: 3px solid rgba(255, 255, 255, 0.22);
  outline-offset: 2px;
}