In the UK it's not unusual to come across a country house that is based on a former castle. After explosives and cannons became widely used in warfare castles were no longer the safe haven they were formerly. The English Civil War of the C17 was the last time armies grappled for control in fighting on UK soil. When peace came many castles were "slighted" (i.e. blown apart) so they could not be used in any future warfare. Some country houses were made from these remains, others were made by building living accommodation and stately rooms in existing, undamaged castles so that they became homes rather than military architecture. Chirk Castle dates from 1295 and was designed to suppress part of the Marches, the border area between England and Wales. It was bought by Sir Thomas Myddleton in 1593 for £5000 and successive owners converted it to the grand house we see today. The photograph shows the main entrance of the original castle was adapted to be the main entrance of the house, and the adjoining walls were pierced by mullioned and transomed windows to let light into the new rooms.
photo © T. Boughen Camera: Nikon Z 5