/* ====================== GOOGLE FONTS ====================== */
@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;600&display=swap");

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

  --header-offset-mobile: var(--header-height);
  --header-offset-desktop: calc(var(--header-height) + 2rem);
  
  /* ====================== COLORS ====================== */
  /* Color mode HSL(hue, saturation, lihtness) */
  --black-color:         hsl(220, 24%, 12%);
  --black-color-light:   hsl(220, 24%, 15%);
  --black-color-lighten: hsl(220, 20%, 18%);
  --white-color:         #fff;
  --body-color:          hsl(220, 100%, 97%);
  --red-color:           #e71d36;

  --sh-bg:               #ffffff;
  --sh-text:             #111418;
  --sh-muted:            #4b5563;
  --sh-border:           #e5e7eb;
  --sh-surface:          #f6f7f9;
  --sh-surface-hover:    #eef1f5;
  --sh-hover:            #f9fafb;
  --sh-accent:           #0f62fe;

  /* ====================== 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;
}

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

/* ====================== BASE ====================== 4:85 */
* {
  box-sizing: border-box;
  padding: 0;
  margin: 0;
}

body {
  padding-top: 56px;
  padding-top: var(--header-offset-mobile);
}

.header-body {
  font-family: var(--body-font);
  font-size: var(--normal-font-size);
  background-color: var(--body-color);
}

.header-body ul {
  list-style: none;
}

.header-body a {
  text-decoration: none;
}


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

/* ====================== HEADER ====================== */

.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: var(--sh-bg);
  box-shadow: 0 2px 16px hsla(220, 32%, 8%, .3);
  z-index: var(--z-fixed);

  border-bottom: 1px solid var(--sh-border);
}

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

/* .nav__logo, .nav__burger, .nav__close {
  color: white;
} */

.nav__burger, .nav__close {
  color: var(--sh-text) !important;
}

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

.header .sh-branding-top {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.header .sh-logo img {
  display: block;
  width: 50px;
  height: 50px;
  object-fit: contain;
  border-radius: 8px;
  background: var(--black-color-light);
  padding: 5px;
  border: 1px solid var(--black-color-lighten);
}

.header .sh-title-wrap {
  min-width: 0;
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.header .sh-title {
  color: var(--sh-text);
  font-size: 1.05rem;
  font-weight: var(--font-semi-bold);
  white-space: nowrap;
}

.header .sh-subtitle {
  color: var(--red-color);
  font-style: italic;
  font-size: 0.9rem;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* .nav__logo {
  display: inline-flex;
  align-items: center;
  column-gap: .25rem;
  font-weight: var(--font-semi-bold);
}

.nav__logo i {
  font-weight: initial;
  font-size: 1.25rem;
} */

.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) {
  .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;

    background: var(--sh-surface);
    border-top: 1px solid var(--sh-border);
  }

  .nav__menu::-webkit-scrollbar {
    width: 0;
  }

  .nav__list {
    /* background-color: var(--black-color); */
    background-color: var(--sh-surface);
    padding-top: 1rem;
  }
}

.nav__link {
  /* color: var(--white-color); */
  color: var(--sh-text);
  /* background-color: var(--black-color); */
  background-color: var(--sh-bg);
  font-weight: var(--font-semi-bold);
  padding: 1.25rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background-color .3s;
}

.nav__link:hover {
  /* background-color: var(--black-color-light); */
  background-color: var(--sh-hover);
}


/* Show Menu */
.expand-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);
}

/* ====================== 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); */
  color: var(--sh-text);
  /* background-color: var(--black-color-light); */
  background-color: var(--sh-surface);
  display: flex;
  align-items: center;
  column-gap: .5rem;
  font-weight: var(--font-semi-bold);
  transition: background-color .2s ease, color .2s ease;

  box-shadow: 1px solid var(--sh-border);
}

.dropdown__link:last-child, .dropdown__sublink:last-child {
  border-bottom: 0;
}

.dropdown__link i, .dropdown__sublink i {
  font-size: 1.25rem;
  /* font-weight: initial; */
  color: var(--sh-muted);
}

.dropdown__link:hover, .dropdown__sublink:hover {
  /* background-color: var(--black-color); */
  background-color: var(--sh-surface-hover);
}

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

  background: var(--sh-surface);
  border: 1px solid var(--sh-border);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(17,20,24,0.08);
}

/* 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);
}

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

.dropdown__sublink {
  background-color: var(--sg-bg);
}

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

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

/* For large devices */
@media screen and (min-width: 1118px) {
  .container {
    margin-inline: auto;
  }

  .nav {
    height: calc(var(--header-height) + 2rem);
    display: flex;
    justify-content: space-between;
  }


  body {
    padding-top: 88px;
    padding-top: var(--header-offset-desktop);
  }

  .nav__toggle {
    display: none;
  }

  .nav__list {
    height: 100%;
    display: flex;
    column-gap: 3rem;
  }

  .nav__link {
    height: 100%;
    padding: 0;
    justify-content: initial;
    column-gap: .25rem;

    background-color: transparent;
  }

  .nav__link:hover {
    background-color: transparent;

    color: var(--sh-text);
  }

  .dropdown__item, .dropdown__subitem {
    position: relative;
  }

  .dropdown__menu, .dropdown__submenu {
    max-height: initial;
    overflow: initial;
    position: absolute;
    left: 0;
    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; */
  }
  
}
