/* ======================================================
   VARIABLES & RESETEO
   - Paleta centralizada para mantener consistencia visual
   ====================================================== */
:root {
  --primary: #1e40af;
  --primary-dark: #1e3a8a;
  --primary-light: #3b82f6;
  --secondary: #0ea5e9;
  --accent: #06b6d4;

  --background: #f8fafc;
  --surface: #ffffff;

  --text-primary: #1e293b;
  --text-secondary: #64748b;

  --border: rgba(30, 64, 175, 0.1);
  --shadow: rgba(30, 64, 175, 0.15);

  --gradient-primary: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  --gradient-secondary: linear-gradient(135deg, var(--secondary) 0%, var(--accent) 100%);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body {
  font-family: 'Inter', sans-serif;
  background: var(--background);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Contenedor estándar para alinear contenido en el header */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* ======================================================
   BACKGROUND: PARTÍCULAS (decorativo)
   - El contenedor se rellena por JS con elementos .particle
   ====================================================== */
.particles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}
.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: var(--primary);
  border-radius: 50%;
  animation: float 12s infinite linear;
  opacity: 0.3;
}
@keyframes float {
  0% { transform: translateY(100vh) translateX(0) rotate(0deg); opacity: 0; }
  10%, 90% { opacity: 0.3; }
  100% { transform: translateY(-100px) translateX(50px) rotate(360deg); opacity: 0; }
}

/* ======================================================
   HEADER / NAV
   ====================================================== */
header {
  position: fixed; top: 0; left: 0; right: 0;
  background: linear-gradient(135deg, #030c2b 0%, #3859bd 100%);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  padding: 1rem 0;
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px var(--shadow);
}
.header-scrolled {
  box-shadow: 0 8px 32px var(--shadow);
}
nav {
  display: flex; justify-content: space-between; align-items: center;
}
.logo-ico img {
  height: 70px; width: auto;

}
.nav-links {
  display: flex; list-style: none; gap: 2rem;
}
.nav-links a {
  color: #fff; text-decoration: none; font-weight: 500;
  padding: .5rem 1rem; border-radius: 8px; position: relative;
  transition: all 0.3s ease;
}
.nav-links a::before{
  content: ''; position: absolute; bottom: 0; left: 50%;
  width: 0; height: 2px; background: #fff; transform: translateX(-50%);
  transition: width .3s ease;
}
.nav-links a:hover::before{ width: 80%; }
.nav-links a:hover{ background: rgba(255,255,255,0.1); transform: translateY(-2px); }
.mobile-menu-btn{
  display: none; background: none; border: none; color: #fff; font-size: 1.5rem; padding: .5rem; cursor: pointer;
}

/* ======================================================
   MAIN
   ====================================================== */
main{
  padding-top: 80px; /* despeje por header fijo */
  min-height: 100vh; position: relative; z-index: 10;
}

/* Sección Aplicaciones */
.applications { padding: 4rem 2rem; max-width: 1400px; margin: 0 auto; }
.section-header { text-align: center; margin-bottom: 4rem; }
.section-title{
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 800; background: var(--gradient-primary);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  margin-bottom: 1rem;
}
.section-subtitle{ font-size: 1.1rem; color: var(--text-secondary); max-width: 600px; margin: 0 auto; }

.apps-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem; margin-bottom: 6rem;
}
.app-card{
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 24px; padding: 2.5rem; text-align: center; position: relative; overflow: hidden;
  transition: all .4s cubic-bezier(0.4, 0, 0.2, 1); box-shadow: 0 8px 25px var(--shadow);
}
.app-card::before{
  content: ''; position: absolute; inset: 0; background: var(--gradient-secondary);
  opacity: 0; transition: opacity .3s ease; z-index: 1;
}
.app-card:hover::before{ opacity: .05; }
.app-card > *{ position: relative; z-index: 2; }
.app-icon{
  width: 80px; height: 80px; margin: 0 auto 1.5rem;
  background: var(--gradient-primary); border-radius: 20px;
  display: flex; align-items: center; justify-content: center;
  transition: all .4s ease; box-shadow: 0 8px 25px rgba(30,64,175,.3);
}
.app-icon img{ width: 70%; height: auto; filter: brightness(0) invert(1); }
.app-card:hover .app-icon{ transform: scale(1.1) rotate(5deg); box-shadow: 0 12px 35px rgba(30,64,175,.4); }
.app-card h3{ font-size: 1.5rem; font-weight: 700; margin-bottom: 1rem; }
.app-card p{ color: var(--text-secondary); margin-bottom: 2rem; font-size: 1rem; }
.app-link{
  display: inline-flex; align-items: center; gap: .5rem;
  background: var(--gradient-primary); color: #fff; text-decoration: none; font-weight: 600;
  padding: .75rem 1.5rem; border-radius: 12px; transition: all .3s ease; font-size: .95rem; border: 0;
}
.app-link:hover{ transform: translateX(5px); box-shadow: 0 8px 25px rgba(30,64,175,.3); }

/* Sección Bots / Features */
.features{
  padding: 4rem 2rem;
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
  border-top: 1px solid var(--border);
}
.features-content{ max-width: 1400px; margin: 0 auto; }
.features h2{
  text-align: center; font-size: clamp(2rem, 4vw, 3rem); font-weight: 800;
  background: var(--gradient-primary);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  margin-bottom: 3rem;
}
.feature-grid{ display: grid; grid-template-columns: repeat(auto-fit, minmax(400px, 1fr)); gap: 2rem; }
.feature-card{
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 20px; padding: 2rem; transition: all .3s ease; box-shadow: 0 8px 25px var(--shadow);
}
.feature-card:hover{ transform: translateY(-8px); box-shadow: 0 16px 40px var(--shadow); }
.feature-header{ display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.feature-icon{
  width: 50px; height: 50px; background: var(--gradient-secondary);
  border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; color: #fff; flex-shrink: 0;
}
.feature-card h3{ font-size: 1.2rem; font-weight: 700; }
.feature-card p{ color: var(--text-secondary); margin-bottom: 1.25rem; }
.copy-button{
  background: var(--gradient-secondary); color: #fff; border: none;
  padding: .75rem 1.5rem; border-radius: 12px; font-weight: 600; cursor: pointer; transition: all .3s ease;
  font-size: .95rem; display: inline-flex; align-items: center; gap: .5rem;
}
.copy-button:hover{ transform: translateY(-2px); box-shadow: 0 8px 25px rgba(14,165,233,.3); }
.copy-button.copied{ background: #10b981; transform: scale(.98); }

/* Footer */
.footer{
  background: linear-gradient(135deg, #030c2b 0%, #3859bd 100%);
  padding: 3rem 2rem 1rem; color: #fff;
}
.footer-content{
  max-width: 1400px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 3rem;
}
.footer-section h3{ color: var(--accent); margin-bottom: 1rem; font-weight: 700; }
.footer-section p, .footer-section a{ color: rgba(255,255,255,.9); text-decoration: none; transition: color .3s ease; }
.footer-section a:hover{ color: #fff; }
.footer-links{ list-style: none; }
.footer-links li{ margin-bottom: .5rem; }
.footer-logo{ font-size: 1.6rem; font-weight: 800; color: #fff; margin-bottom: 1rem; }
.footer-bottom{
  border-top: 1px solid rgba(255,255,255,.2);
  margin-top: 2rem; padding-top: 2rem; text-align: center; color: rgba(255,255,255,.8);
}

/* Animaciones de entrada */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-in{ opacity: 0; } /* JS aplicará la animación */

/* ======================================================
   RESPONSIVE
   ====================================================== */
@media (max-width: 768px) {
  .mobile-menu-btn{ display: block; }
  .nav-links{
    display: none; position: absolute; top: 100%; left: 0; width: 100%;
    background: linear-gradient(135deg, #030c2b 0%, #3859bd 100%);
    flex-direction: column; padding: 1rem; border-radius: 0 0 12px 12px; box-shadow: 0 8px 25px var(--shadow);
  }
  .nav-links.active{ display: flex; }
  .nav-links a{ padding: 1rem; border-radius: 8px; text-align: center; }

  .apps-grid { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: 1fr; }
  .footer-content { grid-template-columns: 1fr; text-align: left; }
}

@media (max-width: 480px) {
  header { padding: 1rem 0; }
  .applications { padding: 2rem 1rem; }
  .app-card { padding: 2rem 1.25rem; }
  .features { padding: 2rem 1rem; }
  .feature-card { padding: 1.5rem; }
}

/* ======================================================
   IMPORTANTE: Se eliminó el TOAST verde del diseño original.
   - No existe .toast en esta hoja: no habrá “etiqueta” en esquina inferior.
   ====================================================== */
