﻿/* Header */
header {
    background: #2c3e50;
    color: white;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
}

/* Hamburger Button */
.hamburger {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 5px;
    z-index: 1001;
}

    .hamburger span {
        display: block;
        width: 28px;
        height: 3px;
        background: white;
        transition: all 0.3s ease;
        border-radius: 3px;
    }

    /* Animate hamburger to X when open */
    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(8px, 8px);
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }

/* Menu Overlay */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
}

    .menu-overlay.active {
        opacity: 1;
        visibility: visible;
    }

/* Sidebar Menu */
.sidebar-menu {
    position: fixed;
    top: 0;
    left: -320px;
    width: 320px;
    height: 100%;
    background: #34495e;
    overflow-y: auto;
    transition: left 0.3s ease;
    z-index: 1000;
    box-shadow: 2px 0 10px rgba(0,0,0,0.3);
}

    .sidebar-menu.active {
        left: 0;
    }

/* Menu Header */
.menu-header {
    background: #2c3e50;
    color: white;
    padding: 1.5rem;
    border-bottom: 1px solid #44586e;
}

    .menu-header h2 {
        font-size: 1.3rem;
        margin-bottom: 0.3rem;
    }

    .menu-header p {
        font-size: 0.9rem;
        color: #bdc3c7;
    }

/* Menu Items */
.menu-nav {
    padding: 0;
}

.menu-item {
    border-bottom: 1px solid #44586e;
}

.menu-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    color: #ecf0f1;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    font-size: 1rem;
}

    .menu-link:hover {
        background: #44586e;
        padding-left: 2rem;
    }

    .menu-link.active {
        background: #3498db;
        border-left: 4px solid #2980b9;
    }

    .menu-link .icon {
        margin-right: 0.75rem;
        font-size: 1.2rem;
    }

    .menu-link .text {
        flex: 1;
    }

    .menu-link .arrow {
        font-size: 0.8rem;
        transition: transform 0.3s ease;
    }

        .menu-link .arrow.rotated {
            transform: rotate(180deg);
        }

/* Submenu */
.submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: #2c3e50;
}

    .submenu.expanded {
        max-height: 500px;
    }

.submenu-link {
    display: block;
    padding: 0.75rem 1.5rem 0.75rem 3.5rem;
    color: #bdc3c7;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    position: relative;
}

    .submenu-link:before {
        content: "→";
        position: absolute;
        left: 2.5rem;
        opacity: 0;
        transition: all 0.3s ease;
    }

    .submenu-link:hover {
        background: #34495e;
        color: #3498db;
        padding-left: 4rem;
    }

        .submenu-link:hover:before {
            opacity: 1;
            left: 2.8rem;
        }

    .submenu-link.active {
        background: #34495e;
        color: #3498db;
        border-left: 3px solid #3498db;
    }

/*-------------------- Mobile --------------------*/
@media screen and (max-width: 600px) {
    header {
        padding: 0.6rem;
    }
}