@import url('./theme.css');

/* --- HEADER --- */
header {
  background-color: var(--bg-color);
  padding: 1rem 0;
  border-bottom: 1px solid #eee;
  position: sticky;
  top: 0;
  z-index: 1000;
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo img {
  height: 60px !important;
}

.logo-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

/* --- HAMBURGER MENU --- */
.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0.5rem;
  color: var(--btn-bg);
}

.hamburger .fa-solid {
  font-size: 1.2rem;
}


/* --- DESKTOP MENU --- */
/* Desktop Navigation Menu */
.nav-menu {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-item {
  position: relative;
}

.nav-item>.dropdown-content {
  min-width: 260px !important;
}

.nav-item a,
.nav-item span {
  font-size: 0.9rem;
  font-weight: 600;
}

.nav-link {
  color: #ecf0f1;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.3s ease;
  padding: 0.5rem 0;
  border-bottom: 2px solid transparent;
  transition: border-color 0.3s ease, color 0.3s ease;
}

.nav-link:hover {
  color: #3498db;
  border-bottom-color: #3498db;
}

/* --- SIDEBAR --- */

.expanded .dropdown-content {
  display: block !important;
}

.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  height: 100vh;
  width: 280px;
  background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
  padding-top: 1rem;
  z-index: 2000;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  overflow-y: auto;
}

.sidebar.active {
  transform: translateX(0);
}

.sidebar-header {
  display: flex;
  justify-content: space-between;
  padding: 8px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);

}

button .fa-xmark {
  color: var(--btn-text);
}

.sidebar-close {
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  /* color: var(--btn-text) !important; */
  padding: 1rem;
  margin-left: auto;
  /* margin-right: 1rem; */
  transition: color 0.3s ease;
  right: 0px;
  position: absolute;
  top: 0;
}

.sidebar-close:hover {
  color: #3498db;
}

.sidebar-menu {
  list-style: none;
  padding: 0;
}

.sidebar-item {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-item.dropdown {
  display: list-item !important;
}

.sidebar-item .dropdown-content {
  padding-left: 24px !important;
  background-color: transparent !important;
  position: relative;
  box-shadow: none;
}

.sidebar-link,
.sidebar-item span,
.sidebar-item a {
  display: block;
  color: #ecf0f1;
  text-decoration: none;
  padding: 1rem 1.5rem;
  transition: all 0.3s ease;
  font-weight: 500;
  font-size: 0.95rem;
}

.sidebar-item .dropdown-content a:active,
.sidebar-item .dropdown-content a:hover {
  color: #2665ec;
  cursor: pointer;
}

.sidebar-link:hover,
.sidebar-link:focus {
  background-color: rgba(52, 152, 219, 0.2);
  color: #3498db;
  padding-left: 2rem;
}

/* Sidebar Overlay */
.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1500;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  overflow-y: scroll;
}

.sidebar-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

/* --- TO TOP BUTTON --- */
/* Return to Top Button */
.return-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 50px;
  height: 50px;
  background-color: var(--btn-bg);
  color: var(--btn-text);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 99;
}

.return-to-top:hover {
  background-color: var(--btn-text);
  color: var(--btn-bg);
  border: 2px solid var(--btn-bg);
  border-radius: 50%;
  transform: translateY(-3px);
}

.return-to-top:active {
  transform: translateY(-1px);
}

/* Show the button when it has the visible class */
.return-to-top.visible {
  display: flex;
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- MOBILE RESPONSIVENESS --- */
@media screen and (max-width: 768px) {

  /* Show hamburger menu */
  .hamburger {
    display: flex;
  }

  /* Hide desktop navigation */
  .nav-menu {
    display: none;
  }
}