/* ===== CUSTOM SIDEBAR STYLES ===== */

/* Page content adjustment for sidebar */
body {
  margin-left: var(--sidebar-width);
}

@media (max-width: 768px) {
  body {
    margin-left: 0;
  }
  
  .custom-sidebar {
    left: -100%;
    width: 280px;
  }
  
  .custom-sidebar.active {
    left: 0 !important;
    transform: translateX(0);
    visibility: visible;
    opacity: 1;
  }
}

/* Sidebar Variables */
:root {
  --sidebar-width: 280px;
  --sidebar-collapsed-width: 70px;
  --sidebar-bg: rgba(255, 255, 255, 0.85);
  --sidebar-border: rgba(0, 212, 255, 0.15);
  --sidebar-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  --sidebar-text: #374151;
  --sidebar-text-muted: #6b7280;
  --sidebar-hover-bg: rgba(0, 212, 255, 0.08);
  --sidebar-active-bg: linear-gradient(135deg, rgba(0, 212, 255, 0.9), rgba(255, 107, 53, 0.9));
  --sidebar-glow: 0 0 20px rgba(0, 212, 255, 0.2);
  --sidebar-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Sidebar Overlay */
.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 1001;
  opacity: 0;
  visibility: hidden;
  transition: var(--sidebar-transition);
}

.sidebar-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Main Sidebar */
.custom-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  min-height: 100vh;
  background: var(--sidebar-bg);
  backdrop-filter: blur(25px);
  border-right: 1px solid var(--sidebar-border);
  box-shadow: var(--sidebar-shadow);
  z-index: 1002;
  transition: var(--sidebar-transition);
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  visibility: visible;
  opacity: 1;
}

@media (max-width: 768px) {
  .custom-sidebar {
    left: -100%;
    width: 280px;
  }
  
  .sidebar-close-btn {
    display: block;
  }
  
  .sidebar-header {
    padding: 0 1rem;
  }
  
  .sidebar-brand .brand-text {
    font-size: 1.1rem;
  }
  
  .sidebar-link {
    padding: 1rem 1.25rem;
    font-size: 1rem;
  }
  
  .sidebar-icon {
    font-size: 1.25rem;
  }
  
  .sidebar-text {
    font-size: 1rem;
  }
  
  .dropdown-header {
    padding: 1rem 1.25rem;
    font-size: 1rem;
  }
  
  .dropdown-text {
    font-size: 1rem;
  }
  
  .dropdown-menu {
    margin-left: -1rem;
  }
  
  .dropdown-link {
    padding: 0.875rem 1.25rem;
    font-size: 0.95rem;
  }
  
  .package-price {
    font-size: 0.9rem;
  }
}

.custom-sidebar.active {
  left: 0 !important;
  transform: translateX(0);
  visibility: visible;
  opacity: 1;
}

/* Sidebar Header */
.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  padding: 0 1.25rem;
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.08), rgba(255, 107, 53, 0.08));
  backdrop-filter: blur(10px);
  flex-shrink: 0;
}

/* Sidebar Close Button */
.sidebar-close-btn {
  display: none;
  background: none;
  border: none;
  color: var(--sidebar-text);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 10px;
  border-radius: 8px;
  transition: var(--sidebar-transition);
  z-index: 1003;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar-close-btn:hover {
  background: rgba(0, 212, 255, 0.1);
  color: #00d4ff;
  transform: scale(1.1);
}

.sidebar-close-btn:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.3);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  position: relative;
}

.sidebar-brand .brand-text {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--sidebar-text);
  z-index: 2;
  position: relative;
}

.sidebar-brand .brand-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg, #00d4ff, #ff6b35);
  filter: blur(20px);
  opacity: 0.3;
  z-index: 1;
}

/* Sidebar Navigation */
.sidebar-nav {
  padding: 1rem 0;
  flex: 1;
  overflow-y: auto;
}

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

.sidebar-item {
  margin: 0.25rem 0;
}

.sidebar-link {
  display: flex;
  align-items: center;
  padding: 0.875rem 1.25rem;
  color: var(--sidebar-text);
  text-decoration: none;
  border-radius: 0 25px 25px 0;
  margin-right: 1rem;
  transition: var(--sidebar-transition);
  position: relative;
  overflow: hidden;
}

.sidebar-link:hover {
  background: var(--sidebar-hover-bg);
  color: #00d4ff;
  text-decoration: none;
}

.sidebar-link.active {
  background: var(--sidebar-active-bg);
  color: white;
  box-shadow: var(--sidebar-glow);
}

.sidebar-icon {
  font-size: 1.125rem;
  margin-right: 0.875rem;
  min-width: 1.25rem;
  text-align: center;
  transition: var(--sidebar-transition);
}

.sidebar-text {
  font-weight: 500;
  font-size: 0.9rem;
  transition: var(--sidebar-transition);
}

.link-glow {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.1), transparent);
  transform: translateX(-100%);
  transition: transform 0.5s ease;
}

.sidebar-link:hover .link-glow {
  transform: translateX(100%);
}

/* Dropdown Styles */
.sidebar-dropdown {
  margin-bottom: 0.5rem;
  position: relative;
}

.dropdown-header {
  display: flex;
  align-items: center;
  padding: 0.875rem 1.25rem;
  color: var(--sidebar-text);
  text-decoration: none;
  border-radius: 0 25px 25px 0;
  margin-right: 1rem;
  transition: var(--sidebar-transition);
  position: relative;
  overflow: hidden;
  user-select: none;
}

.dropdown-header:hover {
  background: var(--sidebar-hover-bg);
  color: #00d4ff;
  text-decoration: none;
}

.dropdown-header.active {
  background: var(--sidebar-active-bg);
  color: white;
  box-shadow: var(--sidebar-glow);
}

.dropdown-icon {
  font-size: 1.125rem;
  margin-right: 0.875rem;
  min-width: 1.25rem;
  text-align: center;
  transition: var(--sidebar-transition);
}

.dropdown-text {
  font-weight: 600;
  font-size: 0.9rem;
  flex: 1;
  transition: var(--sidebar-transition);
}

.dropdown-arrow {
  font-size: 0.875rem;
  transition: var(--sidebar-transition);
  color: var(--sidebar-text-muted);
  margin-left: auto;
}

.dropdown-header:hover .dropdown-arrow,
.dropdown-header.active .dropdown-arrow {
  color: inherit;
}

.dropdown-header.active .dropdown-arrow {
  transform: rotate(180deg);
}

.dropdown-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 0;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  margin: 0 1rem 0 2.5rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  position: relative;
  z-index: 100;
  display: none;
  min-height: 50px;
  border: 1px solid transparent;
  margin-left: -2rem;
  background-color: transparent !important;
  width: auto !important;
}

.dropdown-menu.active {
  max-height: 500px !important;
  padding: 0.75rem 0 !important;
  margin-top: 0.5rem !important;
  margin-bottom: 0.5rem !important;
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateY(0) !important;
  display: block !important;
}

.dropdown-item {
  margin: 0.25rem 0;
  position: relative;
}

.dropdown-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.25rem;
  color: var(--sidebar-text);
  text-decoration: none;
  border-radius: 0 25px 25px 0;
  margin: 0.125rem 0.75rem;
  transition: var(--sidebar-transition);
  position: relative;
  overflow: hidden;
  font-size: 0.85rem;
  width: 100% !important;
}

.dropdown-link:hover {
  background: rgba(0, 212, 255, 0.18) !important;
  color: #00d4ff !important;
  border-radius: 0 25px 25px 0 !important;
  box-shadow: none !important;
  width: 100% !important;
}

.dropdown-link.active {
  background: linear-gradient(135deg, #00d4ff 30%, #ff6b35 100%) !important;
  color: #fff !important;
  border-radius: 0 25px 25px 0 !important;
  box-shadow: var(--sidebar-glow) !important;
}

.dropdown-item-icon {
  font-size: 1rem;
  margin-right: 0.75rem;
  min-width: 1rem;
  text-align: center;
  transition: var(--sidebar-transition);
}

.dropdown-item-text {
  font-weight: 400;
  font-size: 0.85rem;
  transition: var(--sidebar-transition);
  flex: 1;
  color: #FFF;
}

/* Package Links */
.package-link {
  display: flex;
  align-items: center;
  width: 100%;
}

.package-price {
  background: linear-gradient(135deg, #00d4ff, #ff6b35);
  color: white;
  padding: 0.375rem 0.75rem;
  border-radius: 15px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-left: 0.75rem;
  transition: var(--sidebar-transition);
  box-shadow: 0 2px 8px rgba(0, 212, 255, 0.25);
}

.dropdown-link:hover .package-price {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 212, 255, 0.35);
}

/* Sidebar Divider */
.sidebar-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--sidebar-border), transparent);
  margin: 1.5rem 1.25rem;
}

/* Sidebar Sections */
.sidebar-section {
  margin-bottom: 1.5rem;
}

.sidebar-section-title {
  display: flex;
  align-items: center;
  padding: 0 1.25rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--sidebar-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0;
}

.sidebar-section-title i {
  margin-right: 0.5rem;
  font-size: 0.9rem;
  color: #00d4ff;
}

/* Sidebar Footer */
.sidebar-footer {
  margin-top: auto;
  padding: 1.5rem 1.25rem;
  border-top: 1px solid var(--sidebar-border);
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.06), rgba(255, 107, 53, 0.06));
  backdrop-filter: blur(10px);
  flex-shrink: 0;
}

.sidebar-social {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  background: rgba(0, 212, 255, 0.08);
  color: var(--sidebar-text);
  border-radius: 50%;
  text-decoration: none;
  transition: var(--sidebar-transition);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(5px);
}

.social-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #00d4ff, #ff6b35);
  opacity: 0;
  transition: var(--sidebar-transition);
}

.social-link:hover {
  color: white;
  transform: translateY(-2px);
  box-shadow: var(--sidebar-glow);
}

.social-link:hover::before {
  opacity: 1;
}

.social-link i {
  position: relative;
  z-index: 2;
  font-size: 1.1rem;
}

.sidebar-contact {
  text-align: center;
}

.contact-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  color: var(--sidebar-text);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.5rem;
  border-radius: 8px;
  transition: var(--sidebar-transition);
}

.contact-link:hover {
  background: var(--sidebar-hover-bg);
  color: #00d4ff;
  text-decoration: none;
}

.contact-link i {
  color: #ff6b35;
  font-size: 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  .custom-sidebar {
    width: 100%;
    left: -100%;
  }
  
  .sidebar-close-btn {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
  }
  
  .sidebar-close-btn i {
    font-size: 1.5rem !important;
    color: var(--sidebar-text) !important;
  }
  
  .sidebar-overlay.active {
    backdrop-filter: blur(8px);
  }
  
  .sidebar-header {
    height: 56px;
    padding: 0 1rem;
  }
  
  .sidebar-brand .brand-text {
    font-size: 1.1rem;
  }
  
  .sidebar-link {
    padding: 1rem 1.25rem;
    margin-right: 0.5rem;
  }
  
  .sidebar-icon {
    font-size: 1.25rem;
    margin-right: 1rem;
  }
  
  .sidebar-text {
    font-size: 1rem;
  }
  
  .dropdown-header {
    padding: 1rem 1.25rem;
    margin-right: 0.5rem;
  }
  
  .dropdown-text {
    font-size: 1rem;
  }
  
  .dropdown-menu {
    margin-left: 3rem;
    margin-right: 0.5rem;
  }
  
  .dropdown-link {
    padding: 0.875rem 1rem;
    font-size: 0.9rem;
  }
  
  .package-price {
    font-size: 0.8rem;
    padding: 0.375rem 0.75rem;
  }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
  :root {
    --sidebar-bg: rgba(26, 26, 46, 0.95);
    --sidebar-border: rgba(0, 212, 255, 0.3);
    --sidebar-text: #ffffff;
    --sidebar-text-muted: rgba(255, 255, 255, 0.7);
    --sidebar-hover-bg: rgba(0, 212, 255, 0.15);
  }
  
  .sidebar-header {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.15), rgba(255, 107, 53, 0.15));
  }
  
  .sidebar-close-btn {
    color: #d1d5db;
  }
  
  .sidebar-close-btn:hover {
    background: rgba(0, 212, 255, 0.15);
    color: #00d4ff;
  }
  
  .sidebar-footer {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.1), rgba(255, 107, 53, 0.1));
  }
  
  .dropdown-menu {
    background: rgba(0, 212, 255, 0.05);
  }
}

/* Animation Classes */
.sidebar-fade-in {
  animation: sidebarFadeIn 0.3s ease-out;
}

@keyframes sidebarFadeIn {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Scrollbar Styling - Completely Hidden */
.custom-sidebar::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  background: transparent !important;
}

.custom-sidebar::-webkit-scrollbar-track {
  display: none !important;
  background: transparent !important;
}

.custom-sidebar::-webkit-scrollbar-thumb {
  display: none !important;
  background: transparent !important;
}

.custom-sidebar::-webkit-scrollbar-thumb:hover {
  display: none !important;
  background: transparent !important;
}

.custom-sidebar::-webkit-scrollbar-corner {
  display: none !important;
  background: transparent !important;
}

/* Firefox scrollbar */
.custom-sidebar {
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}

/* Custom scrollbar for sidebar navigation */
.sidebar-nav::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  background: transparent !important;
}

.sidebar-nav::-webkit-scrollbar-track {
  display: none !important;
  background: transparent !important;
}

.sidebar-nav::-webkit-scrollbar-thumb {
  display: none !important;
  background: transparent !important;
}

.sidebar-nav::-webkit-scrollbar-thumb:hover {
  display: none !important;
  background: transparent !important;
}

.sidebar-nav::-webkit-scrollbar-corner {
  display: none !important;
  background: transparent !important;
}

/* Hide scrollbar for all browsers */
.custom-sidebar,
.sidebar-nav {
  -ms-overflow-style: none !important;  /* IE and Edge */
  scrollbar-width: none !important;  /* Firefox */
}

/* Additional hiding for webkit browsers */
.custom-sidebar::-webkit-scrollbar,
.sidebar-nav::-webkit-scrollbar {
  -webkit-appearance: none;
  width: 0 !important;
  height: 0 !important;
}

/* Scrollbar corner */
.custom-sidebar::-webkit-scrollbar-corner {
  background: transparent;
}

.sidebar-nav::-webkit-scrollbar-corner {
  background: transparent;
}

/* Active State Management */
.sidebar-link[data-page="home"].active,
.sidebar-link[data-page="about"].active,
.sidebar-link[data-page="services"].active,
.sidebar-link[data-page="contact"].active {
  background: var(--sidebar-active-bg);
  color: white;
  box-shadow: var(--sidebar-glow);
}

.sidebar-link[data-section="courses"].active,
.sidebar-link[data-section="macros"].active,
.sidebar-link[data-section="plugins"].active {
  background: var(--sidebar-active-bg);
  color: white;
  box-shadow: var(--sidebar-glow);
}

/* Hover Effects Enhancement */
.sidebar-link:hover .sidebar-icon {
  transform: scale(1.1);
  color: #00d4ff;
}

.sidebar-link.active .sidebar-icon {
  color: white;
}

/* Focus States for Accessibility */
.sidebar-link:focus,
.sidebar-close-btn:focus,
.social-link:focus,
.contact-link:focus {
  outline: 2px solid #00d4ff;
  outline-offset: 2px;
}

/* Loading State */
.sidebar-loading {
  position: relative;
}

.sidebar-loading::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.1), transparent);
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

.sidebar-dropdown .dropdown-menu .dropdown-item:hover{
  background: transparent !important;
  color: #00d4ff !important;
  border-radius: 0 25px 25px 0 !important;
  box-shadow: none !important;
}


