nav {
  width: 200px;
  height: 100%;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  background-color: var(--glass-background);
  border-right: 1px solid var(--glass-border);
  padding: 20px 0;
  box-shadow: 4px 0 10px var(--shadow-strong);
  transform: translateX(0);           /* default: visible */
  transition: transform 0.3s ease;    /* smooth sliding */
}
#toggle-button {
    position: fixed; /* Fixed position for the toggle button */
    top: 20px; /* Adjust as needed */
    left: 20px; /* Adjust as needed */
    z-index: 1001; /* Ensure it's above the sidebar */
    background: linear-gradient(180deg, orange, yellow);
    
    /* Match the sidebar */
    border: none;
    padding: 10px;
    border-radius: 5px; /* Rounded button */
    cursor: pointer; /* Cursor pointer for button */
    box-shadow: 0 4px 10px var(--shadow-strong); /* Add shadow */
}

#toggle-button:focus {
    outline: none; /* Remove default outline */
}

.nav-container {
    width: 100%; /* Full width of the sidebar */
    display: flex;
    flex-direction: column; /* Stack links vertically */
    align-items: center; /* Center items */
}

.nav-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column; /* Stack nav items vertically */
    gap: 15px; /* Space out nav items */
    width: 100%; /* Full width of the sidebar */
    align-items: center; /* Center items horizontally */
}

.nav-links li a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 600;
    padding: 12px 18px; /* Padding for button shape */
    border-radius: 10px; /* Rounded corners */
    transition: color 0.3s ease, transform 0.6s ease;
    display: flex;
    align-items: center;
    justify-content: center; /* Center text within the button */
    gap: 8px; /* Space between icon and text */
    width: 80%; /* Give buttons a width and center them */
}

/* base: make the icon rotatable */
.nav-links i.cuhs {
  display: inline-block;              /* required for transform */
  transition: transform 0.6s ease;    /* smooth spin */
}

/* on link hover: change text color, but spin ONLY the icon */
.nav-links li a:hover {
  color: var(--primary-light);
}

.nav-links li a:hover i.cuhs {
  transform: rotate(720deg);
}


.nav-links li a.active { 
    color: var(--primary-light);
}

/* --- Responsive Adjustments --- */
@media (max-width: 768px) {
    .container-inner {
        padding: 30px;
        margin-left: 260px; /* Space for the sidebar */
    }

    .container-inner h1 {
        font-size: 2.5em;
    }

    .container-inner h2 {
        font-size: 1.2em;
    }

    .nav-links {
        gap: 10px; /* Adjust space on smaller screens */
    }

    nav {
        padding: 20px 0; /* Maintain padding */
    }
}

@media (max-width: 480px) {
    .nav-links li a {
        padding: 8px 12px; /* Adjust padding */
        font-size: 0.9em;
    }
}
#nav-toggle {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 1100;
  background: linear-gradient(45deg, #f39c12, #8e44ad);
  color: white;
  border: none;
  padding: 10px 15px;
  font-size: 20px;
  cursor: pointer;
  border-radius: 100px;
  transition: transform 0.3s ease;
}
#nav-toggle:hover {
transition: transform 0.3s ease;
transform: translateY(-4px) scale(1.1);
background: linear-gradient(270deg, #ff007f, #00ff7f, #007fff, #ff7f00, #ff00ff);
background-size: 400% 400%;
animation: gradientAnimation 5s ease infinite;
}
/* --- Preloader Styles (Kept as is, but ensured it integrates) --- */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.55); /* A dark background, adjust to match your theme */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 1s ease-out;
    opacity: 1;
}

#preloader.hidden {
    opacity: 0;
    pointer-events: none;
}

.spinner {
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid #fff;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
} /*

/* Base animation style */
.animated-content {
    opacity: 0;
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}
/* --- Container intro (slides up from bottom) --- */
.container.animated-content {
  opacity: 0;
  transform: translateY(50px); /* start offset */
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.container.animated-content.show {
  opacity: 1;
  transform: translateY(0);
}

/* --- Nav intro (slides in from left) --- */
nav.animated-content {
  opacity: 0;
  transform: translateX(-50px); /* start offset */
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

nav.animated-content.show {
  opacity: 1;
  transform: translateX(0);
}

/* --- Nav toggle (open/close) --- */
nav.closed {
  transform: translateX(-100%) !important;
  opacity: 1; /* stays visible while sliding out */
  transition: transform 0.3s ease;
}

.cuhs {
  font-size: 15px;          /* Size of the icon */
  padding: 10px;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, color 0.75s ease;
}