/* ============================================
   AquaRuta - Estilos personalizados
   ============================================ */

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Navbar con cambio al hacer scroll */
#navbar {
  background: rgba(255, 255, 255, 0);
  backdrop-filter: blur(0);
  -webkit-backdrop-filter: blur(0);
}

#navbar.scrolled {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
  border-bottom: 1px solid rgba(226, 232, 240, 0.6);
}

/* Gradiente radial helper para Tailwind */
.bg-gradient-radial {
  background-image: radial-gradient(var(--tw-gradient-stops));
}

/* FAQ animación */
.faq-toggle {
  transition: background-color 0.2s ease;
}
.faq-toggle:hover {
  background-color: rgba(14, 165, 233, 0.04);
}
.faq-icon.rotated {
  transform: rotate(180deg);
}
.faq-content {
  animation: fadeDown 0.3s ease-out;
}

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

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #0ea5e9, #0284c7);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #0284c7, #075985);
}

/* Selección de texto */
::selection {
  background: #0ea5e9;
  color: white;
}

/* Botón con efecto de brillo */
.btn-shine {
  position: relative;
  overflow: hidden;
}
.btn-shine::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,0.4), transparent);
  transition: left 0.6s;
}
.btn-shine:hover::before {
  left: 100%;
}

/* Inputs focus */
input:focus,
select:focus,
textarea:focus {
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.1);
}

/* Loader del botón al enviar */
.btn-loading {
  pointer-events: none;
  opacity: 0.7;
}
.btn-loading::after {
  content: '';
  display: inline-block;
  width: 16px;
  height: 16px;
  margin-left: 8px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  vertical-align: middle;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Anti-FOUC para tailwind CDN */
[x-cloak] { display: none !important; }

/* Mejor renderizado en mobile */
@media (max-width: 768px) {
  h1 { letter-spacing: -0.02em; }
  h2 { letter-spacing: -0.015em; }
}

/* Print styles */
@media print {
  #navbar, .fixed { display: none !important; }
}
