/* ===== ONEPAGE STYLES - Estilos específicos para navegação onepage ===== */

/* ===== SCROLL BEHAVIOR ===== */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

/* ===== NAVEGAÇÃO ONEPAGE ===== */
.nav-link.active {
  color: var(--color-primary);
  position: relative;
  font-weight: 600;
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  height: 2px;
  background: var(--color-primary);
  border-radius: 1px;
}

/* ===== SEÇÕES ONEPAGE ===== */
.onepage-section {
  padding-top: 100px;
  margin-top: -100px;
}

.onepage-section:first-of-type {
  padding-top: 0;
  margin-top: 0;
}

/* Garantir que a primeira seção (home) ocupe a altura da viewport */
#home {
  min-height: 100vh;
  display: flex;
  align-items: center;
}

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

.header.scrolled {
  background: rgba(10, 15, 28, 0.98);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

/* ===== MENU MOBILE MELHORADO ===== */
#hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  z-index: 1001;
  transition: background-color 0.3s ease;
  gap: 3px;
}

.hamburger-bar {
  width: 25px;
  height: 3px;
  background: var(--text-primary);
  transition: all var(--transition-fast);
  border-radius: 2px;
}

.hamburger.active .hamburger-bar:nth-child(1) {
  transform: rotate(45deg) translateY(8px);
}

.hamburger.active .hamburger-bar:nth-child(2) {
  opacity: 0;
}

.hamburger.active .hamburger-bar:nth-child(3) {
  transform: rotate(-45deg) translateY(-8px);
}

/* ===== RESPONSIVIDADE DO MENU ===== */
@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }


  /* .nav-link {
    font-size: 1.1rem;
    font-weight: 500;
    display: block;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius-md);
    transition: all 0.3s ease;
  }

  .nav-link:hover {
    background: rgba(6, 182, 212, 0.1);
    color: var(--color-primary);
  }

  .nav-link.active::after {
    display: none;
  }

  .nav-link.active {
    background: rgba(6, 182, 212, 0.2);
  } */

  .social-links.desktop-only {
    display: none;
  }

  /* Ajustar padding das seções no mobile */
  .onepage-section {
    padding-top: 80px;
    margin-top: -80px;
  }
}

/* ===== GRID RESPONSIVO ===== */

@media (min-width: 769px) {
  .grid[style*="1fr 1fr"] {
    grid-template-columns: 1fr 1fr;
  }

  .grid[style*="repeat(auto-fit"] {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  }
}

@media (max-width: 768px) {
  .grid {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
  }

  /* Invertir ordem em algumas seções para melhor UX mobile */
  .grid .scroll-reveal:nth-child(2) {
    order: -1;
  }
}

/* ===== BOTÕES RESPONSIVOS ===== */
.cta-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  .cta-buttons {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }

  .btn {
    width: 100%;
    max-width: 300px;
  }

  .btn-lg {
    width: 100%;
    padding: 1rem 2rem;
    font-size: 1.1rem;
  }
}

/* ===== FORMULÁRIO RESPONSIVO ===== */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text-primary);
  font-size: 0.95rem;
}

.form-input {
  width: 100%;
  padding: 0.875rem;
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius-md);
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 1rem;
  transition: all 0.3s ease;
  font-family: var(--font-family);
}

.form-input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.1);
}

.form-input::placeholder {
  color: var(--text-secondary);
}

.form-input:invalid:not(:focus):not(:placeholder-shown) {
  border-color: var(--error-color);
}

select.form-input {
  cursor: pointer;
}

textarea.form-input {
  resize: vertical;
  min-height: 120px;
}

/* ===== CARDS RESPONSIVOS ===== */
@media (max-width: 480px) {
  .card {
    padding: 1.5rem;
  }

  .section {
    padding: 2rem 0;
  }

  .section-title h2 {
    font-size: 1.75rem;
  }

  .section-subtitle {
    font-size: 0.95rem;
  }
}

/* ===== OTIMIZAÇÕES DE PERFORMANCE ===== */
.scroll-reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease;
}

.scroll-reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

.scroll-reveal.delay-200 {
  transition-delay: 0.2s;
}

.scroll-reveal.delay-300 {
  transition-delay: 0.3s;
}

.scroll-reveal.delay-400 {
  transition-delay: 0.4s;
}

.scroll-reveal.delay-600 {
  transition-delay: 0.6s;
}

/* ===== MELHORIAS DE ACESSIBILIDADE ===== */
.nav-link:focus,
.btn:focus,
.form-input:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* Reduzir animações para usuários que preferem menos movimento */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .scroll-reveal,
  .form-input {
    transition: none;
  }
}

/* ===== OTIMIZAÇÕES PARA TELAS MUITO PEQUENAS ===== */
@media (max-width: 320px) {
  .container {
    padding: 0 0.75rem;
  }

  .section {
    padding: 1.5rem 0;
  }

  .btn {
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
  }

  .hero-title {
    font-size: 1.75rem;
  }
}

/* ===== OTIMIZAÇÕES PARA TABLETS ===== */
@media (min-width: 769px) and (max-width: 1024px) {
  .container {
    padding: 0 2rem;
  }

  .grid {
    gap: 2.5rem;
  }


}

/* ===== LOADING STATE ===== */
.loading {
  opacity: 0.7;
  pointer-events: none;
}

.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid var(--color-primary);
  border-top: 2px solid transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}