@charset "UTF-8";
/* CSS Document */

@import url("variables.css");


#navbar {
  height: var(--navbar-height);
  background: var(--navbar-bg-gradient);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
  padding: 0 2%;
  border-radius: 10px;
}

.navbar-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--navbar-height);
}

.navbar-logo img {
	padding-top: 4px;
  width: 60px;
  height: auto;
}

.ece_labs_title {
  display: flex;
  align-items: center;
  font-weight: bold;
  color: var(--navbar-text-color);
  margin-left: 1em;
}

.navbar-toggle {
  cursor: pointer;
  border: none;
  background: transparent;
  width: 40px;
  height: 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.icon-bar {
  width: 25px;
  height: 4px;
  margin: 2px;
  background-color: var(--navbar-text-color);
  transition: all 0.3s ease-in-out;
}

.navbar-toggle:hover .icon-bar {
  background-color: var(--navbar-text-color-focus);
}

#navbar.opened .icon-bar:first-child {
  transform: rotate(45deg);
  position: absolute;
  width: 30px;
}

#navbar.opened .icon-bar:nth-child(2) {
  opacity: 0;
}

#navbar.opened .icon-bar:last-child {
  transform: rotate(-45deg);
  position: absolute;
  width: 30px;
}

#navbar-menu {
  position: fixed;
  top: var(--navbar-height);
  left: -1000px;
  right: 0;
  bottom: 0;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease-in-out;
}

#navbar.opened #navbar-menu {
  background-color: rgba(0, 0, 0, 0.4);
  opacity: 1;
  visibility: visible;
  left: 0;
}

.navbar-links {
  list-style: none;
  position: absolute;
  left: 0;
  background: var(--navbar-bg-gradient);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0;
  max-height: 0;
  overflow: hidden;
  box-shadow: 5px 20px 20px rgba(0, 0, 0, 0.3);
}

#navbar.opened .navbar-links {
  padding: 1em;
  max-height: 100vh;
  overflow-y: auto;
}

.navbar-item {
  width: 100%;
  margin: 0.4em 0;
}

.navbar-link {
  display: flex;
  align-items: center;
  justify-content: left;
  width: 100%;
  color: var(--navbar-text-color);
  text-decoration: none;
  border-radius: 5px;
  transition: background-color 0.2s ease-in-out;
}

.navbar-link {
  display: flex;
  align-items: center;
  height: var(--navbar-height); /* Match navbar height */
  padding: 0 1em; /* Horizontal only */
}

.navbar-link {
  white-space: nowrap; /* Prevent wrapping */
  overflow: hidden;     /* Optional: hide overflow if needed */
  text-overflow: ellipsis; /* Optional: add "..." if it overflows */
}

.navbar-link,
.home-link,
.dropbtn {
  color: var(--navbar-text-color);
}

.navbar-link:hover,
.navbar-link:focus,
.home-link:hover,
.home-link:focus,
.dropbtn:hover {
  color: var(--navbar-text-color-focus);
}


.navbar-link:hover,
.navbar-link:focus {
  background-color: var(--navbar-bg-contrast);
  color: var(--navbar-text-color-focus);
}

/* Dropdown */
.dropdown {
  position: relative;
}

.dropbtn {
  cursor: pointer;
}

.dropdown-content {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--navbar-bg-gradient);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
  min-width: 180px;
  border-radius: 0 0 9px 9px;
  z-index: 1000;
  flex-direction: column;
}

.dropdown-content a {
  padding: 3px 5px;       /* Reduced from 12px 16px */
  font-size: 0.85em;         /* Optional: slightly smaller text */
  line-height: 1.2;         /* Optional: tighter vertical spacing */
}
.dropdown:hover .dropdown-content {
  display: flex;
}

.dropdown-content {
  min-width: 160px;
  padding: 4px 0;           /* Optional: reduce top/bottom spacing */
}


/* Desktop layout */
@media screen and (min-width: 768px) {
  .navbar-toggle {
    display: none;
  }

  #navbar-menu {
    position: static;
    visibility: visible;
    opacity: 1;
    left: 0;
    height: auto;
  }

  .navbar-links {
    position: static;
    flex-direction: row;
    max-height: none;
    overflow: visible;
    box-shadow: none;
    width: 100%;
    height: 100%;
  }

  .navbar-item {
    margin: 0 0.5em;
  }

  .dropdown-content {
    position: absolute;
  }
}
.ece_labs_title {
  display: none;
  visibility: hidden;
}
@media screen and (max-width: 768px) {
  .ece_labs_title {
    display: flex;
    visibility: visible;
    color: var(--navbar-text-color-focus);
    font-weight: bold;
    margin-left: 1em;
  }
	.home-link a{
		text-decoration: none;
	}
}

@keyframes dropdownFade {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.dropdown-content {
  animation: dropdownFade 0.2s ease-out;
}

