/* ==========================================================================
   7. MEDIA QUERIES (RESPONSIVE)
   ========================================================================== */

/* --- Estilos para Tablets y Pantallas Pequeñas (hasta 960px) --- */
@media screen and (max-width: 960px) {
  /* --- AJUSTES PARA EL MENÚ MÓVIL --- */
  .nav-links {
    display: flex;
    flex-direction: column;
    width: 100%;
    position: absolute;
    top: var(--nav-height); /* Se posiciona debajo del menú */
    left: -100%;
    opacity: 0;
    transition: all 0.5s ease;
    background: var(--color-white);
    padding-bottom: 20px;
    border-top: 1px solid var(--color-border);
  }

  .nav-links.active {
    left: 0;
    opacity: 1;
  }

  .nav-link {
    padding: 1.5rem;
    width: 100%;
    display: table;
    text-align: center;
  }

  .nav-toggle {
    display: block;
    position: absolute;
    top: 50%;
    right: 24px;
    transform: translateY(-50%);
    cursor: pointer;
  }

  .nav-toggle .bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    transition: all 0.3s ease-in-out;
    background: var(--color-primary);
  }

  .nav-toggle.is-active .bar:nth-child(2) { opacity: 0; }
  .nav-toggle.is-active .bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  .nav-toggle.is-active .bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

  /* --- AJUSTES PARA EL BOTÓN DE CONTACTO EN MENÚ MÓVIL --- */
  .nav-button {
      display: none; /* Ocultamos el botón destacado para un menú más limpio */
  }
}

/* --- Estilos para Celulares (hasta 768px) --- */
@media screen and (max-width: 768px) {
  /* --- AJUSTES GENERALES DE TIPOGRAFÍA Y ESPACIADO --- */
  h1 { font-size: 2em; }
  h2 { font-size: 1.8em; }
  
  .container {
    padding: 40px 20px; /* Menos padding en los lados */
  }
  
  /* --- SECCIÓN DE BIENVENIDA --- */
  .welcome-container {
    flex-direction: column; /* Apila el texto sobre la imagen */
    text-align: center;
  }

  .welcome-text {
    text-align: center;
    padding-right: 0;
    margin-bottom: 30px;
  }
  
  /* --- SECCIÓN FINAL (Soluciones) --- */
  .final-section-container {
    flex-direction: column; /* Apila las columnas */
  }
  
  .final-section-text {
    text-align: center;
    margin-bottom: 40px;
  }
  
  .final-section-text h2 {
    text-align: center;
  }

  .final-section-features {
    width: 100%;
  }

  /* --- FOOTER --- */
  .footer-container {
      text-align: center; /* Centra el texto del footer */
  }

  /* --- SECCIÓN DE CONTACTO DESPLEGABLE --- */
  #contacto.open {
    padding-top: 40px;
    padding-bottom: 40px;
  }
}
