/* ===== VARIÁVEIS E RESET ===== */
:root {
  --header-height: 90px;
  --header-height-scrolled: 70px;
  --primary-color: #4361ee;
  --primary-hover: #3a56d4;
  --text-light: #e5e7eb;
  --text-dark: #1f2937;
  --bg-dark: #000;
  --bg-light: #ffffff;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-600: #4b5563;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
}

body {
  font-family: "Montserrat", sans-serif;
  background-color: var(--bg-light);
  color: var(--text-dark);
  line-height: 1.6;
  overflow-x: hidden;
}

/* ===== LAYOUT RÁPIDO ===== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* ===== HEADER OTIMIZADO ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--gray-200);
  transition: all 0.3s ease;
}

.header.scrolled {
  height: var(--header-height-scrolled);
  background: rgba(255, 255, 255, 0.98);
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
  padding: 0 1rem;
}

.navbar-brand .logo {
  height: 50px;
  width: auto;
  transition: height 0.3s ease;
}

.header.scrolled .navbar-brand .logo {
  height: 40px;
}

/* ===== MENU MOBILE FIRST ===== */
.navbar-toggler {
  display: flex;
  flex-direction: column;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 1001;
  width: 30px;
  height: 30px;
  justify-content: center;
}

.toggler-icon {
  width: 25px;
  height: 2px;
  background: var(--text-dark);
  margin: 2px 0;
  transition: 0.3s ease;
}

.navbar-toggler.active .toggler-icon:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.navbar-toggler.active .toggler-icon:nth-child(2) {
  opacity: 0;
}

.navbar-toggler.active .toggler-icon:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -6px);
}

.navbar-menu {
  position: fixed;
  top: 0;
  left: -100%;
  width: 280px;
  height: 100vh;
  background: #111827; /* Solid gray-900 */
  flex-direction: column;
  padding: 5rem 1.5rem 2rem;
  transition: left 0.3s ease;
  z-index: 1001; /* Higher z-index */
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

.navbar-menu.active {
  left: 0;
}

.menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

.nav-link {
  display: block;
  padding: 0.8rem 1rem;
  color: var(--text-dark);
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.3s ease;
  margin: 0.25rem 0;
  font-weight: 500;
}

.nav-link:hover {
  background: rgba(67, 97, 238, 0.05);
  color: var(--primary-color);
}

.cta-nav {
  background: var(--primary-color);
  color: white;
  font-weight: 600;
  margin-top: 1rem;
}

.cta-nav:hover {
  background: var(--primary-hover);
  color: white;
}

/* ===== HERO OTIMIZADO ===== */
.hero-bg {
  padding: 2rem 0;
  text-align: center;
  background-image:
    radial-gradient(circle at top right, rgba(67, 97, 238, 0.1), transparent 40%),
    radial-gradient(circle at bottom left, rgba(67, 97, 238, 0.05), transparent 40%);
}

.hero-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 900;
  text-transform: uppercase;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: var(--text-dark);
}

.hero-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  max-width: 600px;
  margin: 0 auto 2rem;
  color: var(--gray-600);
}

.cta-button {
  display: inline-block;
  padding: 1rem 2rem;
  background-color: var(--primary-color);
  color: white;
  font-weight: bold;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  font-size: clamp(0.9rem, 2vw, 1.1rem);
  box-shadow: var(--shadow);
}

.cta-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(67, 97, 238, 0.3);
  background: var(--primary-hover);
}

/* ===== FORMULÁRIO OTIMIZADO ===== */
.registration-form {
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.registration-form input {
  width: 100%;
  padding: 1rem;
  margin: 0.5rem 0;
  border: 1px solid var(--gray-300);
  border-radius: 8px;
  font-size: 1rem;
  transition: all 0.3s ease;
  font-family: inherit;
}

.registration-form input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
}

.submit-button {
  width: 100%;
  padding: 1rem;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-family: inherit;
}

.submit-button:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
}

.submit-button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

#spinner {
  width: 20px;
  height: 20px;
}

/* ===== PROCESSO E FAQ ===== */
.process-card,
.faq-item {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  margin: 1rem 0;
  border: 1px solid var(--gray-200);
  transition: all 0.3s ease;
  box-shadow: var(--shadow);
}

.process-card:hover {
  transform: translateY(-5px);
  border-color: var(--primary-color);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  padding: 1rem 0;
}

.faq-icon {
  transition: transform 0.3s ease;
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s ease;
}

.faq-item.open .faq-answer {
  max-height: 500px;
}

.faq-item.open .faq-icon {
  transform: rotate(45deg);
}

/* ===== MENSAGEM DE SUCESSO ===== */
.success-message {
  text-align: center;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 200px;
}

.success-icon {
  font-size: 3rem;
  color: #25d366;
  margin-bottom: 1rem;
}

.success-title {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}

.success-text {
  color: var(--gray-600);
  max-width: 400px;
  line-height: 1.6;
}

/* ===== WHATSAPP FLOAT ===== */
.whatsapp-float {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  width: 60px;
  height: 60px;
  background: #25d366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  z-index: 100;
  transition: all 0.3s ease;
}

.whatsapp-float:hover {
  transform: scale(1.1);
  background: #128C7E;
}

/* ===== DESKTOP ===== */
@media (min-width: 768px) {
  .container {
    padding: 0 1.5rem;
  }

  .navbar-toggler {
    display: none;
  }

  .navbar-menu {
    position: static;
    width: auto;
    height: auto;
    background: transparent;
    flex-direction: row;
    padding: 0;
    left: 0;
    box-shadow: none;
  }

  .nav-link {
    display: inline-flex;
    margin: 0 0.5rem;
    padding: 0.5rem 1rem;
  }

  .cta-nav {
    margin-top: 0;
    margin-left: 0.5rem;
  }

  .hero-bg {
    padding: 4rem 0;
  }

  .registration-form {
    padding: 2rem;
  }

  .whatsapp-float {
    width: 70px;
    height: 70px;
    bottom: 2rem;
    right: 2rem;
  }
}

@media (min-width: 1024px) {
  .hero-title {
    font-size: clamp(2.5rem, 6vw, 4rem);
  }

  .process-card,
  .faq-item {
    padding: 2rem;
  }
}

/* ===== ANIMAÇÕES PERFORMÁTICAS ===== */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }
}

/* ===== ESTADOS DE FOCUS VISÍVEIS ===== */
button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

#contador-pessoas {
  display: inline-block; /* Needed for transform */
  transition: all 0.3s ease-in-out;
}

#contador-pessoas.updated {
  animation: pulse-green 0.5s ease-in-out;
}

@keyframes pulse-green {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.25);
    color: #4ade80; /* brighter green */
  }
  100% {
    transform: scale(1);
  }
}

/* ===== NEW SUCCESS MESSAGE ===== */
.success-message-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2.5rem 2rem;
  background-color: #1f2937; /* bg-gray-800 */
  border-radius: 1rem;
  border: 1px solid #374151; /* border-gray-700 */
  animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.success-message-icon-wrapper {
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #10b981; /* bg-green-500 */
  color: white;
  font-size: 2rem;
  margin-bottom: 1.5rem;
}

.success-message-title {
  font-size: 1.75rem;
  font-weight: 800;
  color: white;
  margin-bottom: 0.75rem;
}

.success-message-text {
  color: #d1d5db; /* text-gray-300 */
  margin-bottom: 1.5rem;
  max-width: 450px;
  line-height: 1.6;
}

.success-message-question {
    color: #9ca3af; /* text-gray-400 */
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.whatsapp-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 0.75rem 1.5rem;
  background-color: #25d366;
  color: white;
  font-weight: 700;
  border-radius: 0.5rem;
  border: none;
  cursor: pointer;
  transition: background-color 0.3s ease;
  text-decoration: none;
}

.whatsapp-button:hover {
  background-color: #1ea952;
}

.whatsapp-button i {
    font-size: 1.25rem;
}