/* Sidebar Navigation Styles */
:root {
  --sidebar-width: 250px;
  --sidebar-bg: white;
  --sidebar-transition: 0.3s ease;
}

.sidebar {
  position: fixed;
  top: 0;
  right: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background-color: var(--sidebar-bg);
  z-index: 1002;
  box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
  transform: translateX(100%);
  transition: transform var(--sidebar-transition);
  padding: 80px 20px 20px;
  overflow: hidden;
  display: none; /* Hide by default on all devices */
  height: 100vh;
  width: var(--sidebar-width);
}

.sidebar.active {
  transform: translateX(0);
}

.sidebar__overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1001;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--sidebar-transition), visibility var(--sidebar-transition);
}

.sidebar__overlay.active {
  opacity: 1;
  visibility: visible;
}

.sidebar__close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 30px;
  height: 30px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar__close:before,
.sidebar__close:after {
  content: '';
  position: absolute;
  width: 20px;
  height: 2px;
  background-color: var(--primary-color);
}

.sidebar__close:before {
  transform: rotate(45deg);
}

.sidebar__close:after {
  transform: rotate(-45deg);
}

.sidebar__links {
  list-style: none;
  padding: 0;
  overflow: hidden;
  margin: 0;
}

.sidebar__link {
  margin: 15px 0;
}

.sidebar__link a {
  display: block;
  text-decoration: none;
  color: var(--text-color);
  font-weight: 500;
  transition: color 0.3s ease;
  padding: 8px 0;
}

.sidebar__link a:hover {
  color: var(--primary-color);
}

.sidebar__buttons {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  width: 100%;
}

.sidebar__buttons .button {
  width: auto;
  min-width: 120px;
  text-align: center;
  padding: 10px 15px;
  font-size: 16px;
  display: inline-block;
  margin: 0 auto;
}

@media (max-width: 480px) {
  .sidebar__buttons .button {
    padding: 10px 15px;
    font-size: 14px;
    min-width: 100px;
  }
}

/* Only show sidebar on mobile */
@media (min-width: 769px) {
  .sidebar,
  .sidebar__overlay {
    display: none;
  }
}

/* Additional responsive adjustments for very small screens */
@media (max-width: 320px) {
  .sidebar {
    width: 100%;
    padding: 70px 15px 15px;
  }
  
  .sidebar__buttons .button {
    padding: 8px 12px;
    font-size: 13px;
    min-width: 90px;
  }
}

/* Prevent body scrolling when sidebar is open */
body.sidebar-open {
  overflow: hidden;
}