/* === VARIABLES Y PALETAS (Futurista & Elegante) === */
:root {
  /* TEMA CLARO (Digital Clean) */
  --bg-body: #F0F6FF;       /* Azul muy pálido, limpio */
  --bg-card: #ffffff;
  --text-main: #0B1930;     /* Azul profundo */
  --text-secondary: #475E7B;
  --primary: #0C66E4;       /* Azul corporativo vibrante */
  --accent: #00B8D9;        /* Cian tecnológico */
  --shadow: 0 8px 30px rgba(12, 102, 228, 0.12); /* Sombra azulada moderna */
  --border: #DCE5F2;
}

/* TEMA OSCURO (Cyber Space) */
body.dark-mode {
  --bg-body: #050B14;       /* Negro azulado profundo */
  --bg-card: #0F1C2E;       /* Panel oscuro */
  --text-main: #E6F0FF;     /* Blanco azulado */
  --text-secondary: #94A8C0;
  --primary: #3B82F6;       /* Azul brillante */ 
  --accent: #00E5FF;        /* Cian neón eléctrico */
  --shadow: 0 10px 40px rgba(0, 0, 0, 0.7);
  --border: #1E2D45;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

img { max-width: 100%; height: auto; display: block; }

body {
  font-family: 'Segoe UI', system-ui, sans-serif;
  line-height: 1.6;
  color: var(--text-main);
  background-color: var(--bg-body);
  transition: background-color 0.3s ease;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* === HEADER & NAV === */
header {
  background: var(--bg-card);
  box-shadow: var(--shadow);
  padding: 1rem 5%;
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid var(--border);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* LOGO PNG SIN FONDO */
.logo-link {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-size: 1.6rem;
  font-weight: 800;
  flex: 1;
}

.logo-img {
  height: 50px; /* Ajusta según tu logo */
  width: auto;
  object-fit: contain;
  /* ELIMINADO: background-color white para que sea transparente */
}

.brand-text-wrapper { display: flex; align-items: baseline; }
.brand-text { font-weight: 700; color: var(--text-main); }
.brand-text-accent { color: var(--accent); font-weight: 900; }

.nav-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex: 1;
  gap: 1rem;
}

/* MENU GRANDE */
nav ul { display: flex; gap: 2rem; }
nav a {
  color: var(--text-main);
  font-weight: 600;
  font-size: 1.15rem; /* Un poco más grande */
  padding: 0.5rem 0;
  transition: color 0.2s;
}
nav a:hover { color: var(--primary); }

/* BOTÓN TEMA */
.theme-toggle-btn {
  background: transparent;
  border: none;
  font-size: 1.3rem;
  color: var(--text-main);
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 50%;
  transition: background 0.3s;
}
.theme-toggle-btn:hover { background-color: var(--border); }

/* CTA BUTTON */
/*
.cta-btn {
  background: var(--primary);
  color: white;
  padding: 0.9rem 2rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1.1rem;
  transition: all 0.3s;
  box-shadow: var(--shadow);
}
.cta-btn:hover {
  background: var(--text-main);
  color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 8px 15px rgba(0,0,0,0.3);
}
*/
/* MOBILE MENU */
.mobile-menu-btn { display: none; font-size: 1.5rem; cursor: pointer; color: var(--text-main); }

/* === HERO SECTION (SIEMPRE CENTRADO) === */
.hero {
  background: radial-gradient(circle at top right, #e2f0ff 0%, #f0f6ff 100%);
  padding: 6rem 5% 5rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 80vh;
}

body.dark-mode .hero {
  background: radial-gradient(circle at top right, #112240 0%, #050b14 100%);
}

.hero-content { max-width: 800px; margin: 0 auto; text-align: center; z-index: 2; }

/* Nuevo branding en Hero */
.hero-branding {
  margin-bottom: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.hero-logo-img {
  width: 30%; /* Tamaño dinámico relativo al contenedor */
  max-width: 300px; /* Límite máximo para pantallas muy grandes */
  min-width: 180px; /* Límite mínimo para no perder legibilidad */
  height: auto;
  object-fit: contain;
  /* drop-shadow opcional para resaltar sobre fondo */
  filter: drop-shadow(0 4px 6px rgba(0,0,0,0.1));
}

.hero-brand-text {
  font-size: 3.5rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -1px;
}

.hero h1 {
  font-size: 2.5rem; /* Reducido ligeramente para dar protagonismo al logo */
  margin-bottom: 1.5rem;
  color: var(--text-main);
  line-height: 1.2;
  font-weight: 700;
}

.hero p {
  font-size: 1.25rem;
  color: var(--text-secondary);
  max-width: 700px;
  margin: 0 auto 2.5rem;
}

.hero-btns { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

.hero-btn {
  padding: 1rem 2.5rem;
  border-radius: 50px;
  font-weight: 600;
  transition: all 0.3s;
  font-size: 1rem;
}

.btn-primary { background: var(--primary); color: white; box-shadow: var(--shadow); }
.btn-primary:hover { background: var(--text-main); color: var(--primary); }

.btn-secondary { background: white; color: var(--primary); border: 2px solid var(--primary); box-shadow: var(--shadow); }
.btn-secondary:hover { background: #f8fafc; border-color: var(--primary-dark); }

body.dark-mode .btn-secondary { background: var(--bg-body); color: var(--primary); border-color: var(--primary); }
body.dark-mode .btn-secondary:hover { background: var(--border); color: white; }

/* === SECCIONES GENERALES === */
.section { padding: 6rem 5%; max-width: 1200px; margin: 0 auto; }
.bg-light { background-color: var(--bg-body); }
.section-title { text-align: center; margin-bottom: 4rem; }
.section-title h2 { font-size: 2.5rem; margin-bottom: 1rem; font-weight: 800; }

.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2.5rem; }

.feature-card {
  background: var(--bg-card);
  padding: 2.5rem;
  border-radius: 1rem;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease;
  border: 1px solid var(--border);
}
.feature-card:hover { transform: translateY(-5px); }

.feature-icon {
  font-size: 2.5rem;
  color: var(--primary);
  margin-bottom: 1.5rem;
  background: rgba(37, 99, 235, 0.1);
  width: 60px; height: 60px;
  line-height: 60px;
  text-align: center;
  border-radius: 50%;
}

/* BENEFITS */
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 2rem; max-width: 1000px; margin: 0 auto; }
.benefit-item { text-align: center; padding: 2rem; }
.icon-circle { width: 80px; height: 80px; background: var(--bg-body); border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 1.5rem; font-size: 2rem; color: var(--primary); }
.benefit-item h3 { margin-bottom: 0.75rem; font-size: 1.25rem; }

/* CONTACTO */
.contact-section { padding: 6rem 5%; background-color: var(--bg-body); }
.contact-container {
  max-width: 900px; margin: 0 auto; background: var(--bg-card);
  padding: 3rem; border-radius: 1rem; box-shadow: var(--shadow);
  display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center;
}
.contact-info h2 { font-size: 2.25rem; margin-bottom: 1.5rem; }
.contact-list li { margin-bottom: 1rem; color: var(--text-secondary); display: flex; align-items: center; gap: 10px; }
.contact-list i { color: var(--primary); width: 20px; text-align: center; }

.form-group { text-align: left; margin-bottom: 1.25rem; }
.form-group label { display: block; margin-bottom: 0.5rem; font-weight: 600; }
.form-group input, .form-group textarea {
  width: 100%; padding: 0.8rem; border-radius: 0.5rem;
  border: 1px solid var(--border); background: var(--bg-body); color: var(--text-main);
  transition: border-color 0.3s;
}
.form-group input:focus, .form-group textarea:focus { border-color: var(--primary); outline: none; }

.btn-submit { background: var(--primary); color: white; padding: 1rem; border: none; border-radius: 0.5rem; font-size: 1.1rem; font-weight: 600; cursor: pointer; width: 100%; }
.btn-submit:hover { background: var(--text-main); color: var(--primary); }

/* FOOTER */
footer { background: var(--bg-body); color: var(--text-secondary); padding: 3rem 5% 1.5rem; }
.footer-content { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 2.5rem; max-width: 1200px; margin: 0 auto 2rem; }

.logo-footer-link { display: flex; align-items: center; gap: 0.8rem; margin-bottom: 1rem; }
.footer-logo-img { height: 50px; width: auto; object-fit: contain; }

.footer-col h3 { color: var(--text-main); margin-bottom: 1.25rem; font-size: 1.1rem; text-transform: uppercase; letter-spacing: 1px; border-bottom: 1px solid var(--border); padding-bottom: 0.5rem; display: inline-block; }
.footer-col ul li { margin-bottom: 0.5rem; }
.footer-col a { color: var(--text-secondary); transition: color 0.2s; }
.footer-col a:hover { color: var(--primary); }
.copyright { text-align: center; border-top: 1px solid var(--border); padding-top: 2rem; font-size: 0.9rem; }

/* RESPONSIVE */
@media (max-width: 768px) {
  /* HEADER & NAV */
  .nav-container { 
    /* position: static;  <-- IMPORTANTE: Permitir que nav ul se posicione respecto al header */
    flex-wrap: nowrap;
  }
  
  /* Logo más compacto en móvil */
  .logo-link { 
    flex-direction: row; 
    font-size: 1.2rem; 
    align-items: center; 
    flex: 0 0 auto;
  }
  .logo-img { height: 35px; } 
  .brand-text-wrapper { flex-direction: row; align-items: baseline; margin-top: 0; }

  /* Menú Flotante (Overlay) */
  nav { width: auto; } /* Reset */

  nav ul { 
    display: none; 
    position: absolute; 
    top: 100%; /* Debajo del header */
    left: 0;
    width: 100%; /* Ancho del header (que es 100% del viewport) */
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    flex-direction: column; 
    text-align: center; 
    padding: 1.5rem; 
    gap: 1.5rem;
    margin: 0;
    z-index: 999;
  }

  nav ul.active { 
    display: flex; 
    animation: slideDown 0.3s ease forwards;
  }
  
  /* Corrección visual header elementos derechos */
  .nav-right {
    gap: 0.8rem;
    flex: 0 0 auto;
  }

  .mobile-menu-btn { display: block; font-size: 1.5rem; }

  /* CAJAS Y GRIDS */
  .features, .features-grid {
    grid-template-columns: 1fr; /* Una columna en móvil */
    gap: 2rem;
  }
  
  .feature-card, .benefit-item {
    padding: 2rem 1.5rem;
  }

  /* HERO */
  .hero { padding: 4rem 5% 3rem; min-height: auto; }
  .hero-brand-text { font-size: 2.2rem; }
  .hero-logo-img { width: 45%; max-width: 150px; min-width: 100px; }
  .hero h1 { font-size: 1.8rem; }
  .hero p { font-size: 1rem; }
  
  .contact-container { grid-template-columns: 1fr; padding: 2rem; }
  .footer-content { grid-template-columns: 1fr; text-align: center; gap: 2rem; }
}

/* Ajuste específico para cuando el JS pone .active en UL */
@media (max-width: 768px) {
   /* Eliminado bloque redundante y conflictivo */
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}