/* === MOBILE: Submenu padrão (nível 1) === */
.mob-submenu {
    position: relative;
    width: 100%;
    background-color: white;
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.3s ease;
    display: flex;
    flex-direction: column;
}

/* Quando visível */
.mob-menu-item.active>.mob-submenu {
    max-height: 1000px;
    /* suficiente para o conteúdo expandir */
}

/* Estilização dos links internos */
.mob-submenu li a {
    padding: 8px 16px 8px 32px;
}

/* === MOBILE: Submenu aninhado (nível 2) === */
.mob-nested-submenu {
    position: relative;
    width: 100%;
    background-color: white;
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.3s ease;
    display: flex;
    flex-direction: column;
    padding-left: 16px;
}

/* Quando visível */
.mob-submenu-item.active>.mob-nested-submenu {
    max-height: 1000px;
}

/* Estilo dos links de segundo nível */
.mob-nested-submenu li a {
    padding: 8px 16px 8px 48px;
}

/* === MOBILE MENU === */
.mob-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 300px;
    height: 100%;
    background-color: white;
    z-index: 50;
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
    display: none;
}

.mob-menu.active {
    transform: translateX(0);
    display: block;
}

.mob-menu-item {
    position: relative;
    width: 100%;
}

.mob-menu-item a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    width: 100%;
    text-decoration: none;
    color: inherit;
}

.mob-submenu {
    position: relative;
    width: 100%;
    background-color: white;
    transition: all 0.3s ease;
    max-height: 0;
    overflow: hidden;
}

.mob-submenu.active {
    max-height: 1000px;
}

.mob-submenu li a {
    padding-left: 32px;
}

/* Ícone de seta */
.mob-expand-icon {
    transition: transform 0.3s ease;
}

.mob-menu-item.active .mob-expand-icon {
    transform: rotate(180deg);
}

/* Ícone de chevron */
.mob-chevron-icon {
    transition: transform 0.3s ease;
}

.mob-submenu-item.active .mob-chevron-icon {
    transform: rotate(90deg);
}

/* Botão de menu (hamburger) */
#mob-menu-button {
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1000;
}

/* Botão de fechar */
#mob-close-menu {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

/* Overlay */
.mob-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 40;
    display: none;
}

.mob-menu-overlay.active {
    display: block;
}

/* === DESKTOP MENU === (mantido original) */

/* Nível 1 */
.main-menu-item {
    position: relative;
}

.main-submenu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: white;
    min-width: 200px;
    box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.2);
    z-index: 100;
}

.main-menu-item:hover>.main-submenu {
    display: block;
}

/* Nível 2 (submenu dentro de submenu) */
.submenu-parent {
    position: relative;
}

.nested-submenu {
    display: none;
    position: absolute;
    top: 0;
    left: 100%;
    background-color: white;
    min-width: 200px;
    box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.2);
    z-index: 110;
}

/* Só mostra submenu se estiver sobre o link pai */
.submenu-parent:hover>a+.nested-submenu {
    display: block;
}

/* Links */
.main-submenu li a {
    padding: 8px 16px;
    display: block;
    white-space: nowrap;
    color: inherit;
    text-decoration: none;
}

.main-submenu li a:hover {
    background-color: white;
}