@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@100..900&display=swap');

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Outfit', sans-serif;
    background: var(--gradient-normal);
    color: white;
}

.container {
    margin-left: 60px;
    transition: margin-left 0.5s ease;
}


/* SIDENAV */
.sidenav {
    height: calc(100dvh - 100px);
    width: 250px;
    position: fixed;
    top: 100px;
    left: 0;
    padding: 10px;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(24px);
    z-index: 100;
    overflow-x: hidden;
    overflow-y: auto;
}


.nav-brand {
    position: fixed;
    top: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100px;
    width: 250px;
    font-size: 1.75rem;
    padding: 20px;
    color: rgb(179, 179, 179);
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(24px);
}

.nav-brand-content {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #3b3b42;
    padding: 0.75rem;
    box-shadow: 0px 0px 8px 2px black;
}

.nav-brand span {
    flex-shrink: 0;
}

.nav-toggle {
    margin-left: auto;
    cursor: pointer;
    display: none;
    align-items: center;
}

.nav-toggle i {
    font-size: 2rem;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.open-icon {
    position: absolute;
    top: 20px;
    right: 20px;
    opacity: 1;
    transform: rotate(0deg);
}

.close-icon {
    opacity: 0;
    transform: rotate(-90deg);
}

.nav-toggle.active .open-icon {
    opacity: 0;
    transform: rotate(90deg);
}

.nav-toggle.active .close-icon {
    opacity: 1;
    transform: rotate(0deg);
}

/* sections */

.nav-section {
    width: 100%;
    display: flex;
    flex-direction: column;
    padding: 10px;
}

.nav-section .header {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    color: var(--text-color);
    padding: 5px 0;
    overflow: hidden;
    box-shadow: 0 3px 2px -2px rgba(160, 160, 160, 0.60);
    margin-bottom: 10px;
}

.nav-section .header span,
.nav-section .header .bi {
    color: rgba(160, 160, 160, 0.6);
    margin: 0;
    padding: 0;
}

.nav-section hr {
    width: 100%;
    background-color: rgba(160, 160, 160, 0.60);
    height: 1.5px;
}

/* NAV ITEMS */
.nav-item {
    display: flex;
    gap: 10px;
    margin-left: 10px;
    font-size: 0.9rem;
    padding: 10px;
    text-decoration: none;
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--text-color);
}

.nav-item:hover .bi,
.nav-item:hover span {
    color: rgba(160, 160, 160, 0.6);
}

.nav-user {
    position: absolute;
    bottom: 10px;
    left: 0;
    width: 100%;
    line-height: 30px;
    display: flex;
    flex-direction: column;
    padding: 10px 20px;
}

.sidenav.has-overflow .nav-user {
    position: relative;
    padding: 10px 10px;
}

.sidenav.has-overflow .nav-user-box {
    left: 10px;
}

.nav-user-link {
    position: relative;
    display: flex;
    align-items: center;
    color: var(--text-color);
    cursor: pointer;
    gap: 10px;
}

.nav-user-box {
    position: absolute;
    left: 20px;
    bottom: 50px;
    padding: 10px 20px 10px 20px;
    width: 210px;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    box-shadow: 0 0 8px 1px rgb(0, 0, 0);
    visibility: hidden;
    opacity: 0;
    overflow: hidden;
}


.nav-user:hover .nav-user-box {
    visibility: visible;
    opacity: 1;
    animation: boxIn 0.2s forwards ease;
}

@keyframes boxIn {
    0% {
        width: 0;
        opacity: 0;
        pointer-events: none;
    }

    100% {
        opacity: 1;
        width: 210px;
        pointer-events: auto;
    }
}

.nav-user-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
    color: var(--text-color);
    font-size: 0.9rem;
}

.nav-user-item.main {
    font-size: 1rem;
    color: white;
    padding: 6px 0px;
}

p.nav-user-item {
    padding: 0;
    margin: 0;
    color: white;
}

a.nav-user-item,
button.nav-user-item {
    padding: 3px 0;
    text-decoration: none;
    background: transparent;
    border: none;
    cursor: pointer;
}

a.nav-user-item:hover,
button.nav-user-item:hover {
    color: rgba(160, 160, 160, 0.6);
}

.nav-user-item.logout {
    color: rgb(255, 146, 146);
}

/* Scroll bar */
.sidenav::-webkit-scrollbar {
    width: 2px;
}

.sidenav::-webkit-scrollbar-track {
    background: transparent;
}

.sidenav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
}

.sidenav::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

.sidenav {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
}



/* RESPONSIVE */
@media screen and (max-width: 1000px) {
    .container{
        overflow: hidden;
    }
    body {
        overflow-x: hidden;
    }

    /* ===== SIDENAV WRAPPER ===== */
    .sidenav {
        position: absolute;
        width: 90%;
        top: 80px;
        left: 5%;
        max-width: 100%;
        height: calc(100dvh - 80px);
        overflow-x: hidden;
        overflow-y: auto;
        box-shadow: none;
        transform: translateX(120%);
        transition: transform 0.3s ease, opacity 0.3s ease;
    }

    .sidenav.open {
        transform: translateX(0);
    }

    /* ===== NAV BRAND – VŽDY VIDITELNÉ ===== */
    .nav-brand {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: space-between;
        background: transparent;
        gap: 10px;
        padding: 10px;
        height: 80px;
        z-index: 10;
        color: var(--text-color);
        font-size: 25px;
    }

    .nav-brand img {
        margin-right: 10px;
    }

    .nav-toggle {
        width: 30px;
        display: flex;
        justify-content: center;
        align-items: center;
        cursor: pointer;
        height: 80px;
    }

    .nav-toggle i {
        width: 30px;
        font-size: 1.8rem;
        transition: opacity 0.3s ease, transform 0.3s ease;
    }

    .open-icon {
        opacity: 1;
        transform: rotate(0deg);
        font-size: 25px;
        width: 25px;
    }

    .close-icon {
        opacity: 0;
        transform: rotate(90deg);
    }

    .nav-toggle.active .open-icon {
        opacity: 0;
        transform: rotate(-90deg);
    }

    .nav-toggle.active .close-icon {
        opacity: 1;
        transform: rotate(0deg);
    }

    /* ===== SECTIONS & ITEMS ===== */
    .nav-section,
    .nav-user {
        display: flex;
        flex-direction: column;
        padding: 10px 20px;
        opacity: 0;
        transform: translateY(-10px);
        transition: opacity 0.3s ease 0.15s, transform 0.3s ease 0.15s;
    }

    .sidenav.open .nav-section,
    .sidenav.open .nav-user {
        opacity: 1;
        transform: translateY(0);
    }

    .nav-section .header {
        display: flex;
        align-items: center;
        gap: 10px;
        padding-bottom: 8px;
        font-size: 0.9rem;
        color: rgba(200, 200, 200, 0.7);
        border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    }

    .nav-item {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 12px 0;
        font-size: 0.9rem;
        color: var(--text-color);
        cursor: pointer;
        background: transparent;
        border: none;
        text-decoration: none;
    }

    .nav-item:hover span,
    .nav-item:hover i {
        color: rgba(200, 200, 200, 0.7);
    }

    /* ===== USER BOX ===== */
    .nav-user {
        position: relative;
    }

    .nav-user-box {
        position: absolute;
        left: 0;
        bottom: -10px;
        width: 100%;
        background: rgba(49, 0, 0, 0.9);
        backdrop-filter: blur(10px);
        padding: 10px 20px;
        box-shadow: 0 0 8px rgba(0, 0, 0, 0.8);
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease;
    }

    .nav-user:hover .nav-user-box {
        opacity: 1;
        visibility: visible;
    }


}

.subnav {
    display: flex;
    width: 100%;
    gap: 20px;
    justify-content: end;
}

.page-nav {
    position: relative;
    display: inline-block;
}

.page-nav-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    border-color: var(--primary-color);
}

.page-nav-toggle i.bi{
    display: inline-block;
    transform-origin: center;
    transform: rotate(0deg);
    transition: all 0.3s ease;
}

.page-nav-toggle.active i.bi {
    transform: rotate(180deg);
}

.page-nav-box {
    position: absolute;
    top: calc(100% + 2px);
    right: 0;
    min-width: 180px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    border-radius: 6px;
    padding: 8px 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 1000;

    /* ANIMACE */
    max-height: 0;
    opacity: 0;
    visibility: hidden;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.25s ease;
}

.page-nav-box.show {
    max-height: 1000px;
    opacity: 1;
    visibility: visible;
}

.page-nav-link {
    display: block;
    padding: 8px 14px;
    font-size: 1rem;
    color: var(--text-color);
    text-decoration: none;
    transition: background 0.15s;
}

.page-nav-link:hover {
    background: rgba(0, 0, 0, 0.35);
}

.page-nav-link {
    width: 100%;
}

@media screen and (max-width: 1199px) {
    .subnav {
        flex-direction: column;
    }

    .page-nav .btn-link {
        width: 90%;
        margin-left: auto;
        margin-right: auto;
    }

    .page-nav-box {
        width: 90%;
        left: 5%;
    }
}