/* Critical navbar styles – loaded first on every page to prevent FOUC */
:root {
  --text-light: #f7fafc;
}

html {
  background-color: #181818;
}

#site-header,
.site-header {
  position: relative;
  z-index: 10001;
  min-height: 60px;
  pointer-events: none;
}

#site-header > *,
.site-header > * {
  pointer-events: auto;
}

.logo1 {
  height: 32px;
  position: fixed;
  top: 14px;
  left: 24px;
  display: none;
  z-index: 102;
  transition: transform 0.3s ease;
}

.logo1:hover {
  transform: scale(1.05);
}

.navbar-logo {
  position: relative;
  top: 50%;
  left: 0;
  height: 32px;
  display: flex;
  align-items: center;
}

.navbar-logo img {
  height: 100%;
  width: auto;
  transition: transform 0.3s ease;
}

.navbar-logo img:hover {
  transform: scale(1.05);
}

#navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background-color: rgb(24 24 24 / 96%);
  height: 60px;
  z-index: 100;
  box-shadow: none;
  width: 100%;
  display: flex;
  align-items: center;
  backdrop-filter: blur(5px);
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  visibility: visible;
  opacity: 1;
}

#navbar:hover {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

#navbar ul {
  list-style: none;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  max-width: 1280px;
  gap: 16px;
  visibility: visible;
  opacity: 1;
}

#navbar li {
  flex: none;
  visibility: visible;
  opacity: 1;
}

#navbar a {
  text-decoration: none;
  color: var(--text-light);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 12px 16px;
  line-height: 64px;
  transition: color 0.3s ease, background-color 0.3s ease;
  border-radius: 6px;
  position: relative;
  visibility: visible;
  opacity: 1;
}

#navbar a:hover {
  color: #47a0e9;
  background-color: rgba(190, 170, 170, 0.05);
}

#navbar a::after {
  content: "";
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 12px;
  left: 50%;
}

#navbar a:hover::after {
  width: 50%;
  left: 25%;
}

#hamburger {
  display: none;
  position: fixed;
  top: 20px;
  right: 24px;
  width: 28px;
  height: 20px;
  z-index: 1000;
  cursor: pointer;
  visibility: visible;
  opacity: 1;
}

#hamburger span {
  display: block;
  width: 100%;
  height: 3px;
  background-color: #aaa;
  margin: 4px 0;
  transition: all 0.3s ease;
  transform-origin: center;
}

#hamburger:hover span {
  background-color: #085fd7;
}

#hamburger.open span:first-child {
  transform: rotate(45deg) translate(5px, 5px);
  background-color: #085fd7;
}

#hamburger.open span:nth-child(2) {
  opacity: 0;
}

#hamburger.open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
  background-color: #085fd7;
}

@media (max-width: 480px) {
  #hamburger {
    right: 15px;
  }

  .logo1 {
    left: 15px;
  }
}

@media (max-width: 768px) {
  #navbar {
    border-bottom: none;
    box-shadow: none;
  }

  .navbar-logo {
    display: none;
  }

  .logo1 {
    display: block;
  }

  #hamburger {
    display: block;
  }

  #navbar ul {
    position: fixed;
    top: -6px;
    left: 0;
    width: 100%;
    flex-direction: column;
    background-color: #181818;
    padding: 0;
    margin: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    border: none;
  }

  #navbar ul.active {
    max-height: 369px;
    padding: 92px 0;
  }

  #navbar li {
    width: 100%;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.3s ease 0.2s, transform 0.3s ease 0.2s;
  }

  #navbar ul.active li {
    opacity: 1;
    transform: translateY(0);
  }

  #navbar a {
    font-size: 1rem;
    padding: 12px 1px;
    line-height: normal;
    border-bottom: none;
    margin: 0;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
  }
}

@media (min-width: 769px) {
  #navbar ul,
  #navbar li,
  #navbar a {
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
  }
}
