@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&family=Lato&display=swap');
/* navbar.css */
/* Base styles & Custom properties */
:root {
  --navbar-height: 60px;
  --navbar-height-inner: 50px; 
}

/* === Navbar === */
.navbar-container {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--navbar-height);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  
  display: flex;
  align-items: flex-start;

  background-color: var(--background);

  transition: background-color var(--transition-normal), box-shadow var(--transition-normal);
}
.navbar-container.scrolled {
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.container-boxed.navbar-boxed {
  width: 100%;
  height: var(--navbar-height-inner);
  padding-inline: 0.5rem;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  transform: translateY(calc(0.5 * (var(--navbar-height) - var(--navbar-height-inner))));
  transition: transform 0.3s ease;
}
.navbar-container.scrolled .container-boxed.navbar-boxed {
  transform: translateY(calc(var(--navbar-height) - var(--navbar-height-inner)));
}

.nav-mobile-top {
  height: var(--navbar-height-inner);
  display: flex;
  align-items: center;
}

/* === Navbar Brand === */
.nav-logo {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden; /* prevents overflow if image gets too big */
}
.nav-logo-small {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.nav-logo-small img {
  height: 90%;
  width: auto;
  display: block;
}

.nav-logo-text {
  margin-left: 10px;
  font-family: 'Montserrat', sans-serif;
  font-optical-sizing: auto;
  font-weight: 800;
  font-style: normal;
  font-size: 30px;
}

/* === Navbar links (items) === */
.nav-links{
  display: flex;
  flex-wrap: wrap;
  flex-grow: 1;
  align-items: center;
  justify-content: center;
  margin: 0;

  gap: 2rem;

  list-style: none;
}
.nav-links li a {
  color: var(--text);
  text-decoration: none;
  font-size: 1.4rem;
  font-weight: 500;
  position: relative;
  display: inline-block;
  transition: color 0.3s ease;
}

.nav-links li a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.3s ease;
  transform: translateX(-50%);
}

.nav-links li a:hover::after,
.nav-links li a.active::after {
  width: 100%;
}

.nav-links li a:hover {
  /* color: var(--accent); */
  text-shadow: 0px 0px 6px var(--accent);
}

.nav-links li a.disabled {
  color: var(--text-muted);
  cursor: not-allowed;
}
.nav-links li a.disabled:hover {
  text-shadow: none;
}
.nav-links li a.disabled::after {
  display: none;
}

.tooltip.navbar-tooltip {
  z-index: 1050;
}
.tooltip.navbar-tooltip .tooltip-inner {
  background-color: var(--accent);
  color: white;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 8px;

  z-index: 1050;
}

.tooltip.navbar-tooltip .tooltip-arrow::before {
  border-bottom-color: var(--accent); /* match tooltip background */
  z-index: 1050;
}

/* === Dark mode toggle === */
.darkmode-toggle {
  display: flex;
  align-items: center;
  margin-inline-start: auto;
}
.checkbox {
  opacity: 0;
  position: absolute;
}

.checkbox-label {
  background-color: #111;
  width: 50px;
  height: 26px;
  border-radius: 50px;
  position: relative;
  padding: 5px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.fa-moon {color: #f1c40f;}

.fa-sun {color: #f39c12;}

.checkbox-label .ball {
  background-color: #fff;
  width: 22px;
  height: 22px;
  position: absolute;
  left: 2px;
  top: 2px;
  border-radius: 50%;
  transition: transform 0.2s linear;
}

.checkbox:checked + .checkbox-label .ball {
  transform: translateX(24px);
}

/* === Styling Hamburger icon === */
.hamburger div {
  width: 30px;
  height: 3px;
  background: #f2f5f7;
  margin: 5px;
  transition: transform 0.3s ease, width 0.3s ease;
}
.hamburger{
  display: none;
}

/* Styling for small screens */
@media screen and (max-width: 768px) {
  .navbar-container {
    max-height: var(--navbar-height);
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    height: auto;
    overflow: hidden;
    transition: max-height 0.5s ease;
  }
  .navbar-container.open {
    max-height: 1000px;
  }

  .container-boxed.navbar-boxed {
    display: flex;
    flex-direction: column;
    align-items: flex-start !important;
    width: 100% !important;
    height: 100% !important;
    transform: none !important;
    align-items: center;
    justify-content: center;
  }
  .navbar-container.scrolled .container-boxed.navbar-boxed {
    transform: none !important;
  }

  .nav-mobile-top {
    width: 100%;
    height: var(--navbar-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  .nav-mobile-top .hamburger {
    display: block;
    position: relative;
    cursor: pointer !important; /* Force pointer */
    z-index: 3;
    transition: transform 0.3s ease; /* Specific property */
    margin-right: 5%;
  }
  /*Animating Hamburger Icon on Click*/
  .toggle .line1 {
    transform: rotate(-45deg) translate(-5px,6px);
  }
  .toggle .line2 {
    width: 0;
    transition: width 0.3s ease; /* Specific property */
  }
  .toggle .line3 {
    transform: rotate(45deg) translate(-5px,-6px);
  }

  .nav-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    gap: 1rem;

    list-style: none;
    margin: 0;
    padding: 0.5rem 1rem;

    position: relative;
    top: auto;
    left: auto;

    transform: scaleY(0);
    transform-origin: top;
    transition: transform 0.4s ease, opacity 0.4s ease;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    z-index: 2;

    will-change: opacity, max-height;
  }

  .navbar-container.open .nav-links {
    transform: scaleY(1);
    pointer-events: all;
    opacity: 1;
    visibility: visible;
  }

  .nav-links li {
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    width: 100%;
  }

  .nav-links li a {
    width: 100%;
    color: var(--text-primary);
    text-align: center;
    display: block;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
  }

  .navbar-container.open .nav-links li {
    opacity: 1;
    transform: translateY(0);
  }

  .nav-links li:nth-child(1) {
    transition-delay: 0.1s;
  }

  .nav-links li:nth-child(2) {
    transition-delay: 0.2s;
  }

  .nav-links li:nth-child(3) {
    transition-delay: 0.3s;
  }

  .nav-links li:nth-child(4) {
    transition-delay: 0.4s;
  }

  .nav-links li:nth-child(5) {
    transition-delay: 0.5s;
  }

  .nav-links li:nth-child(6) {
    transition-delay: 0.6s;
  }

  li.fade {
    opacity: 1;
    transform: translateY(0);
  }

  .darkmode-toggle {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: auto;
    margin: 1rem 0 1rem 0;
  }
  
  .checkbox-label {
    transform: scale(1.5);
  }
}