Molecular aspects of the main phase transition in lipid systems as a weak first-order phase transition: 1. Model of thermodynamic behavior of lipid membranes