Wireless sensor networks (WSN) find applications in diverse fields such as environmental monitoring, healthcare, and industrial control systems. The pivotal components of these networks are the sensor nodes, which, unfortunately, consume a substantial amount of energy when transmitting information directly to the base station (BS). To mitigate energy consumption associated with direct transmission, this paper proposes a two-phase approach utilizing hybrid clustering and routing algorithms. The proposed approach incorporates fuzzy and seagull techniques for clustering and adopts optimal CH (cluster head) selection, CBRP (Cluster-Based Routing Protocol), and AES (Advanced Encryption Standard) for secure routing. The system employs rule-based fuzzy logic to correlate input values in both clustering and routing algorithms. Decision-making is based on factors such as the residual energy of sensor nodes, distance from the BS, and the number of nodes within the communication range. Input variables' crisp values are transformed into diverse fuzzy values, and the fuzzy output values are converted back to crisp values using the centroid defuzzification method. Selection of cluster heads and routers is determined by the output values, with sensor nodes being allocated to respective cluster heads based on their load-handling capacity. The routing path is then generated considering the capacity of routers. Simulations are conducted to evaluate energy consumption, active sensor nodes per round, and the sustainability period of the network. This proposed hybrid clustering and routing system aim to enhance the overall efficiency of wireless sensor networks by optimizing energy consumption and ensuring secure data transmission. The optimization model identifies the most suitable nodes in the routing cycle, starting with chosen cluster heads. The overarching goal is to enhance network indicators, including network lifespan, power consumption per node, and packet delivery percentage. The proposed solution achieved a network lifetime of 100 hours and a data delivery rate of 98%. additionally, it consumed the least amount of energy, measuring at 95,000 joules.