/* --- ESTILOS BASE ESCRITORIO --- */
.aostmm-nav-wrapper {
    position: relative;
}
.aostmm-nav-wrapper a {
    text-decoration: none !important;
}
.aostmm-mobile-toggle {
    display: none;
}
.aostmm-nav {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}
.aostmm-menu-item {
    position: relative;
    list-style: none;
}
.aostmm-menu-item > a {
    display: block;
    padding: 10px 15px;
    white-space: nowrap;
    position: relative;
}
.aostmm-menu-item .dashicons {
    margin-right: 5px;
    vertical-align: middle;
}
.aostmm-mega-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1000;
    border: 1px solid #ddd;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}
.aostmm-menu-item:hover > .aostmm-mega-menu {
    display: flex;
}
.aostmm-mega-menu.no-content {
    min-width: auto !important;
    width: fit-content;
    padding: 0;
}
.aostmm-mega-menu.no-content .aostmm-tabs-nav {
    padding: 10px;
    border-right: none;
}
.layout--horizontal .aostmm-mega-menu {
    flex-direction: column;
}
.layout--horizontal .aostmm-tabs-nav {
    display: flex;
    flex-direction: row;
    border-bottom: 1px solid #eee;
}
.layout--vertical .aostmm-mega-menu {
    flex-direction: row;
}
.layout--vertical .aostmm-tabs-nav {
    display: flex;
    flex-direction: column;
    border-right: 1px solid #eee;
    min-width: 180px;
}
.aostmm-tabs-nav a {
    padding: 10px 15px;
    display: block;
    border: 1px solid transparent;
    position: relative;
}
.layout--horizontal .aostmm-tabs-nav a {
    border-bottom: 0;
}
.layout--vertical .aostmm-tabs-nav a {
    border-right: 0;
}
.aostmm-tabs-content {
    padding: 20px;
    flex-grow: 1;
}
.aostmm-tab-pane {
    display: none;
}
.aostmm-tab-pane.active {
    display: block;
}
.aostmm-content-columns {
    display: flex;
    gap: 20px;
    flex-wrap: wrap; 
}
.aostmm-column {
    flex: 1 0 200px;
    min-width: 0;
}
.aostmm-tab-pane ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
.aostmm-tab-pane ul li {
    position: relative;

}
.aostmm-tab-pane ul > li > a {
    display: block;
    position: relative; 
}
.aostmm-sublink-list {
    padding-left: 20px;
}
.aostmm-sublink-list li {
    margin-bottom: 4px;
}
.aostmm-sublink-list a {
    font-weight: normal;
}
/* --- ESTILOS PARA LA OPCIÓN "SOLO ICONO" --- */
.aostmm-nav-wrapper a.icon-only .aostmm-menu-title {
    /* Esconde el texto del título cuando el enlace tiene la clase 'icon-only' */
    display: none !important;
}

.aostmm-nav-wrapper a.icon-only .dashicons {
    /* Elimina el margen derecho del icono cuando se muestra solo */
    margin-right: 0 !important;
}

/* --- ESTILOS RESPONSIVE (BREAKPOINT MÓVIL) --- */
@media (max-width: 768px) {
    .aostmm-nav-wrapper {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        min-height: 50px;
    }
    .aostmm-mobile-toggle {
        display: block;
        background: none;
        border: none;
        padding: 10px;
        cursor: pointer;
        z-index: 1001;
        position: -webkit-sticky;
        position: sticky;
        top: 10px;
        right: 10px;
        margin-left: auto;
    }
    .aostmm-mobile-toggle span {
        display: block;
        width: 25px;
        height: 3px;
        margin: 5px 0;
        transition: all 0.3s ease-in-out;
    }
    .mobile-menu-open .aostmm-mobile-toggle span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    .mobile-menu-open .aostmm-mobile-toggle span:nth-child(2) {
        opacity: 0;
    }
    .mobile-menu-open .aostmm-mobile-toggle span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
    .aostmm-nav-container {
        display: none;
        width: 100%;
        background-color: inherit;
        max-height: calc(100vh - 70px);
        overflow-y: auto;
    }
    .mobile-menu-open .aostmm-nav-container {
        display: block;
    }
    .aostmm-nav, .layout--vertical .aostmm-nav {
        flex-direction: column;
        width: 100%;
    }
    .aostmm-menu-item {
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    .aostmm-menu-item:last-child {
        border-bottom: none;
    }
    .aostmm-menu-item:hover > .aostmm-mega-menu {
        display: none;
    }
    .aostmm-menu-item.active > .aostmm-mega-menu {
        display: flex;
    }
    .aostmm-mega-menu, .layout--vertical .aostmm-mega-menu, .layout--horizontal .aostmm-mega-menu {
        position: static;
        display: none;
        box-shadow: none;
        border: none;
        padding: 0 0 0 20px;
        background: rgba(0,0,0,0.1);
        width: 100%;
        flex-direction: column;
    }
    .aostmm-tabs-nav, .layout--vertical .aostmm-tabs-nav, .layout--horizontal .aostmm-tabs-nav {
        flex-direction: column;
        border: none;
        padding: 10px 0;
        width: 100%;
    }
    .aostmm-tabs-nav a {
        border: none !important;
        margin: 0;
        border-radius: 0;
    }
    .aostmm-tabs-content {
        padding: 0 0 10px 20px;
    }
    .aostmm-content-columns {
        flex-direction: column;
        gap: 0;
    }
    .aostmm-menu-item-has-children > a::after,
    .aostmm-tab-link.has-children::after,
    .aostmm-column > ul > li.has-children > a::after {
        content: '+';
        position: absolute;
        right: 15px;
        top: 50%;
        transform: translateY(-50%);
        font-size: 1.5em;
        font-weight: bold;
        color: inherit;
    }
    .aostmm-menu-item-has-children.active > a::after,
    .aostmm-tab-link.has-children.active::after,
    .aostmm-column > ul > li.has-children.active > a::after {
        content: '−';
    }
    .aostmm-menu-item.active > a, 
    .aostmm-tab-link.active,
    .aostmm-column > ul > li.active > a {
    }
    .aostmm-sublink-list {
        display: none;
        padding-left: 15px;
        background: rgba(0,0,0,0.05);
    }
    .aostmm-column > ul > li.active > .aostmm-sublink-list {
        display: block;
    }
}
