/* assets/css/styles.css */

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

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-light);
  color: var(--text-primary-light);
  transition: background-color 0.3s ease, color 0.2s ease;
}

html { scroll-behavior: smooth; }

/* Glassmorphism */
.glass {
  background: var(--card-bg-light);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-glass-light);
  border-radius: 24px;
  transition: all 0.25s ease;
}

.glass-nav {
  background: rgba(252, 252, 253, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-glass-light);
}

body.dark .glass-nav {
  background: rgba(10, 15, 26, 0.95);
}

.btn-primary {
  background: linear-gradient(135deg, #00D4FF, #0056B3);
  color: white;
  padding: 12px 28px;
  border-radius: 40px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: transform 0.2s, box-shadow 0.2s;
  border: none;
  cursor: pointer;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 20px -10px rgba(0, 86, 179, 0.4);
}

.btn-outline {
  border: 1.5px solid var(--cyan);
  color: var(--cyan);
  padding: 12px 28px;
  border-radius: 40px;
  font-weight: 600;
  background: transparent;
  transition: background 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.btn-outline:hover {
  background: rgba(0, 212, 255, 0.08);
}

/* Sticky CTA flotante */
.sticky-cta {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 100;
  background: linear-gradient(135deg, #00D4FF, #0056B3);
  color: white;
  padding: 12px 20px;
  border-radius: 60px;
  box-shadow: 0 8px 20px rgba(0, 86, 179, 0.3);
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.2s;
}

.sticky-cta:hover {
  transform: translateY(-2px);
}

/* Botón WhatsApp flotante */
.whatsapp-float {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 100;
  background-color: #25D366;
  color: white;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  transition: transform 0.2s;
  text-decoration: none;
}

.whatsapp-float:hover {
  transform: scale(1.05);
}

/* Botón volver arriba */
.back-to-top {
  position: fixed;
  bottom: 100px;
  right: 24px;
  z-index: 99;
  background: var(--card-bg-light);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-glass-light);
  color: var(--cyan);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  opacity: 0;
  visibility: hidden;
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background: var(--cyan);
  color: white;
}

/* Tarjetas Bento */
.bento-card {
  background: var(--card-bg-light);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-glass-light);
  border-radius: 32px;
  padding: 2rem;
  transition: all 0.25s;
}

.bento-card:hover {
  transform: translateY(-4px);
  border-color: var(--cyan);
  box-shadow: 0 20px 30px -12px rgba(0, 0, 0, 0.08);
}

/* Metodología PHVA */
.phva-step {
  position: relative;
  padding-left: 2rem;
}

.phva-step::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.2rem;
  width: 1.2rem;
  height: 1.2rem;
  border-radius: 2px;
  background: var(--cyan);
  box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.2);
}

.phva-step:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 0.55rem;
  top: 1.5rem;
  width: 2px;
  height: calc(100% - 1rem);
  background: var(--border-glass-light);
}

/* Fuente monoespaciada para datos técnicos */
.mono-data {
  font-family: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;
  font-size: 0.85rem;
  letter-spacing: -0.02em;
}

/* Inputs y selects */
input, select, textarea {
  background-color: var(--card-bg-light);
  border: 1px solid var(--border-glass-light);
  color: var(--text-primary-light);
  border-radius: 16px;
  padding: 0.75rem 1rem;
  transition: all 0.2s;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--cyan);
  outline: none;
  box-shadow: 0 0 0 2px rgba(0, 212, 255, 0.2);
}

/* Logo — se mantiene original en ambos modos */
.logo-img {
  height: 52px;
  width: auto;
}

.footer-logo {
  height: 42px;
  width: auto;
}

/* Estilos modo oscuro con alto contraste */
body.dark .text-gray-500,
body.dark .text-gray-600,
body.dark .text-gray-400,
body.dark .text-gray-700 {
  color: #CBD5E1 !important;
}

body.dark .border-gray-200,
body.dark .border-gray-300 {
  border-color: #334155 !important;
}

body.dark .bg-white\/50,
body.dark .bg-gray-50 {
  background-color: rgba(26, 31, 46, 0.7) !important;
}

/* Modo claro: secciones con fondo gris → fondo más sutil y texto legible */
.bg-white\/30 {
  background-color: rgba(255, 255, 255, 0.5) !important;
}

body:not(.dark) .text-gray-500 {
  color: #475569 !important;
}

body:not(.dark) .text-gray-400 {
  color: #64748B !important;
}

body:not(.dark) .text-gray-600 {
  color: #334155 !important;
}

/* Toggle tema: transición suave con icono animado */
#themeToggle,
#mobileThemeToggle {
  transition: all 0.3s ease;
}

#themeToggle:hover {
  transform: scale(1.05);
  box-shadow: 0 0 12px rgba(0, 212, 255, 0.3);
}

/* Nav links: asegurar legibilidad en ambos modos */
body:not(.dark) .glass-nav a {
  color: #111827 !important;
}

body:not(.dark) .glass-nav a:hover {
  color: var(--cyan) !important;
}

body.dark .glass-nav a {
  color: #F1F5F9 !important;
}

body.dark .glass-nav a:hover {
  color: var(--cyan) !important;
}

/* === MENÚ MÓVIL ESTILOS AISLADOS === */
.mobile-menu-panel {
  display: none; /* Controlado por JS */
  flex-direction: column;
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background: rgba(252, 252, 253, 0.98);
  border-top: 1px solid var(--border-glass-light);
  padding: 1rem;
  gap: 0.5rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

body.dark .mobile-menu-panel {
  background: rgba(10, 15, 26, 0.98);
}

.mobile-nav-link {
  display: block !important;
  padding: 12px 16px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  color: var(--text-primary-light) !important;
  transition: background 0.2s;
}

.mobile-nav-link:hover {
  background: rgba(0, 212, 255, 0.1);
}

.mobile-menu-divider {
  border-top: 1px solid var(--border-glass-light);
  margin-top: 8px;
  padding-top: 12px;
}

.mobile-theme-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px;
  border-radius: 40px;
  border: 1px solid var(--border-glass-light);
  background: var(--card-bg-light);
  color: var(--text-primary-light);
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
}

body.dark #themeToggle,
body.dark #mobileThemeToggle {
  background: rgba(26, 31, 46, 0.9) !important;
  border-color: #4AA3E0 !important;
  color: #F1F5F9 !important;
}

body.dark footer {
  background: #003d7a !important;
}

body.dark footer .text-white\/70 {
  color: #E2E8F0 !important;
}

body.dark footer .border-white\/20 {
  border-color: rgba(255, 255, 255, 0.15) !important;
}

@media (max-width: 768px) {
  .bento-card { padding: 1.5rem; }
  .phva-step { padding-left: 1.5rem; }
  .logo-img { height: 44px; }
  .sticky-cta { padding: 10px 16px; font-size: 0.8rem; }
  .whatsapp-float { width: 48px; height: 48px; font-size: 24px; bottom: 16px; left: 16px; }
  .back-to-top { bottom: 90px; right: 16px; }
}
