/*=============== VARIABLES CSS ===============*/
:root {
  --header-height: 3.5rem;

  /*========== Colors ==========*/
  /*Color mode HSL(hue, saturation, lightness)*/
  --c-primary-1: #081C15;
  --c-primary-2: #1B4332;
  --c-primary-3: #2D6A4F;
  --c-primary-4: #40916C;
  --c-primary-5: #52B788;
  --c-primary-6: #74C69D;
  --c-primary-7: #95D5B2;
  --c-primary-8: #B7E4C7;
  --c-primary-9: #D8F3DC;
  --c-grey-1: #102a42;
  --c-grey-2: #06080a;
  --c-grey-3: #9eb2c7;
  --c-grey-4: #f1f5f8;
  --c-white: rgb(255, 255, 255);
  --c-footer: #10002b;
  --ff-primary: "Yekan", sans-serif;
  --transition: all 0.3s linear;
  --light-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  --dark-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);

  --first-color: #2D6A4F;
  --title-color: hsl(230, 75%, 15%);
  --text-color: hsl(230, 12%, 40%);
  --body-color: hsl(230, 100%, 98%);
  --container-color: hsl(230, 100%, 97%);
  --border-color: hsl(230, 25%, 80%);

  /*========== Font and typography ==========*/
  /*.5rem = 8px | 1rem = 16px ...*/
  --body-font: "Montserrat", sans-serif;
  --normal-font-size: .938rem;

  /*========== Font weight ==========*/
  --font-regular: 400;
  --font-semi-bold: 600;

  /*========== z index ==========*/
  --z-tooltip: 10;
  --z-fixed: 100;
}

/*========== Responsive typography ==========*/
@media screen and (min-width: 1024px) {
  :root {
    --normal-font-size: 1rem;
  }
}

/*=============== BASE ===============*/

ul {
  list-style: none;
  /* Color highlighting when pressed on mobile devices */
  /*-webkit-tap-highlight-color: transparent;*/
}

li {
  list-style: none;
  /* Color highlighting when pressed on mobile devices */
  /*-webkit-tap-highlight-color: transparent;*/
}


@keyframes bounce2 {
  0% {transform: translateX(1200px);}
  10% {transform: translateY(1000px);}
  20% {transform: translate(0px);}
  50% {transform: scale(1.2);}
  55% {transform: scale(1);}
}

/*=============== REUSABLE CSS CLASSES ===============*/
.topnav-container {
  max-width: 1120px;
  margin-inline: 1.5rem;
}

/*=============== HEADER ===============*/
.topnav-header {
  position: relative;
  top: 0;
  left: 0;
  width: 100%;
  background-color: var(--c-white);
  box-shadow: 0 2px 16px hsla(220, 32%, 8%, .3);
  z-index: var(--z-fixed);
}

/*=============== NAV ===============*/
.topnav {
  height: var(--header-height);
}

.nav__logo, 
.nav__burger, 
.nav__close {
  color: var(--c-grey-2);
}

.nav__data {
  height: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav__logo {
  display: inline-flex;
  align-items: center;
  column-gap: .25rem;
  font-weight: var(--font-semi-bold);
  /* Color highlighting when pressed on mobile devices */
  /*-webkit-tap-highlight-color: transparent;*/
}

.nav__logo img {
  font-weight: initial;
  width: 5.5rem;
  animation: bounce2 2s ease;
}

.nav__toggle {
  position: relative;
  width: 32px;
  height: 32px;
}

.nav__burger, 
.nav__close {
  position: absolute;
  width: max-content;
  height: max-content;
  inset: 0;
  margin: auto;
  font-size: 1.25rem;
  cursor: pointer;
  transition: opacity .1s, transform .4s;
}

.nav__close {
  opacity: 0;
}

/* Navigation for mobile devices */
@media screen and (max-width: 1118px) {

  .topnav {
    height: 5rem;
  }
  .nav__logo img {
    width: 4.5rem;
  }
  
  .nav__menu {
    position: absolute;
    left: 0;
    top: 2.5rem;
    width: 100%;
    height: calc(100vh - 3.5rem);
    overflow: auto;
    pointer-events: none;
    opacity: 0;
    transition: top .4s, opacity .3s;
  }
  .nav__menu::-webkit-scrollbar {
    width: 0;
  }
  .nav__list {
    padding-top: 1rem;
  }
}

.nav__link {
  color: var(--clr-grey-1);
  background-color: var(--c-white);
  padding: 1.25rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background-color .3s;
  font-size: 19px;
}

.nav__link:hover {
  background-color: var(--c-primary-5);
}


.i_nav__link {
  color: var(--c-primary-2);
  font-weight: bold;
}

/* Show menu */
.show-menu {
  opacity: 1;
  top: 3.5rem;
  pointer-events: initial;
}

/* Show icon */
.show-icon .nav__burger {
  opacity: 0;
  transform: rotate(90deg);
}
.show-icon .nav__close {
  opacity: 1;
  transform: rotate(90deg);
}

/* nav user */

.nav-data-left {
  display: flex;
  flex-direction: row;
  gap: 20px;
}

.nav__user {
  position: relative;
  font-size: 22px;
  padding-top: 2px;
  cursor: pointer;
  transition: all ease 0.6s;
}

.nav__user p{
  font-size: 14px;  
  position: absolute;
  top: 30px;
  bottom: 5px;
  background-color:rgba(53, 53, 53, 0.212);
  transition: all ease 1s;
  display: none;
  width: max-content;
  right: -27px;
}

.nav__user:hover {
  color: var(--c-primary-3);
}

.nav__user:hover .nav__user__p {
  display: block;
}

.nav__guest {
  position: relative;
  font-size: 16px;
  padding-top: 2px;
  cursor: pointer;
  transition: all ease 0.6s;
}

.nav__guest:hover {
  color: var(--c-primary-3);
}

.loginedbtn {
  color: var(--c-primary-3);
}

/*=============== DROPDOWN ===============*/
.dropdown__item {
  cursor: pointer;
}

.dropdown__arrow {
  font-size: 1.25rem;
  font-weight: initial;
  transition: transform .4s;
}

.dropdown__link, 
.dropdown__sublink {
  padding: 1.25rem 1.25rem 1.25rem 2.5rem;
  color: var(--white-color);
  background-color: var(--c-white);
  display: flex;
  align-items: center;
  column-gap: .5rem;
  font-size: 17px;
  transition: background-color .3s;
}

.dropdown__link i, 
.dropdown__sublink i {
  font-size: 1rem;
}

.dropdown__link:hover, 
.dropdown__sublink:hover {
  background-color: var(--c-primary-5);
}

.dropdown__menu, 
.dropdown__submenu {
  max-height: 0;
  overflow: hidden;
  transition: max-height .4s ease-out;
}

/* Show dropdown menu & submenu */
.dropdown__item:hover .dropdown__menu, 
.dropdown__subitem:hover > .dropdown__submenu {
  max-height: 1000px;
  transition: max-height .4s ease-in;
}

/* Rotate dropdown icon */
.dropdown__item:hover .dropdown__arrow {
  transform: rotate(180deg);
}

/*=============== DROPDOWN SUBMENU ===============*/
.dropdown__add {
  margin-left: auto;
}

.dropdown__sublink {
  background-color: var(--c-primary-4);
}

/*=============== BREAKPOINTS ===============*/
/* For small devices */
@media screen and (max-width: 340px) {
  .container {
    margin-inline: 0;
  }

  .nav__link {
    padding-inline: 1rem;
  }
}

/* For large devices */
@media screen and (min-width: 1118px) {

  .nav__user {
    position: absolute;
    left: 200px;
    top: 24px;
    font-size: 30px;
  }

  .nav__user p{
    top: 40px;
  }
  .nav__guest {
    position: absolute;
    left: 250px;
    top: 32px;
  }

  .topnav-container {
    margin-inline: auto;
  }

  .topnav {
    height: calc(var(--header-height) + 2rem);
    display: flex;
    gap: 20px;
  }
  .nav__toggle {
    display: none;
  }
  .nav__list {
    height: 100%;
    display: flex;
    column-gap: 2rem;
  }
  .nav__link {
    height: 100%;
    padding: 0;
    justify-content: initial;
    column-gap: .25rem;
    transition: var(--transition);
  }
  .nav__link:hover {
    background-color: transparent;
    color: var(--c-primary-4);
  }

  .dropdown__item, 
  .dropdown__subitem {
    position: relative;
  }

  .dropdown__menu, 
  .dropdown__submenu {
    max-height: initial;
    overflow: initial;
    position: absolute;
    top: 6rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s, top .3s;
  }

  .dropdown__link, 
  .dropdown__sublink {
    padding-inline: 1rem 3.5rem;
  }

  .dropdown__subitem .dropdown__link {
    padding-inline: 1rem;
  }

  .dropdown__submenu {
    position: absolute;
    left: 100%;
    top: .5rem;
  }

  /* Show dropdown menu */
  .dropdown__item:hover .dropdown__menu {
    opacity: 1;
    top: 5.5rem;
    pointer-events: initial;
    transition: top .3s;
  }

  /* Show dropdown submenu */
  .dropdown__subitem:hover > .dropdown__submenu {
    opacity: 1;
    top: 0;
    pointer-events: initial;
    transition: top .3s;
  }


}


/* Login */

.loginpannel {
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  background-color: hsla(230, 75%, 15%, .1);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px); /* For safari */
  padding: 8rem 1.5rem 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity .4s;
}

.login__close {
  position: absolute;
  top: 2rem;
  right: 2rem;
  font-size: 1.5rem;
  color: var(--title-color);
  cursor: pointer;
}


.login__form, 
.login__group {
  display: grid;
}

.login__form {
  background-color: var(--container-color);
  padding: 2rem 1.5rem 2.5rem;
  box-shadow: 0 8px 32px hsla(230, 75%, 15%, .2);
  border-radius: 1rem;
  row-gap: 1.25rem;
  text-align: center;
  transform: translateY(-1rem);
  transition: transform .4s;
}

.login__title {
  font-size: var(--h2-font-size);
  color: var(--title-color);
}

.login__group {
  row-gap: 1rem;
}

.login__label {
  display: block;
  text-align: initial;
  color: var(--title-color);
  font-weight: var(--font-medium);
  margin-bottom: .25rem;
}

.login__input {
  width: 100%;
  background-color: var(--container-color);
  border: 2px solid var(--border-color);
  padding: 1rem;
  border-radius: .5rem;
  color: var(--text-color);
}

.login__input::placeholder {
  color: var(--text-color);
}

.login__signup {
  margin-bottom: .5rem;
}

.login__signup a {
  color: var(--first-color);
}

.login__forgot {
  display: inline-block;
  color: var(--first-color);
  margin-bottom: 1.25rem;
}

.login__button {
  display: inline-block;
  background-color: var(--first-color);
  width: 100%;
  color: #fff;
  font-weight: var(--font-semi-bold);
  padding: 1rem;
  border-radius: .5rem;
  cursor: pointer;
  transition: box-shadow .4s;
  
}

.login__button:hover {
  box-shadow: 0 4px 24px hsla(230, 75%, 40%, .4);
}

/* Show login */
.show-login {
  opacity: 1;
  pointer-events: initial;
}

.show-login .login__form {
  transform: translateY(0);
}

@media screen and (min-width: 576px) {
  .loginpannel {
    padding-top: 10rem;
  }
  .login__close {
    width: max-content;
    top: 5rem;
    left: 0;
    right: 0;
    margin-inline: auto;
    font-size: 2rem;
  }

  .login__form {
    max-width: 400px;
    margin-inline: auto;
  }
}

@media screen and (min-width: 1023px) {
  .login__form {
    padding: 3rem 2rem 3.5rem;
  }
}

.login__signup {
  cursor: pointer;
}

/* side bar */

.sidenav {
  height: 100%;
  width: 0;
  position: fixed;
  z-index: 10000;
  top: 0;
  left: 0;
  background-color: #111;
  overflow-x: hidden;
  transition: 0.5s;
  padding-top: 60px;
  
}

.sidenav a {
  padding: 8px 8px 8px 32px;
  text-decoration: none;
  font-size: 20px;
  color: #818181;
  display: block;
  transition: 0.3s;
  text-align: center;
}
.sidenav p {
  padding: 8px 8px 8px 32px;
  text-decoration: none;
  font-size: 20px;
  color: #818181;
  display: block;
  transition: 0.3s;
  text-align: center;
}
.sidenav hr {
  margin-top: 20px;
  margin-bottom: 20px;
}

.sidenavlink {
  border: 1px solid var(--c-grey-3);
  margin: 2px;
}

.sidenav a:hover {
  color: #f1f1f1;
}

.sidenav .closebtn {
  position: absolute;
  top: 0;
  right: 25px;
  font-size: 36px;
  margin-left: 50px;
}

@media screen and (max-height: 450px) {
  .sidenav {padding-top: 15px;}
  .sidenav a {font-size: 18px;}
}