/* Theme Name: Slowtwitch Wp Text Domain: Slowtwitch Version: 1.0.0 */ @import url('https://fonts.googleapis.com/css2?family=Oswald:wght@200..700&display=swap'); * { font-family: Oswald; } nav { position: fixed; background-color: #0b4fa0; width: 100%; z-index: 999; height: 32px; line-height: 32px; } .main-menu-wrapper { font-size: 15px; text-transform: uppercase; letter-spacing: 1.20px; max-width: 1250px; padding: 0 30px; margin: auto; display: flex; align-items: center; justify-content: center; } .main-menu-wrapper ul { list-style: none; } .main-menu-wrapper .nav-links { display: inline-flex; } .nav-links li a { color: #fff; text-decoration: none; padding: 4px 10px; transition: all 0.3s ease; } .nav-links li a:hover { background-color: #272727; } .nav-links .sub-menu { background-color: #0b4fa0; width: 180px; position: absolute; } .sub-menu li { margin-bottom: 0; } .sub-menu li a { width: 100%; display: block; padding: 7px 0 7px 0; text-align: center; line-height: 32px; } .sub-menu { margin: auto; opacity: 0; visibility: hidden; width: 0; background-color: #272727; } .nav-links li:hover .sub-menu { opacity: 1; visibility: visible; } .menu-cancel-btn { font-size: 20px; cursor: pointer; position: absolute; right: 30px; top: 10px; display: none; color: #fff; } .menu-open-btn { font-size: 20px; cursor: pointer; position: absolute; right: 30px; top: 10px; display: none; } #open-btn { display: none; } #cancel-btn { display: none; } @media screen and (max-width: 940px) { .menu-cancel-btn { display: block; } .menu-open-btn { display: block; } #open-btn:checked ~ .nav-links{ left: 0px; } nav { background-color: #fff; } .main-menu-wrapper .nav-links { position: fixed; height: 100vh; width: 100%; max-width: 350px; background-color: #0b4fa0; display: block; top: 0; left: 0; overflow-y: auto; line-height: 50px; padding: 50px 10px; box-shadow: 0 15px 15px rgba(0,0,0,0.15); transition: all 0.3s ease; left: -500px; } .nav-links li { margin: 15px 10px; } .nav-links li { padding: 0 20px; display: block; font-size: 20px; } .nav-links .sub-menu { position: static; opacity: 1; visibility: visible; margin-left: 0; top: 65px; width: 100%; } .sub-menu li a { text-align: start; } .nav-links .sub-menu li { margin: 0; } .nav-links .sub-menu li a { font-size: 18px; } .nav-links li a:hover { background-color: #0b4fa0; } }