/* =============================================
   CSS OPTIMIZADO - SIAPOL
   Versión con esquema de colores AZUL
   ============================================= */

/* Variables CSS - Definir una sola vez, usar en todas partes */
:root {
  /* Colores principales - CAMBIADOS A AZUL */
  --primary-blue: #3b82f6;
  --primary-blue-dark: #2563eb;
  --primary-blue-light: #70b3ff;
  --accent-blue: #1d4ed8;
  --text-white: #ffffff;
  --text-gray: #e5e7eb;
  --text-light: #d1d5db;
  --text-muted: #9ca3af;
  --text-dark: #6b7280;
  
  /* Fondos */
  --bg-dark: rgba(0, 0, 0, 0.3);
  --bg-glass: rgba(255, 255, 255, 0.1);
  --bg-overlay: rgba(0, 0, 0, 0.35);
  --bg-overlay-dark: rgba(0, 0, 0, 0.65);
  
  /* Bordes y efectos */
  --border-glass: rgba(255, 255, 255, 0.2);
  --border-glass-strong: rgba(255, 255, 255, 0.3);
  
  /* Espaciado */
  --padding-sm: 8px;
  --padding-base: 15px;
  --padding-lg: 25px;
  --padding-xl: 50px;
  
  /* Border radius */
  --radius-sm: 10px;
  --radius-base: 12px;
  --radius-lg: 15px;
  --radius-xl: 25px;
  
  /* Transiciones */
  --transition-fast: all 0.2s ease;
  --transition-base: all 0.3s ease;
  --transition-slow: all 0.4s ease;
  --transition-cubic: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  
  /* Sombras - ACTUALIZADAS CON AZUL */
  --shadow-sm: 0 4px 15px rgba(0, 0, 0, 0.2);
  --shadow-base: 0 8px 32px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 25px 50px rgba(0, 0, 0, 0.3);
  --shadow-blue: 0 8px 25px rgba(59, 130, 246, 0.4);
}

/* Reset y configuración base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html, body {
  height: 100%;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: var(--text-white);
  overflow-x: hidden;
}

body {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
  background-attachment: fixed;
}

/* =============================================
   CLASES UTILITARIAS REUTILIZABLES
   ============================================= */

/* Efecto cristal - usar en lugar de repetir el código */
.glass-effect {
  background: var(--bg-glass);
  backdrop-filter: blur(15px);
  border: 1px solid var(--border-glass);
  box-shadow: var(--shadow-base);
}

/* Fondos de secciones - elimina repetición */
.section-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  opacity: 0.30;
}

.section-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-overlay);
}

/* Botones base - elimina duplicación */
.btn-base {
  padding: var(--padding-base);
  border: none;
  font-weight: bold;
  cursor: pointer;
  transition: var(--transition-base);
  text-decoration: none;
  display: inline-block;
  border-radius: var(--radius-base);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-blue), var(--primary-blue-dark));
  color: #ffffff;
  padding: var(--padding-base) 30px;
  border-radius: var(--radius-xl);
  font-size: 1.1rem;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-blue);
  transition: all 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Inputs base - consolida todos los estilos de input */
.input-base {
  width: 100%;
  padding: var(--padding-base);
  background: var(--bg-dark);
  border: 1px solid var(--border-glass-strong);
  border-radius: var(--radius-base);
  color: var(--text-white);
  font-size: 1rem;
  transition: var(--transition-base);
}

.input-base:focus {
  outline: none;
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.input-base::placeholder {
  color: var(--text-muted);
}

/* Fix autocompletado - aplicar a todos los inputs */
.input-base:-webkit-autofill,
.input-base:-webkit-autofill:hover,
.input-base:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 30px var(--bg-dark) inset !important;
  -webkit-text-fill-color: var(--text-white) !important;
  transition: background-color 5000s ease-in-out 0s !important;
}

.input-base:-webkit-autofill:focus {
  border-color: var(--primary-blue) !important;
  box-shadow: 0 0 0 30px var(--bg-dark) inset, 0 0 0 3px rgba(59, 130, 246, 0.1) !important;
}

/* =============================================
   NAVEGACIÓN
   ============================================= */
.navbar {
  position: fixed;
  top: 20px;
  right: 40px;
  z-index: 1000;
  padding: 5px 15px;
  border-radius: var(--radius-sm);
}

.nav-list {
  list-style: none;
  display: flex;
  gap: 30px;
  margin: 0;
  padding: 0;
}

.nav-item {
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  padding: 5px 0;
  position: relative;
  transition: var(--transition-base);
  color: var(--text-white);
  text-decoration: none;
  display: block;
}

.nav-item:hover {
  color: var(--primary-blue-light);
  transform: translateY(-2px);
}

.nav-item.active {
  color: var(--primary-blue-light);
}

.nav-item::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary-blue), var(--primary-blue-light));
  transition: var(--transition-base);
  transform: translateX(-50%);
}

.nav-item:hover::before,
.nav-item.active::before {
  width: 100%;
}

/* =============================================
   SISTEMA DE NAVEGACIÓN - SCROLL SIMPLE
   ============================================= */
.main-container {
  position: relative;
  min-height: 100vh;
  padding-bottom: 80px;
}

.section {
  position: relative;
  width: 100%;
  min-height: 100vh;
  opacity: 1;
  transform: none;
  z-index: 1;
}

/* =============================================
   SECCIONES - Usando clases reutilizables
   ============================================= */

/* Inicio */
.hero-section {
  background-image: url('imagenes/ima1.png');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-overlay-dark);
}

.hero-content {
  position: relative;
  z-index: 10;
  max-width: 800px;
  padding: 0 20px;
}

.hero-title {
  font-size: 3.6rem;
  font-weight: bold;
  margin-bottom: 20px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  animation: fadeInUp 1s ease-out;
}

.hero-subtitle {
  font-size: 1.5rem;
  margin-bottom: 30px;
  color: var(--text-gray);
  animation: fadeInUp 1s ease-out 0.2s both;
}

.highlight-text {
  color: var(--primary-blue-light);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 20px;
  margin-top: 50px;
  padding: 0 20px;
}

.stat-card {
  padding: var(--padding-lg);
  text-align: center;
  transition: var(--transition-base);
  animation: float 3s ease-in-out infinite;
  border-radius: var(--radius-lg);
}

.stat-card:nth-child(1) { animation-delay: 0s; }
.stat-card:nth-child(2) { animation-delay: 0.5s; }
.stat-card:nth-child(3) { animation-delay: 1s; }
.stat-card:nth-child(4) { animation-delay: 1.5s; }

.stat-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(59, 130, 246, 0.2);
}

.stat-number {
  font-size: 2rem;
  font-weight: bold;
  color: var(--primary-blue-light);
  display: block;
}

.stat-label {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-top: 5px;
}

/* Nosotros */
.about-section {
  padding: 100px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  min-height: 100vh;
}

.about-background {
  background-image: url('imagenes/ima2.png');
}

.about-content {
  position: relative;
  z-index: 10;
  max-width: 1200px;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.about-image img {
  width: 100%;
  height: 400px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.about-text h2 {
  font-size: 3rem;
  font-weight: bold;
  color: var(--primary-blue-light);
  margin-bottom: 20px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.about-text p {
  font-size: 0.9rem;
  line-height: 1.8;
  margin-bottom: 20px;
  color: var(--text-gray);
  text-align: justify;
}

/* Precios */
.pricing-section {
  padding: 100px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  min-height: 100vh;
}

.pricing-background {
  background-image: url('imagenes/ima3.png');
}

.pricing-content {
  position: relative;
  z-index: 10;
  max-width: 1200px;
  width: 100%;
  text-align: center;
}

.pricing-header h2 {
  font-size: 3rem;
  font-weight: bold;
  color: var(--primary-blue-light);
  margin-bottom: 20px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.pricing-header p {
  font-size: 1.2rem;
  color: var(--text-gray);
  margin-bottom: 40px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.pricing-card {
  padding: 30px;
  text-align: center;
  transition: var(--transition-slow);
  position: relative;
  border-radius: var(--radius-xl);
}

.pricing-card:hover {
  transform: translateY(-15px) scale(1.02);
  box-shadow: 0 25px 50px rgba(59, 130, 246, 0.2);
}

.pricing-card.featured {
  border: 2px solid var(--primary-blue);
  transform: scale(1.05);
}

.pricing-badge {
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--primary-blue), var(--primary-blue-dark));
  color: #ffffff;
  padding: 8px 20px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: bold;
}

.pricing-card h3 {
  font-size: 1.5rem;
  font-weight: bold;
  margin-bottom: 10px;
  color: var(--text-white);
}

.pricing-price {
  font-size: 3rem;
  font-weight: bold;
  color: var(--primary-blue-light);
  margin-bottom: 10px;
}

.pricing-period {
  color: var(--text-muted);
  margin-bottom: 20px;
}

.pricing-features {
  list-style: none;
  margin-bottom: 20px;
  text-align: left;
}

.pricing-features li {
  padding: 4px 0;
  color: var(--text-gray);
  display: flex;
  align-items: center;
  margin-bottom: 1px;
  line-height: 1.0;
  font-size: 0.95rem;
}

.pricing-features li::before {
  content: '✓';
  color: #10b981;
  font-weight: bold;
  margin-right: 10px;
  font-size: 1.2rem;
}

.btn-pricing {
  width: 100%;
  padding: var(--padding-base);
  border: none;
  border-radius: var(--radius-lg);
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  transition: var(--transition-base);
  text-decoration: none;
  display: inline-block;
}

.btn-pricing.primary {
  background: linear-gradient(135deg, var(--primary-blue), var(--primary-blue-dark));
  color: #ffffff;
}

.btn-pricing.secondary {
  background: rgba(107, 114, 128, 0.8);
  color: var(--text-white);
}

.btn-pricing:hover {
  transform: translateY(-2px);
}

/* Login */
.login-section {
  padding: 100px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  min-height: 100vh;
}

.login-background {
  background-image: url('imagenes/ima4.jpg');
}

.login-form {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 460px;
  border-radius: var(--radius-xl);
  padding: var(--padding-xl);
  box-shadow: var(--shadow-lg);
}

.logo-container {
  text-align: center;
  margin-bottom: 15px;
}

.login-logo {
  width: 80px;   /* ajusta el tamaño según tu logo */
  height: auto;
  display: block;
  margin: 0 auto 5px; /* centra y deja espacio debajo */
}

.login-form h2 {
  font-size: 2.5rem;
  font-weight: bold;
  color: var(--primary-blue-light);
  text-align: center;
  margin-bottom: 15px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.form-group {
  margin-bottom: 15px;
}

.form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-gray);
  margin-bottom: 8px;
}

.password-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.password-wrapper input {
  padding-right: 45px !important;
}

.toggle-password-icon {
  position: absolute;
  right: 12px;
  width: 20px;
  height: 20px;
  cursor: pointer;
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.toggle-password-icon:hover {
  opacity: 1;
}

.btn-login {
  width: 100%;
  padding: var(--padding-base);
  background: linear-gradient(135deg, var(--primary-blue), var(--primary-blue-dark));
  color: #ffffff;
  border: none;
  border-radius: var(--radius-lg);
  font-size: 1.1rem;
  font-weight: bold;
  cursor: pointer;
  transition: var(--transition-base);
  margin-bottom: 15px;
}

.btn-login:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-blue);
}

.register-link {
  text-align: center;
  color: var(--text-light);
}

.register-link a {
  color: var(--primary-blue-light);
  text-decoration: none;
  font-weight: bold;
}

.register-link a:hover {
  color: var(--primary-blue);
}

/* Descargar */
.download-section {
  padding: 100px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  min-height: 100vh;
  text-align: center;
}

.download-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('imagenes/ima5.png');
  background-size: cover;
  background-position: center;
  opacity: 0.30;
  z-index: 1;
}

.download-section::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-overlay);
  z-index: 2;
}

.download-content {
  position: relative;
  z-index: 3;
  max-width: 800px;
  padding: var(--padding-xl);
  border-radius: var(--radius-xl);
  animation: fadeInUp 1s ease-out;
}

.download-content h2 {
  font-size: 2.5rem;
  font-weight: bold;
  color: var(--primary-blue-light);
  margin-bottom: 20px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.download-content p {
  font-size: 1.2rem;
  color: var(--text-gray);
  margin-bottom: 40px;
}

.download-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
}

.btn-download {
  padding: var(--padding-base) 30px;
  border-radius: var(--radius-base);
  font-size: 1.1rem;
  text-decoration: none;
  transition: var(--transition-base);
  box-shadow: var(--shadow-sm);
}

.btn-download.windows {
  background: linear-gradient(135deg, #0078d7, #03487c);
  color: var(--text-white);
}

.btn-download.android {
  background: linear-gradient(135deg, #23b34e, #036e27);
  color: var(--text-white);
  cursor: pointer;
}

.btn-download:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: var(--shadow-blue);
}

/* Footer */
.footer-fixed {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: #0f172a;
  color: var(--text-gray);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 15px;
  font-size: 14px;
  z-index: 1000;
  border-top: 1px solid var(--border-glass);
}

.footer-fixed .footer-icons {
  display: flex;
  gap: 20px;
  margin-bottom: 5px;
}

.footer-fixed .footer-icons a {
  color: var(--primary-blue-light);
  font-size: 18px;
  transition: var(--transition-base);
}

.footer-fixed .footer-icons a:hover {
  color: var(--primary-blue);
  transform: translateY(-3px);
}

.footer-fixed p {
  margin: 0;
  font-size: 12px;
  color: var(--text-muted);
}

/* =============================================
   APLICAR CLASES REUTILIZABLES
   ============================================= */

/* Aplicar efecto cristal */
.navbar,
.login-form,
.pricing-card,
.stat-card,
.download-content {
  background: var(--bg-glass);
  backdrop-filter: blur(15px);
  border: 1px solid var(--border-glass);
  box-shadow: var(--shadow-base);
}

/* Aplicar fondos de sección */
.about-background,
.pricing-background,
.login-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  opacity: 0.30;
}

.about-overlay,
.pricing-overlay,
.login-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-overlay);
}

/* Aplicar estilos base a inputs */
.form-group input {
  width: 100%;
  padding: var(--padding-base);
  background: var(--bg-dark);
  border: 1px solid var(--border-glass-strong);
  border-radius: var(--radius-base);
  color: var(--text-white);
  font-size: 1rem;
  transition: var(--transition-base);
}

.form-group input:focus {
  outline: none;
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

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

/* Fix autocompletado mejorado */
.form-group input:-webkit-autofill,
.form-group input:-webkit-autofill:hover,
.form-group input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 30px var(--bg-dark) inset !important;
  -webkit-text-fill-color: var(--text-white) !important;
  transition: background-color 5000s ease-in-out 0s !important;
}

.form-group input:-webkit-autofill:focus {
  border-color: var(--primary-blue) !important;
  box-shadow: 0 0 0 30px var(--bg-dark) inset, 0 0 0 3px rgba(59, 130, 246, 0.1) !important;
}

/* Animaciones */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

/* =============================================
   RESPONSIVE DESIGN
   ============================================= */
@media (max-width: 768px) {
  .navbar {
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    right: auto;
    align-items: center;
    padding: 5px 10px;
  }
  
  .nav-list {
    gap: 10px;
  }
  
  .nav-item {
    font-size: 12px;
    padding: 5px 0;
  }
  
  .hero-title {
    font-size: 2.5rem;
  }
  
  .hero-subtitle {
    font-size: 1.2rem;
  }
  
  .about-content {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  
  .about-text h2 {
    font-size: 2rem;
    margin-top: 10px;
  }
  
  .about-image img {
    width: 90%;
    height: auto;
    margin: 20px auto 10px auto;
    display: block;
  }
  
  .about-text p {
    font-size: 0.9rem;
  }
  
  .pricing-header h2 {
    font-size: 2rem;
  }
  
  .pricing-grid {
    grid-template-columns: 1fr;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
  }
  
  .pricing-card {
    width: 90%;
    max-width: 350px;
    margin: 0;
  }
  
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .login-form {
    margin: 0 10px;
    padding: 20px;
  }

  .download-content {
    width: 90%;
    margin: 0 auto;
    padding: 30px 20px;
  }
  
  /* Performance fix para móvil */
  .hero-section {
    background-attachment: scroll;
  }
}

@media (max-width: 420px) {
  /* Botones con iconos para móviles pequeños */
  .btn-download.windows {
    font-size: 1rem;
  }

  .btn-download.android {
    font-size: 1rem;
  }

  .login-form h2 {
    font-size: 2rem;
  }
  .login-logo {
    width: 65px;   /* ajusta el tamaño según tu logo */
  }
  .btn-login {
    font-size: 0.9rem;
  }
}