@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap');

:root {
    --menu-width: 80vw;
    --menu-max-width: 20rem;
    --menu-height: 100vh;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.hamburger {
    position: relative;
    width: 1.25rem;
    height: 1.25rem;
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.1875rem;
    z-index: 1001;
    padding: 0;
}

.hamburger hr {
    width: 100%;
    height: 0.125rem;
    background-color: var(--text-primary);
    border: none;
    transition: all 0.3s ease-in-out;
    transform-origin: center;
    margin: 0;
}

.hamburger[aria-expanded="true"] .linha1 {
    position: absolute;
    transform: rotate(45deg);
}

.hamburger[aria-expanded="true"] .linha2 {
    opacity: 0;
}

.hamburger[aria-expanded="true"] .linha3 {
    position: absolute;
    transform: rotate(-45deg);
}

.opcoes {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--menu-width);
    max-width: var(--menu-max-width);
    height: var(--menu-height);
    background-color: var(--bg-menu);
    z-index: 1000;
    color: var(--text-primary);
    padding: 0;
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform 0.3s ease-out;
}

.opcoes.is-open {
    transform: translateX(0);
}

.opcoes .plogo {
    width: 0.875rem;
    height: auto;
    display: block;
    position: absolute;
    top: 0.8125rem;
    right: 0.8125rem;
    cursor: pointer;
    z-index: 10;
}

.opcoes .user {
    width: 3.5rem;
    height: 3.5rem;
    display: block;
    margin: 2.5rem auto 0.5rem;
    border-radius: 50%;
}

.menu-content {
    margin-top: 0;
    padding: 0;
}

.perfil {
    margin-bottom: 1.25rem;
    text-align: center;
    padding: 0 0.8125rem;
    background-color: var(--border-light);
    padding-top: 0.5rem;
    padding-bottom: 0.8125rem;
}

.nome {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.375rem;
    color: var(--text-primary);
}

.conta {
    font-size: 0.75rem;
    color: var(--accent-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.conta:hover {
    color: var(--accent-hover);
}

.categorias {
    margin-bottom: 0;
    padding: 0;
}

.tit {
    font-size: 0.8125rem;
    margin-bottom: 0;
    color: var(--text-primary);
    font-weight: 600;
    padding: 0.625rem 0.8125rem 0.4375rem;
    background-color: var(--border-light);
}

.menu-principal {
    list-style: none;
    padding: 0;
    margin: 0;
}

.menu-item {
    border-bottom: 0.0625rem solid var(--border-light);
}

.menu-item > a,
.linkhp {
    display: block;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.75rem;
    padding: 0.78125rem 0.8125rem;
    transition: background-color 0.3s ease;
    position: relative;
}

.menu-item > a:hover,
.linkhp:hover {
    background-color: var(--border-light);
}

.linkhp {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.seta {
    font-size: 1.125rem;
    font-style: normal;
    transition: transform 0.3s ease;
}

.linkhp[aria-expanded="true"] .seta {
    transform: rotate(90deg);
}

.submenu {
    list-style: none;
    padding: 0;
    margin: 0;
    background-color: var(--bg-submenu);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.submenu.is-visible {
    max-height: 23.75rem;
}

.submenu li {
    border-bottom: 0.0625rem solid var(--border-light);
}

.submenu a {
    display: block;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.6875rem;
    padding: 0.625rem 1.25rem;
    transition: background-color 0.3s ease;
}

.submenu a:hover {
    background-color: var(--border-light);
    color: var(--text-primary);
}

.outro {
    margin: 0;
    padding: 0.625rem 0 0 0;
    background-color: var(--bg-submenu);
    width: 100%;
    list-style: none;
    border-top: 0.0625rem solid var(--border-light);
}

.outro .menu-item {
    border-bottom: 0.0625rem solid var(--border-light);
}

.outro a {
    display: block;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.6875rem;
    padding: 0.625rem 0.8125rem;
    transition: color 0.3s ease;
}

.outro a:hover {
    color: var(--text-primary);
}

.theme-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.625rem 0.8125rem;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.6875rem;
    cursor: pointer;
    transition: color 0.3s ease, background-color 0.3s ease;
    font-family: 'Inter', sans-serif;
    text-align: left;
}

.theme-toggle:hover {
    color: var(--text-primary);
    background-color: var(--border-light);
}

.theme-icon {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
}

.theme-text {
    flex-grow: 1;
}

.opcoes footer {
    margin: 0;
    background-color: var(--bg-submenu);
    width: 100%;
    padding: 0;
}

.opcoes.is-open::before {
    content: none;
}

.desktop-navigation {
    display: none;
}

@media (min-width: 901px) {
    :root {
        --menu-width: 20rem;
        --menu-max-width: 20rem;
    }

    .opcoes {
        padding: 0;
    }

    .opcoes .plogo {
        width: 1.25rem;
        top: 1.5rem;
        right: 1.0625rem;
    }

    .opcoes .user {
        width: 4.75rem;
        height: 4.75rem;
        margin-bottom: 0.9375rem;
    }

    .nome {
        font-size: 1.125rem;
    }

    .conta {
        font-size: 0.9375rem;
    }

    .tit {
        font-size: 1rem;
    }

    .menu-item > a,
    .linkhp {
        font-size: 0.9375rem;
        padding: 0.9375rem 1.0625rem;
    }

    .submenu a {
        font-size: 0.875rem;
        padding: 0.875rem 1.625rem;
    }

    .outro a,
    .theme-toggle {
        font-size: 0.875rem;
        padding: 0.875rem 1.0625rem;
    }

    .theme-icon {
        width: 1.25rem;
        height: 1.25rem;
    }

    .opcoes.is-open::before {
        content: '';
        position: fixed;
        top: 0;
        left: var(--menu-width);
        right: 0;
        bottom: 0;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: -1;
    }
}

@media (min-width: 1400px) {
    .hamburger,
    .opcoes {
        display: none;
    }

    .desktop-navigation {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 1.5rem;
        min-height: 3.75rem;
        padding: 0.625rem 5%;
        background-color: var(--bg-header);
        border-top: 1px solid rgba(255, 255, 255, 0.14);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    }

    .desktop-nav-links,
    .desktop-nav-actions {
        display: flex;
        align-items: center;
        gap: 0.375rem;
        list-style: none;
        margin: 0;
        padding: 0;
    }

    .desktop-nav-links {
        flex: 1;
        min-width: 0;
        flex-wrap: wrap;
    }

    .desktop-nav-actions {
        gap: 0.625rem;
    }

    .desktop-nav-link {
        display: inline-flex;
        align-items: center;
        min-height: 2.5rem;
        padding: 0 0.875rem;
        border-radius: 999px;
        color: #ffffff;
        font-size: 0.875rem;
        text-decoration: none;
        white-space: nowrap;
        transition: background-color 0.2s ease;
    }

    .desktop-nav-link:hover {
        background-color: rgba(255, 255, 255, 0.12);
        text-decoration: none;
    }

    .desktop-navigation a:focus-visible,
    .desktop-navigation button:focus-visible {
        outline: 2px solid #ffffff;
        outline-offset: 3px;
    }

    .desktop-nav-greeting {
        padding: 0 0.5rem;
        color: rgba(255, 255, 255, 0.85);
        font-size: 0.875rem;
        white-space: nowrap;
    }

    .desktop-account-link {
        border: 1px solid rgba(255, 255, 255, 0.25);
        background-color: rgba(255, 255, 255, 0.08);
        font-weight: 500;
    }

    .desktop-account-link:hover {
        background-color: rgba(255, 255, 255, 0.18);
    }

    .desktop-navigation .theme-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: auto;
        min-height: 2.5rem;
        gap: 0.5rem;
        padding: 0 0.875rem;
        border: 1px solid rgba(255, 255, 255, 0.25);
        border-radius: 999px;
        background-color: rgba(255, 255, 255, 0.08);
        color: #ffffff;
        font-size: 0.875rem;
        white-space: nowrap;
    }

    .desktop-navigation .theme-toggle:hover {
        background-color: rgba(255, 255, 255, 0.18);
    }
}