/* ============================================
   PARAPOWER - SIDEBAR NAVIGATION
   Modern sidebar with toggle functionality
   ============================================ */

/* Sidebar Toggle Button */
.sidebar-toggle {
    position: fixed;
    top: clamp(15px, 3vw, 20px);
    right: clamp(15px, 3vw, 20px);
    left: auto;
    z-index: 1001;
    width: clamp(45px, 10vw, 50px);
    height: clamp(45px, 10vw, 50px);
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.sidebar-toggle:hover {
    background: rgba(0, 0, 0, 0.8);
    border-color: rgba(255, 215, 0, 0.5);
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.3);
}

.sidebar-toggle:active {
    transform: scale(0.95);
}

.sidebar-toggle-icon {
    width: clamp(20px, 5vw, 24px);
    height: clamp(20px, 5vw, 24px);
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

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

.sidebar-toggle.active .sidebar-toggle-icon span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.sidebar-toggle.active .sidebar-toggle-icon span:nth-child(2) {
    opacity: 0;
}

.sidebar-toggle.active .sidebar-toggle-icon span:nth-child(3) {
    transform: rotate(-45deg) translate(8px, -8px);
}

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

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

/* Sidebar */
.sidebar {
    position: fixed;
    top: 0;
    left: -320px;
    width: 320px;
    height: 100vh;
    background: linear-gradient(180deg, #1e3c72 0%, #2a5298 50%, #1e3c72 100%);
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar.active {
    left: 0;
}

/* Sidebar Header */
.sidebar-header {
    padding: clamp(1.5rem, 5vw, 2rem) clamp(1rem, 4vw, 1.5rem);
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 2px solid rgba(255, 215, 0, 0.3);
    text-align: center;
}

.sidebar-logo {
    max-width: 120px;
    height: auto;
    margin-bottom: 0.5rem;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.sidebar-title {
    font-size: clamp(1rem, 4vw, 1.2rem);
    font-weight: bold;
    color: #ffd700;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

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

.nav-section {
    margin-bottom: 1.5rem;
}

.nav-section-title {
    padding: clamp(0.5rem, 2vw, 0.75rem) clamp(1rem, 4vw, 1.5rem);
    font-size: clamp(0.65rem, 2vw, 0.75rem);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: rgba(255, 255, 255, 0.6);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 0.5rem;
}

.nav-item {
    display: block;
    padding: clamp(0.8rem, 3vw, 1rem) clamp(1rem, 4vw, 1.5rem);
    color: #ffffff;
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
    position: relative;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.1);
    border-left-color: #ffd700;
    padding-left: clamp(1.5rem, 5vw, 2rem);
}

.nav-item.active {
    background: rgba(255, 215, 0, 0.2);
    border-left-color: #ffd700;
    color: #ffd700;
}

.nav-icon {
    font-size: clamp(1.1rem, 4vw, 1.25rem);
    width: 24px;
    text-align: center;
    flex-shrink: 0;
}

.nav-text {
    flex: 1;
    font-size: clamp(0.85rem, 3vw, 0.95rem);
    font-weight: 500;
}

.nav-badge {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    background: rgba(255, 215, 0, 0.2);
    color: #ffd700;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 600;
    margin-left: auto;
}

/* Sidebar Footer */
.sidebar-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: clamp(1rem, 4vw, 1.5rem);
    background: rgba(0, 0, 0, 0.3);
    border-top: 2px solid rgba(255, 215, 0, 0.3);
    text-align: center;
}

.sidebar-footer-text {
    font-size: clamp(0.65rem, 2vw, 0.75rem);
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 0.5rem;
}

.sidebar-footer-link {
    color: #ffd700;
    text-decoration: none;
    font-size: clamp(0.75rem, 2.5vw, 0.85rem);
    font-weight: 600;
    transition: all 0.3s ease;
}

.sidebar-footer-link:hover {
    color: #ffed4e;
    text-decoration: underline;
}

/* External Link Indicator */
.nav-item.external::after {
    content: '↗';
    margin-left: auto;
    font-size: 0.8rem;
    opacity: 0.6;
}

/* Divider */
.nav-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 0.5rem clamp(1rem, 4vw, 1.5rem);
}

/* Scrollbar Styling */
.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 215, 0, 0.3);
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 215, 0, 0.5);
}

/* Responsive Design */
@media (max-width: 768px) {
    .sidebar {
        width: 280px;
        left: -280px;
    }
}

@media (max-width: 480px) {
    .sidebar {
        width: 100%;
        left: -100%;
    }

    .sidebar-overlay.active {
        background: rgba(0, 0, 0, 0.8);
    }
}

/* Animation for nav items */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.sidebar.active .nav-item {
    animation: slideIn 0.3s ease forwards;
}

.sidebar.active .nav-item:nth-child(1) { animation-delay: 0.05s; }
.sidebar.active .nav-item:nth-child(2) { animation-delay: 0.1s; }
.sidebar.active .nav-item:nth-child(3) { animation-delay: 0.15s; }
.sidebar.active .nav-item:nth-child(4) { animation-delay: 0.2s; }
.sidebar.active .nav-item:nth-child(5) { animation-delay: 0.25s; }
.sidebar.active .nav-item:nth-child(6) { animation-delay: 0.3s; }

/* Prevent body scroll when sidebar is open */
body.sidebar-open {
    overflow: hidden;
}