/* ==============================================
   SIAPOL - index.css
   Sin duplicados · Sin código muerto · Responsive
   ============================================== */

/* ----------------------------------------------
   VARIABLES
   ---------------------------------------------- */
:root {
  --primary-gold:       #fbbf24;
  --primary-gold-dark:  #f59e0b;
  --text-white:         #ffffff;
  --text-gray:          #e5e7eb;
  --text-light:         #d1d5db;
  --text-muted:         #9ca3af;

  --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);

  --border-glass:       rgba(255,255,255,0.2);
  --border-glass-strong:rgba(255,255,255,0.3);

  --padding-sm:   8px;
  --padding-base: 15px;
  --padding-lg:   25px;
  --padding-xl:   50px;

  --radius-sm:  10px;
  --radius-base:12px;
  --radius-lg:  15px;
  --radius-xl:  25px;

  --transition-base: all 0.3s ease;
  --transition-slow: all 0.4s ease;

  --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-gold: 0 8px 25px rgba(251,191,36,0.4);
}

/* ----------------------------------------------
   RESET 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;
}

/* ----------------------------------------------
   NAVBAR
   ---------------------------------------------- */
.navbar {
  position: fixed;
  top: 20px;
  right: 40px;
  z-index: 1000;
  padding: 5px 15px;
  border-radius: var(--radius-sm);
  background: var(--bg-glass);
  backdrop-filter: blur(15px);
  border: 1px solid var(--border-glass);
  box-shadow: var(--shadow-base);
}

.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;
  white-space: nowrap;
}

.nav-item:hover,
.nav-item.active {
  color: var(--primary-gold);
}

.nav-item:hover { transform: translateY(-2px); }

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

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

/* ----------------------------------------------
   CONTENEDOR PRINCIPAL Y SECCIONES
   ---------------------------------------------- */
.main-container {
  position: relative;
  min-height: 100vh;
  padding-bottom: 80px;
}

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

/* Fondos y overlays reutilizables */
.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);
}

/* ----------------------------------------------
   SECCIÓN INICIO
   ---------------------------------------------- */
.hero-section {
  background-image: url('imagenes/fondo2.jpeg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.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: 4rem;
  font-weight: bold;
  margin-bottom: 20px;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
  animation: fadeInUp 1s ease-out;
}

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

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

/* Botón principal */
.btn-primary {
  background: linear-gradient(135deg, var(--primary-gold), var(--primary-gold-dark));
  color: #000;
  padding: var(--padding-base) 30px;
  border-radius: var(--radius-xl);
  font-size: 1.1rem;
  font-weight: bold;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  border: none;
  transition: var(--transition-base);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-gold);
}

/* Stats */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 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);
  background: var(--bg-glass);
  backdrop-filter: blur(15px);
  border: 1px solid var(--border-glass);
  box-shadow: var(--shadow-base);
}

.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(251,191,36,0.2);
}

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

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

/* ----------------------------------------------
   SECCIÓN NOSOTROS
   ---------------------------------------------- */
.about-section {
  padding: 100px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.about-background { background-image: url('imagenes/fondo11.jpeg'); }

.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-gold);
  margin-bottom: 20px;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

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

/* ----------------------------------------------
   SECCIÓN PRECIOS
   ---------------------------------------------- */
.pricing-section {
  padding: 100px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pricing-background { background-image: url('imagenes/fondo9.jpeg'); }

.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-gold);
  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);
  background: var(--bg-glass);
  backdrop-filter: blur(15px);
  border: 1px solid var(--border-glass);
  box-shadow: var(--shadow-base);
}

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

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

.pricing-badge {
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--primary-gold), var(--primary-gold-dark));
  color: #000;
  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: 0;
  color: var(--text-white);
}

.pricing-price {
  font-size: 3rem;
  font-weight: bold;
  color: var(--primary-gold);
  margin-bottom: 0;
}

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

.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;
  font-size: 0.95rem;
  line-height: 1.3;
}

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

.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-gold), var(--primary-gold-dark));
  color: #000;
}

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

/* ----------------------------------------------
   SECCIÓN LOGIN
   ---------------------------------------------- */
.login-section {
  padding: 100px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-background { background-image: url('imagenes/fondo1.jpeg'); }

.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);
  
  background: var(--bg-glass);
  backdrop-filter: blur(15px);
  border: 1px solid var(--border-glass);
}

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

.login-logo {
  width: 80px;
  height: auto;
  display: block;
  margin: 0 auto;
}

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

/* Mensaje de alerta URL */
.mensaje-alerta {
  background: rgba(239,68,68,0.2);
  border: 1px solid rgba(239,68,68,0.5);
  color: #fca5a5;
  padding: 12px 20px;
  border-radius: var(--radius-base);
  margin-bottom: 20px;
  text-align: center;
  font-size: 0.9rem;
}

.login-subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 10px;
}

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

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

/* 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-gold);
  box-shadow: 0 0 0 3px rgba(251,191,36,0.1);
}

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

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

.form-group input:-webkit-autofill:focus {
  border-color: var(--primary-gold) !important;
}

/* Toggle contraseña */
.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.7;
  transition: opacity 0.3s ease;
}

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

/* Botón login */
.btn-login {
  width: 100%;
  padding: var(--padding-base);
  background: linear-gradient(135deg, var(--primary-gold), var(--primary-gold-dark));
  color: #000;
  border: none;
  border-radius: var(--radius-lg);
  font-size: 1.1rem;
  font-weight: bold;
  cursor: pointer;
  transition: var(--transition-base);
  margin-bottom: 20px;
}

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

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

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

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

/* ----------------------------------------------
   SECCIÓN DESCARGAR
   ---------------------------------------------- */
.download-section {
  padding: 100px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.download-section::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background-image: url('imagenes/fondo7.jpeg');
  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;
  width: 100%;
  padding: var(--padding-xl);
  border-radius: var(--radius-xl);
  animation: fadeInUp 1s ease-out;
  background: var(--bg-glass);
  backdrop-filter: blur(15px);
  border: 1px solid var(--border-glass);
  box-shadow: var(--shadow-base);
}

.download-content h2 {
  font-size: 2.5rem;
  font-weight: bold;
  color: var(--primary-gold);
  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;
  font-weight: bold;
  text-decoration: none;
  border: none;
  cursor: pointer;
  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);
}

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

/* ----------------------------------------------
   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-gold);
  font-size: 18px;
  transition: var(--transition-base);
}

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

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

/* ----------------------------------------------
   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 — 768px
   ---------------------------------------------- */
@media (max-width: 768px) {

  /* Navbar centrado, texto más pequeño */
  .navbar {
    top: 20px;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    padding: 5px 10px;
    align-items: center;
  }

  .nav-list {
    gap: 15px;
  }

  .nav-item {
    font-size: 12px;
    padding: 5px 0;
  }

  /* Hero */
  .hero-section { background-attachment: scroll; }
  .hero-title   { font-size: 2.2rem; }
  .hero-subtitle{ font-size: 1.1rem; }
  .btn-primary  { font-size: 1rem; padding: 12px 20px; }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 0 10px;
    margin-top: 30px;
  }

  /* Nosotros */
  .about-content {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .about-image img {
    width: 90%;
    height: auto;
    margin: 0 auto;
    display: block;
  }

  .about-text h2 { font-size: 2rem; }
  .about-text p  { font-size: 0.95rem; }

  /* Precios */
  .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: 92%;
    max-width: 380px;
  }

  .pricing-card.featured { transform: scale(1); }

  /* Login */
  .login-form {
    margin: 0 10px;
    padding: 30px 20px;
  }

  .login-form h2 { font-size: 2rem; }

  .login-logo {
    width: 65px;
  }

  /* Descargar */
  .download-content {
    width: 90%;
      margin: 0 auto;
    padding: 30px 20px;
  }

  .download-content h2 { font-size: 2rem; }

  .download-buttons {
    flex-direction: column;
    align-items: center;
  }

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

/* ----------------------------------------------
   RESPONSIVE — 420px  (móviles pequeños)
   ---------------------------------------------- */
@media (max-width: 420px) {

    
  .nav-list {
    gap: 10px;
    justify-content: space-around;
    width: 90%;  /* ✅ CORREGIDO: era 9100% */
  }

  
  .register-link {
    font-size: 0.8rem;
  }
  
  /* Premium primero */
  .pricing-card.featured {
    order: 1;
    width: 85%;
    max-width: 360px;
    transform: scale(1);
  }

  /* Características segundo */
  .pricing-card:nth-child(1) {
    order: 2;
    width: 85%;
    max-width: 360px;
  }

  /* Novedades OCULTO en responsive */
  .pricing-card:nth-child(3) {
    display: none;
  } 

  .hero-title    { font-size: 1.8rem; }
  .hero-subtitle { font-size: 1rem; }

  .stat-number { font-size: 1.6rem; }
  .stat-label  { font-size: 0.8rem; }

  .login-form { padding: 25px 15px; }
  .login-form h2 { font-size: 1.8rem; }

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

  .download-content h2 { font-size: 1.8rem; }
}
