.navbar {
    position: absolute;
    top: 0;
    width: 100%;
    background: rgb(var(--color-white) / 0);
    transition: background-color 0.15s ease-in;
    border-bottom: var(--border-white);
    padding: var(--space-6) 0 var(--space-5);
    z-index: 9999;

    > .navbar-container {
        display: flex;
        justify-content: space-between;
        height: 60px;
        padding: 0 var(--space-5);

        > .navbar-logo {
            margin-right: var(--space-8);
            height: 100%;

            > img {
                display: inline-block;
                height: 100%;
            }
        }

        > .navbar-hamburger-menu {
            display: none;
            color: rgb(var(--color-white));
        }

        > .navbar-menu-container {
            display: flex;

            > .navbar-menu {
                display: flex;
                flex: 1;
                gap: var(--space-4);
                align-items: center;

                > .navbar-menu-item {
                    flex: 1;
                    text-align: center;

                    > a {
                        width: 100%;
                        display: inline-block;
                        padding: var(--space-3) var(--space-5);
                        text-transform: uppercase;
                        color: rgb(var(--color-white));
                        font-size: var(--font-size-s);
                        font-family: var(--font-main), sans-serif;

                        &:hover,
                        &.active {
                            outline: var(--border-white);
                            border-radius: var(--border-radius-sm);
                            background-color: rgba(var(--color-white) / var(--opacity-100));
                        }
                    }
                }
            }
        }
    }
}

@media (max-width: 820px) {
    .navbar {
        > .navbar-container {
            > .navbar-hamburger-menu {
                padding: var(--space-4);
                display: flex;
                align-items: center;
                justify-content: center;

                > input {
                    position: absolute;
                    width: 1px;
                    height: 1px;
                    margin: -1px;
                    padding: 0;
                    overflow: hidden;
                    clip: rect(0, 0, 0, 0);
                    border: 0;
                }

                > label {
                    display: flex;
                    align-items: center;
                    justify-content: center;

                    > i {
                        font-size: 24px;
                    }
                }

                &:hover,
                &:focus-within {
                    outline: var(--border-white);
                    border-radius: var(--border-radius-sm);
                    background-color: rgba(var(--color-white) / var(--opacity-100));
                }
            }

            > .navbar-menu-container {
                position: absolute;
                top: 100%;
                left: 0;
                right: 0;
                background-color: rgba(var(--color-primary));
                visibility: hidden;
                opacity: 0;
                max-height: 0;
                overflow: hidden;
                transition: max-height 0.3s ease-in,
                            opacity 0.3s ease-in,
                            visibility 0s linear 0.3s;

                > .navbar-menu {
                    width: 100%;
                    display: flex;
                    flex-direction: column;
                    align-items: center;
                    justify-content: center;
                    padding: var(--space-4) 0;

                    > .navbar-menu-item {
                        width: 100%;
                        text-transform: uppercase;
                        text-align: left;

                        > a {
                            width: 100%;
                            padding: var(--space-2) var(--space-5) ;
                            display: inline-block;
                            color: rgb(var(--color-white));
                            font-size: var(--font-size-s);
                            font-weight: var(--font-weight-bold);
                            font-family: var(--font-main), sans-serif;

                            &:hover,
                            &.active {
                                background-color: rgb(var(--color-white) / var(--opacity-100));
                            }
                        }
                    }
                }
            }
        }

        &:has(#navbar-hamburg:checked) {
            background-color: rgba(var(--color-primary));
            transition: background-color 0.15s ease-out;

            > .navbar-container > .navbar-menu-container {
                visibility: visible;
                opacity: 1;
                max-height: 800px;
                transition: max-height 0.3s ease-out,
                            opacity 0.3s ease-out,
                            visibility 0s;
            }
        }
    }
}
