## 3 Results and Discussion
### The Adsorption Properties of the Mesoporous Materials
In turn, the results of fitting using the Generalized Freundlich (GL) equation for dye-polymer systems give more realistic values of this parameter, but the values of maximum adsorption capacity (a\({}_{\rm m}\)) are overestimated. By analysing the structural (from nitrogen adsorption/desorption and SAXS measurements) and surface chemical properties (from potentiometric titration and XPS measurements) of the two groups of materials, it can be concluded that their significantly differentiated adsorption efficiencies towards methylene blue are mainly due to a difference in surface charge. Under the experimental conditions, methylene blue was in the ionized form with a positive charge, while the activated carbons were characterized by a negative surface charge due to partial ionisation of the acidic groups. The different charges of the contacting species promoted adsorption by electrostatic interactions. It can be assumed that the presence of silica in the carbon materials as a residue of the incompletely removed matrix did not affect dye adsorption (a weak mutual affinity). In the case of the polymeric materials characterized by a weakly positive charged surface, contact with the adsorbate cations resulted in repulsive electrostatic interactions which also limited other possible adsorption mechanisms. Regarding the influence of the solid porosity on the methylene blue adsorption, a correlation between the adsorption capacity and the pore size is observed for both groups of materials. Methylene blue, as a relatively small molecule with a linear structure (Figure S1 in Supplementary Materials), is adsorbed more strongly in smaller pores (micropores and small mesopores) than in larger pores (medium and large mesopores). Therefore, carbon C3 turned out to be a relatively more effective adsorbent (a\({}_{\rm m}\) = 1.01 mmol/g) than carbon C4 (a\({}_{\rm m}\) = 0.88 mmol/g), despite its smaller specific surface area and total pore volume. These parameters for C3 and C4 were 508 m\({}^{2}\)/g and 0.29 cm\({}^{3}\)/g and 649 m\({}^{2}\)/g and 0.65 cm\({}^{3}\)/h, respectively. In the group of polymers, P2 (a\({}_{\rm m}\) = 0.044 mmol/g) was more effective than P1 (a\({}_{\rm m}\) = 0.038 mmol/g). The V\({}_{\rm t}\) values for P2 and P1 are 0.75 cm\({}^{3}\)/g and 1.06 cm\({}^{3}\)/g, respectively (the specific surface area of both polymers is the same). It can be concluded that when methylene blue is adsorbed in porous solids, which are characterized by different mesopore sizes, part of the pore space remains unfilled with the adsorbate. This is well reflected in the isotherms course when plotted in reduced form _a/S\({}_{BET}\)_ vs. _c\({}_{eq}\)_ (inset figures in Figure 14). Figure 14C presents the adsorption isotherms of malachite green on carbon materials. Malachite green molecules are larger and have a more developed spatial orientation than methylene blue ones (Figure S1 in Supplementary Materials), so a sieving effect in the system with carbon C3 can be assumed. The sieving effect enables the diffusion of the dye into the pore space of the adsorbent with sizes smaller than the adsorbate or with narrow entrances. The adsorption capacity values of the carbons C3 and C4 towards malachite green are 0.60 and 0.65 mmol/g, respectively, indicating a reverse trend in the efficiency of the adsorbents compared to their behaviour for methylene blue. Lower log K values (0.96 and 1.19) indicate again a decrease in the affinity of the activated carbons when the adsorbate changes from a thiazine derivative to a triarylmethane derivative. The changes in affinity between adsorbent and adsorbate may be related to the difference in the chemical structure of two dyes, i.e., the presence of a triphenylmethyl group, which is a major steric hindrance in the malachite green molecule, and a phenothiazazine scaffold with a sulphur and nitrogen atom in the methylene blue molecule. The difference also concerns the number of double bonds and the distribution of the positive charge in the molecule, which originates from the secondary amino group.