/* Google Font */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600&display=swap');

/* Color Group */
:root {
  --body-color: #d8deee;
  --main-color: #b16015;
  --nav-color: #313131;
  --side-nav: #313131;
  --text-color: #fff;
  --search-bar: #f2f2f2;
  --search-text: #010718;
}

* {
  padding: 0;
  margin: 0;
  font-family: 'Poppins', sans-serif;
  text-decoration: none;
  box-sizing: border-box;
}

body {
  height: 100vh;
  background-color: var(--body-color);
}

body.dark {
  --body-color: #18191a;
  --nav-color: #242526;
  --side-nav: #242526;
  --text-color: #fff;
  --search-bar: #242526;
}

nav {
  position: fixed;
  top: 0;
  left: 0;
  height: 70px;
  width: 100%;
  background-color: var(--nav-color);
  z-index: 100;
}

nav .nav-bar {
  position: relative;
  height: 100%;
  max-width: 1000px;
  width: 100%;
  background-color: var(--nav-color);
  margin: 0 auto;
  padding: 0 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

nav .nav-bar .sidebarOpen {
  color: var(--text-color);
  font-size: 25px;
  padding: 5px;
  cursor: pointer;
  display: none;
}

nav .nav-bar .logo {
  width: 50px;
  height: 50px;
  justify-content: center;
  filter: drop-shadow(2px 2px 2px rgba(255, 255, 255, 0.317));
}

.menu .logo-toggle {
  display: none;
}

.nav-bar .nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-bar .nav-links li {
  margin: 0 5px;
  list-style: none;
}

.nav-links li a {
  position: relative;
  font-size: 1.1 rem;
  font-weight: 700;
  color: var(--text-color);
  padding: 10px;
  transition: all 0.5s ease;
}


.nav-links li a:hover {
  color: var(--main-color);
}

.nav-links .active {
  color: var(--main-color);
}

.nav-bar .darkLight-searchBox {
  display: flex;
  align-items: center;
}

.darkLight-searchBox .dark-light,
.darkLight-searchBox .search-toggle {
  height: 40px;
  width: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 5px;
}

.dark-light i,
.search-toggle i {
  position: absolute;
  color: var(--text-color);
  font-size: 22px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.dark-light i.sun {
  opacity: 0;
  pointer-events: none;
}

.dark-light.active i.sun {
  opacity: 1;
  pointer-events: auto;
}

.dark-light.active i.moon {
  opacity: 0;
  pointer-events: none;
}

.search-toggle i.cancel {
  opacity: 0;
  pointer-events: none;
}

.search-toggle.active i.cancel {
  opacity: 1;
  pointer-events: auto;
}

.search-toggle.active i.search {
  opacity: 0;
  pointer-events: none;
}

.search-box {
  position: relative;
}

.search-box .search-field {
  position: absolute;
  bottom: -85px;
  right: 5px;
  height: 50px;
  width: 300px;
  display: flex;
  align-items: center;
  background-color: rgb(129, 129, 129);
  padding: 3px;
  border-radius: 6px;
  box-shadow: 0 5px 5px rgba(0, 0, 0, 0.1);
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
}

.search-field input {
  width: 100%;
  height: 100%;
  padding: 0 45px 0 15px;
  font-size: 14px;
  font-weight: 400;
  outline: none;
  border: none;
  border-radius: 4px;
  color: rgb(129, 129, 129);
  background-color: rgb(49, 46, 46);
}

.search-toggle.active~.search-field {
  opacity: 1;
  bottom: -74px;
  pointer-events: auto;
}

.search-field::before {
  content: '';
  position: absolute;
  right: 14px;
  top: -4px;
  height: 12px;
  width: 12px;
  background-color: rgb(170, 170, 170);
  transform: rotate(-40deg);
  z-index: -1;
}

body.dark .search-field input {
  color: var(--nav-color);
  background-color: #d4d4d4;
}

.search-field i {
  position: absolute;
  color: var(--nav-color);
  right: 15px;
  font-size: 22px;
  cursor: pointer;
}

body.dark .search-field {
  color: var(--nav-color);
}

/* Resolition Media */

@media (max-width: 790px) {
  nav .nav-bar .sidebarOpen {
    display: block;
  }

  .menu {
    position: fixed;
    width: 320px;
    height: 100%;
    left: -100%;
    top: 0;
    padding: 20px;
    background-color: var(--side-nav);
    z-index: 100;
    transition: all 0.4s ease;
  }

  nav.active .menu {
    left: 0%;
  }

  nav.active .nav-bar .navLogo {
    opacity: 0;
    transition: all 0.3s ease;
  }

  .menu .logo-toggle {
    display: block;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .logo-toggle .sidebarClose {
    color: var(--text-color);
    font-size: 24px;
    cursor: pointer;
  }

  .nav-bar .nav-links {
    flex-direction: column;
    padding-top: 30px;
  }

  .nav-links li a {
    display: block;
    margin-top: 20px;
  }
}

@media (max-width: 465px) {
  .menu {
    position: fixed;
    width: 250px;
    height: 100%;
    left: -100%;
    top: 0;
    padding: 20px;
    background-color: var(--side-nav);
    z-index: 100;
    transition: all 0.4s ease;
  }

  nav .nav-bar .navLogo {
    opacity: 0;
    transition: all 0.3s ease;
  }
}