/* Mobile Navigation */
.mobile-nav {
  display: none;
}

.mobile-nav__toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 20px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 1000;
  position: relative;
  margin-right: 10px;
}

/* Hide the hamburger button when the sidebar is open */
.mobile-nav__toggle.hide {
  display: none;
}

.mobile-nav__toggle span {
  display: block;
  width: 100%;
  height: 3px;
  background-color: #ffffff;
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* Sidebar */
.mobile-nav__sidebar {
  position: fixed;
  top: 0;
  right: -280px;
  width: 240px;
  height: 100vh;
  background: #40724b;
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.3);
  transition: right 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  z-index: 999;
  overflow-y: auto;
  backdrop-filter: blur(10px);
}

.mobile-nav__sidebar.open {
  right: 0;
}

/* Close button - floating outside sidebar */
.mobile-nav__close {
  position: fixed;
  top: 20px;
  right: 280px;
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  font-size: 1.5rem;
  color: #fff;
  cursor: pointer;
  z-index: 1001;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  opacity: 0;
  transform: translateX(60px);
}

.mobile-nav__sidebar.open + .mobile-nav__close,
.mobile-nav__sidebar.open ~ .mobile-nav__close {
  opacity: 1;
  transform: translateX(0);
}

.mobile-nav__close:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.4);
  transform: scale(1.1);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.mobile-nav__close:active {
  transform: scale(0.95);
}

/* Logo section */
.mobile-nav-logo {
  padding: 2rem 1.5rem 1rem;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 1rem;
}

.mobile-nav-logo img {
  width: 60px;
  height: 60px;
  border-radius: 100%;
  margin-bottom: 0.5rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease;
}

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

.mobile-nav-logo h3 {
  color: #ffffff;
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.5px;
}

/* Navigation list */
.mobile-nav__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
}

.mobile-nav__list li {
  position: relative;
  overflow: hidden;
}

.mobile-nav__list a {
  display: flex;
  align-items: center;
  gap: 15px;
  color: #ffffff;
  text-decoration: none;
  font-weight: 500;
  padding: 1rem 1.5rem;
  position: relative;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* Hover effect with sliding background */
.mobile-nav__list a::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
  transition: left 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  z-index: -1;
}

.mobile-nav__list a:hover::before,
.mobile-nav__list a:focus::before {
  left: 0;
}

.mobile-nav__list a:hover,
.mobile-nav__list a:focus {
  color: #87ceeb;
  border-left-color: #87ceeb;
  transform: translateX(8px);
  text-shadow: 0 0 10px rgba(135, 206, 235, 0.3);
}

.mobile-nav__list a:hover i,
.mobile-nav__list a:focus i {
  transform: scale(1.1);
  color: #87ceeb;
}

.mobile-nav__list a i {
  font-size: 1.2rem;
  transition: all 0.3s ease;
  flex-shrink: 0; /* Prevent icons from shrinking */
}

/* Active state */
.mobile-nav__list a:active {
  transform: translateX(4px);
}

/* Backdrop overlay */
.mobile-nav__overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(2px);
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.mobile-nav__overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Show only on mobile */
@media (max-width: 768px) {
  .mobile-nav {
    display: block;
  }

  .mobile-nav__toggle {
    display: flex;
  }
}

/* Small mobile screens */
@media (max-width: 480px) {
  .mobile-nav__sidebar {
    width: min(240px, 85vw);
    right: min(-280px, -85vw);
  }
  
  .mobile-nav__close {
    right: min(270px, 85vw);
  }
  
  .mobile-nav-logo {
    padding: 1.5rem 1rem 1rem;
  }
  
  .mobile-nav__list a {
    padding: 0.8rem 1rem;
  }
}

/* Extra small screens */
@media (max-width: 320px) {
  .mobile-nav__sidebar {
    width: 95vw;
    right: -95vw;
  }
  
  .mobile-nav__close {
    right: 15px;
    top: 15px;
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
  }
  
  .mobile-nav-logo img {
    width: 50px;
    height: 50px;
  }
  
  .mobile-nav-logo h3 {
    font-size: 1rem;
  }
  
  .mobile-nav__list a {
    padding: 0.7rem 0.8rem;
    gap: 10px;
  }
}