/* ============================================================
   VIEW — estilos globales, variables y componentes reutilizables
   Aquí solo hay CSS. Sin lógica, sin datos hardcodeados.
   ============================================================ */

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ---------- Variables de diseño ---------- */
:root {
  --blue:        #1B4FD8;
  --blue-dark:   #1540B8;
  --blue-light:  #EEF2FF;
  --green:       #22C55E;
  --green-dark:  #16A34A;
  --green-light: #DCFCE7;
  --navy:        #1E2A4A;
  --gray:        #6B7280;
  --gray-light:  #F9FAFB;
  --gray-border: #E5E7EB;
  --white:       #FFFFFF;
  --text:        #111827;
  --text-soft:   #374151;
  --radius:      12px;
  --radius-sm:   8px;
}

/* ---------- Base ---------- */
html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.6;
}

h1, h2, h3, h4, h5 { font-family: 'Nunito', sans-serif; }

/* ---------- Animaciones globales ---------- */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}

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

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

/* ============================================================
   NAVBAR
   ============================================================ */
nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--gray-border);
  padding: 0 2rem;
}

.nav-inner {
  max-width: 1100px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  height: 68px;
}

/* Logo */
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }

.logo-icon {
  width: 44px; height: 44px;
  background: var(--blue-light);
  border: 2px solid var(--blue);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; position: relative;
}

.logo-icon::after {
  content: '360°';
  position: absolute; bottom: -8px; right: -8px;
  font-size: 9px; font-weight: 700; font-family: 'Nunito', sans-serif;
  color: var(--blue); background: white;
  border: 1px solid var(--blue); border-radius: 6px;
  padding: 0 3px;
}

.logo-text { display: flex; flex-direction: column; line-height: 1.1; }
.logo-text span:first-child { font-family: 'Nunito', sans-serif; font-weight: 800; font-size: 15px; color: var(--blue); }
.logo-text span:last-child  { font-family: 'Nunito', sans-serif; font-weight: 700; font-size: 13px; color: var(--green); }

/* Links */
.nav-links { display: flex; align-items: center; gap: 2rem; list-style: none; }
.nav-links a { text-decoration: none; font-size: 15px; font-weight: 500; color: var(--text-soft); transition: color 0.2s; cursor: pointer; }
.nav-links a:hover, .nav-links a.active { color: var(--blue); }
.nav-links a.active { border-bottom: 2px solid var(--blue); padding-bottom: 2px; }

/* ============================================================
   BOTONES reutilizables
   ============================================================ */
.btn-demo {
  background: var(--blue); color: white;
  border: none; border-radius: var(--radius-sm);
  padding: 10px 20px; font-size: 14px; font-weight: 600;
  cursor: pointer; text-decoration: none;
  transition: background 0.2s, transform 0.1s;
}
.btn-demo:hover { background: var(--blue-dark); transform: translateY(-1px); }

.btn-primary {
  background: var(--blue); color: white;
  border: none; border-radius: var(--radius-sm);
  padding: 13px 24px; font-size: 15px; font-weight: 700;
  cursor: pointer; transition: all 0.2s; text-decoration: none; display: inline-block;
}
.btn-primary:hover { background: var(--blue-dark); transform: translateY(-1px); }

.btn-outline {
  background: transparent; color: var(--green);
  border: 2px solid var(--green); border-radius: var(--radius-sm);
  padding: 11px 24px; font-size: 15px; font-weight: 700;
  cursor: pointer; transition: all 0.2s;
}
.btn-outline:hover { background: var(--green-light); }

.btn-interface {
  border: 2px solid var(--green); color: var(--green);
  border-radius: var(--radius-sm); padding: 8px 20px;
  font-size: 14px; font-weight: 700; cursor: pointer;
  background: transparent; transition: all 0.2s;
}
.btn-interface:hover { background: var(--green-light); }
.btn-interface.primary { background: var(--green); color: white; border-color: var(--green); }
.btn-interface.primary:hover { background: var(--green-dark); }

.btn-plan {
  width: 100%; border-radius: var(--radius-sm); padding: 12px;
  font-size: 15px; font-weight: 700; cursor: pointer;
  border: 2px solid var(--gray-border); background: white; color: var(--text);
  transition: all 0.2s;
}
.btn-plan:hover { background: var(--gray-light); }
.btn-plan.green { background: var(--green); border-color: var(--green); color: white; }
.btn-plan.green:hover { background: var(--green-dark); }

.btn-report {
  width: 100%; margin-top: 14px;
  background: var(--gray-light); border: 1px solid var(--gray-border);
  border-radius: var(--radius-sm); padding: 10px;
  font-size: 13px; font-weight: 600; cursor: pointer; color: var(--text);
  transition: background 0.2s;
}
.btn-report:hover { background: var(--gray-border); }

.btn-submit {
  width: 100%; background: var(--blue); color: white;
  border: none; border-radius: var(--radius-sm); padding: 13px;
  font-size: 15px; font-weight: 700; cursor: pointer;
  margin-top: 8px; transition: background 0.2s;
}
.btn-submit:hover { background: var(--blue-dark); }

/* ============================================================
   SECCIONES (páginas)
   ============================================================ */
section { display: none; }
section.active { display: block; }

/* ============================================================
   BADGE / PILL reutilizable
   ============================================================ */
.hero-badge, .tienda-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--green-light); color: var(--green-dark);
  border-radius: 20px; padding: 5px 14px; font-size: 13px; font-weight: 600;
  margin-bottom: 20px;
}
.hero-badge::before {
  content: ''; width: 7px; height: 7px;
  background: var(--green); border-radius: 50%;
  animation: pulse 2s infinite;
}

/* ============================================================
   MODAL
   ============================================================ */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.5);
  z-index: 300; display: none; align-items: center; justify-content: center;
}
.modal-overlay.open { display: flex; }

.modal {
  background: white; border-radius: 16px; padding: 36px;
  width: 460px; max-width: 90vw; position: relative;
}
.modal-close {
  position: absolute; top: 16px; right: 16px;
  background: none; border: none; font-size: 22px;
  cursor: pointer; color: var(--gray); line-height: 1;
}
.modal h3 { font-size: 22px; font-weight: 800; color: var(--navy); margin-bottom: 8px; }
.modal p  { font-size: 14px; color: var(--gray); margin-bottom: 20px; }

.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; color: var(--text-soft); margin-bottom: 5px; }
.form-group input, .form-group select {
  width: 100%; border: 1px solid var(--gray-border);
  border-radius: var(--radius-sm); padding: 10px 12px;
  font-size: 14px; font-family: 'Inter', sans-serif;
  outline: none; transition: border-color 0.2s;
}
.form-group input:focus, .form-group select:focus { border-color: var(--blue); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ============================================================
   CHAT FLOTANTE
   ============================================================ */
.chat-fab {
  position: fixed; bottom: 24px; right: 24px;
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--green); border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px rgba(34,197,94,0.4);
  font-size: 22px; z-index: 200; transition: transform 0.2s;
}
.chat-fab:hover { transform: scale(1.1); }

.chat-panel {
  position: fixed; bottom: 90px; right: 24px;
  width: 300px; background: white;
  border: 1px solid var(--gray-border); border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
  z-index: 200; overflow: hidden; display: none;
}
.chat-panel.open { display: block; }
.chat-head {
  background: var(--navy); color: white; padding: 14px 16px;
  display: flex; align-items: center; justify-content: space-between;
}
.chat-head h4 { font-size: 14px; font-weight: 700; }
.chat-head p  { font-size: 11px; opacity: 0.7; }
.chat-close { background: none; border: none; color: white; cursor: pointer; font-size: 18px; }
.chat-body  { padding: 16px; }
.chat-msg {
  background: var(--blue-light); border-radius: 10px; border-top-left-radius: 2px;
  padding: 10px 12px; font-size: 13px; color: var(--text); margin-bottom: 12px; line-height: 1.5;
}
.chat-form { display: flex; gap: 8px; }
.chat-form input {
  flex: 1; border: 1px solid var(--gray-border); border-radius: var(--radius-sm);
  padding: 8px 12px; font-size: 13px; outline: none; font-family: 'Inter', sans-serif;
}
.chat-form button {
  background: var(--blue); color: white; border: none;
  border-radius: var(--radius-sm); padding: 8px 14px;
  cursor: pointer; font-size: 13px; font-weight: 600;
}

/* ============================================================
   TOAST
   ============================================================ */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--navy); color: white; border-radius: var(--radius-sm);
  padding: 12px 24px; font-size: 14px; font-weight: 600;
  z-index: 500; opacity: 0; transition: opacity 0.3s; pointer-events: none;
}
.toast.show { opacity: 1; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
/* ============================================================
   RESPONSIVE MEJORADO
   ============================================================ */
@media (max-width: 768px) {
  /* --- Navegación --- */
  .menu-toggle {
    display: block !important; /* Muestra el botón en móviles */
    background: none;
    border: none;
    font-size: 30px;
    cursor: pointer;
    color: var(--navy);
    padding: 10px;
    z-index: 101;
     
  }

  .nav-links {
    display: none; /* Se oculta por defecto */
    flex-direction: column;
    position: absolute;
    top: 68px;
    left: 0;
    width: 100%;
    background: white;
    padding: 2rem;
    border-bottom: 1px solid var(--gray-border);
    gap: 1.5rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    z-index: 100;
  }

  /* Esta clase se activará con JavaScript */
  .nav-links.open {
    display: flex !important;
  }

  /* --- Ajustes de Estructura --- */
  .hero, .nosotros-hero { 
    grid-template-columns: 1fr; /* Coloca una columna sobre otra */
    text-align: center;
    padding: 40px 1.5rem; 
  }
  
  /* Oculta elementos pesados en móviles para mejorar la carga */
  .hero .dashboard-card, .nosotros-icon-big { 
    display: block; 
    margin: 20px auto;
    width: 100%;
    max-width: 400px;
  }

  /* Todo a una sola columna para lectura vertical */
  .features-inner, .interfaces-grid, .values-row, .plans-grid { 
    grid-template-columns: 1fr; 
  }

  .trust-bar { 
    grid-template-columns: 1fr 1fr; 
  }

  .team-grid { 
    grid-template-columns: repeat(3, 1fr); /* 3 integrantes por fila */
    gap: 10px;
  }
}

/* Ajustes para pantallas muy pequeñas (celulares mini) */
@media (max-width: 480px) {
  .team-grid { grid-template-columns: repeat(2, 1fr); }
  .trust-bar { grid-template-columns: 1fr; }
  .hero h1 { font-size: 28px; } /* Ajusta el tamaño del título */
}
