﻿/* Base styles */
body {
    margin: 0;
    font-family: 'Poppins', sans-serif;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: linear-gradient(90deg, #3658c7, #14255c);
    color: white;
    position: relative;
}

.logo a {
    color: white;
    text-decoration: none;
    font-size: 1.8rem;
    font-weight: bold;
}

.nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
}

.nav li {
    position: relative;
    margin: 0 1rem;
}

.nav a {
    color: white;
    text-decoration: none;
    font-size: 1rem;
    padding: 0.5rem 0;
    display: inline-block;
    transition: color 0.3s ease;
}

    .nav a:hover {
        color: #f4f4f9;
    }

/* Dropdown submenu */
.submenu .dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    display: none;
    flex-direction: column;
    background: rgba(0, 0, 0, 0.9);
    padding: 1rem;
    border-radius: 5px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.submenu:hover .dropdown {
    display: flex;
}

.dropdown li {
    margin: 0.5rem 0;
}

.dropdown a {
    font-size: 0.9rem;
    color: #f4f4f9;
    transition: background 0.3s ease;
}

/*.dropdown a:hover {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    padding-left: 0.5rem;
}*/

/* Mobile menu */
.menu-toggle {
    display: none;
    font-size: 1.5rem;
    color: white;
    background: none;
    border: none;
    cursor: pointer;
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .nav {
        display: none;
        flex-direction: column;
        width: 100%;
        background: rgba(0, 0, 0, 0.9);
        position: absolute;
        top: 100%;
        left: 0;
        padding: 1rem;
        box-sizing: border-box;
    }

        .nav.active {
            display: flex;
        }

        .nav ul {
            flex-direction: column;
            align-items: flex-start;
        }

    .submenu .dropdown {
        position: static;
        display: none;
    }

    .submenu.open .dropdown {
        display: flex;
    }
}
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    width: 60px;
    background-color: #3658c7;
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: width 0.3s ease, transform 0.3s ease;
    overflow-x: hidden;
    z-index: 1000;
}

.sidebar:hover {
    width: 200px;
}

.logo {
    font-size: 1.5rem;
    padding: 1rem 0;
    width: 100%;
    text-align: center;
}

.sidebar ul {
    list-style: none;
    padding: 0;
    margin-top: 2rem;
    width: 100%;
}

.sidebar li {
    width: 100%;
}

.sidebar a {
    display: flex;
    align-items: center;
    padding: 1rem;
    color: white;
    text-decoration: none;
    transition: background 0.3s;
}

.sidebar i {
    margin-right: 1rem;
    min-width: 20px;
    text-align: center;
}

.label {
    opacity: 0;
    transition: opacity 0.3s;
    white-space: nowrap;
}

.sidebar:hover .label {
    opacity: 1;
    margin-left: 10px;
}

main {
    margin-left: 60px;
    padding: 2rem;
    transition: margin-left 0.3s ease;
    flex-grow: 1;
}

.sidebar:hover ~ main {
    margin-left: 200px;
}

.hamburger {
    display: none;
    position: fixed;
    top: 1rem;
    left: 1rem;
    font-size: 1.8rem;
    color: white;
    z-index: 1100;
    cursor: pointer;
    background: #14255c;
    padding: 0.5rem 1rem;
    border-radius: 4px;
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        width: 200px;
        box-shadow: 2px 0 5px rgba(0, 0, 0, 0.3);
    }

        .sidebar.mobile-active {
            transform: translateX(0);
        }

        .sidebar:hover {
            width: 200px;
        }

    .label {
        opacity: 1;
    }

    .hamburger {
        display: block;
    }

    main {
        margin-left: 0;
    }

    .sidebar:hover ~ main {
        margin-left: 0;
    }

    body.mobile-open {
        overflow: hidden;
    }
}