/* ==========================================
   RESET & VARIABLES GLOBALES
   ========================================== */
:root {
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-card: #1e293b;
  --bg-white: #ffffff;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dark: #0f172a;
  --accent-color: #25d366; /* WhatsApp Green */
  --accent-hover: #1ebd56;
  --brand-blue: #38bdf8;
  --border-color: #334155;
  --border-light: #e2e8f0;
  --font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  --max-width: 1200px;
  --transition: all 0.3s ease;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-primary);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ==========================================
   LAYOUT Y CONTENEDORES
   ========================================== */
.container {
  width: 90%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 60px 0;
}

.center {
  text-align: center;
}

.divider {
  width: 60px;
  height: 4px;
  background-color: var(--brand-blue);
  margin: 20px auto;
  border-radius: 2px;
}

.section-white {
  background-color: var(--bg-white);
  color: var(--text-dark);
}

.section-white .divider {
  background-color: var(--bg-primary);
}

/* ==========================================
   HEADER Y NAVEGACIÓN
   ========================================== */
.header-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  padding: 15px 0;
}

.nav-container {
  width: 90%;
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-logo-wordmark {
  height: 100px; /* Aumenta o disminuye este valor según qué tan grande lo quieras (ej. 52px, 60px) */
  width: auto;
  display: block;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-main);
  font-size: 28px;
  cursor: pointer;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 25px;
}

/* Estilo general para los enlaces del menú */
.nav-menu a {
  position: relative;
  text-decoration: none;
  color: var(--text-main);
  padding-bottom: 5px; /* Espacio para que la línea no pegue al texto */
  transition: color 0.3s ease;
}

/* Indicador de página activa (línea verde inferior) */
.nav-menu a.active-link {
  color: #10b981; /* Verde (ajusta el código HEX al tono exacto de tu marca) */
  font-weight: 600;
}

/* Subrayado verde dinámico usando un pseudoelemento */
.nav-menu a.active-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: #10b981; /* Mismo color verde */
  border-radius: 2px;
}

/* ==========================================
   RESPONSIVO MÓVIL (Añadir aquí abajo)
   ========================================== */
@media (max-width: 768px) {
  .nav-container {
    position: relative;
  }

  .menu-toggle {
    display: block !important;
    font-size: 32px;
    padding: 5px;
    z-index: 1001;
    touch-action: manipulation;
  }

  .nav-menu {
    display: none !important;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: 100%;
    background-color: #0f172a;
    flex-direction: column;
    align-items: center;
    padding: 25px 20px;
    gap: 20px;
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    z-index: 1000;
  }

  .nav-menu.active {
    display: flex !important;
  }
}

/* Enlaces del menú en color blanco */
.nav-menu a {
  color: #ffffff;
  font-weight: 500;
  text-decoration: none;
  transition: var(--transition, color 0.25s ease);
}

.nav-menu a:hover {
  color: #25d366;
}

/* Corrección definitiva para el botón Cotizar en el menú (Verde sólido) */
.nav-menu .nav-btn-cotizar,
a.nav-btn-cotizar {
  background-color: #25d366 !important;
  color: #0f172a !important;
  border: none !important;
  padding: 8px 18px !important;
  border-radius: 6px !important;
  font-weight: 600 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: 1 !important;
  transition: all 0.2s ease !important;
  text-decoration: none !important;
}

.nav-menu .nav-btn-cotizar:hover,
a.nav-btn-cotizar:hover {
  background-color: #20ba5a !important;
  color: #0f172a !important;
  transform: translateY(-1px);
}

/* ==========================================
   HERO Y BOTONES
   ========================================== */
.hero {
  padding: 80px 0 40px;
}

.hero h1 {
  font-size: 2.5rem;
  line-height: 1.2;
  margin-bottom: 20px;
}

.hero p {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 800px;
  margin: 0 auto 30px;
}

.role-anchors {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-bottom: 35px;
}

.role-anchors a {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.9rem;
  transition: var(--transition);
}

.role-anchors a:hover {
  border-color: var(--brand-blue);
  color: var(--brand-blue);
}

.whatsapp-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background-color: var(--accent-color);
  color: #fff;
  font-weight: 600;
  padding: 14px 28px;
  border-radius: 8px;
  font-size: 1rem;
  transition: var(--transition);
}

.whatsapp-btn:hover {
  background-color: var(--accent-hover);
  transform: translateY(-2px);
}

/* ==========================================
   TARJETAS Y SECCIONES
   ========================================== */
.features-section {
  background-color: var(--bg-primary);
  padding: 40px 0;
}

.features-intro {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 750px;
  margin: 0 auto 40px;
}

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

.feature-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 30px;
  border-radius: 12px;
  transition: var(--transition);
}

.section-white .feature-card {
  background-color: #f8fafc;
  border: 1px solid var(--border-light);
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: var(--brand-blue);
}

.feature-icon {
  width: 48px;
  height: 48px;
  background-color: rgba(56, 189, 248, 0.1);
  color: var(--brand-blue);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.feature-card h3 {
  font-size: 1.25rem;
  margin-bottom: 12px;
}

.feature-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.section-white .feature-card p {
  color: #64748b;
}

.roadmap-badge {
  background-color: rgba(56, 189, 248, 0.15);
  color: var(--brand-blue);
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ==========================================
   IMÁGENES Y TARJETAS ESPECIALES (INDEX)
   ========================================== */
.hero-image {
  margin: 0 auto 30px auto;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-color);
}

.section-image {
  margin: 30px auto 0 auto;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.roadmap-card {
  max-width: 600px;
  margin: 30px auto 0 auto;
}

/* ==========================================
   CTA & FOOTER
   ========================================== */
.cta-section {
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.footer {
  background-color: var(--bg-primary);
  padding: 60px 0 30px;
  border-top: 1px solid var(--border-color);
  font-size: 0.9rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
}

.footer-brand h3 {
  margin-bottom: 15px;
}

.footer-brand p {
  color: var(--text-muted);
  max-width: 350px;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  color: var(--text-muted);
  transition: var(--transition);
}

/* Corrección para el estado hover en los enlaces del footer */
.footer-links a:hover,
.footer a:hover {
  color: #25d366 !important;
}

.footer-bottom {
  text-align: center;
  color: var(--text-muted);
  padding-top: 30px;
  border-top: 1px solid var(--border-color);
}

/* ==========================================
   BOTÓN FLOTANTE WHATSAPP
   ========================================== */
.floating-whatsapp {
  position: fixed;
  bottom: 25px;
  right: 25px;
  width: 55px;
  height: 55px;
  background-color: var(--accent-color);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  z-index: 999;
  transition: var(--transition);
}

.floating-whatsapp:hover {
  transform: scale(1.1);
  background-color: var(--accent-hover);
}

/* ==========================================
   ANIMACIONES & RESPONSIVE
   ========================================== */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 768px) {
  /* Asegura que el botón sea visible y fácil de presionar */
  .menu-toggle,
  .nav-toggle {
    display: flex !important;
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 1.8rem;
    cursor: pointer;
    padding: 8px;
    z-index: 1001; /* Queda por encima para recibir el toque */
  }

  /* Oculta el menú por defecto en móvil */
  .nav-menu {
    display: none !important;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: 100%;
    background-color: #0f172a;
    flex-direction: column;
    padding: 20px;
    gap: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    z-index: 1000;
  }

  /* REGLA CLAVE: Fuerza al menú a desplegarse cuando JS añade la clase active */
  .nav-menu.active {
    display: flex !important;
  }
}

  .hero h1 {
    font-size: 1.8rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
}